无法使用Maven在Jenkins上执行Chrome驱动程序

时间:2019-06-21 12:37:10

标签: jenkins selenium-webdriver selenium-chromedriver

我在jenkins中安装了chrome驱动程序插件,但无法执行chrome驱动程序

MVN测试已开始  我正在从目标类阅读chrome驱动程序。但出现以下错误。 “找不到Chrome二进制文件”

    `
    Starting ChromeDriver 2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706) on port 5951
    Only local connections are allowed.
    [ERROR] Tests run: 12, Failures: 1, Errors: 0, Skipped: 11, Time elapsed: 1.345 s <<< FAILURE! - in TestSuite
    [ERROR] initiateDriverInstance(org.automation.testingworld.testcases.TC_001_ValidateAdminFunctionality)  Time elapsed: 1.275 s  <<< FAILURE!
    org.openqa.selenium.WebDriverException: 
    unknown error: cannot find Chrome binary
      (Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.18.0-1019-azure x86_64) (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 40 milliseconds
    Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
    System info: host: 'jenkins', ip: '10.0.1.4', os.name: 'Linux', os.arch: 'amd64', os.version: '4.18.0-1019-azure', java.version: '1.8.0_212'
    Driver info: driver.version: ChromeDriver

    [INFO] 
    [INFO] Results:
    [INFO] 
    [ERROR] Failures: 
    [ERROR] org.automation.testingworld.testcases.TC_001_ValidateAdminFunctionality.initiateDriverInstance(org.automation.testingworld.testcases.TC_001_ValidateAdminFunctionality)
    [ERROR]   Run 1: TC_001_ValidateAdminFunctionality>DriverInstance.initiateDriverInstance:23 » WebDriver
    [INFO]   Run 2: PASS
    [INFO]   Run 3: PASS
    [INFO]   Run 4: PASS
    [INFO] 
    [INFO] 
    [ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 4
    [INFO] 
    [ERROR] There are test failures.

    Please refer to /var/lib/jenkins/workspace/automation-framework/target/surefire-reports for the individual test results.
    Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
    [JENKINS] Recording test results
    [WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.SurefireArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
    [WARNING] Attempt to (de-)serialize anonymous class org.jfrog.hudson.maven2.MavenDependenciesRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  7.836 s
    [INFO] Finished at: 2019-06-21T10:10:37Z
    [INFO] ------------------------------------------------------------------------
    Waiting for Jenkins to finish collecting data
    [JENKINS] Archiving /var/lib/jenkins/workspace/automation-framework/pom.xml to groupId/samplejenkin/1.0-SNAPSHOT/samplejenkin-1.0-SNAPSHOT.pom
    channel stopped
    Finished: UNSTABLE`

0 个答案:

没有答案