Generating Advanced Test Reports with Allure: Features & Integration Guide

Know how to generate advanced Test Reports with Allure. Discover Allure Reporting Alternatives like BrowserStack Test Observability for comprehensive reporting

Written by Nithya Mani Nithya Mani
Reviewed by Rohit Nair Rohit Nair
Last updated: 3 August 2026 14 min read

Key Takeaways

  • Allure turns raw pass/fail output into a structured, interactive report, and it plugs into JUnit, TestNG, Pytest, and Cucumber without changing how tests are written.
  • Wrapping test actions in @allure.step and tagging tests with feature/story metadata is what produces the step-level breakdown and grouping in the final report.
  • Once reports are generated, teams triage by filtering failed tests, checking the exact step and attached evidence, and cross-referencing categories/trends to separate real regressions from flaky tests.

Managing test reports can get confusing fast. Testers often can’t tell which line threw an exception or which component failed in CI, leading to scattered logs.

Allure report fixes this by turning raw test output into clear, visual reports. Failed steps show exact error traces, with attached screenshots and logs so you know where the error is.

This guide helps generate advanced test reports with Allure and tells you how to integrate it into your test automation framework. Let’s get started!

What is Allure Reporting?

Allure report is an open-source testing framework that helps interactively debug your test script to push for faster production.

Allure generates a visually rich, detailed and interactive test execution dashboard and report to point out your debugging failures much better.

Rather than a plain pass/fail log, it gives you a structured breakdown of every run: which tests executed, how long each step took, what failed and why, and what the trend looks like across builds.

It plugs into most major test frameworks, like JUnit, TestNG, Pytest, and Cucumber, without requiring you to change how you write tests. You add a lightweight adapter, run your suite as usual, and Allure builds the report from the results.

Why QA Teams Use Allure?

For QA teams, Allure eliminates the confusion of running through debugged code during runtime to scram for errors.

It provides interactive, visual and data-rich insights for test executions. Here is why it stands out.

  • Faster root-cause analysis: Every failed step shows its exact error and stack trace, so testers aren’t guessing which line broke.
  • Evidence at the point of failure: Screenshots, logs, and attachments sit next to the step that failed, instead of being buried in a separate log file.
  • Trend visibility: Historical data across runs helps teams tell a one-off failure apart from a recurring problem or a genuinely flaky test.
  • Shared context: Reports can be opened by anyone on the team, so a developer debugging a failure doesn’t need a tester to explain what happened.
  • Framework flexibility: The same reporting format works whether your suite is in Java, Python, or JavaScript, which matters for teams running mixed test automation frameworks.

Key Features of Allure Reporting

Allure Reporting offers several key features that make it a valuable tool for automated testing:

FeatureWhat it gives you
Step-level breakdownSee exactly which step in a test failed, not just the overall result.
AttachmentsScreenshots, logs, and request/response payloads captured automatically on failure
CategorisationGroup failures as product defects, test defects, or flaky tests
Execution historyTrack pass rate and duration trends across multiple runs.
Suite/feature groupingOrganise results by Epic, Feature, and Story instead of just by file
CI-friendly outputGenerates from a results directory, so it drops into any CI pipeline

Setting up Allure Reporting

Integrating Allure with your test framework requires a few setup steps to ensure seamless test reporting.

Prerequisites for Allure Reporting

To set up Allure Reporting, you need to meet the following prerequisites:

  • Java Installation: Ensure that Java version 8 or above is installed on your system. The Java directory should be specified in the JAVA_HOME environment variable.
  • Allure Installation: Install the Allure command-line tool. This can be done using Scoop on Windows, Homebrew on macOS and Linux, or by downloading and unpacking the Allure archive.
  • Environment Variable Setup: Add the path to the Allure bin directory to your system’s PATH environment variable to ensure the allure command is accessible.
pip install allure-pytest

pytest tests/ --alluredir=allure-results

allure serve allure-results

Output –

snippet 01 allure setup and report generation snap

Configuring Allure with Different Testing Frameworks

Allure supports integration with various testing frameworks, including TestNG, JUnit, and Pytest. Here’s a brief overview of how to configure Allure with these frameworks:

1. JUnit (Maven Project)

  • Add Allure dependencies to pom.xml:
<dependency>

    <groupId>io.qameta.allure</groupId>

    <artifactId>allure-junit5</artifactId>

    <version>2.x.x</version>

</dependency>
  • Use Allure annotations like @AllureFeature, @AllureStory for better reporting.

2. TestNG (Maven Project)

  • Add Allure TestNG dependency in pom.xml:
<dependency>

    <groupId>io.qameta.allure</groupId>

    <artifactId>allure-testng</artifactId>

    <version>2.x.x</version>

</dependency>
  • Add listeners in testng.xml:
<listeners>

    <listener class-name="io.qameta.allure.testng.AllureTestNg"/>

</listeners>

3. Pytest (Python Project)

  • Install Allure Pytest plugin:
pip install allure-pytest
  • Run tests with Allure:
pytest --alluredir=allure-results

Generating Allure Reports

Generating Allure reports involves a straightforward process that can be automated as part of your testing workflow. Here’s a step-by-step guide on how to generate Allure reports:

Step 1. Run Your Tests

First, run your automated tests using your preferred testing framework (such as, TestNG, JUnit, Pytest). Ensure that the Allure adapter for your framework is enabled and configured to save test results in the Allure format.

Step 2. Save Test Results

The Allure adapter will save the test results in a directory, typically named allure-results. This directory contains files that describe the execution of tests, including test result files and container files for test fixtures.

Step 3. Generate the Report

Use the Allure command-line tool to generate the HTML report from the saved test results. You can use one of two commands:

  • allure generate: This command processes the test results and saves an HTML report into a specified directory. It is useful if you need to save the report for future reference or sharing.
allure generate --clean -o allure-report allure-results
  • allure serve: This command creates the same report as allure generate but puts it into a temporary directory and starts a local webserver to display the report. It automatically opens the report in your default web browser.
allure serve allure-results
pytest tests/ --alluredir=allure-results

allure generate allure-results --clean -o allure-report

allure open allure-report

Output –

snippet 02 generate and open allure report snap

Allure Report Structure: Key Components with Example

Allure reports are generated in CI, since it writes static reports that you can archive and publish. It is generated using these three key steps: running tests, generating raw results and building the final report.

Here is what’s in the report:

  • Overview dashboard: An overview of total tests run, pass/fail/skip counts, and a trend graph if history is available.
  • Test cases: Details of every test, with its steps, duration, and any attachments, expandable individually.
  • Categories: It categorises failures based on auto- or manually grouped (e.g., product defect vs. flaky test vs. environment issue), which is usually the fastest way to triage a large failed run.
  • Suites: Results are organised by test class/module. This is useful when you want to isolate one component.
  • Graphs & trends. It fastens duration and stability across builds, which is what you need  before deciding whether a regression is new or ongoing.
#Allure Reports with CI/CD

- name: Run Tests

  run: pytest tests --alluredir=allure-results

- name: Generate Allure Report

  run: allure generate allure-results --clean -o allure-report

- name: Upload Report

  uses: actions/upload-artifact@v4

  with:

    name: allure-report

    path: allure-report

Output –

snippet 03 allure report steps github actions snap

Instrumenting a Test with Allure

This example wraps a login flow in named steps and tags it with feature/story metadata, which is what drives the grouping and step breakdown in the report above:

import logging

import time

from selenium import webdriver

from selenium. webdriver import Keys

from selenium.webdriver.common.by import By

import allure



logging.basicConfig(level=logging.INFO)



@allure.feature("Login Functionality")

@allure.story("Valid Login")

def test_valid_login():

    driver = webdriver. Chrome()

    driver.get("https://example.com/signin")



    with allure.step("Enter username"):

        username_field = driver.find_element(By.CSS_SELECTOR, "#username")

        username_field.send_keys("demouser" + Keys.ENTER)



    with allure. step("Enter password"):

        password_field = driver.find_element(By.CSS_SELECTOR, "#password")

        password_field.send_keys("testpassword" + Keys.ENTER)



    with allure.step("Click login"):

        driver.find_element(By.CSS_SELECTOR, "#login-btn"). click()

        time.sleep(1)



    with allure. step("Verify login success"):

        if not driver.find_element(By.CSS_SELECTOR, ".username"). is_displayed():

            allure.attach(

                driver.get_screenshot_as_png(),

                name="login-failure",

                attachment_type=allure.attachment_type.PNG,

            )

        assert driver.find_element(By.CSS_SELECTOR, ".username"). is_displayed()



    driver.quit()

Output-

snippet 04 instrumenting test with allure snap

How This Appears in Allure Report

  • Feature: Login Functionality
  • Story: Valid Login
  • Steps: Enter Username > Enter Password > Click Login > Verify Login

Allure Test

This structured report provides a clear execution flow, categorised test results, and debugging insights, making test analysis more efficient.

New Features of Allure Reports

Allure-advanced reports require an advanced web driver plugin that you can access with your test framework, like Selenium.

Here are the new features you can get with the latest version of Allure:

  • Test plan support: Execute only high-functional or critical tests defined in a test suite first and view visual records.
  • Enhanced SDK integration: Import allure-js-commons v3.3.2 to improve performance and faster fetching.
  • Better BDD: Offers behaviour-driven development, API automation support and multi-language bindings with JavaScript, Java or TypeScript.
  • Enhanced Error Handling: More robust error reporting and debugging for faster test timeouts.

Analysing Test Results with Allure

Once a run is in, the fastest bug triage, i.e., the bug detection and debugging path, is usually:

  • Filter by failed status on the overview dashboard.
  • Open a failing test and read the step where it broke, not just the final assertion.
  • Check the attached screenshot/log at that step.
  • Use categories to see if the failure matches a known pattern (e.g., recurring timeout on a specific element usually points to a flaky test rather than a real regression).
  • Cross-check the trend graph. If the same test has failed intermittently across recent runs, treat it as a stability issue, not a one-off bug.

Best Practices for Allure Reporting

To maximise the benefits of Allure Reporting, follow these best practices:

  • Wrap actions in @allure.step so failures map to a specific action, not the whole test.
  • Attach on failure, not by default. Screenshots and logs are most useful when tied to the exact failing step; attaching everything for every test bloats the report.
  • Define failure categories early (in categories.json or allure.properties) so bug triage is consistent across the team from day one.
  • Keep results out of version control. Treat allure-results and allure-report as build artefacts, not something you commit.
  • Publish reports from CI, not just local runs. So the whole team is looking at the same data, and the CI/CD pipeline remains consistent for everyone.

Allure Reports with CI/CD

Allure reports are only as useful as their visibility. In most pipelines, that means:

  • Test run: Running tests with –alluredir (or the framework equivalent) as a pipeline step.
  • Archive and save: Archiving the allure-results directory as a build artefact.
  • Simplified debugging: Running allure generate as a post-build step and publishing the output. Platforms like Jenkins have a native Allure plugin; GitHub Actions and GitLab CI can publish the generated HTML as an artefact or to a static host.
  • History storage: Enabling history by copying the previous report’s history folder into the new allure-results before generating, which is what powers the trend graphs.

Alternative to Allure Reporting: Test Observability

While Allure is a powerful test reporting tool, other solutions focus on test observability, offering deeper insights into automation failures and trends.

BrowserStack Test Observability is a key Allure Reporting Alternative that provides real-time test execution logs, screenshots, and video recordings. It supports parallel execution and automated debugging across multiple devices and browsers.

BrowserStack Test Observability Integrates with CI/CD pipelines for seamless test observability. It enhances test insights, historical trends, and debugging efficiency, helping teams choose the best fit based on their testing needs.

Why Use BrowserStack Test Observability for Test Reporting and Analysis?

BrowserStack Test Observability provides a comprehensive, real-time test reporting and debugging solution that enhances automation efficiency. Teams gain deeper visibility into test executions, making debugging faster and improving overall test quality.

Here’s why it stands out:

  • Real-Time Test Insights: Provides logs, screenshots, and video recordings for every test execution.
  • Intelligent Failure Analysis: AI-driven categorization of flaky tests, infrastructure issues, and actual failures.
  • Centralized Reporting Dashboard: Aggregates test data across multiple browsers, devices, and platforms.
  • Seamless CI/CD Integration: Supports Jenkins, GitHub Actions, CircleCI, and Azure DevOps.
  • Performance and Trend Analysis: Tracks historical test runs to identify execution patterns and bottlenecks.

Conclusion

By integrating allure, you might not be able to fix a badly written test, but you can get clear insights into where the test failed and whether it is a main logic or an avoidable error.

It helps testers spend their time fixing issues instead of reproducing them. Set it up once per framework, wire it into CI, and it pays off every time a build turns red.

While Allure is a great reporting tool, BrowserStack’s Test Observability solution offers real-time insights, AI-powered failure analysis, and seamless CI/CD integration for a more advanced testing workflow.

Choosing appropriate, cloud-native browser testing like BrowserStack is key to view your application behaviour across multiple platforms.

Version History

  1. Aug 03, 2026 Current Version

    Added 3 new sections, edited and removed sections that don’t align with the intent of Python developers, and edited the meta, intro and conclusion for ICP targeting.

    Rohit Nair
    Reviewed by Rohit Nair Accessibility Specialist
Tags
Automation Testing Testing Tools
Nithya Mani
Nithya Mani

Lead Engineer

Nithya Mani is a Lead Engineer with 8+ years of experience in customer solutions. She specializes in creating tailored testing solutions that address real customer needs and optimize workflows.

Test Analytics powered by AI
Try BrowserStack Test Observability, an AI-powered Test Analytics & Reporting Tool. Identify and Manage Flaky Test, Defects, and perform Test Monitoring effortlessly for efficient testing