Hi all,
I have my cucumber suite which works well, but i am stuck generating HTML reports.
I need to generate HTML reports from cucumber-jvm-reporting.
This below method which converts the generated Cucumber.json file to HTML report.
public void generateCucumberReports()
{
File reportOutputDirectory = new File("E:\\Programming\\Cucumber\\MyProj\\Results");
List<String> jsonFiles = new ArrayList<>();
jsonFiles.add("E:\\Programming\\Cucumber\\MyProj\\target\\cucumber.json");
String projectName = "cucumber-jvm";
Configuration configuration = new Configuration(reportOutputDirectory, projectName);
ReportBuilder reportBuilder = new ReportBuilder(jsonFiles, configuration);
reportBuilder.generateReports();
}
This code is working fine when i run as standalone meaning, the below line generates HTML reports. So no problem in this method.
public static void main(String[] args)
{
generateCucumberReports();
}
but when i invoke this method in @After method, it is not generating HTML reports. So can someone help me how to invoke this after the entire suite is completed execution?
@After
public void tearDown()
{
generateCucumberReports();
}