In my grails application I use Spock and Geb to perform functional tests.
Since all test run on the same database, I would like to provide order in which CRUDSpec classes being executed. How this can be specified?
Example
- First class tests blog author creation
- Second class, assuming first test run successfully, tests post creation
- Third class adds comments to the post
It turned out that order can be specified as follows:
Another example using packages from here:
The ultimate way to order tests with no-arg ‘grails test-app‘ is to name test classes alphabetically.