-1

For example, I have the following methods and I run the whole test class.

public void previous() {
 .......
}
@Test(dependsOnMethods={"previous"})
    public void current() {
 .......
}

If that is the case, how many times will the previous methods be run?

Khalil
  • 21
  • 1
  • 6

1 Answers1

1

Only one time. However, please remember dependsOnMethods mean

  • If previous method result is PASSED, current method will run
  • If previous method result is FAILED, current method will NOT run
Nguyen Vu Hoang
  • 1,570
  • 14
  • 19