我是诱惑报告的新手,想生成诱惑报告。有人能帮忙吗?
我正在尝试一个简单的例子,我的项目文件夹包含 config.js 和 test.js 以及安装的诱惑报告
当我运行配置文件时,它正在创建一个文件夹 allure-results,在那里我可以看到屏幕截图和一个 xml 文件。我不知道从这里开始做什么,我正在尝试使用 maven 但无法生成 html 报告。
我已经添加了我的例子的代码
配置文件
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: 'test.js',
onPrepare: function () {
var AllureReporter = require('jasmine-allure-reporter');
jasmine.getEnv().addReporter(new AllureReporter({
allureReport: {
resultsDir: 'allure-results'
}
}));
jasmine.getEnv().afterEach(function (done) {
browser.takeScreenshot().then(function (png) {
allure.createAttachment('Screenshot', function () {
return new Buffer(png, 'base64');
}, 'image/png')();
done();
});
});
}
};
Run Code Online (Sandbox Code Playgroud)
测试.js
describe('angularjs homepage todo list', function () {
var todoList = element.all(by.repeater('todo in todoList.todos'));
it('should add a todo', function () …Run Code Online (Sandbox Code Playgroud)