您的位置:軟件測(cè)試 > 開源軟件測(cè)試 > 開源單元測(cè)試工具 > TestNG
TestNG之執(zhí)行測(cè)試類方式
作者:網(wǎng)絡(luò)轉(zhuǎn)載 發(fā)布時(shí)間:[ 2016/2/2 13:57:56 ] 推薦標(biāo)簽:單元測(cè)試工具 軟件測(cè)試

  4.XML指定組中組

@Test(groups={"g2"})
public void test4() {
System.out.println("this is test4");
}
@Test(groups={"g1"})
public void test5() {
System.out.println("this is test5");
}
@Test(groups={"g1","g3"})
public void test10() {
System.out.println("this is test10");
}
XML:
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite" parallel="true">
<test name="Test">
<groups>
<define name="fun">
<include name="g3"/>
</define>
<define name="all">
<include name="g.*" />
</define>
<run>
<include name="all" />
</run>
</groups>
<classes>
<class name="test.testng.TestOrder"/>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->
上一頁(yè)12下一頁(yè)
軟件測(cè)試工具 | 聯(lián)系我們 | 投訴建議 | 誠(chéng)聘英才 | 申請(qǐng)使用列表 | 網(wǎng)站地圖
滬ICP備07036474 2003-2017 版權(quán)所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd