Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguous steps ruin reporting #1113

Closed
enkessler opened this issue May 24, 2017 · 8 comments · Fixed by #1132
Closed

Ambiguous steps ruin reporting #1113

enkessler opened this issue May 24, 2017 · 8 comments · Fixed by #1132
Assignees
Milestone

Comments

@enkessler
Copy link
Contributor

Summary

When ambiguous steps are encountered, Cucumber essentially crashes. No reports are generated and no other tests executed. It just dies.

Expected Behavior

All tests should be run and output generated as normal. Some tests might fail/be skipped/have undefined steps, etc. but they will at least get executed.

Current Behavior

As soon as an ambiguous step is encountered, Cucumber declares the ambiguity and then stops. It does not proceed to the next step or even output the results of the run. Using --guess will, naturally, remove this problem but the idea is to have failures due to ambiguous steps (e.g. when using --strict) be handled in a similar way to pending or undefined steps. That is to say, usefully.

Possible Solution

If I recall correctly, it didn't use to be this way and ambiguous steps were handled similarly to undefined/pending steps. Why did that change?

Steps to Reproduce (for bugs)

  1. Have a test with ambiguous steps
  2. Run it
  3. Watch Cucumber fail to fail gracefully

Here is a gist that will trigger the problem (run it one with --guess and once without in order to see the difference)

https://gist.github.com/enkessler/f351c4fd83f1b621789ad1d22cecb369

Context & Motivation

Ambiguous steps happen. Breaking the build happens. However, even a broken build needs useful output but ambiguous steps completely ruin that possibility by crashing the suite immediately.

Your Environment

  • Version used: 2.4.0
  • Operating System and version: OSX
  • Link to your project: N/A (private)
@mattwynne
Copy link
Member

Thanks for reporting @enkessler. Do you have time to add a scenario into our acceptance tests that reproduces this? That would be the first step to fixing it.

@enkessler
Copy link
Contributor Author

@mattwynne I'm a little short on time but I'll try. I've got some other projects to maintain and I'm trying to get them all ready for when I show up to CukenFest.

@brasmusson
Copy link
Contributor

brasmusson commented May 27, 2017

Cucumber-JS has "ambiguous" as a separate result type, which neither Cucumber-Ruby nor Cucumber-JVM have.

@enkessler
Copy link
Contributor Author

Step 1. Shamelessly steal from Cucumber-JS.
Step 2. Get it working in Ruby
Step 3. Profit.

:)

@enkessler
Copy link
Contributor Author

Step 0: Make the build work on Windows.

:(

@mattwynne
Copy link
Member

mattwynne commented May 28, 2017

Step 0: Make the build work on Windows.

Can you raise a separate ticket about that? With an error message?

@enkessler
Copy link
Contributor Author

#1115 opened. Links to the failing builds are included. Mind you, I don't necessarily know how to get them working any more than I know how to make ambiguous steps work. But, you know, I'm trying to do my part by keeping you lot informed. ;)

@lock
Copy link

lock bot commented Oct 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants