September 12, 2022

How to customize report name instead of Index.html/ Dashboard.html when using latest versions of extent report

  September 12, 2022

 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;
Will keep this blog updated with new developments on this topic.
logoblog

Thanks for reading How to customize report name instead of Index.html/ Dashboard.html when using latest versions of extent report

Previous
« Prev Post

No comments:

Post a Comment

How to send email from current Outlook instance using Java + VBScript

If we are using .Net, we can easily access outlook and send emails using its own libraries. But what if we are using Java? Here we can seek ...