Parallel Execution on Multiple Browsers using TestNG

August 7, 2016

One of the important feature of executing test cases using tesng.xml is the parallel execution of test cases in different browsers. Say for example we want to test a particular scenario parallelly in three different browsers (say Mozilla Firefox, Google Chrome, and Internet Explorer).

In testng.xml file we will define three different tests (one for each browser type) with a parameter say Browser Type.

An attribute parallel = “tests” will be passed in the test suite, which makes the execution as parallel. By default execution is sequential.

TestNG.xml file:

TestNG.java File:

For any queries, suggestions or feedback feel free to write us at saurabh@qatechhub.com or support@qatechhub.com

Saurabh

About the Author

Saurabh

Follow Saurabh:

Leave a Comment: