---
title: "YAML"
description: "The same document as the JSON output, in YAML — for reading by eye"
url: "https://docs.justcat.it/reference/outputs/yaml/"
---
# YAML


## When to use it

When a person will open the file — to look at a failed test's message, to diff two runs in a text editor, to keep a readable record next to the project — or when the consuming tool speaks YAML. Multi-line messages come out as readable blocks rather than `\n`-escaped strings. For automation, [JSON](https://docs.justcat.it/reference/outputs/json/ "JSON") has the wider library support; the content is identical.

## How to set it

```yaml
Output: yaml
```

writes `TestResults/cat-test-results-{timestamp}.yaml`. With a name of your own:


**Properties**



Format
: yaml

File
: results/latest.yaml





**YAML**


```yaml
Output:
- Format: yaml
  File: results/latest.yaml
```




See [Settings](https://docs.justcat.it/reference/outputs/settings/ "Settings"). Not available on the Starter and Professional plans (MS Excel only).

## What it looks like

The [sample run](https://docs.justcat.it/reference/outputs/overview/#the-sample-run "The sample run"), trimmed the same way as on the JSON page:

```yaml
executionGuid: 78084065-0bde-4628-b49f-f977c0f803df
startedOn: 2026-08-21T09:06:37.4369592+00:00
finishedOn: 2026-08-21T09:06:44.7333889+00:00
duration: 00:00:07.2964297
results:
- executionGuid: 2ecab40f-fbcd-4d94-a2a0-28b1134f9a5c
  testResult: Passed
  message: >+
    The sets match.


    Description: Every airline in the source must land in the dimension, nothing more.

    First Data Source: DWH

    First Query:


    SELECT 'CSA' AS Code UNION ALL SELECT 'LH' ORDER BY Code


    Second Data Source: DWH

    Second Query:


    SELECT 'CSA' AS Code UNION ALL SELECT 'LH' ORDER BY Code

  rawMessage: The sets match.
  startTime: 2026-08-21T09:06:38.2510955+00:00
  endTime: 2026-08-21T09:06:38.3266711+00:00
  duration: 00:00:00.0755756
  threadNumber: 0
  numberOfErrors:
  exceptionMessage:
  exceptions:
  testDefinition:
    testDefinitionID: aa6f2ccd-6e99-4c0e-8f4d-775c7904a628
    suite: Smoke tests
    name: Airline dimension matches the source
    testFullName: '[Smoke tests].[Airline dimension matches the source]'
    description: Every airline in the source must land in the dimension, nothing more.
    firstDataSource: DWH
    firstQuery: SELECT 'CSA' AS Code UNION ALL SELECT 'LH' ORDER BY Code
    secondDataSource: DWH
    secondQuery: SELECT 'CSA' AS Code UNION ALL SELECT 'LH' ORDER BY Code
    expectation: sets match
    expectationType: SetsMatch
    timeout: 0
    maximumErrorsLogged: 1
    toleranceMode: Absolute
    tags: []
    settings:
      Name: Airline dimension matches the source
      Suite: Smoke tests
      Description: Every airline in the source must land in the dimension, nothing more.
      First data source: DWH
      First query: SELECT 'CSA' AS Code UNION ALL SELECT 'LH' ORDER BY Code
      Second data source: DWH
      Second query: SELECT 'CSA' AS Code UNION ALL SELECT 'LH' ORDER BY Code
      Expectation: sets match
  testDefinitionGuid: aa6f2ccd-6e99-4c0e-8f4d-775c7904a628
  testName: Airline dimension matches the source
  testFullName: '[Smoke tests].[Airline dimension matches the source]'
  testSuite: Smoke tests
  description: Every airline in the source must land in the dimension, nothing more.
  firstDataSource: DWH
  firstQuery: SELECT 'CSA' AS Code UNION ALL SELECT 'LH' ORDER BY Code
  secondDataSource: DWH
  secondQuery: SELECT 'CSA' AS Code UNION ALL SELECT 'LH' ORDER BY Code
  expectation: sets match
- testResult: Failed
  rawMessage: "No row was expected, but at least 1 row exists. …"
- testResult: Error
  exceptionMessage: "Invalid object name 'dbo.Flights'."
passedCount: 1
failedCount: 1
errorCount: 1
inconclusiveCount: 0
totalCount: 3
passRate: 33.3
failedRate: 33.3
errorRate: 33.3
inconclusiveRate: 0
```

## Details

**Same document as JSON** — see the [JSON details](https://docs.justcat.it/reference/outputs/json/#details "JSON details") for the fields; two differences of the YAML writer: enumerations come out by name (`expectationType: SetsMatch`, `toleranceMode: Absolute`) where JSON writes numbers, and an empty value is written as an empty key (`numberOfErrors:`) where JSON writes `null`. Messages are written as literal blocks (`>+`), so the box-drawing table of a failed test reads as on the console.

**Anchors.** When two results share an identical value the writer may emit a YAML anchor and alias (`tags: &o0 []` … `tags: *o0`). Every YAML parser resolves them; a reader should not be surprised by them.

**UTF-8 with a byte-order mark**, like JSON. **Written once, after the run.**

## Related

* [JSON](https://docs.justcat.it/reference/outputs/json/ "JSON") — the same document for programs, with the reading snippets.
* [Properties](https://docs.justcat.it/reference/outputs/properties/ "Properties") — what each field holds.

