I have many scenarios with Examples. In case of failure for an "Example", JBehave stop executing the scenario for remaining list of examples. e.g.
Given a record with classification When I view the page Then I see the record has type
Examples: |classification|type| |classification_1|type_1| |classification_2|type_2| |classification_3|type_3| |classification_4|type_4|
If the scenario fails for
|classification_2|type_2|
then it will not execute 3 and 4. Is there a way to configure JBehave to execute all the examples even in cas of failures?
Thanks.
After debugging with JBehave source code, looks like it is not possible. In StoryRunner class, in case of failure it uses instance of "SomethingHappened implements State
" which doesn't look at any strategy just does the following:
StepResult result = step.doNotPerform(scenarioFailure);
result.describeTo(reporter.get());
Hence we see step NOT PERFORMED in the report.
I wish I'm wrong and somebody more knowledgeable can correct me.