If your tests need to setup some data before running or the actions performed in a test modify the datastore you obviously want to clear the changes after the test has run so that next test can start with a clean datastore. There is a @ModifiesDatastore
Spock extension available as a part of the library that comes to your rescue in such situations.
If you annotate a feature method then datastore will be cleaned up every time after your feature has been executed. See ModifiesDatastoreOnFeatureSpec
for an example.
If you annotate a non-stepwise specification then datastore will be cleaned up after every feature execution in that specification. See ModifiesDatastoreOnSpecSpec
for an example.
If you annotate a stepwise specification then datastore will be cleaned up only after the execution of the last feature in that specification. See ModifiesDatastoreOnStepwiseSpecSpec
for an example.
Gaelyk Functional Test Tools Documentation - 0.2 - December, 2012
Licensed under the Apache License, Version 2.0