Categories file

This page describes a data format used by Allure and its adapters for test frameworks. Depending on the test framework you use, this file may or may not be generated automatically based on the project configuration. Check your adapter's documentation.

The categories.json file in the test results directory, if present, defines custom defect categories.

The data is stored as a JSON array of objects. Each object defines one custom category and can have the properties described below. The order of objects in the array is the order in which Allure will try to match a test result against the categories.

Example:

JSON
[ { "name": "Ignored tests", "messageRegex": ".*ignored.*", "matchedStatuses": ["skipped"] }, { "name": "Infrastructure problems", "messageRegex": ".*RuntimeException.*", "matchedStatuses": ["broken"] } ]

name (string)

The name of the category.

messageRegex (string)

The regular expression that the test result's message should match.

traceRegex (string)

The regular expression that the test result's trace should match.

matchedStatuses (array)

An array of statuses that the test result should be one of. Possible values are: “failed”, “broken”, “passed”, “skipped”, “unknown”. See Test statuses.

flaky (boolean)

Whether the test result should be flaky or not flaky.

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.