in Testing by
Q:
How to set test case priority in TestNG?

▼ Show 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
Learn More with Madanswer

Related questions

0 votes
asked Nov 13, 2020 in Testing by sharadyadav1986
0 votes
...