Executing Test cases from multiple classes using testng.xml

August 21, 2016

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

About the Author

Saurabh

Follow Saurabh:

Leave a Comment: