您的位置:軟件測試 > 開源軟件測試 > 開源功能測試工具 > Selenium
selenium+testng+ant+jenkins 手記
作者:網(wǎng)絡(luò)轉(zhuǎn)載 發(fā)布時間:[ 2016/3/3 14:09:27 ] 推薦標(biāo)簽:軟件測試工具 功能測試工具

  更多ant和testng  classname="org.testng.TestNGAntTask"是固定格式
  參考:http://testng.org/doc/index.html
  接下來在項目添加幾個case,項目目錄如下

  準(zhǔn)備testng的配置文件如下,放在工程的根目錄下

  接下來是見證奇跡的時候:
  在Jenkins里選擇構(gòu)建
  Building in workspace C:Program Files (x86)JenkinsworkspaceDemo
  [workspace] $ cmd.exe /C '""C:Program Filesapache-ant-1.9.4inant.bat" -file Demo run && exit %%ERRORLEVEL%%"'
  Buildfile: C:UsersYoungworkspaceDemouild.xml
  [echo] import libs clean:
  [delete] Deleting directory C:UsersYoungworkspaceDemouild compile:
  [echo] mkdir
  [mkdir] Created dir: C:UsersYoungworkspaceDemouildclasses
  [javac] C:UsersYoungworkspaceDemouild.xml:21: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
  [javac] Compiling 6 source files to C:UsersYoungworkspaceDemouildclasses run:
  [testng] [TestNG] Running:
  [testng]   C:UsersYoungworkspaceDemo estng.xml
  [testng]
  [testng] Fast test
  [testng] Slow test
  [testng] Starting ChromeDriver (v2.9.248315) on port 43260
  [testng] Starting ChromeDriver (v2.9.248315) on port 20660
  [testng] Starting ChromeDriver (v2.9.248315) on port 13803
  [testng] cookie write to file
  。。。。

上一頁12下一頁
軟件測試工具 | 聯(lián)系我們 | 投訴建議 | 誠聘英才 | 申請使用列表 | 網(wǎng)站地圖
滬ICP備07036474 2003-2017 版權(quán)所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd