Appearance
Categories file
WARNING
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 marked as flaky.