-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconf.js
More file actions
56 lines (48 loc) · 1.8 KB
/
conf.js
File metadata and controls
56 lines (48 loc) · 1.8 KB
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
var TestObject = require('./node_modules/testobject_api/lib/TestObject');
exports.config = {
seleniumAddress: 'http://eu1.appium.testobject.com/wd/hub',
specs: ['specs/*spec.js'],
// restartBrowserBetweenTests: true,
onPrepare: function() {
var caps = browser.getCapabilities();
},
multiCapabilities: [{
testobject_api_key: process.env.TESTOBJECT_API_KEY,
testobject_device: 'Google_Pixel_real',
testobject_test_name: Date.now() + " - Static",
testobject_cache_device: "true",
testobject_suite_name: "Static device allocation",
browserName: 'chrome',
shardTestFiles: true,
maxInstances: 3,
}, {
testobject_api_key: process.env.TESTOBJECT_API_KEY,
testobject_test_name: Date.now() + " - Dynamic",
testobject_cache_device: "false",
testobject_suite_name: "Dynamic device allocation",
platformName: "Android",
platformVersion: "7",
phoneOnly: "true",
browserName: 'chrome',
shardTestFiles: true,
maxInstances: 3
},
// add more configurations here
],
onComplete: function(result) {
var myAccount = new TestObject({
username: process.env.TESTOBJECT_USER_NAME,
apiKey: process.env.TESTOBJECT_API_KEY,
password: process.env.TESTOBJECT_PASSWORD
});
console.log("result is " + result);
var printSessionId = function(jobName) {
browser.getSession().then(function(session) {
console.log('SauceOnDemandSessionID=' + session.getId() + ' job-name=' + jobName);
myAccount.updateTest(session.getId(), {"passed": result}, function(res){
});
});
}
printSessionId("Insert Job Name Here");
}
};