I have a JUnit 4 test suite that contains several test classes in the order in which they should be run (our integration tests must run in a specific order).
If I use the maven-fail-safe plugin without any configuration, it will run the test, but not in the correct order. However, if I installed the plugin to run the test suite, the tests will not run.
Can I run a test suite using a secure plugin? if so, where did I go wrong!
Code below:
@RunWith(Suite.class) @SuiteClasses({ TestCase1.class, TestCase2.class, ... TestCaseN.class, }) public class IntegrationSuite {
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:)
source share