mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
PoC saucelabs test runner
This commit is contained in:
29
saucelabs.js
Normal file
29
saucelabs.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
var port = 8081;
|
||||||
|
|
||||||
|
// Create a web server for the local dir
|
||||||
|
var connect = require('connect');
|
||||||
|
var server = connect.createServer(
|
||||||
|
connect.static(__dirname)
|
||||||
|
).listen(port);
|
||||||
|
|
||||||
|
// Tell saucelabs to run some tests
|
||||||
|
var username = process.env['SAUCE_USERNAME'];
|
||||||
|
var accessKey = process.env['SAUCE_ACCESS_KEY'];
|
||||||
|
|
||||||
|
var request = require('request');
|
||||||
|
|
||||||
|
request.post(
|
||||||
|
'https://saucelabs.com/rest/v1/' + username + '/js-tests',
|
||||||
|
{
|
||||||
|
auth: { user: username, pass: accessKey },
|
||||||
|
json: {
|
||||||
|
platforms: [[ "Windows 7", "chrome", "27" ]],
|
||||||
|
url: "http://localhost:" + port + "/test/index.html",
|
||||||
|
framework: "qunit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function (error, response, body) {
|
||||||
|
console.log(response.statusCode);
|
||||||
|
console.log(body);
|
||||||
|
}
|
||||||
|
);
|
||||||
Reference in New Issue
Block a user