You have to change your config file so it looks like this:
// An example configuration file.
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
chromeOnly: true,
capabilities: {
'browserName': 'chrome'
},
specs: ['../test/protractor/publisher_list_e2e.js'],
allScriptsTimeout: 60000,
// Options to be passed to Jasmine-node.
onPrepare: function() {
require('jasmine-reporters');
jasmine.getEnv().addReporter(
new jasmine.JUnitXmlReporter(null, true, true, '<path to directory>')
);
},
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000
}
};
The whole jasmine-reports
feature has to be done in the onPrepare
statement since jasmine
is required the only way that's guaranteed is within the onPrepare
function.
And will be based from the root folder of your project.