public class MyTestSuite extends TestSuite {
// Since Eclipse launches tests relative to the project root,
// declare the relative path to the test scripts for convenience
private static final String TEST_ROOT = "src/test/com/foo/bar/";
public static TestSuite suite() throws Exception {
TestSuite suite = new TestSuite();
GroovyTestSuite gsuite = new GroovyTestSuite();
suite.addTestSuite(FooTest.class); // non-groovy test cases welcome, too.
suite.addTestSuite(gsuite.compile(TEST_ROOT + "BarTest.groovy"));
suite.addTestSuite(gsuite.compile(TEST_ROOT + "FooFactoryTest.groovy"));
suite.addTestSuite(gsuite.compile(TEST_ROOT + "BaazTest.groovy"));
return suite;
}
}
Does Spock have any Test Suite support like this?
If not, is there any way to specify what order the specs run in beside alphabetical?
I am using IntelliJ.
Do you have an example of JUnit 4 test suite for Spock tests and the
accompanying Command line and VM Parameters for the IntelliJ project?
Currently I use these inputs:
Command line: test-app functional: -echoOut
VM Parameters: -DbaseURL= -Dgeb.driver=<driver?
This would really help me a lot!
--Thanks,
Brian
<quote author="Peter Niederwieser">
Cheers,
Peter
--
You received this message because you are subscribed to the Google Groups
"Spock Framework - User" group.
To post to this group, send email to spockfr...@googlegroups.com.
To unsubscribe from this group, send email to
spockframewor...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/spockframework?hl=en.
--
View this message in context: http://spock-framework.3207229.n2.nabble.com/Does-Spock-have-any-Test-Suite-support-tp6170800p6173976.html
Personally, I've never had the need for test suites. Instead I use the features provided by my build tool and IDE to run a particular subset of tests. The Grails command line also allows you to do this, but I don't know what the state of IDE integration is.
Cheers,
Peter
The Grails way of doing this is to arrange your “suites” into packages, then invoke what you like by targeting.
Let's say you have two packages, one for the functional tests for admin related tasks and one for cart tasks.
// Run all tests in the “admin” package
grails test-app functional: admin.**.*
// Run all tests in the “cart” package
grails test-app functional: cart.**.*
If this is not satisfactory, then please raise your query on the Grails list as this is specific to Grails.