Forum Discussion
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
- 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
Recent Discussions
- 5 months agopz1502
- 5 months agoraja110199