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

Including and excluding

TestNG provides the flexibility to include or exclude tests while defining a test suite. This helps in defining a test suite with a particular set of tests. While defining the testng XML configuration file, we can use the include and exclude tags to include or exclude tests. Let's create a few test suites to include and exclude particular tests and execute them.

Include/exclude packages

You can use the TestNG feature of including and excluding to include and exclude certain test packages from a set of tests. Let's create a few test suites by including and excluding test package in a test.

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