diff options
Diffstat (limited to 'tests')
-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 |