Allure Report JUnit 5 is a solution for test automation reporting. Allure Report is very popular reporting tool in all around the world. We used allure when I was working in and also it is used in Emirates Airlines too. Before, I wrote a comprehensive article on Allure Report TestNG. In this article, I will explain test reporting with Allure Report JUnit 5. Let’s start to do the integration of Allure Junit 5.

Step-1: Download Allure Command-Line Interpreter

In order to generate a report, we should install Allure command-line interpreter.

  1. Download the latest version as a zip archive from bintray.
  2. Unpack the archive to allure-command-line directory.
  3. Navigate to the bin directory.
  4. Add allure to system PATH.


Step-2: Modify Maven pom.xml 

You should add JUnit 5, Allure and Selenium libraries in your pom.xml as shown below.

Step-3: Add Allure Report Annotations in Your Project

Now, we are ready to use Allure annotations in our project. The detailed explanations of Allure Annotations are explained in Allure TestNG article. Here, I will skip those explanations and use allure annotations in my test class. A sample test class is shown below.

As you see the above code, we used @Epic, @Feature, @Story, and @Description annotations. Now, let’s run our test class. We will expect 2 passes and 1 fail as shown below.

allure report

Step-4: Generate Allure Report

In order to generate a report, you should open a command prompt on Windows or terminal on Mac or just use IntelliJ’s terminal section and type below command and hit enter.

open a command prompt screen, go to the project directory, and write below command!

allure serve allure-results

allure reporting

After this operation, Allure report created and displayed as shown below.

allure report junit 5

As you see in this article, we learned how to create a test automation report Allure and JUnit 5. You will find more details of Allure on Allure TestNG article. In this article, I did not want to repeat the same stuff again.

You can find a sample project on swtestacademy Allure Junit 5 example page.

Selenium Webdriver Tutorial Series

Onur Baskirt