如何将 JASMIN-SPEC-REPORTER 的测试结果保存在变量或文件中,以后会在测试后发送到松弛状态?
答案 0 :(得分:0)
来自https://github.com/bcaudan/jasmine-spec-reporter/tree/master/examples/protractor。将其添加到您的配置:
let SpecReporter = require('jasmine-spec-reporter').SpecReporter;
exports.config = {
// your config here ...
onPrepare: function () {
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: true
}
}));
}
}
或者你可以查看一个非常酷的回复者:https://github.com/mlison/protractor-jasmine2-screenshot-reporter。它将占用屏幕短路并将测试结果生成为html文件。