操作系統:Windows 10瀏覽器:Chrome瀏覽器版本:73.0.3683.86版(官方內部版本)(32位)我正在運行硒黃瓜BDD項目,在此我要驗證一頁的標題。我正在使用擴展報告版本4。項目在本地成功運行。但是當我通過Jenkins運行它時,它在捕獲屏幕截圖并顯示以下錯誤時失敗。如果我從pom.xml中刪除surfire插件,則TEST無法通過Jenkins運行。在詹金斯的執行Windows批處理命令選項中,我給出了以下命令C:\Program Files (x86)\Jenkins\workspace\CucumberBDDFrameworkmvn testTestRunner package com.accenture.TestRunner; import org.testng.annotations.AfterClass; import org.testng.annotations.Test; import org.testng.annotations.BeforeClass; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import cucumber.api.CucumberOptions; import cucumber.api.testng.AbstractTestNGCucumberTests; import cucumber.api.testng.CucumberFeatureWrapper; import cucumber.api.testng.TestNGCucumberRunner; /** * @author ajinkya.pande * */ @CucumberOptions( features="./features/WhatIsBitcoin.feature", glue= {"com.accenture.StepDef"}, tags= {"@ExtentReport"}, dryRun = false ) public class TestRunner { // Write following steps or Try to extend AbstractTestNGCucumberTests private TestNGCucumberRunner testNGCucumberRunner; @BeforeClass(alwaysRun = true) public void setUpClass() throws Exception{ testNGCucumberRunner = new TestNGCucumberRunner(this.getClass()); } @Test(dataProvider = "features") public void feature(CucumberFeatureWrapper cucumberFeature) { testNGCucumberRunner.runCucumber(cucumberFeature.getCucumberFeature()); } @DataProvider public Object [][] features(){ return testNGCucumberRunner.provideFeatures(); } @AfterClass(alwaysRun = true) public void tearDownClass() throws Exception{ testNGCucumberRunner.finish(); } }步驟定義
- 3 回答
- 0 關注
- 1265 瀏覽
添加回答
舉報
0/150
提交
取消