Container file

This page describes a data format used by Allure and its adapters for test frameworks. Understanding this format is not necessary for using Allure in your project. For a more high-level description of the process of building a report, see How it works.

A container file describes a set of initialization and finalization steps related to certain tests. It is used by the test frameworks that implement the concept of test fixtures, with one container normally describing one fixture. The container may refer to multiple test results via the children property, thus adding the initialization and finalization steps to each of them in the test report.

The data is stored as a JSON object. Each file is named {uuid}-container.json, where {uuid} is a randomly generated identifier. This article describes the properties that can be found in the JSON object.

Example:

JSON
{ "uuid": "987b1a5d-fbab-4707-acff-ddfd41f9e511", "start": 1682502818632, "stop": 1682502818712, "children": [ "f82da25c-3565-4eb4-a1db-4a502fe35eea", "fc9e5cee-f4af-475c-94f2-5902ee7c9d2d", "e3592f29-c828-4816-8d3d-3759c6663b27" ], "befores": [ { "name": "Create temporary directory", "status": "passed", "start": 1682502818632, "stop": 1682502818632 }, { "name": "Create temporary files", "status": "passed", "start": 1682502818632, "stop": 1682502818632 } ], "afters": [ { "name": "Remove temporary files", "status": "passed", "start": 1682502818712, "stop": 1682502818712 }, { "name": "Remove temporary directory", "status": "passed", "start": 1682502818712, "stop": 1682502818712 } ] }

uuid (string)

A unique identifier of the test result.

start (integer)

The time when the execution of the initialization steps started, in the UNIX timestamp format. Normally, it is equal or close to the earliest start time from the befores.

stop (integer)

The time when the execution of the finalization steps finished, in the UNIX timestamp format. Normally, it is equal or close to the latest stop time from the afters.

children (array)

The uuid values of the test results for which this fixture was added.

befores (array)

An array of initialization steps that were executed before the tests. Note that the test report does not necessarily display these steps in the same order as defined in the file.

Objects in the array have the following properties, each having the same format as the corresponding property of a test result:

afters (array)

An array of finalization steps that were executed after the tests. Note that the test report does not necessarily display these steps in the same order as defined in the file.

Objects in the array have the following properties, each having the same format as the corresponding property of a test result:

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.