Forum Discussion
Hello,
Could you please give us more details for us to be able to reproduce your scenario?
Which cucumber are you using? Which version?
I am using cucumber 6.8.0 version.
Whenever I am executing in parallel threads using core.cli.main if an example under a scenario fails. All the examples in that scenario are treated as failed. Which is wrong. I am using scenario.getstatus(). Is there any way to determine each example status when running cucumber tests in parallel
- aurelien-reeves4 years agoStaff
Do you confirm you are using cucumber-jvm (cucumber for java)?
Did you try updating to cucumber-jvm to the latest - at the moment 6.10.2?
If it is still happening, I would suggest to open an issue on cucumber-jvm issue tracker: https://github.com/cucumber/cucumber-jvm/issues
- KaranRaju4 years agoNew ContributorI just wanted to know whether there is any method to determine individual example status instead of scenario status.
- aurelien-reeves4 years agoStaff
Ok, thanks for the clarification.
This is actually not supported by Cucumber.
Would you need that for altering the state while your test is executing? Or for reporting purpose?
If you want to alter the state of your test execution, this is actually a bad idea. It is good testing practices to start from a clean state for each and every executed test.
If this is for reporting purpose, hooks are not the good tools for that. As you can see there: https://github.com/cucumber/cucumber-jvm/blob/a64adbe2264dab2d4a5ee0f2d92d1b193b800a18/java/src/main/java/io/cucumber/java/Scenario.java, a custom formatter using the plugin system would be a better choice.
Related Content
- 6 years ago
- 6 months ago