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
exclude tags to include or exclude tests. Let's create a few test suites to include and exclude particular tests and execute them.
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.