Use TestNG, it's @Test annotation<http://testng.org/doc/documentation-main.html#annotations>has dependsOnMethods and dependsOnGroups attributes which allow you to express such test dependencies in tests themselves.
Regards, Stevo. On Thu, Jan 7, 2010 at 1:07 PM, Entner Harald <entner.har...@afb.de> wrote: > Hey Michael, > > Afaics there is no way to define the order of tests with the surefire > plugin. Maybe another plugin could help you. > > But IMHO i would suggest to remove the dependencies of your tests. E.g. > using the @Before annotation. Otherwise you can never be sure that your > tests are working after changing one of your dependent tests. > > This is more an advice than an useful hint. But i'm pretty sure that the > surefire plugin itself wont help you defining the order of your tests. > > Harald > > -----Ursprüngliche Nachricht----- > Von: Michel Barakat [mailto:bmic...@gmail.com] > Gesendet: Donnerstag, 7. Januar 2010 12:24 > An: users@maven.apache.org > Betreff: Running unit tests in a specific order > > Hey folks, > > I am using the surefire plugin to run through JUnit tests. > I am facing some cross-test dependencies issues and thus would like to > investigate how tests perform when ran in a specific order. > > I have tried using the' test' flag, as in: > mvn -Dtest=ATest,BTest,CTest test > > However, this does not necessarily execute the tests in the specified > order (eg. CTest is executed before ATest or BTest). > Is it possible to specify a strict order, through which unit tests > should be executed? > > Cheers > Michel > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >