Cucumber Java - JUnit set monochrome over command line
Asked Answered
A

1

6

What is the best way to disable color output for my Cucumber JUnit tests when they are run by a build machine?
It is possible to set monochrome = true in the @CucumberOptions annotation. The problem with that is, running the Tests locally should contain Color.

Setting -Dcucumber.options.monochrome=true is not working, for whatever reason.

Is there any way to set/override this from the command line?

Astrophysics answered 20/11, 2020 at 8:55 Comment(0)
A
6

Found the solution.
As stated here https://cucumber.io/docs/cucumber/api/#list-configuration-options
Providing -Dcucumber.ansi-colors.disabled=true solves the issue.

Astrophysics answered 20/11, 2020 at 9:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.