'How to rename generated multiple report file names for extentreport version 4.0.3?
Using extent report version 4.0.3, multiple reports files are generates (dashboard.html, index.html etc). We need to append date and time stamp to each report file.
Using version 3.1.3, i am able to append date and time stamp to file name as there is single file generated.
var htmlReporter = new ExtentHtmlReporter(dir + "\\Test_Execution_Reports" + "\\Automation_Report_" + DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss") + ".html");
Solution 1:[1]
While there is no way to rename this file directly from Extent library, I renamed index.html using this simple piece of code:
System.IO.File.Move(oldNameFullPath, newNameFullPath);
This solved my purpose. Hope this helps.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jaideep Dhumal |
