Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running remote grid tests in parallel? #48

Closed
aarong opened this issue Feb 24, 2024 · 2 comments
Closed

Running remote grid tests in parallel? #48

aarong opened this issue Feb 24, 2024 · 2 comments

Comments

@aarong
Copy link

aarong commented Feb 24, 2024

I'm trying to run tests on multiple platforms/browsers in parallel on Sauce (useRemoteSeleniumGrid === true). If I call runSpecs() multiple times without allowing it to finish, I understandably get:

Error: listen EADDRINUSE: address already in use :::5555

And if I try to specify a different port for each platform/browser combo, I get:

Error: Can't specify a port when browser.useSauce or browser.useRemoteSeleniumGrid is true

Is there any way to run multiple platforms/browsers in parallel? Apologies if I'm missing something obvious.

@sgravrock
Copy link
Member

We could consider removing that restriction. But the experience when you choose a port number other than the handful that Sauce Connect supports is pretty bad:

WebDriverError: Reached error page: about:neterror?e=connectionFailure&u=http%3A//localhost%3A1234/%3Frandom%3Dtrue&c=UTF-8&d=Firefox%20can%E2%80%99t%20establish%20a%20connection%20to%20the%20server%20at%20localhost%3A1234.
    at Object.throwDecodedError (/[...]/node_modules/selenium-webdriver/lib/error.js:524:15)
    at parseHttpResponse (/[...]/node_modules/selenium-webdriver/lib/http.js:601:13)
    at Executor.execute (/[...]/node_modules/selenium-webdriver/lib/http.js:529:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async thenableWebDriverProxy.execute (/[...]/node_modules/selenium-webdriver/lib/webdriver.js:745:17)
    at async Runner.run (/[...]/lib/runner.js:103:5)
    at async Object.runSpecs (/[...]/index.js:112:25)
    at async Command.runSpecs (/[...]/lib/command.js:187:5) {
  remoteStacktrace: 'RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8\n' +
    'WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:191:5\n' +
    'UnknownError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:800:5\n' +
    'checkReadyState@chrome://remote/content/marionette/navigate.sys.mjs:58:24\n' +
    'onNavigation@chrome://remote/content/marionette/navigate.sys.mjs:324:39\n' +
    'emit@resource://gre/modules/EventEmitter.sys.mjs:154:20\n' +
    'receiveMessage@chrome://remote/content/marionette/actors/MarionetteEventsParent.sys.mjs:33:25\n'

@aarong
Copy link
Author

aarong commented Feb 25, 2024

I've been trying out various ports by replacing the "5555" in Jasmine Browser Runner's index.js to different values and the options listed on the following page seem to work for me (didn't try them all though):

https://docs.saucelabs.com/secure-connections/sauce-connect/advanced/specifications/

So maybe it would make sense to allow the port to be configured via the options object?

Unless I'm missing a simpler/better way to parallelize my tests across platforms/browsers. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants