Search code examples
c#seleniumextentreports

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

  • 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);