3

I am running tests on Selenium grid - usually 5 machines running tests in parallel. I am getting some odd errors that aren't consistent. For example, one of my tests with about 600 iterations will finish with 0-50 of the 3 errors below. The number is different every time I run it. For each exception, the line it fails on is always the same.

  1. org.openqa.selenium.UnsupportedCommandException: Command duration or timeout: 65.91 seconds com.web.test.library.BaseTest.openUrl(BaseTest.java:45)

    Line #45 in BaseTest: remoteDriver.get(url);

  2. org.openqa.selenium.WebDriverException: Error forwarding the new session Error forwarding the request Read timed out Command duration or timeout: 134.11 seconds com.web.test.utility.DriverFactory.generateDriver(DriverFactory.java:46)

    Line #46 in DriverFactory: WebDriver driver = new RemoteWebDriver("my hub url here", capabilities);

  3. org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms com.web.test.utility.DriverFactory.generateDriver(DriverFactory.java:46)

    Line #46 in DriverFactory: WebDriver driver = new RemoteWebDriver("my hub url here", capabilities);

When I search for these errors online the fixes only help when this error is stopping every test. I can't find anything when it happens inconsistently like this. For example, the fix I found for #1 requires editing the host file. I don't think that is the problem in my case since it works ~95% of the time.

1 Answer 1

2

I'm guessing you are doing parallel testing using multiple threads.

If that is the case, I would recommend looking at ThreadGuard. It's a lightweight solution to make Webdriver thread safe.

If that doesn't work, then I imagine you are running into a networking overload problem (you are trying to do too many outgoing connections). How to fix such a problem, I don't know.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks, Nathan. I will check that out. You are correct that I am running tests in parallel with multiple threads.
@l3v I know long time has past since then, but any chance that you've solved the problem? IS it possible for you to share the solution a little bit?
@YAAK I do not have a solution. I don't remember how I got rid of it. If I recall, I think this was happening with FirefoxDriver and I began to mostly use ChromeDriver. I also use ThreadGuard as mentioned above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.