selenium-webdriver HTML Reports Allure Reports


This example covers the implementation of Allure Reports in Selenium using TestNG, Java and Maven.

Maven Configuration


Add following code to configure the jcenter repository



Add following dependencies to your pom.xml


Surefire Plugin Configuration

        <groupId> org.apache.maven.plugins</groupId>

Sample test for Allure Report

Create a sample test with name

public class test{
    WebDriver driver;
    WebDriverWait wait;

    public void setup() {
        System.setProperty("", "path to/chromedriver.exe");
        driver = new ChromeDriver();
        wait = new WebDriverWait(driver,50);

    @Title("Title check")
    @Description("Checking the title of the loaded page.")
    public void searchTest(){
        String title = driver.getTitle();
        LogUtil.log("Title Fetched: "+title);
        LogUtil.log("Test Passed. Expected: Google | Actual: "+title);
        System.out.println("Page Loaded");

    public void teardown(){

In the above class we have used LogUtiil class. This is simply done to log Steps in our test. Below is the code for the same

public final class LogUtil {

    private LogUtil() {

    public static void log(final String message){
        //intentionally empty


@Title("") will add the title to your test in Allure Report

@Description("") will add the description to your test

@Step("") will add a step in the allure report for the test

On execution a xml file will be generated in the folder "target/allure-results/"

Final Report with Jenkins

If you are running in Jenkins with Allure Report plugin installed, then Jenkins will automatically render the report in your job.

Final Report without Jenkins

For those who dont have a Jenkins, use the following commandline to create the html report. Allure CLI is a Java application so it's available for all platforms. You have to manually install Java 1.7+ before using Allure CLI.


For Debian-based repositories we provide a PPA so the installation is straightforward: Install Allure CLI for debian

$ sudo apt-add-repository ppa:yandex-qatools/allure-framework
$ sudo apt-get update 
$ sudo apt-get install allure-commandline

Supported distributions are: Trusty and Precise. After installation you will have allure command available.

Mac OS

You can install Allure CLI via Homebrew.

$ brew tap qatools/formulas 
$ brew install allure-commandline

After installation you will have allure command available.

Windows and other Unix

  1. Download the latest version as zip archive from
  2. Unpack the archive to allure-commandline directory. Navigate to bin directory.
  3. Use allure.bat for Windows and allure for other Unix platforms.

In the Commandline/Terminal now simply enter following syntax and report will be generated into allure-report folder

$ allure generate directory-with-results/

enter image description here