'How to generate an extent report for POM QA automation framework with updated classes?

I am developing a QA automation framework using a Page Object Model in C#. I want to get a report about passed and failed test cases. I think Extent Reports is most suitable for this and I tried to run it, but extent report classes are not working. How can I integrate Extent Reports into my POM?



Solution 1:[1]

You need to add a dependency in your POM.XML

<dependency>
  <groupId>com.aventstack</groupId>
  <artifactId>extentreports</artifactId>
  <version>3.1.5</version>
</dependency>

Use the code below to setup reporting:

ExtentHtmlReporter report=new ExtentHtmlReporter(path);
extentReport=new ExtentReports();
extentReport.attachReporter(report);

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 TylerH