【问题标题】:possible values for @CucumberOptions(plugin = ...)@CucumberOptions(plugin = ...) 的可能值
【发布时间】:2017-03-18 19:22:20
【问题描述】:

我正在使用@CucumberOptions(plugin = {"pretty"} 测试黄瓜中的报告,但默认颜色真的很糟糕..所以我希望更改输出报告中的字体颜色。任何人都知道。 .如何进一步?

【问题讨论】:

    标签: cucumber cucumber-jvm cucumber-junit test-reporting


    【解决方案1】:

    控制台颜色见Console-Colours

    对于报告,您可以指定以 JSON 格式输出报告,然后将生成的 JSON 传递给自定义格式化程序。见Custom-Formatters。顺便说一句,这就是 TeamCity 创建报告的方式。

    以下是生成 HTML 和 JSON 报告的示例:

    @RunWith(Cucumber.class)
    @Options(format = { "html:target/cucumber-html-reports", "json:target/cucumber-html-reports/cucumber.json"},
        features = { "."},
        tags = {"~@obsolete", "~@wip", "~@detailed", "~@SP", "@FRA001, @SWZ001"},
        strict = true)
    
    public class CucumberRunnerTest {
    }
    

    JSON cucumber-jvm 报告的目的不是为了可读,而是作为传递给其他应用程序的中间体。请参阅各个自定义格式化程序以了解它们支持的颜色选项。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-01-20
      • 1970-01-01
      • 2021-02-11
      • 2020-07-18
      • 1970-01-01
      • 2018-04-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多