我在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)
);
}
答案 0 :(得分:1)
回答您的第一个问题并引用jasmine-reporters
存储库,您应该将具有savePath
属性的对象传递给报告者,以便将报告存储在自定义路径中。这是怎样的 -
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。
根据你的第二个问题,我不认为你可以将true
这样的论点传递给记者,因为大多数记者根据财产/关键名称确定了一个参数。 jasmine-reporters
点的github仓库可以传递带有NUnitXmlReporter
- savePath
,filename
,reportName
的以下属性的参数。
希望它有所帮助。