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 testng XML:

  1. Open Eclipse and create a new file with the name testng.xml in the previously created project.
  2. Add the following code to the said file:
    <suite name="Time test Suite" verbose="1">
      <test name="Timed Test">
        <groups>
          <run>
            <include name="test-group" />
          </run>
        </groups>
        <classes>
          <class name="test.groups.TestGroup" />
        </classes>
      </test>
    </suite>

    The preceding XML file contains only one test inside a suite. This contains the groups section defined by using the groups tag as shown in the code. The run tag represents the group that needs to be run. The include tag represents the name of the group that needs to be executed. ...

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