Test section: <test>

The test section in the suite file contains a name for the <test> set, a list of parameters (which can also be declared at the suite level), classes, or packages to run. Both classes and packages can take a wildcard in the entry to run all the test classes in a specific folder or all of them in a package. Here are a couple of examples:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">

<suite name="My_Test_Suite" preserve-order="true" parallel="false"
thread-count="1" verbose="2">

<!-- tests -->
<test name="My Test">
<!-- test parameters -->
<parameter name="browser" value="chrome" />
<parameter name="platform" value="Windows 10" />
<parameter name="environment" value="local" />

<classes>
<class name="my.tests.RockBandsTest" />
</classes>
</test>
</suite>

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">

<suite name="My_Test_Suite" preserve-order="true" parallel="false"
thread-count="1" verbose="2">

<!-- tests -->
<test name="My Test">
<!-- test parameters -->
<parameter name="browser" value="chrome" />
<parameter name="platform" value="Windows 10" />
<parameter name="environment" value="local" />

<packages>
<package name="my.tests.*" />
</packages>
</test>
</suite>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.247.196