I want to write custom failure message in my Cucumber ExtentReports.
Tool using :
Cucumber
Java
Selenium
JUnit
ExtentReports
What's happening now:
I have a cucumber scenario.
Given something
When I do something
Then this step fails
The failed step Fails with:
Assert.assertTrue("CUSTOM_FAIL_MSG", some_condition);
In the ExtentReport, I see the
What I want to achieve:
What I have researched so far:
There is a scenario.write("")
function but this creates a new info log into the report(But I am looking for CustomFailure message rather than a new log entry)
scenario.stepResults
has the String which is displayed in the report. However, I could not find a way to set some value in the same.
Any ideas on this?
cucumber-core
,cucumber-java
,cucumber-junit
andExtentReports
version? Thanks – Bookstand