I am trying to run my three specs in three separate instances but when I run the configuration file, one instance is opened and then closes. Other two specs runs successfully.
var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter');
var reporter = new HtmlScreenshotReporter({
dest: 'C:/Users/bill/report/report/screenshots',
filename: 'my-report.html'
});
exports.config = {
directConnect: true,
framework: 'jasmine',
// seleniumAddress: 'http://localhost:4444/wd/hub',
jasmineNodeOpts: {
defaultTimeoutInterval: 640000000
},
specs: ['00-test.js',
'01-test.js',
'02-test.js'],
multiCapabilities: [
{
browserName: 'chrome',
shardTestFiles: true,
maxInstances: 3,
}
],
// Setup the report before any tests start
beforeLaunch: function() {
return new Promise(function(resolve){
reporter.beforeLaunch(resolve);
});
},
// Assign the test reporter to each running instance
onPrepare: function() {
jasmine.getEnv().addReporter(reporter);
},
// Close the report after all tests finish
afterLaunch: function(exitCode) {
return new Promise(function(resolve){
reporter.afterLaunch(resolve.bind(this, exitCode));
});
}
}
You don't need multiCapabilities here as you are running in single browser which is chrome.Try Capabilities only.