Allure Report in Selenium

Profile picture for user arilio666

This article will show how we can set up allure reports in selenium java.

1.) Allure Installation And Setup

  • Go to this link here , and the allure download should start.
  • Extract the zip file and copy the bin path into the environmental variable path.
  • Now when we try to check the version using the allure --version, it should popup.

2.) POM

                        <!--<executable>C:\Program Files\Java\jdk1.8.0_121\bin\javac.exe</executable> -->
<!-- -->
  • Add these dependencies and surefire plugins into the pom file before proceeding.

3.) Clean

Go to your maven project folder and open the terminal, and type in:

mvn clean test

4.) Run Test.

Let us run this testng test and generate the report.

public class PopUp {
    public void popUp() throws Throwable {
        ChromeDriver driver = new ChromeDriver();
        List<WebElement> elementTexts = driver.findElements(By.xpath("//div[@class='header__main__left']"));
        for (WebElement webElement : elementTexts) {

Type in:

 allure serve allure-results
  • Reports should be opened from the temp directory, where reports are generated after every run.
  • This is what the allure report looks like.