Order of execution of tests in TestNG

前端 未结 17 2655
情书的邮戳
情书的邮戳 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条回答
  •  -上瘾入骨i
    2020-11-27 13:42

    I've faced the same issue, the possible reason is due to parallel execution of testng and the solution is to add Priority option or simply update preserve-order="true" in your testng.xml.

    
    

提交回复
热议问题