I am facing synchronisation issues with my protractor tests and I would like to run my tests in parallel in contrast to my actual settings. In fact at the moment my tests run one after the other. I know how to this with TestsNG not sure how to do it with Jasmin Framework?
To split tests between two browsers,
capabilities: {
browserName: 'chrome',
shardTestFiles: true,
maxInstances: 2
},
Since 0.19.0 version of Protractor, you can run tests in parallel using the multiCapabilities
option:
protractor.conf.js
multiCapabilities: [{
'browserName': 'chrome'
}, {
'browserName': 'chrome'
}]
from Browser setup - Protractor docs
This issue seems to fit your case.
For now, Protractor doesn't allow to set Webdriver maxSessions
option, there is a more global discussion to include this feature among others.
EDIT: multiCapabilities was introduced to run tests in parallel under different browsers, but in your case, you can use it to run multiple instances of the same ;)
multiCapabilities: [
{
"browserName": "chrome",
shardTestFiles: true,
maxInstances: 2,
specs: ['login.js', 'login2.js', 'login.js', 'login2.js']
},
{
"browserName": "firefox",
"count": 1
specs: ['login2.js']
},
],
You can use both "count" as well "maxInstances" This is what worked best for me ..
"browserName": "chrome",
shardTestFiles: true,
maxInstances: 2,
specs: ['login.js', 'login2.js', 'login.js', 'login2.js']
this would run 4 tests divided equally(or may not equally) in two different chrome browsers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With