I've got a JUnit 4 test suite that contains a number of test classes in the order they need to be run (our Integration tests need to be run in a certain order).
If I use the maven-failsafe-plugin without any configuration it will run the test but not in the correct order. However, If I set the plugin to run the test suite no tests are run.
Is it possible to run a test suite using the failsafe plugin? if so, where have I gone wrong!!
The code is below:
@RunWith(Suite.class)
@SuiteClasses({
TestCase1.class,
TestCase2.class,
...
TestCaseN.class,
})
public class IntegrationSuite {
//Do Nothing.
}
and from pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.9</version>
<configuration>
<includes>
<include>IntegrationSuite.java</include>
</includes>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
Thanks :)