Reputation: 1
I added the following command in my config.file
onPrepare: function() {
var jasmineReporters = require('C:/Users/KB_PRASHA_QA/AppData/Roaming/npm/node_modules/jasmine-reporters');
jasmine.getEnv().addReporter(
new jasmineReporters.NUnitXmlReporter ('C:/Users/KB_PRASHA_QA/AppData/Roaming/npm/node_modules/protractor/example/outputdir', true, true)
);
}
Upvotes: 0
Views: 252
Reputation: 6962
Answering your first question and referring to jasmine-reporters
repository, you should be passing an object with savePath
property to the reporter to have your report stored in a custom path. Here's how -
jasmine.getEnv().addReporter(
new jasmineReporters.NUnitXmlReporter ({savePath: 'C:/Users/KB_PRASHA_QA/AppData/Roaming/npm/node_modules/protractor/example/outputdir'})
);
Here's an example implementation of it in the github repo.
As per your second question, i don't think you can just pass in an argument like true
to the reporter, as most of the reporters identify an argument based on the property/key name. The github repo for jasmine-reporters
points that you can pass the arguments with following properties for NUnitXmlReporter
- savePath
, filename
, reportName
.
Hope it helps.
Upvotes: 1