O'Reilly logo

TestNg Beginner's Guide by Varun Menon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running testng.xml

In the earlier section we had created a testng.xml file but haven't yet verified it by running it. In this section we will learn how to run the testng.xml configuration file. There are multiple ways of running the testng.xml file as a TestNG suite.

Using command prompt

You can execute the testng.xml file through the command prompt. This also allows the use of multiple testng.xml files to execute simultaneously through TestNG. Before running a testng.xml suite through the command prompt, we need to compile our project code. However, compilation of project code using Java is out of the scope of this book and is not covered. Hence, we will use the class files compiled by Eclipse. The code compiled by Eclipse can be found under a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required