report

Home >> Tags >> report

Allure Report using Annotations

Allure Reporting framework works fine with any test framework like TestNG, JUnit etc. Below example covers the implementation of Allure Reports in Selenium using TestNG, Java and Maven.

Let us first try to understand allure annotations before using them in our selenium example.

@Epic
@Features
@Stories/@Story
@Severity(SeverityLevel.BLOCKER)
@Description("In this cool test we will check cool thing")
@Step
@Attachment
@Link

These annotations are used in the same way like we use TestNG annotations or JUnit annotations.

Allure report example using testng and maven

Allure is an open-source framework designed to create interactive and comprehensive test report by Yandex QA Team

Each time when we run automation tests, we will have test results to view details about no. of tests passed, failed and failure details etc. And few reports also include test failure screenshots. We have discussed selenium examples on Extent report and testng custom report with screenshots.

Extent Reports using TestNG Listeners in POM

As we know all know that ExtentReport is an HTML reporting library (open source) which can be integrated with Selenium WebDriver.

In this article, we will teach you how to develop advanced extent reports / integrate Extent Reports with your existing test automation framework.

We assume you have a working knowledge on Selenium,TestNG and Maven.

Let us start now !!!!

Importance of Reporting in a Test Automation Framework :-

Creating extent reports in selenium webdriver example

Extent Reports are the most popular reporting used with Selenium. As we all know, TestNG generates html reports by default but they are not more readable and interactive, we have to put lots of efforts to make it attractive. TestNG has provided an ability to implement 'IReporter' an interface to customize testng report by users.

Customize TestNG html Report

Please visit for the updated article customized emailable report along with screenshots which works perfect for newer versions of testNG and tested with testng latest version 6.14.3

When ever we execute tests with TestNG, it will generate a default html report with basic information.

Take Screenshot and place it in a folder with Test Class name

In this tutorial, we will see taking a screen shot with test name and placing it in a folder by creating a folder with Test Class Name.

As we are taking screen shots on failure, we need to add logic in creating a screen shot and naming it with test name and place it in its test class name respectively.

We can get the test class name using 'result.getInstanceName()'. Test class name looks some thing like "com.pack.sample.HomePage". But we need to create a folder name with test class name i.e 'HomePage'.