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

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

  二、通過preserve-order="true"
  在xml添加<suite name="Suite" preserve-order="true">,方法將按照XML中配置的先后順序由上按下執行(代碼無需額外控制)
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite" preserve-order="true">
<test name="Test">
<classes>
<class name="test.testng.TestOrder"/>
<methods>
<include name="test2" />
<include name="test3" />
<include name="test1" />
</methods>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->
  執行順序,打印結果:
  this is test2
  this is test3
  this is test1
  三、并發執行,Parallel
  1、如果沒有并發執行用例的需要,建議把Parallel=false,如果等于Parallel=true,則會并發執行用例,除非你設置了Dependencies,否則執行的順序將不受控制
  如:<suite name="Suite" parallel="true">
  2、添加Parallel的時候也可以設置線程數,如:
  <suite name="My suite" parallel="methods" thread-count="5">
  <suite name="My suite" parallel="tests" thread-count="5">
  <suite name="My suite" parallel="classes" thread-count="5">
  <suite name="My suite" parallel="instances" thread-count="5">
  官方的解釋,有興趣的可以自行翻譯:
  parallel="methods": TestNG will run all your test methods in separate threads. Dependent methods will also run in separate threads but they will respect the order that you specified.
  parallel="tests": TestNG will run all the methods in the same <test> tag in the same thread, but each <test> tag will be in a separate thread. This allows you to group all your classes that are not thread safe in the same         <test> and guarantee they will all run in the same thread while taking advantage of TestNG using as many threads as possible to run your tests.
  parallel="classes": TestNG will run all the methods in the same class in the same thread, but each class will be run in a separate thread.
  parallel="instances": TestNG will run all the methods in the same instance in the same thread, but two methods on two different instances will be running in different threads.
  Additionally, the attribute thread-count allows you to specify how many threads should be allocated for this execution.

上一頁12下一頁
軟件測試工具 | 聯系我們 | 投訴建議 | 誠聘英才 | 申請使用列表 | 網站地圖
滬ICP備07036474 2003-2017 版權所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd
主站蜘蛛池模板: 久久精品一区二区三区日韩 | 国产欧美一区二区三区视频 | 亚洲国产成人va在线观看 | 日本高清乱理论片 | 极品蜜桃臀美女啪啪 | 一级做a爱过程视频免 | 男人的天堂色偷偷亚洲京东 | 天天操天天拍 | 日韩一区在线播放 | 欧美任你躁免费精品一区 | 国产一区二区三区美女秒播 | 故意坐公交忘穿内裤被挺进小说 | 韩国一级黄色大片 | 欧美系列第一页 | 欧美成人精品第一区首页 | 免费永久观看美女视频网站网址 | 国产一区中文字幕在线观看 | 黄色小视频免费 | 在线看片a | 国产亚洲精品影达达兔 | 粉色污视频 | 中国xxxx真实自拍hd | 国产成人咱精品视频免费网站 | 国产不卡精品一区二区三区 | 男人的天堂免费视频 | 日日碰狠狠添天天爽爽爽 | 一个人看的www日本高清视频 | 深夜在线观看网站 | 成人观看网站a | 成人国产精品免费软件 | 你懂的在线视频 | 福利网在线 | 在线播放中文字幕 | 男女一级毛片免费播放 | 国产一级片免费视频 | 欧美一级精品高清在线观看 | 美女视频很黄很a免费国产 美女涩涩网站 | 丁香婷婷色综合 | 草草影院欧美 | 欧美理伦| 日日爽天天干 |