Skip to content

Add more browser testing with Sauce Labs. #2

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

Open
wants to merge 7 commits into
base: solution
Choose a base branch
from

Conversation

heathkit
Copy link
Collaborator

Here's a simple example of one way to add support for testing on Sauce Labs. No need to actually merge this, it's just intended as an example.

sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY,

directConnect: false,
Copy link
Collaborator

@cnishina cnishina Sep 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of trying to override an existing with an Object.assign, could we instead do something like:

var defaultConfig = require('./protractor.conf.js').config;

defaultConfig.directConnect = undefined;
defaultConfig.seleniumAddress = undefined;
defaultConfig.sauceUser
...

exports.config = defaultConfig;

similar to https://github.com/angular/protractor/blob/6a667c8a3211ac451a264544bb6f44dfe29f7b74/spec/ciNg2Conf.js

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, defaultConfig.capabilities = undefined to get rid of the warning

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out the problem was I was using an old Sauce Labs account, which didn't have any VM minutes for automated testing. Instead of throwing an error, Sauce would just hang forever waiting to launch.

Also, this uncovered a bug in Protractor. The way 'beforeLaunch' is used to set up ts-node doesn't actually work with multiCapabilities, because of the way we fork in the launcher. I suspect that if you used test sharding, that would also break.

@heathkit heathkit force-pushed the add-saucelabs branch 2 times, most recently from 4953489 to e9c713a Compare September 26, 2016 10:29
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

Successfully merging this pull request may close these issues.

2 participants