Calling a scenario within a step #48
-
Hi! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
So I can think of a few ways to do this cleanly. One is using Background with your Gherkin, it allows you to define a set of steps that should happen before every scenario. You could also extract your steps to functions, and then call those functions as needed. Finally, you can use hooks as a way to execute logic before a scenario runs. All of these should give you the behavior you desire. |
Beta Was this translation helpful? Give feedback.
So I can think of a few ways to do this cleanly. One is using Background with your Gherkin, it allows you to define a set of steps that should happen before every scenario.
You could also extract your steps to functions, and then call those functions as needed.
Finally, you can use hooks as a way to execute logic before a scenario runs.
All of these should give you the behavior you desire.