Appearance
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 is used for transferring simplified information between consecutive test reports. The directory is being generated as part of the test report generation and then can be copied to the test results directory for the new report, either manually or by a CI integration plugin.
The information in the history
directory is used for displaying the History tab in the test details and various graphs.
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 is some test's historyId
. Each value is an object containing:
statistic
— the statistics related to the test (used for the Test statuses graph).items
— information about specific runs of the test (used for the History tab in the test details).
Example:
json
{
"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 fromstatus
in the test result file.statusDetails
(string) — the short text message with which the test finished. Copied fromstatusDetails.message
in the test result file.time
(object):start
(integer) — the time when the execution started, in the UNIX timestamp format. Copied fromstart
in the test result file.stop
(integer) — the time when the execution finished, in the UNIX timestamp format. Copied fromstop
in the test result file.duration
(integer) — the difference in seconds between thestart
andstop
values.
history-trend.json
The history/history-trend.json
file stores data for the Trend graph.
Example:
json
[
{
"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 Defect categories). The value for each of these keys represents the number of tests in this category. The value for thetotal
key indicates the total number of tests.
duration-trend.json
The history/duration-trend.json
file stores data for the Duration trend graph, see Trend graphs.
Example:
json
[
{
"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/retries-trend.json
file stores data for the Retries trend graph, see Trend graphs.
Example:
json
[
{
"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 graph, see Trend graphs.
Example:
json
[
{
"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 Defect categories). The value for each of these keys represents the number of tests in this category.