@CucumberOptions(plugin = ...)的可能值 [英] possible values for @CucumberOptions(plugin = ...)
问题描述
我在黄瓜中使用@CucumberOptions(plugin = {"pretty"}作为测试报告,但是默认颜色确实不好..所以我希望更改输出报告中的字体颜色..如何进一步进行?
I am using @CucumberOptions(plugin = {"pretty"} for test report in cucumber but the default colors for this are really bad..so I am looking to change the font color in output report. Anyone as any idea..how proceed further?
推荐答案
有关控制台的颜色,请参见控制台颜色.
For console colors see Console-Colours.
对于报告,您可以指定以JSON输出报告,然后将生成的JSON传递给自定义格式器.参见自定义格式.顺便说一句,这就是TeamCity创建报告的方式.
For reports you can specify that the report be output in JSON and then pass the generated JSON to a custom formatter. See Custom-Formatters. BTW, this is how TeamCity creates its reports.
以下是同时生成HTML和JSON报告的示例:
Here is an example of generating both HTML and JSON reports:
@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 {
}
JSONcumber-jvm报告不是可读性的,而是您传递给其他应用程序的中间内容.有关它们支持的颜色选项,请参见各个自定义格式器.
JSON cucumber-jvm reports are not intended to be readable but to be intermediates that you pass to other applications. See the individual custom formatters for color options that they support.
这篇关于@CucumberOptions(plugin = ...)的可能值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!