0

I am running selenium scripts using jenkins jobs/multijob and its creating multiple html reports for different modules.

How can we combine/merge all html reports to one single report?

Extent report 2 has a feature to combine html report. How can we do the same with extent report 3?

Ref: http://relevantcodes.com/Tools/ExtentReports2/ExtentMerge.html

0

In your extent report class,

ExtentReports extent = new ExtentReports("Specify the file path here where your extent reports should reside",false);

Parameter False- Is used to append the reports of previous run testcase along with newly run testcase.

Parameter True- Deletes the history of reports of previous run testcases and shows only the reports of newly run testcases.

| improve this answer | |
0

For appending reports please check the link. For Appending to HtmlReporter use

htmlReporter.setAppendExisting(true);

If you want to append to an existing report based on reportName, use:

extentxReporter.setAppendExisting(true);

Refer link for more information.. Hope this helps.

| improve this answer | |
-1

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();
    }

}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.