Use annotation specifying the scenario type

@BeforeScenario(uponType=ScenarioType.EXAMPLE)

Cheers

On 24/01/2014 23:14, Corbin, J.D. wrote:
We are using the tabular scenario format to run multiple sets of data through a single jbehave scenario using the Examples: tabular format.

We are using a custom scenario scope that has our global scenario state. Using this approach, we get a new instance of our global state object at the beginning of each scenario which is what we want.

The problem is that there is some state we'd like to reset in between the tabular runs for the scenario but I don't see where to inject some behavior into JBehave. JBehave doesn't treat each run as a new scenario, just runs the new set of parameterized data through the same scenario instance, so we cannot figure out where to reset the state in between the runs. We have gotten around this by resetting the state in one of the steps of the scenario but this is not ideal because its possible that this step is used in other scenarios and we don't necessary want this state reset in those cases.

Is there such a thing as tabular scope or some place we can introduce some behavior in between parameterized runs of a single scenario?

J.D.




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to