错误:Azure Devops管道-“ java.lang.IllegalStateException:驱动程序不可执行”

时间:2018-10-26 19:03:03

标签: azure-devops azure-pipelines-release-pipeline

我试图在Azure Devops中为我的github存储库创建CI / Cd管道。它包含在chrome上运行的硒webdriver的基本单元测试。我已经在项目test / resources路径中安装了linux chromedriver,由于该测试不是可执行文件,因此测试失败,我尝试使用chmod + x将其转换为可执行文件,但这不起作用:

我的“ azure-pipeline.yml”文件如下:

  

pool:vmImage:'Ubuntu 16.04'

     

步骤:    -任务:Maven @ 3       输入:       mavenPomFile:'pom.xml'       mavenOptions:“-Xmx3072m”       javaHomeOption:“ JDKVersion”       jdkVersionOption:'1.8'       jdkArchitectureOption:'x64'       publishJUnitResults:否       testResultsFiles:'** / TEST-*。xml'       目标:“包装”

     
      
  • 脚本:     mvn全新安装
  •   重击:|   chmod + x / home / vsts / work / 1 / s / target / test-classes / drivers / chromedriver   mvn测试   

它产生如下错误:

2018-10-26T18:33:57.2097240Z java.lang.IllegalStateException: The driver is not executable: /home/vsts/work/1/s/target/test-classes/drivers/chromedriver
2018-10-26T18:33:57.2097492Z    at 
com.google.common.base.Preconditions.checkState(Preconditions.java:585)
2018-10-26T18:33:57.2097627Z    at 
org.openqa.selenium.remote.service.DriverService.checkExecutable
(DriverService.java:140)
2018-10-26T18:33:57.2097751Z    at 
org.openqa.selenium.remote.service.DriverService.findExecutable
(DriverService.java:131)
2018-10-26T18:33:57.2097913Z    at 
org.openqa.selenium.chrome.ChromeDriverService.access$000
(ChromeDriverService.java:33)
2018-10-26T18:33:57.2098058Z    at 
org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable
(ChromeDriverService.java:139)
2018-10-26T18:33:57.2098200Z    at 
org.openqa.selenium.remote.service.DriverService$Builder.build
(DriverService.java:335)
2018-10-26T18:33:57.2098325Z    at 
org.openqa.selenium.chrome.ChromeDriverService.createDefaultService
(ChromeDriverService.java:89)
2018-10-26T18:33:57.2098467Z    at org.openqa.selenium.chrome.ChromeDriver. 
<init>(ChromeDriver.java:123)
2018-10-26T18:33:57.2098594Z    at 
com.mfaisalkhatri.citests.tests.UnitTest.browserTest(UnitTest.java:48)
2018-10-26T18:33:57.2098662Z 
2018-10-26T18:33:57.2229115Z 
2018-10-26T18:33:57.2232164Z Results :
2018-10-26T18:33:57.2233116Z 
2018-10-26T18:33:57.2234233Z Failed tests:   
browserTest(com.mfaisalkhatri.citests.tests.UnitTest): The driver is not 
executable: /home/vsts/work/1/s/target/test-classes/drivers/chromedriver

任何帮助将不胜感激。

0 个答案:

没有答案