我创建了一个TestNG XML文件,我称之为多个类。我担心的是,我想在我从上到下排列的所有类上执行我的测试用例,如下所示。然而,一些底层案例依赖于大写情况,每当我运行XML文件时,它会随机选择类。我该怎么做呢?
类型 - 1
{
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite3">
<test name="Test3" preserve-order="true">
<classes>
<class name="com.netgearInsight.testReports.RegistrationTestCase"/>
<class name="com.netgearInsight.testReports.LoginTestCase"/>
<class name="com.netgearInsight.testReports.AddNetworkTestCase"/>
<class name="com.netgearInsight.testReports.AddDevicesTestCase"/>
<class name="com.netgearInsight.testReports.CreateSsidTestCase"/>
<class name="com.netgearInsight.testReports.DeleteDevicesTestCase"/>
<class name="com.netgearInsight.accountCheck.About"/>
<class name="com.netgearInsight.accountCheck.AccountManage"/>
<class name="com.netgearInsight.testRunEnd.GetTotalStatus"/>
<class name="com.netgearInsight.testRunEnd.SendReport"/>
</classes>
</test> <!-- Test3 -->
</suite> <!-- Suite3 -->
}
类型 - 2
{
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite1">
<test thread-count="5" name="Test One" >
<classes>
<class name="com.netgearInsight.testReports.RegistrationTestCase"/>
<class name="com.netgearInsight.testReports.LoginTestCase"/>
</classes>
</test> <!-- Test -->
<test thread-count="5" name="Test Two" >
<classes>
<class name="com.netgearInsight.testReports.AddNetworkTestCase"/>
<class name="com.netgearInsight.testReports.AddDevicesTestCase"/>
<class name="com.netgearInsight.testReports.CreateSsidTestCase"/>
</classes>
</test> <!-- Test -->
<test thread-count="5" name="Test Three" >
<classes>
<class name="com.netgearInsight.testReports.UrlFilterTestCase"/>
<class name="com.netgearInsight.testReports.DeleteDomainTestCase"/>
<class name="com.netgearInsight.testReports.DeleteDevicesTestCase"/>
</classes>
</test> <!-- Test -->
<test thread-count="5" name="Test Four" >
<classes>
<class name="com.netgearInsight.testReports.AddDataVLAN"/>
<class name="com.netgearInsight.accountCheck.AccountManage"/>
<class name="com.netgearInsight.accountCheck.About"/>
<class name="com.netgearInsight.accountCheck.ChangePassword"/>
</classes>
</test> <!-- Test -->
<test thread-count="5" name="Test Five">
<classes>
<class name="com.netgearInsight.testRunEnd.GetTotalStatus"/>
<class name="com.netgearInsight.testRunEnd.SendReport"/>
</classes>
</test> <!-- Test -->`enter code here`
</suite> <!-- Suite -->
}