亚洲好骚综合-亚洲黄色录像-亚洲黄色网址-亚洲黄色网址大全-99久久99久久-99久久99久久精品国产

您的位置:軟件測試 > 開源軟件測試 > 開源單元測試工具 > TestNG
TestNG之執行順序
作者:網絡轉載 發布時間:[ 2016/1/5 11:21:48 ] 推薦標簽:軟件測試工具 單元測試工具

  如果很有個測試方法,并且這幾個方法又有先后順序,那么如果讓TestNG按照自己想要的方法執行呢
  一、通過Dependencies
  1.在測試類中添加Dependencies
@Test
public void test1() {
System.out.println("this is test1");
}
@Test(dependsOnMethods = { "test1" })
public void test2() {
System.out.println("this is test2");
}
@Test(dependsOnMethods = { "test2" })
public void test3() {
System.out.println("this is test3");
}
@Test(dependsOnMethods = { "test3" })
public void test4() {
System.out.println("this is test4");
}
@Test(dependsOnMethods = { "test4" })
public void test5() {
System.out.println("this is test5");
}
  執行順序,print:
  this is test1
  this is test2
  this is test3
  this is test4
  this is test5
  2.在xml文件中添加Dependencies,代碼中無需再添加Dependencies
<test name="Test">
<classes>
<class name="test.testng.TestOrder"/>
<methods>
<dependencies>
<method name="test2" depends-on="test1"/>
<method name="test3" depends-on="test2"/>
<method name="test4" depends-on="test3"/>
<method name="test5" depends-on="test4"/>
<method name="test1" />
</dependencies>
</methods>
</classes>
</test>
  執行順序,打印結果:
  this is test1
  this is test2
  this is test3
  this is test4
  this is test5

上一頁12下一頁
軟件測試工具 | 聯系我們 | 投訴建議 | 誠聘英才 | 申請使用列表 | 網站地圖
滬ICP備07036474 2003-2017 版權所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd
主站蜘蛛池模板: 99精品国产成人a∨免费看 | 好黄好猛好爽好痛的视频 | 欧美亚洲天堂网 | 狠狠色丁香久久婷婷综合_中 | 国产在线日韩在线 | 免费观看成人www精品视频在线 | 毛片免费在线观看 | 免费黄网站在线观看 | 欧美成人免费公开播放 | 女攻男受高h全文肉肉 | 色噜噜狠狠狠狠色综合久 | 大陆60老妇xxxxhd | 国产成人一级片 | 性视频网 | 国产精品资源在线观看网站 | 波多野结衣中文字幕在线视频 | 欧美综合网欧美色妞网 | 免费国产a国产片高清 | 国产三级第一页 | 亚洲天堂久久 | 亚洲一区二区三区免费观看 | 黄 色 片成 人免费观看 | 欧美九九 | 天堂亚洲国产日韩在线看 | 成人国产永久福利看片 | 欧美最新的精品videoss | 黄色在线视屏 | 毛片中文字幕 | 天天干天天摸天天操 | 亚洲国产成人久久精品动漫 | 国产啊v在线观看 | 在线久操 | 中文字幕无线码欧美成人 | 最近中文免费字幕在线播放 | 美女一级大黄录像一片 | 一区二区三区鲁丝不卡麻豆 | 欧美日韩视频精品一区二区 | 国产100页| 中文字幕日韩一区二区 | 三级在线免费观看 | 99视频久久|