Multiple class execution using TestNG xml

a couple of years ago

One of the important feature of running test cases from testng.xml is that we can execute test cases from multiple classes in one go. We can include multiple classes together. Below is the simple example of testng xml file which includes multiple classes.

Here, in above xml file, there are two classes which are included in classes tag namely TestClass1 and TestClass2.

Code for TestClass1:

Code for TestClass2:

Result of above Execution:

packageExecution

HTML report for above execution:

report

PS: For any questions queries or comment feel free to write us at saurabh@qatechhub.com or support@qatechhub.com. Happy Learning 🙂

Saurabh Dhingra

About the Author

Saurabh Dhingra

Follow Saurabh Dhingra:

Leave a Comment: