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

Bookmark this website for more workarounds and issue fixes.

Verify Zip file contents without extracting using C# + Selenium

While doing automation testing, we may get a scenario where we need to download a zip file and to validate the contents inside it. One way t...