gpt4 book ai didi

linux - Jenkins - 错误 Chrome 无法启动 : exited abnormally

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:15:09 25 4
gpt4 key购买 nike

Ubuntu - Ubuntu 中的 Jenkins 和 GIT,使用selenium的Java项目

尝试在 Jenkins(带有代理节点的 Jenkins)中运行 GIT 项目。

Jenkins 错误

unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.15.0-39-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 254 milliseconds
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z'
System info: host: 'WebTest-VM', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-39-generic', java.version: '1.8.0_191'
Driver info: driver.version: ChromeDriver

注意:同一个java + Selenium项目可以在本地机器上打开chrome浏览器

System.setProperty("webdriver.chrome.driver", "/home/webtest/Downloads/chromedriver");
WebDriver driver = new ChromeDriver();

最佳答案

尝试将 JenkinsFile 添加到您的项目并提交到 git

enter image description here

您的 JenkinsFile 可能具有以下语法:

pipeline {

agent any
tools {
maven 'maven_3_5_0'
}
stages {

stage('Checkout Code from Git') {
steps {
git 'https://github.com/xxxxxxx/your-project.git'
}}

stage('compile stage') {
steps {
bat "mvn clean compile"
}
}

stage('testing stage') {
steps {
bat "mvn test"
}
}

}

}

关于linux - Jenkins - 错误 Chrome 无法启动 : exited abnormally,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53394311/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com