-
Notifications
You must be signed in to change notification settings - Fork 123
Added support for multiCapabilities object and splitTestsBetweenCapabilities boolean #62
base: master
Are you sure you want to change the base?
Conversation
…ilities boolean which were recently added to protractor
@rrazey Have you tested Because I think |
I have tested this. Actually, as far as I could tell, protractor was not taking multiCapabilities from the command line at all, so I submitted a PR on the protractor project to rectify that: angular/protractor#860 The command gets sent to protrator with these arguments:
which is equivalent to this array:
This is consistent with the params argument - to pass an array of objects to protractor via command line, this is the format:
As soon as the protractor PR makes its way through, this should work. I'm fine with holding off on merging this one in until the protractor PR is merged in. |
How would you call for instance of browsers now, if in example with one browser it was: How to open test in chrome, and in the middle of the test to open in firefox? |
@lovacuzitu This isn't what the multiCapabilities object is used for. It's used to execute your tests in parallel, either on different browsers for browser specific testing, or on multiple instances of the same browser to speed up your test execution. I suggest reading more about it, here are some suggested start points: |
Hi, i've patched the two given files "protractor/lib/cli.js" and "grunt-protractor-runner/tasks/protractor_runner.js" but it does not work like expected. if i setup multiple browsers in the following form:
There will be an error from selenium "cannot find : Capabilities ..." so i think this is the same error as my prior ticket (#59). Ill thik the problem is, that one or more of my paramters ("version") is not supportet by protractor as an parameter for the config file? Can anyone confirm this and/or extend the protractor-config? (ill rarely speaking javascript so ill dont understand anything in the protractor code :D) Hint: |
@Brootux I pasted your snippet into my gruntfile and am having no issues running either locally or in Saucelabs. I suspect that it's not related to these updates. |
Hm, okay. How was your exact setup in Gruntfile.js?
? You're right, ill think this has noting to do with this update :) (but ill said this in my prior comment) |
Is there any status update on this? This would be great to land to allow for SauceLabs testing. |
Hi there, after testing a lot i have found my error. Ive had installed two versions of protractor, the "normal" and the one, that comes with the grunt-protractor-runner. So my npm-package view was like this:
So ive had always patched the "normal" protractor, but this had no effect on the behaviour of grunt-protractor-runner. After deleting the "normal" protractor package and patching your given protractor-patch (angular/protractor#860) to the right protractor installation the execution of multiple Browsers has worked. But then i encountered my other problem with the setup of the version of the browser. After trying a lot ive found the problem. After calling "flattenObject" there was the following structure for a capability:
As you can see, the version was "parsed" from flattenObject() as a number, not a string. So ive manipulated the flattenObject()-Method to "parse" the version as a string:
With that, the structure for a capability is
And now everything works fine. You now get my 1up to merge this into the project :) |
@rrazey After i saw, that the merging of your protractor-patch was closed ive created a new pull-request with your code and my extensions here: angular/protractor#1083 |
The last comment here lasts from 2 months, will this pull request be checked soon ? Or should I move on and merge manually the commit allowing for this ? |
@hilnius Does this PR work? I thought it has been waiting for the PR angular/protractor#860 or angular/protractor#1083 to be merged to protractor?? |
Yeah, @hilnius please create some pressure to angular/protractor#1083 :) |
Any updates on this feature? |
I was going to create a pull request for this but found that rrazey already did it. Github has marked this PR as containing a merge conflict. Would teerapap mind merging this in? If you'd like, I can create another PR to take care of the merge conflict. |
/bump 👍 |
This would be a really useful (jenkins, saucelabs/local testing) if we could get it merged, is it possible for anyone else to correct the merge conflicts? |
Hello this issue continues, I solve calling a different config file in the task watch I like run multiCapabilities. |
I want this too, because I'd like to have my config in the gruntfile. |
See PR #131 |
Thanks for working on this, t0mtaylor! |
how can we add max duration to load a page completely? |
Hi, Thanks, |
These two parameters were fairly recently added to protractor and I'd like to be able to pass them directly into my protractor config file from the gruntfile.