Selenium Jenkins失败试验中的硒

Selenium Jenkins失败试验中的硒,selenium,jenkins,continuous-integration,automated-tests,Selenium,Jenkins,Continuous Integration,Automated Tests,我想在詹金斯经营selenium。当我在本地运行它时,测试总是通过的。但在詹金斯,我总是犯错误: Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@ee7d9f1 Starting ChromeDriver 2.34.522932 (4140ab217e1ca1bec0c4b4d1b148f3361eb3a03e) on port 10010 Only local connec

我想在詹金斯经营selenium。当我在本地运行它时,测试总是通过的。但在詹金斯,我总是犯错误:

Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@ee7d9f1
Starting ChromeDriver 2.34.522932 (4140ab217e1ca1bec0c4b4d1b148f3361eb3a03e) on port 10010
Only local connections are allowed.
Dec 18, 2017 2:35:43 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
File cannot be found
Tests run: 4, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 6.807 sec <<< FAILURE!
使用org.apache.maven.surefire.TestNG.conf配置TestNG。TestNG652Configurator@ee7d9f1
端口10010上的启动ChromeDriver 2.34.522932(4140ab217e1ca1bec0c4b4d1b148f3361eb3a03e)
只允许本地连接。
2017年12月18日凌晨2:35:43 org.openqa.selenium.remote.ProtocolHandshake createSession
信息:检测到的方言:OSS
_RegisterApplication()未能建立到Windows服务器的默认连接,_CGSDefaultConnection()为空。
找不到文件

测试运行:4,失败:2,错误:0,跳过:0,经过的时间:6.807秒此问题与您的mac有关,并且是与运行脚本的其他服务器的连接问题。要解决此问题,请阅读以下内容:

您是在本地机器jenkins还是在从属模式jenkins下运行?请查看
\u RegisterApplication()
,似乎
\u CGSDefaultConnection()为空
@Skyx什么是操作系统?Jenkins作为进程运行?我使用macOS High SierraI也遵循了这一点,但仍然不起作用