Order of execution of tests in TestNG

前端 未结 17 2672
情书的邮戳
情书的邮戳 2020-11-27 12:46

How to customize the order of execution of tests in TestNG?

For example:

public class Test1 {
  @Test
  public void test1() {
      System.out.printl         


        
17条回答
  •  余生分开走
    2020-11-27 13:27

    To address specific scenario in question:

    @Test
    public void Test1() {
    
    }
    
    @Test (dependsOnMethods={"Test1"})
    public void Test2() {
    
    }
    
    @Test (dependsOnMethods={"Test2"})
    public void Test3() {
    
    }
    

提交回复
热议问题