Perform the following steps to create a test suite and exclude a particular package:
testngXML file with name
exclude-package-testng.xmlin the project. Add the following code to it:
<suite name="Exclude Package Suite" verbose="1"> <test name="Exclude Package Test"> <packages> <package name="test.*"> <exclude name="test.secondpackage" /> </package> </packages> </test> </suite>
The preceding test suite defines a test by including all subpackages of the
test package (defined by using the regular expression
test.*) and excluding only a particular package from all the packages for test execution. This is done by using the ...