4

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?

swati
  • 41
  • 1
  • 3

1 Answers1

2

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.

MikeJRamsey56
  • 2,779
  • 1
  • 20
  • 34