Integrate Allure Report in Playwright Java

Profile picture for user arilio666

This article will show how we can integrate allure reporting in playwright java.

1.) Dependencies

  • Add the below two dependencies onto your pom.xml and install.
<dependency>
   <groupId>org.aspectj</groupId>
   <artifactId>aspectjweaver</artifactId>
   <version>1.9.19</version>
</dependency>
    
    <!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-testng -->
<dependency>
   <groupId>io.qameta.allure</groupId>
   <artifactId>allure-testng</artifactId>
   <version>2.21.0</version>
</dependency>
  • Once installed, run a playwright test, and we should see this allure-results folder.

2.) Allure ZIP

  • Go to this respective allure site link and download the latest zip file version.
  • Now go to the bin of the downloaded file and copy the path.
  • Open the environmental variable and paste the copied path inside the path variable.

3.) CMD And Report Generation

  • Open CMD and navigate to your playwright project folder.
  • Now type "allure serve allure-report" to generate the allure report of playwright tests in java.
  • Doing this will open the report.