run test lib for a minute in sauce with firefox

pull/1158/merge
Peter 'Pita' Martischka 2012-11-01 22:17:31 +00:00
parent d6d07570bf
commit 82dfb2df21
4 changed files with 53 additions and 0 deletions

View File

@ -5,6 +5,8 @@ install:
- "bin/installDeps.sh"
before_script:
- "tests/frontend/travis/sauce_tunnel.sh"
script:
- "tests/frontend/travis/runner.sh"
env:
global:
- secure: "oKA4KbSvyxMOFCiOa3hWswnaIrCmX60MfhBhD8xu8sodOqbdK5RUrxDJew9p\n1nNSewxoVmKhX0G5GxIABfGtdU1nrEzCEoejTDJIFmzEbcLcHpcyarouWLSY\nOpn11FKS1rnb69aflHM7K8l4dhrCkA2i0Dwwl8LN3HayGzDV2Rg="

1
tests/frontend/travis/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
sauce_connect.log

View File

@ -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);
});

14
tests/frontend/travis/runner.sh Executable file
View File

@ -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)