Java Selenium WebDriver在使用testNG并行运行测试用例时抛出org.openqa.Selenium.remote.UnreachableBrowserException

Java Selenium WebDriver在使用testNG并行运行测试用例时抛出org.openqa.Selenium.remote.UnreachableBrowserException,java,selenium,selenium-webdriver,testng,testng-eclipse,Java,Selenium,Selenium Webdriver,Testng,Testng Eclipse,当使用TestNG并行运行测试用例时,将引发“UnreachableBrowserException”,而如果给定parallel=“false”,则测试用例将成功执行 TestNG版本:6.9.10 Selenium Java:3.0.1 Chrome版本:58.0.3029.110 Chrome驱动程序版本:2.29 TestNG XML: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http

当使用TestNG并行运行测试用例时,将引发“UnreachableBrowserException”,而如果给定parallel=“false”,则测试用例将成功执行

TestNG版本:6.9.10 Selenium Java:3.0.1 Chrome版本:58.0.3029.110 Chrome驱动程序版本:2.29

TestNG XML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite" parallel="classes" thread-count="2" verbose="5">
  <test name="Test">
    <classes>
      <class name="testscripts.LoginScenario.ParallelTwo"/>
      <class name="testscripts.LoginScenario.ParallelOne"/>
    </classes>
  </test> <!-- Test -->
</suite> <!-- Suite -->
控制台

TestNG 6.9.10 by Cédric Beust (cedric@beust.com)

FAILED: mail
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'

FAILED: google
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'A5DA', ip: '10.**.***.**', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_131'
请澄清


提前感谢。

您在测试时使用的浏览器是什么?请尝试更新Chromedriver和Chrome。如何设置chromedriver路径?请提供代码。您如何初始化驱动程序?
TestNG 6.9.10 by Cédric Beust (cedric@beust.com)

FAILED: mail
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'

FAILED: google
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'A5DA', ip: '10.**.***.**', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_131'