How run spock test classes in spec order? (Spring Boot, Gradle)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How run spock test classes in spec order? (Spring Boot, Gradle)

Иван Тимошенко
How run spock test classes in spec order? (Spring Boot, Gradle)
I have structure like this:
AbstractTest
Test1 extends AbstractTest
Test2 extends AbstractTest
Test3 extends AbstractTest

How I could run Test1 Test2 Test3 in this order?

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/spockframework.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How run spock test classes in spec order? (Spring Boot, Gradle)

alpheratz
I do it like this:

///
package myapp

import org.junit.runner.RunWith
import org.junit.runners.Suite.SuiteClasses

@RunWith(org.junit.runners.Suite)
@SuiteClasses([Test1, Test2, Test3])
class Suite {}
///

And in Gradle, I have:

///
test {
    scanForTestClasses = false
    include '*/**/Suite*'
    ...
}
///

--
You received this message because you are subscribed to the Google Groups "Spock Framework - User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/spockframework.
For more options, visit https://groups.google.com/d/optout.
Loading...