Reputation: 21
I have created a java-Cucumber test suite and its integrated in Jenkin and works fime.
Mu Question is when any script fails. I am getting below message in console.
[31mFailed scenarios:[0m [31mfeatures/XXXXXX.feature:5 [0m# Scenario: XXXXX Scenarios Outline
20 Scenarios ([31m1 failed[0m, [32m19 passed[0m) 52 Steps ([31m1 failed[0m, [36m1 skipped[0m, [32m50 passed[0m) 1m22.342s.
What is that 31m, 0m, 36m is about. Can I turn that off from my console else highlight with some color. Please help !! Thanks in advance!
Upvotes: 2
Views: 2179
Reputation: 5347
Those are non printable character and markup. To turn off it, you can set cucumber option monochrome as true.
This option can either set as true or false. If it is set as true, it means that the console output for the Cucumber test are much more readable. And if it is set as false, then the console output is not as readable as it should be. It is false by default.
package cucumberTest;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(
features = "Feature"
,glue={"stepDefinition"}
,monochrome = true
)
public class TestRunner {
}
Upvotes: 3