Permalink
Browse files

chore(e2e) add SauceLabs support to Travis CI for protractor

* Subscribed open-source account to SauceLabs
* .travis.yml:
  * add sauce_connect addon
  * add SauceLabs credentials
  * before_script:
    * gulp build (to test a regular build)
    * gulp clean
    * gulp build --env test (to prepare a bundled test version to server in build/dist)
    * npm run forever-start-dist (serve build/dist folder in daemon mode)
* protractor.config.js: added config for SauceLabs

See infos on Setup Travis CI & SauceLabs for Protractor at http://dev.topheman.com/setup-travis-ci-saucelabs-for-protractor
  • Loading branch information...
topheman committed Aug 26, 2015
1 parent e590be3 commit 7898239ea252b9163e3e02b77aef2d6e13c0fa5a
Showing with 41 additions and 8 deletions.
  1. +12 −5 .travis.yml
  2. +5 −3 package.json
  3. +10 −0 protractor.config.js
  4. +14 −0 test/forever.gulp.serve.dist.json
View
@@ -1,14 +1,21 @@
language: node_js
node_js:
- "0.12"
- '0.12'
addons:
sauce_connect: true
env:
global:
- secure: "lVqaKzskSfk4RQRYWhb/9eF9iY/18+ZDD3+85tCZVQP/SNRybvAUm9TgCJP8T1JYU4xjmKeXsglg6XHabjbTOqHDo76vKk47rtFD8MOz5/GjGaC0fPNbHgjrXcinMquv1P1tJRle31kLf+BBtrj1LAl/PgoGTTm63OhXDiO6ijVoIVgSLHXWHJVSDu2FsEgAn+rO0nQkMUHgAHs1V1ocy+kZjRf+rIMSn7K6Va/sY0dN7r/efB3yQCBDxCKarORCU+ixDtwEApplWr+8p/IXsb4P3NQ80dmIBzYOd++cAVe1GfmMYcqBgZMg7+EjY14RoL+XwPimu7fQ2GhhQbzFrvJYb73a/CSfaMbtvO2oCCLAbfiPuijt7DhuuWJbhtKHTaJ+HHiEExVk6DA9VrQz1dIBgFD8FtblRskxkTRFsIyQGxdqnpoU/gCNL2MoluBtYTMai6TrcDNxZ+U1zlCTGyWbHr8hy/WUW7nW48KS2LlHbNjBlCw6G+WKy2IotyMOahqS+Fnksk0/QeHNAjUYy8lIpG/hZvdalJW8GsMszyeOrw3Pt6pXkjf7U74oLTmimhk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QNx/zYZj9ZK5y0skJsikaRBBQM=
before_install:
- npm install jspm
- ./node_modules/.bin/jspm config registries.github.auth $JSPM_GITHUB_AUTH_TOKEN
before_script:
- gulp build
- gulp clean
- gulp build --env test
- npm run forever-start-dist
script:
- npm test
- npm run test-build
- npm run test-e2e
View
@@ -10,11 +10,13 @@
"postinstall": "./node_modules/.bin/jspm install",
"test-build": "./bin/test-build.sh",
"test-e2e": "./node_modules/.bin/protractor protractor.config.js",
"forever-start": "echo \"Launching server (test mode) ...\" && ./node_modules/.bin/forever start ./test/forever.gulp.serve.test.json",
"forever-stop": "echo \"Stopping script ...\" && ./node_modules/.bin/forever stop gulp.serve.test",
"forever-start-test": "echo \"Launching server (test mode) ...\" && ./node_modules/.bin/forever start ./test/forever.gulp.serve.test.json",
"forever-stop-test": "echo \"Stopping script (test mode) ...\" && ./node_modules/.bin/forever stop gulp.serve.test",
"forever-start-dist": "echo \"Launching server (dist mode) ...\" && ./node_modules/.bin/forever start ./test/forever.gulp.serve.dist.json",
"forever-stop-dist": "echo \"Stopping script (dist mode) ...\" && ./node_modules/.bin/forever stop gulp.serve.dist",
"forever-stopall": "echo \"Stopping all script ...\" && ./node_modules/.bin/forever stopall",
"forever-list": "./node_modules/.bin/forever list",
"test-e2e-standalone": "npm run forever-start && sleep 4 && npm run test-e2e && npm run forever-stop",
"test-e2e-standalone": "npm run forever-start-test && sleep 4 && npm run test-e2e && npm run forever-stop-test",
"webdriver-manager-update": "./node_modules/.bin/webdriver-manager update"
},
"pre-commit": [
View
@@ -47,4 +47,14 @@ var config = {
}
};
if (process.env.TRAVIS) {
config.sauceUser = process.env.SAUCE_USERNAME;
config.sauceKey = process.env.SAUCE_ACCESS_KEY;
config.capabilities = {
'browserName': 'chrome',
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
'build': process.env.TRAVIS_BUILD_NUMBER
};
}
module.exports.config = exports.config = config;
@@ -0,0 +1,14 @@
{
"uid": "gulp.serve.dist",
"append": true,
"watch": false,
"script": "./node_modules/.bin/gulp",
"args": [
"serve",
"--env",
"dist",
"--disable-watch",
"--open",
false
]
}

0 comments on commit 7898239

Please sign in to comment.