I’m using Maven 3.0.3, Failsafe plugin v2.17 and JUnit 4.11. Currently I have an integration test with tests in the following order
@RunWith(SpringJUnit4ClassRunner.class)
public class MyTests {
    @Test
    public final void testAdd() {
        …
    }
    @Test
    public final void testUpdate() {
        …
    }
    @Test
    public final void testDelete() {
        …
    }
Currently when I run the tests through Maven as part of a “mvn clean install” run, the “testDelete” is getting run before the “testAdd” or “testUpdate”. If I change the name to “testZZZDelete”, then it gets run last but I don’t like that.
How do I get the tests to run in the order that I specify them in the file? My failsafe configuration is like so:
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.17</version>
        <configuration>
                <reuseForks>true</reuseForks>
                <argLine>-Xmx4096m -XX:MaxPermSize=512M ${itCoverageAgent}</argLine>
        </configuration>
        <executions>
                <execution>
                        <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                        </goals>
                </execution>
        </executions>
</plugin>
 
     
     
     
     
     
    