tags:

views:

103

answers:

2

Is there a BeforeStep equivalent to AfterStep in Cucumber?

If not - has anyone found a solution / workaround?

A: 

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.

Alex Kahn
A: 

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.

Voldy