【问题标题】:i want to print only failed scenarios in cucumber html reports我只想在黄瓜 html 报告中打印失败的场景
【发布时间】:2019-02-25 05:55:16
【问题描述】:

是否可以只在 cucumber-html-reports 中打印失败的场景,即如果我有 10 个场景其中 2 个失败了,那么我想要一份关于这 2 个失败场景的报告。

我必须在 pom.xml 中更改任何依赖项吗?

        <dependency>
            <groupId>net.masterthought</groupId>
            <artifactId>cucumber-reporting</artifactId>
            <version>3.8.0</version>
            <scope>test</scope>
        </dependency>

【问题讨论】:

    标签: cucumber karate


    【解决方案1】:

    如果你注意到黄瓜 html 报告,它们有 4 种不同的测试结果执行表示,

    基于,

    1. 功能
    2. 标签
    3. 步骤
    4. 失败

    如果您只想要失败的报告,您可以使用报告中的overview-failures.html

    请在您的cucumber-html-reports 目录中查找overview-failures.html。看看这是否符合您的需要。

    【讨论】:

    • 有没有办法让黄瓜步骤失败?我目前看到一份报告,其中包含失败的方法(胶水代码),但没有失败的步骤。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-30
    • 2019-07-22
    相关资源
    最近更新 更多