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

How to pass more configuration to selenium grid? #111

Closed
yvadugu-insight opened this issue Sep 25, 2013 · 17 comments
Closed

How to pass more configuration to selenium grid? #111

yvadugu-insight opened this issue Sep 25, 2013 · 17 comments

Comments

@yvadugu-insight
Copy link

I am trying to run a same testcase on 100 browser instances all parallel, I was unable to find how to pass configuration to selenium grid from protractor-conf.js

@lukemadera
Copy link

+1
I've got everything working on chromedriver but am struggling to figure out how to run multiple (different) browsers in parallel - either locally or ideally on SauceLabs. Documentation seems to be scarce all around and the Protractor config file seems to only support one browser rather than an array of browsers so I'm not sure how to go about this..
Currently I'm trying creating multiple copies of the Protractor config file and using a grunt task (grunt-shell) to run them - but I need them to all run async/in parallel.. And obviously duplicating multiple Protractor config files isn't ideal.

I've looked at the SauceLabs SeleniumGrid plugin but I'm not sure if that's what we want / if it will work with Protractor?

Any help or fixes/updates would be appreciated!

@mping
Copy link

mping commented Oct 4, 2013

@lukemadera you can always try something like https://github.com/iammerrick/grunt-parallel, although this doesn't prevent config files duplication. Also, a neat thing would be matrix test reporting, ie, each test row would have a column for each browser, but that's more of a test runner thing (ie, jasmine or whatever).

@lukemadera
Copy link

@mping thanks! That seems to be working (as you said there's duplicate files but I got SauceLabs to run 2 tests at once so it's working at least)!

@zazoomauro
Copy link

with grunt-parallel sometimes works fine and sometimes throw this:

/home/new-user/www/tempo-send-mobile-pin/node_modules/protractor/node_modules/seleniun-webdriver/lib/webdriver/promise.js:1542
>>       throw error;
>>             ^
>> Error: Timed out waiting for the WebDriver server at http://192.168.60.60:48223/wd/hub

any idea?

@jfroom
Copy link
Contributor

jfroom commented Nov 4, 2013

Hopefully it's on the roadmap to get some parity with how Karma is dealing with concurrency (easier said then done, I know). It's very well integrated:
https://github.com/karma-runner/karma/blob/master/docs/config/03-browsers.md#available-browser-launchers
https://github.com/karma-runner/karma-sauce-launcher#configuration

@jfroom
Copy link
Contributor

jfroom commented Nov 5, 2013

imho grunt-concurrent is a bit better because it's slightly faster and it has a limit option. The limit number gates the number of parallel tests which you'd need to dial in depending on your sauce account type.

I was able to chain some grunt tasks together to run 3 tests total, with a limit of 2 at a time, using grunt-concurrent. It's pretty darn ugly though since the conf files are duplicated. I tried to use require to share as many config properties as possible but it's still not DRY enough.

I also integrated sauce-connect-launcher into my grunt flow to have it launch automatically based on the grunt root task - but it's pretty slow waiting for the tunnel to open up. It's faster to open a local tunnel connection manually and just leave it open during development/local testing. I do notice the connection gets flakey or dies when I put my computer to sleep, or when the connect .jar been running for hours - I just have to restart the .jar. However, I figure for a CI or travis approach, this connect automation will be necessary.

This approach feels very non-optimized and temporary. A port of karma-sauce-launcher over to protractor-sauce-launcher seems like the way to go. Unfortunately, I don't have the bandwidth, or enough domain familiarity, to take that task on myself.

@facultymatt
Copy link

Looking to do the same thing. So for I found https://github.com/aeh/grunt-mocha-protractor which looks to support this... problem is it's not updated to work with protractors browser, by, and other globally exposed methods.

@facultymatt
Copy link

Errr, and since it uses mocha it doesn't play well with promises...

@bradgreens
Copy link

+1 for replicating Karma's concurrency pattern.

@fwielstra
Copy link

+1; I'd like to be able to have the end-to-end tests run on a list of target platforms and browsers, automatically after a git commit or manually, much like how I have Karma run my unit tests on several browsers and devices simultaneously.

This was possible using angular-scenario, too (since that ran in an iframe from within karma), so ATM I'm not sure if I should continue writing my end to end tests in protractor.

@bayarmunkh
Copy link

Any idea on using Protractor with Selenium Grid?

@juliemr
Copy link
Member

juliemr commented Feb 15, 2014

Should be resolved with 77393d0 and follow-ups.

@juliemr juliemr closed this as completed Feb 15, 2014
@paolodm
Copy link

paolodm commented Apr 2, 2014

Per 77393d0, it looks like running protractor selenium-grid style is possible. However, I don't see any documentation for this. Is there anything I can reference to get my protractor tests to run in-parallel?

@glepretre
Copy link

Are you looking for the multiCapabilities option?

@paolodm
Copy link

paolodm commented Apr 3, 2014

@glepretre Not really. I want to split up my tests across several machines so that I can get a quicker result. multiCapabilities allows you to do that across browsers, but I want to split up my tests even if I'm just using one browser.

@dalssoft
Copy link

@glepretre Not really. I want to split up my tests across several machines so that I can get a quicker result. multiCapabilities allows you to do that across browsers, but I want to split up my tests even if I'm just using one browser.

+1 @paolodm

@iljapavlovs
Copy link

@paolodm, @dalssoft have you managed to find a solution? The ptoblem is that it's not possible to run protractor in selenium grid with all of the great features of grid

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

No branches or pull requests