summaryrefslogtreecommitdiff
path: root/tests/frontend/travis
diff options
context:
space:
mode:
authorPeter 'Pita' Martischka <petermartischka@googlemail.com>2012-11-01 22:17:31 +0000
committerPeter 'Pita' Martischka <petermartischka@googlemail.com>2012-11-01 22:17:31 +0000
commit82dfb2df214cf4c06cfe7431e77eca526ca07407 (patch)
tree7141a5724a56581db6e50f9ff1890cbeefc20875 /tests/frontend/travis
parentd6d07570bf1273ef25bae2c3b3c0a1fb5853aa2e (diff)
downloadetherpad-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/.gitignore1
-rw-r--r--tests/frontend/travis/remote_runner.js36
-rwxr-xr-xtests/frontend/travis/runner.sh14
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