Open sadasivaiahgoli opened 6 years ago
Spock is realized by a custom JUnit runner on the base class Specification
.
So I guess you can simply do it the normal JUnit way.
Have one class annotated with @RunWith(Suite)
and the @SuiteClasses
annotation
in the spock 1.x i use the case like :
import org.junit.runner.RunWith import org.junit.runners.Suite
@RunWith(Suite.class) @Suite.SuiteClasses([xxx.class,bbb.class]) public class Suite4AllTest {
}
it work good. But in the spock 2.x,it‘s bad。 i'm finding the way now.
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
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 .