-
-
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
fix undefined hook parameter #919
Conversation
Can we also get access to current (not only failed) scenario name? There can be several scenarios in one feature file and in addition to |
url + line uniquely identifies a scenario (or an example of a scenario outline) where the name is not guaranteed to be unique. |
I also like matching the event protocol data. Also with some of the ideas for how to view results in the future, I think we will stop saving screenshots to disk and start attaching them and thus let the formatter embed them in an html report. I believe some html reporters already do this. |
let message = testCase.sourceLocation.uri + ":" + testCase.sourceLocation.line + " " | ||
if (testCase.result.status === Status.FAILED) { | ||
message += "failed" | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need an else? seems like the test case only fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the same After hook as the previous scenario. I'll join the two scenarios into one
In reference to the scenario name, we also use it to register all of the step durations with our analytics system to track performance changes over time. We pretty much harvest all of the metadata about the scenario and record as dimensions, then use them to filter in our charting dashboards. I realize that maybe this type of thing might be better implemented as a reporter, but having the full fidelity of the results available in the hooks has been helpful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having only read it, it looks like it does what it says.
@kriswill yes please use one of the reporters for that. Ideally the support code is only used for running tests and then use reporters when you need more parts of data. The event protocol formatter gives pretty much everything |
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. |
resolves #891