Merge branch 'remoterunner-fix' into saucelabs-parallel
commit
e676b12eb2
|
@ -60,7 +60,7 @@ $(function(){
|
|||
stats.tests = stats.tests || 0;
|
||||
stats.tests++;
|
||||
if ('passed' == test.state) {
|
||||
append("->","[green]PASSED[clear] :", test.title);
|
||||
append("->","[green]PASSED[clear] :", test.title," ",test.duration,"ms");
|
||||
} else if (test.pending) {
|
||||
append("->","[yellow]PENDING[clear]:", test.title);
|
||||
} else {
|
||||
|
|
|
@ -17,9 +17,9 @@ var sauceTestWorker = async.queue(function (testSettings, callback) {
|
|||
testSettings.name = name;
|
||||
testSettings["public"] = true;
|
||||
testSettings["build"] = process.env.GIT_HASH;
|
||||
testSettings["extendedDebugging"] = true; // console.json can be downloaded via saucelabs, don't know how to print them into output of the tests
|
||||
testSettings["tunnelIdentifier"] = process.env.TRAVIS_JOB_NUMBER;
|
||||
|
||||
// we wait 10 seconds here with the hope it was enough time for the minified files to be built etc.
|
||||
setTimeout(function(){
|
||||
browser.init(testSettings).get("http://localhost:9001/tests/frontend/", function(){
|
||||
var url = "https://saucelabs.com/jobs/" + browser.sessionID;
|
||||
console.log("Remote sauce test '" + name + "' started! " + url);
|
||||
|
@ -38,7 +38,7 @@ var sauceTestWorker = async.queue(function (testSettings, callback) {
|
|||
var testResult = knownConsoleText.replace(/\[red\]/g,'\x1B[31m').replace(/\[yellow\]/g,'\x1B[33m')
|
||||
.replace(/\[green\]/g,'\x1B[32m').replace(/\[clear\]/g, '\x1B[39m');
|
||||
testResult = testResult.split("\\n").map(function(line){
|
||||
return "[" + testSettings.browserName + (testSettings.version === "" ? '' : (" " + testSettings.version)) + "] " + line;
|
||||
return "[" + testSettings.browserName + " " + testSettings.platform + (testSettings.version === "" ? '' : (" " + testSettings.version)) + "] " + line;
|
||||
}).join("\n");
|
||||
|
||||
console.log(testResult);
|
||||
|
@ -47,7 +47,10 @@ var sauceTestWorker = async.queue(function (testSettings, callback) {
|
|||
callback();
|
||||
}
|
||||
|
||||
//timeout for the case the test hangs
|
||||
/**
|
||||
* timeout for the case the test hangs
|
||||
* @todo this should be configured in testSettings, see https://wiki.saucelabs.com/display/DOCS/Test+Configuration+Options#TestConfigurationOptions-Timeouts
|
||||
*/
|
||||
var timeout = setTimeout(function(){
|
||||
stopSauce(false);
|
||||
}, 1200000 * 10);
|
||||
|
@ -61,16 +64,19 @@ var sauceTestWorker = async.queue(function (testSettings, callback) {
|
|||
knownConsoleText = consoleText;
|
||||
|
||||
if(knownConsoleText.indexOf("FINISHED") > 0){
|
||||
var success = knownConsoleText.indexOf("FAILED") === -1;
|
||||
stopSauce(success);
|
||||
let match = knownConsoleText.match(/FINISHED - ([0-9]+) tests passed, ([0-9]+) tests failed/);
|
||||
if (match[2] && match[2] == 0){
|
||||
stopSauce(true);
|
||||
}
|
||||
else {
|
||||
stopSauce(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
}, 10000);
|
||||
|
||||
}, 1); //run 1 test in parrallel
|
||||
}, 4); //run 4 test in parrallel
|
||||
|
||||
// Firefox on Linux
|
||||
sauceTestWorker.push({
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
if [ -z "${SAUCE_USERNAME}" ]; then echo "SAUCE_USERNAME is unset - exiting"; exit 1; fi
|
||||
if [ -z "${SAUCE_ACCESS_KEY}" ]; then echo "SAUCE_ACCESS_KEY is unset - exiting"; exit 1; fi
|
||||
|
||||
curl https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz > /tmp/sauce.tar.gz
|
||||
curl https://saucelabs.com/downloads/sc-4.6.2-linux.tar.gz > /tmp/sauce.tar.gz
|
||||
tar zxf /tmp/sauce.tar.gz --directory /tmp
|
||||
mv /tmp/sc-*-linux /tmp/sauce_connect
|
||||
|
||||
# start the sauce connector in background and make sure it doesn't output the secret key
|
||||
(/tmp/sauce_connect/bin/sc --user "${SAUCE_USERNAME}" --key "${SAUCE_ACCESS_KEY}" --pidfile /tmp/sauce.pid --readyfile /tmp/tunnel > /dev/null )&
|
||||
(/tmp/sauce_connect/bin/sc --user "${SAUCE_USERNAME}" --key "${SAUCE_ACCESS_KEY}" -i "${TRAVIS_JOB_NUMBER}" --pidfile /tmp/sauce.pid --readyfile /tmp/tunnel > /dev/null )&
|
||||
|
||||
# wait for the tunnel to build up
|
||||
while [ ! -e "/tmp/tunnel" ]
|
||||
|
|
Loading…
Reference in New Issue