Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Jenkins Selenium作业未并行运行_Java_Selenium_Jenkins - Fatal编程技术网

Java Jenkins Selenium作业未并行运行

Java Jenkins Selenium作业未并行运行,java,selenium,jenkins,Java,Selenium,Jenkins,试图在Jenkins中并行运行2个selenium作业 当我开始第一个selenium作业时,它运行得很好(直到第六次迭代,如下所示)。但当我启动第二个作业时,第二个作业正在运行,没有任何错误,但使其他作业驱动程序停止并显示 org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:10964. 如果我们尝试分别运行这两个作业

试图在Jenkins中并行运行2个selenium作业

当我开始第一个selenium作业时,它运行得很好(直到第六次迭代,如下所示)。但当我启动第二个作业时,第二个作业正在运行,没有任何错误,但使其他作业驱动程序停止并显示

org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:10964.
如果我们尝试分别运行这两个作业,那么它将完美地运行,不会出现任何错误(wrt到chromedriver/chrome/java版本)

-------------------------
Jenkins Output of 1st Job
-----------------------------
09/05 10:07:55 (LaunchMaxUptimeDowntime_NC2.java:119)[methodName-Steps] - Script Execution Time in Seconds for 1 Iteration: 126
09/05 10:07:55 (LaunchMaxUptimeDowntime_NC2.java:138)[methodName-Steps] - Script WaitTime for 2 iteration to start: 54

09/05 10:09:22 (LaunchMaxUptimeDowntime_NC2.java:119)[methodName-Steps] - Script Execution Time in Seconds for 2 Iteration: 33
09/05 10:09:22 (LaunchMaxUptimeDowntime_NC2.java:138)[methodName-Steps] - Script WaitTime for 3 iteration to start: 27

09/05 10:10:21 (LaunchMaxUptimeDowntime_NC2.java:119)[methodName-Steps] - Script Execution Time in Seconds for 3 Iteration: 32
09/05 10:10:21 (LaunchMaxUptimeDowntime_NC2.java:138)[methodName-Steps] - Script WaitTime for 4 iteration to start: 28

09/05 10:11:22 (LaunchMaxUptimeDowntime_NC2.java:119)[methodName-Steps] - Script Execution Time in Seconds for 4 Iteration: 33
09/05 10:11:22 (LaunchMaxUptimeDowntime_NC2.java:138)[methodName-Steps] - Script WaitTime for 5 iteration to start: 27

09/05 10:12:21 (LaunchMaxUptimeDowntime_NC2.java:119)[methodName-Steps] - Script Execution Time in Seconds for 5 Iteration: 32
09/05 10:12:21 (LaunchMaxUptimeDowntime_NC2.java:138)[methodName-Steps] - Script WaitTime for 6 iteration to start: 28

09/05 10:13:23 (LaunchMaxUptimeDowntime_NC2.java:119)[methodName-Steps] - Script Execution Time in Seconds for 6 Iteration: 34
09/05 10:13:23 (LaunchMaxUptimeDowntime_NC2.java:138)[methodName-Steps] - Script WaitTime for 7 iteration to start: 26

09/05 10:14:12 (LaunchMaxUptimeDowntime_NC2.java:144)[methodName-Steps] - Execution is stopped because of the following reason

org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:10964
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 'PRINU', ip: '192.168.0.106', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: driver.version: RemoteWebDriver
-----------------------------------------------
TestSuite
Total tests run: 1, Failures: 0, Skips: 0
Configuration Failures: 1, Skips: 1
-----------------------------------------------

在启动ChromeDriver之前,我在我的项目中使用了以下代码

Runtime.getRuntime().exec(System.getProperty(“user.dir”)+“/release/killchromedriver.bat”)


停止chromedriver会影响其他工作。谢谢你的帮助

在启动ChromeDriver之前,我在我的项目中使用了以下代码

Runtime.getRuntime().exec(System.getProperty(“user.dir”)+“/release/killchromedriver.bat”)


停止chromedriver会影响其他工作。谢谢你的帮助

您是否使用网格来分配负载?否。。我不使用网格,我认为网格使用的端口存在这个问题。确保作业中使用的端口不冲突。是否使用网格分配负载?否。。我不使用网格,我认为网格使用的端口存在这个问题。确保作业中使用的端口不冲突。