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

您的位置:軟件測(cè)試 > 開(kāi)源軟件測(cè)試 > 開(kāi)源單元測(cè)試工具 > TestNG
TestNG之執(zhí)行順序
作者:網(wǎng)絡(luò)轉(zhuǎn)載 發(fā)布時(shí)間:[ 2016/1/5 11:21:48 ] 推薦標(biāo)簽:軟件測(cè)試工具 單元測(cè)試工具

  二、通過(guò)preserve-order="true"
  在xml添加<suite name="Suite" preserve-order="true">,方法將按照XML中配置的先后順序由上按下執(zhí)行(代碼無(wú)需額外控制)
<?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 -->
  執(zhí)行順序,打印結(jié)果:
  this is test2
  this is test3
  this is test1
  三、并發(fā)執(zhí)行,Parallel
  1、如果沒(méi)有并發(fā)執(zhí)行用例的需要,建議把Parallel=false,如果等于Parallel=true,則會(huì)并發(fā)執(zhí)行用例,除非你設(shè)置了Dependencies,否則執(zhí)行的順序?qū)⒉皇芸刂?br />   如:<suite name="Suite" parallel="true">
  2、添加Parallel的時(shí)候也可以設(shè)置線(xiàn)程數(shù),如:
  <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">
  官方的解釋?zhuān)信d趣的可以自行翻譯:
  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.

上一頁(yè)12下一頁(yè)
軟件測(cè)試工具 | 聯(lián)系我們 | 投訴建議 | 誠(chéng)聘英才 | 申請(qǐng)使用列表 | 網(wǎng)站地圖
滬ICP備07036474 2003-2017 版權(quán)所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd
主站蜘蛛池模板: 午夜激情在线观看 | 亚洲国产91| 美女黄影院 | 国产日韩一区 | 最好看的中文字幕2019免费 | 欧美一级视频免费观看 | 成人网址在线观看 | 亚洲欧美一级久久精品 | 日韩高清成人 | 日韩伦理剧 | 日本国内一区二区三区 | 爽爽窝窝午夜精品一区二区 | 日本人与物videos另类 | 成人超污免费网站在线看 | 最新丁香六月 | 日日干夜夜操s8 | 日韩一级欧美一级 | 日韩在线免费播放 | 男女羞羞视频网站免费 | 6080欧美a大片一级 | 成年人视频在线免费播放 | 最近的2019中文字幕国语hd | 中国黄色片视频 | 日本h片在线 | 添人人躁日日躁夜夜躁夜夜揉 | 中文字幕亚洲综合久久2 | 看免费黄色一级视频 | 精品国产成a人在线观看 | 国产成人精品免费视频大全办公室 | 国产区成人精品视频 | 亚洲欧美日韩综合在线 | 最近免费中文字幕高清大全 | 综合网插 | 人人干人人插 | 视频日韩| 国产日韩欧美精品一区 | 日干夜干天天干 | 午夜私人影院在线观看 | 欧美成人鲁丝片在线观看 | 在线看小视频 | 天天做天天摸 |