Order of execution of tests in TestNG

前端 未结 17 2700
情书的邮戳
情书的邮戳 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:33

    There are ways of executing tests in a given order. Normally though, tests have to be repeatable and independent to guarantee it is testing only the desired functionality and is not dependent on side effects of code outside of what is being tested.

    So, to answer your question, you'll need to provide more information such as WHY it is important to run tests in a specific order.

提交回复
热议问题