-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
cucumber --fail-fast switch #879
Comments
Hi @danascheider - thanks for the offer that sounds like a great idea. Please make sure you add an acceptance test in If you need any help with the implementation just give us a shout. |
Will do, thanks @mattwynne. |
@mattwynne - Am I correct in concluding that the CLI doesn't have access to the report object while the tests are running? I've been trying to have the runner check the report for failures while the suite is running, without much success. At first blush, it looks like the cucumber-ruby-core would have to be modified to allow that to happen, but intuitively that doesn't seem like a good idea, and I feel like the core and the CLI are better separated than that. Off the top of your head, is there something I'm missing, or would changing core be a valid implementation? |
Good question! The report is constructed here and we use the Does that make any sense? This code is still in a bit of a transitionary state as we tidy up post 2.0, so sorry it's not easier to navigate around. |
Thanks! I've actually found the code pretty easy to work with for the most part - it was just that one thing I was unclear on. |
@mattwynne - Would you suggest giving the aforementioned |
Don't even mention it @danascheider - we're all busy and any contribution is very much appreciated. It occurs to me that you could try setting the global If that doesn't work, show me what you mean with the output streams - I'm not quite following you at the moment. |
I did try that, and the result was that it exited immediately without further output. My basic question was, when I run the tests normally using On the other hand, when I run bundle exec cucumber --fail-fast , the final output looks like this (including the last of the dots):
CTRL+C out of it. I suppose I could just send the INT signal from the rescue block - the only reason I hadn't been doing that was because it seemed like exit status 1 would be more appropriate than 2. That would probably be the easiest way to implement this, so if you don't think the exit code is a big deal I'll just do that. Otherwise I'll see what else I can come up with.
|
Hi @danascheider - sorry for the lag. Can you put what you have in a PR and I can have a look at it? |
My turn to apologize for the lag, @mattwynne. I was about to make the PR when I noticed I had screwed something up in a major way, so I'll make the PR as soon as I fix it. Should be pretty quick. |
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. |
Any interest in adding a
--fail-fast
switch like RSpec has, that would cause Cucumber to exit after the current scenario if the scenario fails? I've thought on a number of occasions that this functionality would be useful, so unless somebody has deliberately decided not to include it, I'd be glad to make a PR.The text was updated successfully, but these errors were encountered: