Priority in TestNG with multiple classes

后端 未结 6 1019
再見小時候
再見小時候 2020-11-27 20:15

I\'m facing with the following problem: I created two classes which include @Tests with priority attribute:

@Test( priority = 1 )
public void testA1() {
             


        
6条回答
  •  广开言路
    2020-11-27 20:58

    You can just provide @Test(testName="test1") / @Test(testName="test2") at the top of each class, and the priorities will be automatically grouped per class. Of course you keep the existing annotations.

提交回复
热议问题