Is there a BeforeStep equivalent to AfterStep in Cucumber?
If not - has anyone found a solution / workaround?
Is there a BeforeStep equivalent to AfterStep in Cucumber?
If not - has anyone found a solution / workaround?
According to the documentation on Hooks on the Cucumber Wiki on GitHub, the answer is no. There is Before
but no BeforeStep
. Depending on what you are trying to achieve, Before
might do what you need.
So far as Before
is executed before each scenario and AfterStep
- after each step in scenario, to achieve BeforeStep you can simply place you code in both hooks: Before and AfterStep.