-
-
Save T-e-j-k-u-m-a-r/d2bce2d16f69164cc123c49de73bd9bd to your computer and use it in GitHub Desktop.
Protractor with Jasmine config for sauce labs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var HtmlReporter = require('protractor-html-screenshot-reporter'); | |
exports.config = { | |
sauceUser: process.env.SAUCE_USER_NAME, | |
sauceKey: process.env.SAUCE_ACCESS_KEY, | |
sauceSeleniumAddress: process.env.SELENIUM_HOST + ':' + process.env.SELENIUM_PORT + '/wd/hub', | |
specs: [ | |
'app/public/tests/e2e/*.js' | |
], | |
multiCapabilities: [ | |
{ | |
'browserName': 'Firefox', | |
'platform': 'OS X 10.10', | |
'version': '36.0', | |
'name': 'tests', | |
'tunnel-identifier': process.env.AGENT_NAME | |
} | |
], | |
onPrepare: function () { | |
require('jasmine-reporters'); | |
//if the target directory doesn't exist it will not be created automatically, it will fail | |
// the path is relative to the dir you're in when you run the test | |
jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter('../target/protractor_junit', true, true)); | |
jasmine.getEnv().addReporter(new HtmlReporter({baseDirectory: '../target/protractor_junit'})); | |
var width = 1024; | |
var height = 768; | |
console.log('setting resolution to', width, 'x', height); | |
browser.driver.manage().window().setSize(width, height); | |
}, | |
jasmineNodeOpts: { | |
defaultTimeoutInterval: 120000, | |
showColors: true, | |
isVerbose: true, | |
includeStackTrace: true | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment