Install and Generate Allure Reports (TestNG & Cucumber BDD)
Allure is a flexible and lightweight reporting tool that provides a clear graphical interface to represent test results. It supports various frameworks like TestNG and Cucumber BDD, making it a popular choice for test automation reporting.
In this blog, you'll learn how to install Allure on your system and generate reports step by step.
Step-by-Step Guide to Install Allure
🔹 Step 1: Search for Allure Framework
Open Google and search for:
allure framework download🔹 Step 2: Visit the Allure GitHub Repository
Click the link:

🔹 Step 3: Go to the Releases Section
On the right-hand side of the GitHub page, locate the "Releases" section.
🔹 Step 4: Click on "+75 Releases" (or the number shown)
This will take you to the full list of Allure releases.

🔹 Step 5: Download the Latest Version
Scroll down to the Assets section under the latest release, and download the .zip file for Allure (e.g., allure-2.x.x.zip).

🔹 Step 6: Extract the ZIP File
Open the downloaded .zip file and extract all files to a suitable folder (e.g., C:\Allure).
🔹 Step 7: Copy the Path to the bin Folder
Navigate to the bin directory inside the extracted folder and copy its full path (e.g., C:\Allure\bin).

Step-by-Step to Configure Allure in Environment Variables
🔹 Step 8: Open Environment Variables
You can do this in either of the following ways:
Method 1:
Right-click on This PC → Properties → Advanced system settings → Environment Variables
Method 2:
Press Win + S, search for System Environment Variables, and click Edit the system environment variables
🔹 Step 9: Add Allure to the System Path
Under System Variables, find the variable named Path, and click Edit or double click the Path
Click New, and paste the path copied in Step 7
Click OK to save


🔹 Step 10: Close and Save
Click OK on all windows to save the environment variable configuration.
Step 11: Verify Allure Installation
Open Command Prompt and run:
allure --versionIf installed correctly, it will return the installed version of Allure.
Step 12: Add Allure Dependencies to pom.xml
For TestNG:
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>2.21.0</version>
</dependency>
For Cucumber-BDD:
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-cucumber7-jvm</artifactId>
<version>2.21.0</version>
</dependency>
Adjust versions based on the latest release.
Step 13: Configure Plugins in the Test Runner
For Cucumber:
@CucumberOptions(
plugin = {"pretty", "io.qameta.allure.cucumber7jvm.AllureCucumber7Jvm"},
features = "src/test/resources/features",
glue = "stepdefinitions"
)
For TestNG: Use @Listeners or appropriate annotations to hook Allure listeners.
Step 14: Generate Allure Report After Test Execution
After executing your Maven test project, right-click on the project folder and select Terminal (or open Terminal/Command Prompt inside the project directory).
🔹 Step 15: Serve the Allure Report
Run the following command:
allure serveThis will generate and open the report in your default browser.
Conclusion
With these steps, you now have Allure installed, configured, and integrated into your TestNG or Cucumber BDD framework. Allure reports provide a clean, interactive UI to analyze test results, making debugging and reporting much more efficient.


