I am trying to customize the extent report which is a third party reporting tool added to my cucumber framework where I want to customize the name of the report.html to "Outputfilename".html which I unable to do as the value of "Outputfilename " is coming from my config file.
here is my testrunner code
@RunWith(Cucumber.class)
@CucumberOptions(
features = ".//src//test//java//FeatureList",glue = "stepDefinations",
plugin = { "com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/"+Outputfilename+".html",
"junit:target/cucumber-results.xml"},
tags="@smoke",
monochrome = true
)
public class TestRunner {
private static final String Outputfilename = FileReader.getInstance().getConfigReader().getReportPath();
I would really appreciate your help.
Finally I fixed it-
So basically we need to change the runner class something like this-