【发布时间】:2020-05-18 11:57:21
【问题描述】:
【问题讨论】:
标签: puppeteer codeceptjs mochawesome
【问题讨论】:
标签: puppeteer codeceptjs mochawesome
您可以使用 HTML 报告而不是 JSON 输出,在您的 codecept.conf.js 中添加以下配置:
为助手添加 Mochawesome 助手:
helpers: {
Mochawesome: {
"uniqueScreenshotNames": "true",
"disableScreenshots" : "false"
}
}
并将 {"reportDir": "output"} 添加到 mocha 配置中,如下所示:
mocha: {
"reporterOptions": {
"codeceptjs-cli-reporter": {
"stdout": "-",
"options": {
"verbose": true,
"steps": true,
}
},
"mocha-junit-reporter": {
"stdout": "./output/console.log",
"options": {
"mochaFile": "./output/result.xml"
}
},
"reportDir": "output",
"inlineAssets": true,
"reporter": "mochawesome"
}
}
【讨论】: