Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
How to set priority to the test cases in TestNG?
We can set priority for test cases in order of their execution, by giving priority to each test method. A test method having lower priority runs first then the test methods with higher priority are executed.
Example
@Test (priority = 1)
public void verifyTravel(){
System.out.println("Travel history successful ");
}
@Test (priority = 2)
public verifyIncome(){
System.out.println ("Income history successful");
}
In the Java class file, verifyTravel() will run first followed by verifyIncome().
Advertisements
