Allure Playwright configuration

The Allure Playwright adapter behavior can be affected by some configuration options set in your project's playwright.config.ts file.

To set the options, define an object after the "allure-playwright" string in the reporter configuration section. For example:

TypeScript
export default defineConfig({ // ... reporter: [ ["line"], [ "allure-playwright", { detail: true, outputFolder: "allure-results", suiteTitle: true, categories: [ { name: "Outdated tests", messageRegex: ".*FileNotFound.*", }, ], environmentInfo: { framework: "playwright", }, }, ], ], });

detail

If true (the default), Allure will display test hooks as separate steps within each test. See Divide a test into steps for more details on how to use steps.

outputFolder

Path to the directory where Allure Playwright will save the test results, see How it works. If the directory does not exist, it will be created. Defaults to allure-results.

suiteTitle

If true (the default), implicitly add each test into a test suite named after its file name.

categories

Define custom categories that will be used to distinguish test results, see Interpreting test results.

This setting is an array, each item being an object representing one custom category. The objects may have the following properties:

  • name — the category name.
  • messageRegex — regular expression that the test result's message should match.
  • traceRegex — regular expression that the test result's trace should match.
  • matchedStatuses — array of statuses that the test result should be one of.
  • flaky — whether the test result should be flaky or not flaky.

environmentInfo

Key-value pairs that will be displayed on the report's main page, see Environment information.

Powered by
logo

Join our newsletter

Join our community

We aim to make Allure Report as reliable and user-friendly as possible, and together with the community, we're here to help when problems arise.

© 2024 Qameta Software Inc. All rights reserved.