Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

possible values for @CucumberOptions(plugin = ...)

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?

like image 877
swati Avatar asked Sep 11 '25 19:09

swati


1 Answers

For console colors see Console-Colours.

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.

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 {
}

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.

like image 83
MikeJRamsey56 Avatar answered Sep 13 '25 11:09

MikeJRamsey56