Category Archives: TestNG

Read data from excel file using Selenium Webdriver

 

Use Grouping in TestNG – Selenium Webdriver

testng.xml

 

Using Priority Test Case in TestNG

Test Case: 1

Output 1:

Test Case 2:

Output 2:

 

Include and Exclude Methods in TestNG

testng.xml

Output

 

Passing Parameters through testng.xml

Test Case:

testng.xml

Output:

 

Preserve Order in TestNG

Test Case: 1

Test Case: 2

Test Case: 3

testng.xml (preserve-order=true > The tests will be executed in order defined in xml)

Output: preserve-order=true

testng.xml (preserve-order=false > Test will not be executed in order. They will get executed in an unpredictable order)

Output: preserve-order=false

1 2 3 7