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

Time for action – running a TestNG group using the testng XML

Perform the following steps to run a TestNG group using the testing XML:

  1. Let's use the existing test class RegularExpressionGroup that was created earlier under the Using regular expressions section for this sample.
  2. Create a new testng XML file with the name groupofgroup-testng.xml under the same project which we created earlier.
  3. Replace any existing code with the following code and save it:
    <suite name="Group of group Suite" verbose="1"> <test name="Group of group Test"> <groups> <define name="include-group"> <include name="include-test-one" /> <include name="include-test-two" /> </define> <define name="exclude-group"> <include name="test-one-exclude" /> <include name="test-two-exclude" ...

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