History files
WARNING
This page describes a data format used by Allure. Understanding this format is not necessary for using Allure in your project. For a more high-level description of working with history, see Tests history.
The history directory in Allure Report 2 and the history JSONL file, which replaced it in Allure Report 3, are used for transferring simplified information between consecutive test reports.
Historical data populates the History tab in the test details and various charts.
Allure Report 3
Allure report 3 stores all historical data in a single JSONL file, its location determined by the historyPath configuration parameter.
History File Format
File: JSONL (JSON Lines) format - one JSON object per line
Location: Configured via historyPath (default: undefined)
Structure: Each line represents one complete test run
Example:
{"uuid":"abc-123","name":"Allure Report","timestamp":1697020800000,"knownTestCaseIds":["tc1","tc2"],"testResults":{...},"metrics":{},"url":""}
{"uuid":"def-456","name":"Allure Report","timestamp":1697107200000,"knownTestCaseIds":["tc1","tc2","tc3"],"testResults":{...},"metrics":{},"url":""}Each history entry contains:
uuid(string) - unique ID for this report run.name(string) - report name.timestamp(integer) - when this run happened, in the UNIX timestamp format.knownTestCaseIds(array of strings) - array of test case IDs.testResults(object) - object containing test results, keyed by the identity of each test (see How Allure Report identifies tests).metrics(object) - the average values of the performance metrics of this run.url(string) - the address of the report, based on thehistoryBaseUrlconfiguration option, onreportUrlin the executor file, or on the address of the report in Allure Report Storage. Empty if the address is not known.
Each test result in the testResults object contains:
id(string) - the unique identifier of this history item.name(string) - the title of the test. Copied fromnamein the test result file.fullName(string) - a unique identifier based on the file name and the test name. Copied fromfullNamein the test result file.environment(string) - environment name. Set by matching labels via rules defined in the configuration file.status(string) - the status with which the test or step finished. Copied fromstatusin the test result file.retries(array of strings) - the statuses of the test's earlier attempts in this run, from the oldest to the newest; empty if the test was not retried. Added in Allure Report 3.21.0.start(integer) - the time when the execution started, in the UNIX timestamp format. Copied fromstartin the test result file.stop(integer) - the time when the execution finished, in the UNIX timestamp format. Copied fromstopin the test result file.duration(integer) - the difference between thestartandstopvalues.labels(array) - array of test labels. Copied fromlabelsin the test result file.url(string) - the address of the report that contains this result, based on thehistoryBaseUrlconfiguration option or onreportUrlin the executor file. Empty otherwise.retryHash(string) - the identity of the test, the same as the key of this object.reportLinks(array) - currently unused.
Failed and broken tests also contain the following fields populated with error data copied from statusDetails in the test result file:
message(string) - a brief description of why the test failed.trace(string) - the complete stack trace showing where in the code the failure occurred.
Single test result object example:
{
"9b448b5eff623519556020f329494163.d41d8cd98f00b204e9800998ecf8427e": {
"id": "74364e3f7162027e8e10fe7f3af56b5e",
"name": "Creating new issue authorized user",
"fullName": "io.qameta.allure.IssuesWebTest.shouldCreateIssue",
"environment": "default",
"status": "passed",
"retries": [],
"start": 1748616059263,
"stop": 1748616060376,
"duration": 1113,
"labels": [
{
"name": "framework",
"value": "junit-platform"
},
{
"name": "language",
"value": "java"
},
{
"name": "package",
"value": "io.qameta.allure.IssuesWebTest"
},
{
"name": "testClass",
"value": "io.qameta.allure.IssuesWebTest"
},
{
"name": "testMethod",
"value": "shouldCreateIssue"
},
{
"name": "suite",
"value": "io.qameta.allure.IssuesWebTest"
}
],
"url": "",
"retryHash": "9b448b5eff623519556020f329494163.d41d8cd98f00b204e9800998ecf8427e",
"reportLinks": []
}
}Configuration
{
historyPath: "./.allure/history.jsonl",
historyBaseUrl: "https://reports.example.com/builds/42/",
appendHistory: true
}Allure Report 2
Allure Report 2 generates its history directory during test report generation. It can then be copied to the test results directory for the new report, either manually or by a CI integration plugin.
The directory contains the following files:
history.json
The history/history.json file stores general information about runs of each test.
In the root JSON object in the file, each key identifies a test. Since Allure Report 2.45.0, the key is calculated from the test's testCaseId or fullName and its parameters, see How Allure Report identifies tests. Older versions used the test's historyId. Each value is an object containing:
statistic- the statistics related to the test (used for the Test statuses chart).items- information about specific runs of the test (used for the History tab in the test details).
Example:
{
"4da3226ec9761b158ba5f826fc8f8289": {
"statistic": {
"failed": 1,
"broken": 0,
"skipped": 0,
"passed": 0,
"unknown": 0,
"total": 1
},
"items": [
{
"uid": "74556baed1daf783",
"reportUrl": "https://reports.example.com/1234",
"status": "failed",
"statusDetails": "AssertionError: Some fail reason\nassert False",
"time": {
"start": 1682358404995,
"stop": 1682358404995,
"duration": 0
}
}
]
}
}In the statistic object, there is a key corresponding to each possible test status. The value for each of these keys represents the number of times the test got this status. Additionally, there is the total key, with the value representing the total number of reports that include this test.
The items array represents the test's data from different test reports. Each object in the array has the following properties:
uid(string) - the unique identifier of this history item.reportUrl(string) - the URL of the test report from which this data is extracted.status(string) - the status with which the test or step finished. Copied fromstatusin the test result file.statusDetails(string) - the short text message with which the test finished. Copied fromstatusDetails.messagein the test result file.time(object):start(integer) - the time when the execution started, in the UNIX timestamp format. Copied fromstartin the test result file.stop(integer) - the time when the execution finished, in the UNIX timestamp format. Copied fromstopin the test result file.duration(integer) - the difference in seconds between thestartandstopvalues.
history-trend.json
The history/history-trend.json file stores data for the Trend chart.
Example:
[
{
"buildOrder": 1234,
"reportName": "Report #1234",
"reportUrl": "https://reports.example.com/1234",
"data": {
"failed": 0,
"broken": 0,
"passed": 32,
"skipped": 0,
"unknown": 0,
"total": 32
}
}
]Each object in the array has the following properties:
buildOrder(integer) - the identifier provided by the build'sexecutor.json.reportUrl(string) - the URL of the test report from which the data is extracted.reportName(string) - the title of the report from which the data is extracted.data(object) - in this object, there is a key corresponding to each category (see Categories). The value for each of these keys represents the number of tests in this category. The value for thetotalkey indicates the total number of tests.
duration-trend.json
The history/duration-trend.json file stores data for the Duration trend chart, see Trend charts.
Example:
[
{
"buildOrder": 1234,
"reportName": "Report #1234",
"reportUrl": "https://reports.example.com/1234",
"data": {
"duration": 78
}
}
]Each object in the array has the following properties:
buildOrder(integer) - the identifier provided by the build'sexecutor.json.reportUrl(string) - the URL of the test report from which the data is extracted.reportName(string) - the title of the report from which the data is extracted.data(object):duration(integer) - number of seconds it took to run all the tests.
retry-trend.json
The history/retry-trend.json file stores data for the Retries trend chart, see Trend charts.
Example:
[
{
"buildOrder": 1234,
"reportName": "Report #1234",
"reportUrl": "https://reports.example.com/1234",
"data": {
"run": 39,
"retry": 15
}
}
]Each object in the array has the following properties:
buildOrder(integer) - the identifier provided by the build'sexecutor.json.reportUrl(string) - the URL of the test report from which the data is extracted.reportName(string) - the title of the report from which the data is extracted.data(object):run(integer) - number of test runs that did not cause a retry.retry(integer) - number of test runs that caused a retry.
categories-trend.json
The history/categories-trend.json file stores data for the Categories trend chart, see Trend charts.
Example:
[
{
"buildOrder": 1234,
"reportName": "Report #1234",
"reportUrl": "https://reports.example.com/1234",
"data": {
"Product defects": 2,
"Test defects": 1
}
}
]Each object in the array has the following properties:
buildOrder(integer) - the identifier provided by the build'sexecutor.json.reportUrl(string) - the URL of the test report from which the data is extracted.reportName(string) - the title of the report from which the data is extracted.data(object) - in this object, there is a key corresponding to each category (see Categories). The value for each of these keys represents the number of tests in this category.