Ramesh T
Ramesh T

Reputation: 106

Run protractor tests in parallel with JUnitXmlReporter

Im running the protractor specs in parallel and generating an xml report. the problem is the report is being overridden instead of consolidating all the specs results.

protractor.config.js is as follows:

capabilities: {
    'browserName': 'chrome',
    shardTestFiles: true,
    maxInstances: 5

},

onPrepare: function () {
var jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
    consolidateAll: true,
    savePath: 'TestReports',
    filePrefix: 'xmloutput',
    consolidate: true
}));
},

Any help will be appreciated!!

Upvotes: 2

Views: 1075

Answers (1)

craig
craig

Reputation: 5016

Have you seen the Protractor-cookbook? There's an example of a jasmine junit reporter. In the example the tests are conslidated to a single xml file.

I would also remove the sharding to make sure that sharded tests are not causing the problem.

Upvotes: 1

Related Questions