-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkarma.saucelabs.conf.js
78 lines (68 loc) · 1.81 KB
/
karma.saucelabs.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
console.log('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.');
process.exit(1);
}
// https://saucelabs.com/platforms/
var browsers = {
sl_chrome: {
base: 'SauceLabs',
browserName: 'chrome',
platform: 'Windows 7',
version: '35'
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
version: '30'
},
sl_ios_safari: {
base: 'SauceLabs',
browserName: 'iphone',
platform: 'OS X 10.9',
version: '7.1'
},
sl_ie_11: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11'
}
};
var key,
defCfg = {},
cfg = {
reporters: ['saucelabs', 'spec'],
browsers: Object.keys(browsers),
customLaunchers: browsers,
captureTimeout: 120000,
browserNoActivityTimeout: 60000,
sauceLabs: {
testName: 'web-istanbul',
build: 'local ' + Date.now(),
recordLogs: true,
recordVideo: false,
startConnect: true,
recordScreenshots: true,
captureHtml: true,
passed: true,
public: 'public',
connectOptions: {
port: 5757,
logfile: 'sauce-connect.log'
}
},
singleRun: true,
autoWatch : false
};
if (process.env.TRAVIS) {
cfg.logLevel = 'LOG_DEBUG';
cfg.sauceLabs.build = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';
cfg.sauceLabs.startConnect = false;
cfg.sauceLabs.recordScreenshots = true;
cfg.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER;
}
require('./karma.local.conf.js')({set: function(obj) { defCfg = obj; }});
for (key in defCfg) if (!(key in cfg) && defCfg.hasOwnProperty(key)) cfg[key] = defCfg[key];
module.exports = function(config) {
config.set(cfg);
};