If anyone is using the new version of Extent report may have seen that now we are getting two HTML files instead of one
- Dashboard.html
- Index.html
And it will be created in the given path but not in the name we provided with the ExtentHtmlReporter instance.
As a fix, we can use the ExtentV3HtmlReporter which will give the older format of having a single report HTML file.
This is method is depreciated as of now, but as a quick fix, we can use the below method.
The new code is given as commented along with working the fix.
ExtentV3HtmlReporter htmlReporter = new ExtentV3HtmlReporter(reportPath+reportName); // New method for name change (Pending clarification - bug fix) // ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(reportPath); // htmlReporter.Config.ReportName = reportname // ExtentHtmlReporterConfiguration repConfig = new ExtentHtmlReporterConfiguration(htmlReporter); // repConfig.ReportName = reportname;
No comments:
Post a Comment