-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add exception to TestStepFinished TestRunFinished #122
Conversation
I think it's okay at least from a JS persective. We can always provide a generic fallback if those fields are not present? You mentioned the flatness of the structure before, I guess the alternative would be an |
Good one. There are some proposals to add more information about exceptions. |
7146e42
to
de53083
Compare
I've added an Exception object with |
What's the use case for the exception on |
To inform about exceptions that didn't happen in steps or global hooks. For example in Cucumber JVM this would be related to creating the dependency injection container. Cucumbers execution model can be seen as a tree of containers. Each container has a started and finished event. Each finished event should have an exception for exceptions that occurred in that container. |
🤔 What's changed?
To implement a message based JUnit XML Formatter (cucumber/junit-xml-formatter#3) we need to know the class and message of the exception that caused the scenario to fail. This information is often included implicitly in the
message
field but can not be reliably extracted.For example if a scenario failed duo to a assertion exception the failure should be rendered as:
Currently however we can only render the stack trace part. The other information is not available.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
Is this generic enough to work in other languages?
📋 Checklist: