Skip to content

grasshopper7/rest-assured-extent-report-plugin

Repository files navigation

Spark & Pdf Extent Report generation for REST Assured API Testing

This artifact deals with the creation of Spark and Pdf Extent Report for REST Assured validation by using a Maven Plugin. The artifact uses the REST Assured Filter from the Allure Framework for generating the report data. This works with JUnit 4, JUnit 5 and TestNG testing frameworks. This avoids the mixing of Extent Report calls within the test code. All that is required in the code is an addition of a REST Assured filter. The remaining changes are all POM configuration changes.

For more details refer to this article. Sample usages for JUnit4, JUnit5, TestNG.

Dependencies - Rest Assured, Extent Allure Annotations, Allure Rest Assured (JUnit4 or JUnit5 or TestNG) & Testing Framework (JUnit4 or JUnit5 or TestNG). POM for JUnit4, JUnit5, TestNG.

Maven Failsafe Plugin Configuration - Plugin configurations for JUnit4, JUnit5, TestNG.

Report Plugin -

<plugin>
  <groupId>tech.grasshopper</groupId>
  <artifactId>rest-assured-extent-report-plugin</artifactId>
  <version>2.1.2</version>
  <executions>
    <execution>
      <id>report</id>
      <phase>post-integration-test</phase>
      <goals>
        <goal>extentreport</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Default configuration details and tips be modify them can be found in the article. For more details refer to the relevant POM - JUnit4, JUnit5, TestNG.

Pdf Report Images -

Dashboard

sample

Tests

sample

Attributes

sample

Exception

sample

Category

sample

Author

sample

Device

sample

Spark Report Images -

Dashboard

sample

Tests

sample

Exception

sample

Category

sample

Author

sample

Device

sample