我试着使用在上面找到的诱人记者
我创建了runner:
const createTestCafe = require('testcafe');
let testcafe = null;
createTestCafe('localhost', 1337, 1338)
.then(tc => {
testcafe = tc;
const runner = testcafe.createRunner();
return runner
.src(['tests/fixture1.js', 'tests/ingo1.js'])
.browsers(['chrome'])
.reporter('allure')
.run();
})
.then(failedCount => {
console.log('Tests failed: ' + failedCount);
testcafe.close();
});当启动脚本时,我得到消息"Allure reporter“,当我完成时,我得到"Allure reporter”。但是在我的根文件夹中,我没有得到任何诱惑力报告。我还尝试使用我自己的配置文件
const DOC_ALLURE_CONFIG = {
CLEAN_REPORT_DIR: true,
COPY_HISTORY: true,
RESULT_DIR: '/allure/allure-results',
REPORT_DIR: '/allure/allure-report',
META: {
STORY_ID: 'STORY',
TEST_ID: 'ID',
SEVERITY: 'SEVERITY',
TEST_RUN: 'TEST_RUN'
},
STORY_LABEL: 'JIRA Story Link',
STORY_URL: 'https://jira.example.ca/browse/{{ID}}',
TEST_LABEL: 'JIRA Test Link',
TEST_URL: 'https://jira.example.ca/secure/Tests.jspa#/testCase/{{ID}}',
labels: {
screenshotLabel: 'Screenshot',
browserLabel: 'Browser',
userAgentLabel: 'User Agent',
allureStartMessage: 'Allure Ingo reporter started...',
allureClosedMessage: 'Allure Ingo reporter closed...'
}
};
module.exports = DOC_ALLURE_CONFIG;这也不起作用。自定义消息不会显示,仅显示默认消息。它看起来像是诱惑插件忽略了所有的东西,并且没有很好地识别我的节点模块。
在我的项目根目录中获取诱人报告时,我错过了什么设置?
(还尝试使用npm链接...)
发布于 2019-06-17 22:49:09
TestCafe并不正式支持testcafe-reporter-allure reporter,因此我们只能建议您向其作者或魅力社区询问有关此问题的信息。
发布于 2019-06-18 22:31:31
testcafe-allure-report文件夹存储相对于此模块的安装路径生成的报告。因此,尝试在本地将testcafe allure-reporter安装到您的项目并执行脚本。在此之后,您的项目根目录中应该会出现allure/allure-results文件夹。
发布于 2020-07-22 01:58:42
我使用了这个更新的包,它开箱即用:https://www.npmjs.com/package/testcafe-reporter-allure-expanded
https://stackoverflow.com/questions/56628927
复制相似问题