简体   繁体   中英

Jenkins Selenium Jobs not running in Parallel

Trying to run 2 selenium jobs parallel in Jenkins.

When I start 1st selenium job, it is running perfectly (till 6th iteration as shown below). But when i start the 2nd job, 2nd job is running without any error, but making other job driver stopped and showing

org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:10964.

If we try to run both the jobs individually, it is running perfectly without any error wrt to chromedriver/ chrome/ java version

-------------------------
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
-----------------------------------------------

I used the below code in my project before initiating the ChromeDriver

Runtime.getRuntime().exec(System.getProperty("user.dir") + "/release/killchromedriver.bat");

It was affecting other job to stop the chromedriver. Thanks for the help!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM