Skip to main content
deleted 2 characters in body
Source Link
alecxe
  • 11.4k
  • 11
  • 51
  • 107
  • 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
}
  • 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
}

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
}
Source Link
David
  • 104
  • 4

  • 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
}