首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Testcafe和诱人记者

Testcafe和诱人记者
EN

Stack Overflow用户
提问于 2019-06-17 17:57:26
回答 3查看 1.2K关注 0票数 1

我试着使用在上面找到的诱人记者

Allure reporter

我创建了runner:

代码语言:javascript
复制
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”。但是在我的根文件夹中,我没有得到任何诱惑力报告。我还尝试使用我自己的配置文件

代码语言:javascript
复制
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链接...)

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2019-06-17 22:49:09

TestCafe并不正式支持testcafe-reporter-allure reporter,因此我们只能建议您向其作者或魅力社区询问有关此问题的信息。

票数 2
EN

Stack Overflow用户

发布于 2019-06-18 22:31:31

testcafe-allure-report文件夹存储相对于此模块的安装路径生成的报告。因此,尝试在本地将testcafe allure-reporter安装到您的项目并执行脚本。在此之后,您的项目根目录中应该会出现allure/allure-results文件夹。

票数 3
EN

Stack Overflow用户

发布于 2020-07-22 01:58:42

我使用了这个更新的包,它开箱即用:https://www.npmjs.com/package/testcafe-reporter-allure-expanded

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56628927

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档