bgarrels / spock

Automatically exported from code.google.com/p/spock
0 stars 0 forks source link

Stepwise annotation should be configurable to continue execution in case of failure #334

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Describe the enhancement you have in mind.

Currently Stepwise annotation executes the feature in sequential order.
It also fails the other feature which are following a failed feature.
Its good to have a configuration that will allow users to continue execution of 
other feature even when there is a failure.

Which particular problem would this enhancement solve for you?

There are many scenarios where this feature can be used. In my case I have the 
following scenario:
We need to create test-data only when we have a new application setup.
Currently we had defined a spock spec to create this test-data so that we can 
know whether its successful or not.
In our case we have to first create users and then use the said users for 
uploading test-data. Its ok if one of the user does not get created int he 
earlier feature but atleast for other users the data should get uploaded in the 
following feature.

Please provide any additional information below. You can also assign
labels.

Original issue reported on code.google.com by menon1...@gmail.com on 24 Oct 2013 at 8:43

GoogleCodeExporter commented 9 years ago
Just don't use `@Stepwise` then. Execution is sequential nevertheless. This 
might change in case Spock itself ever gets some parallel execution support, 
but for now you'll be fine.

Original comment by pnied...@gmail.com on 24 Oct 2013 at 8:47

GoogleCodeExporter commented 9 years ago
Thanks for the response.  I didnt know that by default its sequential, since 
spock uses Junit I though it is sorted alphabetically.

Original comment by menon1...@gmail.com on 24 Oct 2013 at 8:54

GoogleCodeExporter commented 9 years ago
Spock just uses JUnit as a means to integrate with tooling. Execution of a spec 
is fully under Spock's control, and Spock does execute features in their 
declared order.

Original comment by pnied...@gmail.com on 24 Oct 2013 at 8:57