- You can move to testng and use dependsOnMethods. You will have to change few things in your code to make it compatible.
You can move to testng and use dependsOnMethods. You will have to change few things in your code to make it compatible.
It makes sure your tests in the same class are executed in the good order. In the following example "secondTest" will start only when "firstTest" is done.
@Test
public void firstTest() {
//code
}
@Test (dependsOnMethods = { "firstTest" })
public void secondTest() {
//code
}