Skip to content

Commit f74c401

Browse files
IOS | Add w3c caps for parallel tests
1 parent eeb0dd3 commit f74c401

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

ios/examples/run-parallel-test/parallel.conf.js

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,27 @@ exports.config = {
1010

1111
maxInstances: 10,
1212
commonCapabilities: {
13-
project: "First Webdriverio iOS Project",
14-
build: 'Webdriverio iOS Parallel',
15-
name: 'parallel_test',
16-
app: process.env.BROWSERSTACK_APP_ID || 'bs://<hashed app-id>',
17-
'browserstack.debug': true
13+
platformName: "ios",
14+
"appium:app": process.env.BROWSERSTACK_APP_ID || 'bs://<hashed app-id>',
15+
'bstack:options' : {
16+
"projectName" : "First Webdriverio iOS Project",
17+
"buildName" : "Webdriverio iOS Parallel",
18+
"debug" : "true"
19+
}
1820
},
1921

2022
capabilities: [{
21-
device: "iPhone 11 Pro",
22-
os_version: "13"
23+
"appium:deviceName": 'iPhone 11 Pro',
24+
"appium:platformVersion": "13",
25+
'bstack:options' : {
26+
"sessionName" : "parallel_test1"
27+
}
2328
}, {
24-
device: "iPhone 11 Pro Max",
25-
os_version: "13"
29+
"appium:deviceName": 'iPhone 11 Pro Max',
30+
"appium:platformVersion": "13",
31+
'bstack:options' : {
32+
"sessionName" : "parallel_test2"
33+
}
2634
}],
2735

2836
logLevel: 'info',
@@ -32,6 +40,7 @@ exports.config = {
3240
waitforTimeout: 10000,
3341
connectionRetryTimeout: 90000,
3442
connectionRetryCount: 3,
43+
services: [['browserstack']],
3544

3645
framework: 'mocha',
3746
mochaOpts: {
@@ -41,6 +50,8 @@ exports.config = {
4150
};
4251

4352
// Code to support common capabilities
44-
exports.config.capabilities.forEach(function(caps){
45-
for(var i in exports.config.commonCapabilities) caps[i] = caps[i] || exports.config.commonCapabilities[i];
46-
});
53+
var common_caps = exports.config.commonCapabilities
54+
var caps = exports.config.capabilities
55+
for (var i in caps){
56+
caps[i] = {...caps[i], ...common_caps}
57+
}

0 commit comments

Comments
 (0)