3

I have a maven multi module project, I am able to generate the Extent HTML report for each individual module.How to merge and attach the individual reports into single report.

Version : Extent Reports : 2.41.2

Madhuri Haritha
  • 357
  • 1
  • 4
  • 13
  • Version 2 reached end of life a long time ago. Version 4 is in development so you should plan to upgrade soon. The API is not expected to change from version 3 but everything else will. – Karthik Jul 24 '18 at 21:40

3 Answers3

0

If you use the same location and file name for the file and initialize it like this:

extentReportFile = some-path-that-you-use-in-all-modules;
ExtentReports extentReports = new ExtentReports(extentReportFile, false);

it should store all the reports into one single .html file.

You can create a ExtentReports factory in your core module - the one that all the other modules can see into - and implement the code in your modules.

StopTheRain
  • 367
  • 1
  • 5
  • 15
0

You can check Klov. demo here In a nice looking dashboard you have all tests as builds and general info's about them. What I like the most is that once a TC's is executed will be automatically updated in the dashboard - so you can check the results in real time no need to wait for full report. It is simple to be implemented, you can check here.

Some issues are present also :(

  • Screenshots are not displayed correctly
  • Category and description are not displayed
Neagu V
  • 470
  • 4
  • 16
0

I had the similar requirement. I achieved it. (Extent Report V3 and above)

BaseTest is being extended by all the test class.

Class BaseTest{

        public static ExtentReports extent =new ExtentReports();//initiating here is very important
        public static ExtentHtmlReporter htmlReporter;

@BeforeSuite
    public void beforeSuiteSetup() {
        String filepath = System.getProperty("user.dir");
        htmlReporter = new ExtentHtmlReporter(filepath+"/Report.html");     
        extent.attachReporter(htmlReporter);
    }

@AfterSuite(alwaysRun = true)
    public void afterSuite() {
        extent.flush();
    }

}
suro230791
  • 51
  • 4