---
title: How to generate a report
description: Learn how to generate Allure 2 test reports.
---

# How to Generate a Report

## 1. Run Tests

Run your tests as you would do normally: from the command line, from your IDE, etc.

In addition to printing or saving the test results in its own format, the Allure Report integration receives the data from a test framework. The API used for this communication depends on the framework — for example, the Allure integration may be registered as a [Playwright reporter](https://playwright.dev/docs/test-reporters), a [Cucumber.js formatter](https://github.com/cucumber/cucumber-js/blob/main/docs/custom_formatters.md), etc.

The integration saves data in the Allure file formats into a separate directory (`allure-results` by default). The directory path can be changed in the integration settings.

The generated files include:

- [test result files](/docs/how-it-works-test-result-file/) to describe execution of tests,
- [container files](/docs/how-it-works-container-file/) to describe test fixtures.

Tip:
You may run this step multiple times, accumulating data into the same results directory. This is useful, for example, if different tests require different runner parameters or different environments. As a group, these runs are referred to as a **launch**.

When a launch contains multiple runs of the same test, they are referred to as [retries](/docs/history-and-retries/#retries).

## 2. Add Launch Data

If necessary, put files with additional data for this launch into the results directory.

Additional files may include:

- [environment file](/docs/how-it-works-environment-file/) to store some global data for all the tests in the report,
- [executor file](/docs/how-it-works-executor-file/) to describe the CI job and the URL at which the report will be located,
- [history files](/docs/how-it-works-history-files/) to enable trend charts and other history-related features,
- [categories file](/docs/how-it-works-categories-file/) to group test results into custom categories.

Skip this step if you don't need to enable any of these features, or if your Allure integration generates the files automatically. Check [your integration's documentation](/docs/frameworks/).

## 3. Generate Report

Generate the HTML report by using one of the two Allure command-line commands.

- `allure generate` processes the test results and saves an HTML report into the specified directory (`allure-report` by default). To view the report, use the `allure open` command.

Use this command if you need to save the report for future reference or for sharing it with colleagues.

- `allure serve` creates the same report as `allure generate` but puts it into a temporary directory and starts a local web server configured to show this directory's contents. The command then automatically opens the main page of the report in a web browser.

Use this command if you need to view the report for yourself and do not need to save it.

## Initial configuration

The initial configuration depends on the test framework you are using. In general, the following steps are required:

1. Install the Allure integration for your test framework.

1. Install the Allure command-line utility, see [Installation](/docs/v2/install/).

   Info:
   Depending on the framework you are using, the Allure integration may come with the Allure command-line utility included. In such a case, you may skip this step.

1. In your project's configuration, enable the Allure integration and set its parameters.

See the [specific integration documentation](/docs/frameworks/) for more details.
