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

Chapter 2. Understanding testng.xml

In the previous chapter we had learned about TestNG, its features, how to set it up and run it through Eclipse. In this chapter we will learn about testng.xml, the main configuration file of TestNG used to define suites, tests, and configure TestNG.

In this chapter we'll cover the following topics:

  • About testng.xml
  • Creating a test suite
  • Running testng.xml
  • Creating multiple tests in suite
  • Adding classes, packages, and method to tests
  • Including and excluding classes, packages, and methods in tests

About testng.xml

testng.xml is a configuration file for TestNG. It is used to define test suites and tests in TestNG. It is also used to pass parameters to test methods, which we will discuss under the Parameterization of ...

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