-
Notifications
You must be signed in to change notification settings - Fork 71
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
Implement failure reporting #91
Conversation
Sorry, only saw now that there is another PR pending implementing result reporting on |
Thanks for the contribution! The preferred approach has been discussed here: #84 (comment). I think with a little rework your PR can solve this issue. 😄 |
yeah, that's easy enough to implement. So I guess this means we want it to report that new Only remaining question then would be whether to implement that reporting on the |
Not duplicating the count is the best option. Other APIs can be refactored later. Ideally counting things would be functionally separate to the event handlers, as they exist to enable pretty output, XUnit and other 'outputters', and should not have to care about reimplementing the counting logic, as it must be the same anyway. Perhaps some kind of counter type can be passed around with an |
@bbqsrc what do you think about this way? |
Can you rebase onto the current |
821fffd
to
cb93416
Compare
Nice. 😄 Any other changes or do you think it's ready? |
Should be good to go :) . |
Thanks! Only thing left from my original suggestion is a |
Currently when running
Cucumber..run()
nothing it reported back to the caller. This changes this behavior by making the result value aresult
with either()
in the regular case (arguably could be the number of successes or something) andu64
if any errors have been found. This number also equals the total number of failure found.To implement this a handy function
failed()
is added to the various events allowing for checking down the tree whether the currently reported item reports a failure or not. All functions have minimal rustdoc documentation added.