Allure3
Allure Report is a flexible multi-language test report tool to show you a detailed representation of what has been tested and extract maximum from the everyday execution of tests
Install / Use
/learn @allure-framework/Allure3README
Allure 3
Allure 3 is the next evolution of the Allure reporting framework, rebuilt from the ground up with a new architecture and expanded capabilities. Unlike its predecessor, Allure 2, this version is developed in TypeScript and introduces a modular plugin system for greater flexibility. A key addition is the Awesome plugin, which delivers an enhanced UI for better report visualization.
The Allure 3 CLI provides a comprehensive suite of commands designed to streamline the generation, serving, and management of test reports.
- Learn more about Allure Report at https://allurereport.org
- 📚 Documentation – discover official documentation for Allure Report
- ❓ Questions and Support – get help from the team and community
- 📢 Official annoucements – be in touch with the latest updates
- 💬 General Discussion – engage in casual conversations, share insights and ideas with the community
Key Features
Allure 3 introduces several notable improvements. The framework has been entirely rewritten in TypeScript, making it more extensible and easier to maintain. Its plugin system allows you to customize and extend reporting functionality to fit your specific needs. Configuration has been simplified with a single file managing all report settings, making it more convenient to handle multiple reports.
One of the standout features is real-time reporting, which lets you view live updates during test execution using the watch command. The report interface itself has been redesigned to enhance usability and clarity. Moreover, Allure 3 maintains compatibility with the entire Allure ecosystem, supporting all major test frameworks.
Installation
To install Allure 3 globally, you can use npm. Simply run:
npm install -g allure
However, we recommend using npx for running Allure commands without needing a global installation:
npx allure run -- <test_command>
This approach ensures you always use the latest version without managing global dependencies.
Commands
Running Tests and Generating Reports
Running tests and generating a report with Allure 3 is straightforward. Using the run command, you can execute your test suite and automatically generate a report:
npx allure run -- <test_command>
For example, if you're using npm as your test runner, the command would be:
npx allure run -- npm test
If you need to hide some labels use --hide-labels option:
npx allure run --hide-labels=owner --hide-labels=tag -- npm test
To successfully generate a report, ensure that your test setup outputs results into an allure-results directory, which is automatically detected by Allure 3. This directory can be placed at any nested level within your project (e.g., out/tests/allure-results), provided it retains the correct name.
After the tests complete, the report is generated automatically. Existing results from previous runs are ignored, as Allure 3 focuses solely on new data to ensure accurate and up-to-date reporting.
Generating Reports Manually
If you already have test results and wish to generate a report manually, use the generate command:
npx allure generate <resultsDir>
By default, this command produces an Allure 3 Awesome report. You can customize output settings, such as the destination directory, through the configuration file. If you prefer a Classic or Allure 2-style report, or need to disable certain plugins, these adjustments can also be made via configuration.
Viewing Reports
To view a previously generated report locally, the open command serves it in your default browser:
npx allure open <reportDir>
If you’ve defined the output directory in your configuration file, specifying <reportDir> is optional. By default, Allure 3 looks for a directory named allure-report. To open the Awesome report directly, point to the nested directory:
npx allure open allure-report/awesome
You can also open a directory with result files. The report will be generated on the fly and opened in the browser:
npx allure open ./allure-results
Real-time Report Monitoring
When you need to monitor test execution live, the watch command provides dynamic report updates. It continuously monitors the specified results directory for changes and refreshes the report automatically:
npx allure watch <allureResultsDir>
This command is ideal for iterative development and debugging, allowing you to see immediate feedback as you modify and rerun tests. The browser tab updates seamlessly whenever new results are detected.
Command-line Options
The Allure CLI includes several helpful global options. Use --help to explore available commands or get detailed usage information for a specific command:
npx allure run --help
npx allure watch --help
To check your installed version of Allure 3, use:
npx allure --version
Configuration
Allure 3 uses an allurerc.mjs or allurerc.js configuration file to manage report settings, including the report name, output directory, and plugin options.
[!TIP] We recommend using the Awesome plugin for the best experience.
Support for Classic and Allure 2-style reports is currently experimental.
Example Configuration File
import { defineConfig } from "allure";
export default defineConfig({
name: "Allure Report Example",
output: "./out/allure-report",
hideLabels: ["owner", /^_/],
plugins: {
awesome: {
options: {
singleFile: true,
reportLanguage: "en",
},
},
},
});
In this example, the generated report is named Allure Report Example and saved to the ./out/allure-report directory. The Awesome plugin is enabled with options to produce a single-file HTML report in English.
Configuration Options
The configuration file allows you to fine-tune report generation. Key options include:
name: Specifies the report’s display name.output: Defines the directory where the report will be saved.hideLabels((string | RegExp)[]): Hides matching labels by name in report data. Currently, only Allure Awesome report respects the option. Labels with names starting with_are hidden by default.plugins: Enables and configures plugins, with each supporting various options.
Awesome Plugin Options
The Awesome plugin offers several customizable options:
-
singleFile(boolean): If set totrue, generates the report as a single standalone HTML file. -
reportName(string): Overrides the default report name. -
open(boolean): Automatically opens the report after generation if enabled. -
reportLanguage(string): Sets the UI language of the report. Supported languages include:az,br,de,en,es,fr,he,ja,kr,nl,pl,ru,sv,tr,zh.
For example, setting "reportLanguage": "fr" will render the report interface in French.
Categories (Awesome only)
[!NOTE] Categories are currently supported only by the Awesome report.
Categories let you group test results into named buckets with optional grouping inside each category.
Configuration is defined at the top level of defineConfig.
[!IMPORTANT] A test result can belong to only one category. The first matching rule wins, and results are not duplicated across categories.
Example
import { defineConfig } from "allure";
export default defineConfig({
name: "Allure Report Example",
output: "./out/allure-report",
categories: [
{
name: "Product errors",
matchers: { statuses: ["failed"] },
groupBy: ["severity", "owner", "environment"],
groupByMessage: true,
groupEnvironments: true,
expand: true,
},
{
name: "Flaky tests",
matchers: { flaky: true },
groupBy: ["flaky"],
groupByMessage: false,
hide: false,
},
],
plugins: {
awesome: {
options: {
reportLanguage: "en",
},
},
},
});
categories shape
You can provide either:
- an array of rules:
categories: CategoryRule[] - or an object with rules:
categories: { rules: CategoryRule[] }
Default categories
If categories is not specified, two built‑in categories are enabled by default:
- Product errors:
statuses: ["failed"] - Test errors:
statuses: ["broken"]
These defaults are always appended, but you can override them by defining rules with the same names.
Disabling categories
To skip categories generation entirely, use the short flag:
export default defineConfig({
categories: false,
});
Try it in the sandbox
To see categories in action, use the demo setup in the packages/sandbox folder and run it from there.
CategoryRule fields
**name**(string, required): Category title shown in the report.**matchers** (object | function | array, required):- Object matcher supports:
statuses:TestStatus[](passed,failed,broken,skipped,unknown)labels:{ [labelName]: string | RegExp }message:string | RegExptrace:string | RegExpflaky:booleantransitions:TestStatusTransition[](new,fixed,regressed,malfunctioned)environments:string[]
- Function matcher: `(data) => bool
- Object matcher supports:
