TimeOut issue and deprecated webdriver instances after test finished

I am testing a web application using Webdriver, more or less as described below. When the tests pass, everything is fine. However, I noticed the following 2 problems when one of the tests failed.

a) If one of the tests fails, the rest of the tests in the package will be disabled without closing the Webdriver instance. This leaves some legacy webdriver instances on the node machine.

b) When one of the tests fails with a timeout error, all other tests of that class (since testng is configured to run concurrent classes) fail with the following exception org.openqa.selenium.remote.UnreachableBrowserException  Remote browser communication error. He may have died.

How can we fix both of these issues, maybe it's a mesh issue? Any suggestions would be great. See below for details on mesh configuration and environment information.

Browser and version: Chrome and version 23.0.1271.101

Selenium version: - 2.28.0

Grid hub and node properties: -

Hub start: - java -jar / tools / grid / selenium-server-standalone-2.28.0.jar -role hub -maxSession 20 -browserTimeout 240 -remoteControlPollingIntervalInSeconds 180 -sessionMaxIdleTimeInSeconds 240 -newSessionMaxWaitTimeInSeconout

Node start: - java -jar / tools / grid / selenium-server-standalone-2.28.0.jar -role node -Dwebdriver.chrome.driver = / ChromeDriver / 23.0.1240 / chromedriver -hub http://mobygrid.dev .ebay.com: 4444 / grid / register

Testng.xml which runs the class in parallel with 5 threads: -

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<!--  <suite name="Single Group Suite"> -->
<suite name="Single Group Suite" parallel="classes" thread-count="5">
<test name="Single Group Test Run" preserve-order="false">
<groups>
    <define name="completetests">
              <include name="ViewItem"/>
              <include name="ViewItem2"/>
              <include name="ViewItem3"/>
            </define>
               <run>
<include name="@GROUP@" />
<include name="init" />
<exclude name="noRun" />
</run>
</groups>
<classes>
<class name="com.tabletweb.test.tests.ViewItemPageTests" /> 
                                        <class name="com.tabletweb.test.tests.ViewItemPageTests2" /> 
                                        <class name="com.tabletweb.test.tests.ViewItemPageTests3" /> 
</classes>
</test>
</suite>

      

Thank!

+3


source to share


1 answer


Check out the tips for working with the grid : your problem sounds like it is described there. Editing your timeout settings can also help.



We run tests in parallel with the same grid and ChromeDriver versions and we get no errors.

+3


source







All Articles