Skip to content
Discussion options

You must be logged in to vote

Threads are reused. How exactly will depend whether you use JUnit 4, JUnit 5 or TestNG.

To share state between steps within a single scenario, it is recommended that you use dependency injection. Cucumber will ensure that each scenario has its own isolated object graph to work on. As long as you don't use static variables, or leak your state into a shared context or external system that should work just fine,

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by KptCheeseWhiz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants