0 votes
in Testing by
How to set test case priority in TestNG?

1 Answer

0 votes
by
Below code helps you to understand how to set test case priority in TestNG.

1

2

3

4

5

6

7

8

9

10

11

12

13

package TestNG;

import org.testng.annotations.*;

public class SettingPriority {

@Test(priority=0)

public void method1() {

}

@Test(priority=1)

public void method2() {

}

@Test(priority=2)

public void method3() {

}

}

Test Execution Sequence:

1

2

3

Method1

Method2

Method3

Related questions

0 votes
asked Dec 6, 2019 in Testing by SakshiSharma
0 votes
asked Nov 13, 2020 in Testing by sharadyadav1986
...