Query:How to Define TestSuite in spock #2054
-
I am using spock in my grails project. I wan to run the test classes in a sequence order. When I run all the test cases in a package it runs randomly. I am using linux os. How can we run the test classes in a sequence order. Or How to define test suit in spock . |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Spock is realized by a custom JUnit runner on the base class |
Beta Was this translation helpful? Give feedback.
-
in the spock 1.x import org.junit.runner.RunWith @RunWith(Suite.class) } it work good. |
Beta Was this translation helpful? Give feedback.
-
Spock 2.x is a JUnit 5 Platform engine. |
Beta Was this translation helpful? Give feedback.
Spock 2.x is a JUnit 5 Platform engine.
Just use the JUnit Platform Suite engine to define the Suite.
Works fine with Spock and any other engine.
https://junit.org/junit5/docs/current/user-guide/#junit-platform-suite-engine