diff options
author | Peter 'Pita' Martischka <petermartischka@googlemail.com> | 2012-11-01 22:17:31 +0000 |
---|---|---|
committer | Peter 'Pita' Martischka <petermartischka@googlemail.com> | 2012-11-01 22:17:31 +0000 |
commit | 82dfb2df214cf4c06cfe7431e77eca526ca07407 (patch) | |
tree | 7141a5724a56581db6e50f9ff1890cbeefc20875 /tests/frontend/travis | |
parent | d6d07570bf1273ef25bae2c3b3c0a1fb5853aa2e (diff) | |
download | etherpad-lite-82dfb2df214cf4c06cfe7431e77eca526ca07407.zip |
run test lib for a minute in sauce with firefox
Diffstat (limited to 'tests/frontend/travis')
-rw-r--r-- | tests/frontend/travis/.gitignore | 1 | ||||
-rw-r--r-- | tests/frontend/travis/remote_runner.js | 36 | ||||
-rwxr-xr-x | tests/frontend/travis/runner.sh | 14 |
3 files changed, 51 insertions, 0 deletions
diff --git a/tests/frontend/travis/.gitignore b/tests/frontend/travis/.gitignore new file mode 100644 index 00000000..1fe24e25 --- /dev/null +++ b/tests/frontend/travis/.gitignore @@ -0,0 +1 @@ +sauce_connect.log diff --git a/tests/frontend/travis/remote_runner.js b/tests/frontend/travis/remote_runner.js new file mode 100644 index 00000000..3b412a4b --- /dev/null +++ b/tests/frontend/travis/remote_runner.js @@ -0,0 +1,36 @@ +/* + connect to sauce labs + run 2 tests in parrallel + - check in 5s interval for status + - print out result when finished + - exit with 0 when everything has passed, else with 1 +*/ +var srcFolder = "../../../src/node_modules/"; +var log4js = require(srcFolder + "log4js"); +var wd = require(srcFolder + "wd"); + +var config = { + host: "ondemand.saucelabs.com" + , port: 80 + , username: process.env.SAUCE_USER + , accessKey: process.env.SAUCE_KEY +} + +var browser = wd.remote(config.host, config.port, config.username, config.accessKey); +var browserChain = browser.chain(); + +var enviroment = { + 'platform' : 'Linux' + , 'browserName' : 'firefox' + , 'version' : '' + , 'name' : 'Halloween test' +} + +browserChain.init(enviroment).get("http://localhost:9001/tests/frontend/", function(){ + setTimeout(function(){ + browserChain.quit(); + setTimeout(function(){ + process.exit(0); + }, 1000); + }, 60000); +}); diff --git a/tests/frontend/travis/runner.sh b/tests/frontend/travis/runner.sh new file mode 100755 index 00000000..06405b09 --- /dev/null +++ b/tests/frontend/travis/runner.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +#Move to the base folder +cd `dirname $0` + +#start etherpad lite +../../../bin/run.sh & +sleep 10 + +#start remote runner +node remote_runner.js + +kill $! +kill $(cat /tmp/sauce.pid)
\ No newline at end of file |