- Create a Maven project with JUnit5 and Selenium dependencies.
- Add allure reports dependencies in the pom.xml file
- Create a parent class and a method to execute after each test case . Add the below code to take a screenshot and attach it with the Allure report.
-
After executing the test case, you can see a new folder “allure-results” is generated.
-
now in the IDE terminal execute the command, "allure generate ".And you can see the index.html file along with other files also generated .
-
Open the index.html file in the browser. You can see the report like this.
You can refer to this Github project.