Skip to content

CTRF

Buildnote CLI can collect Common Test Report Format (CTRF) test results and submit them to the buildnote service. CTRF is a test report specification designed to standardize the structure of test results reports across all tools and frameworks.

Configuration

To enable collection of CTRF test results add the following section to buildnote.json config file

json
{
  "collect": {
    ...
    "ctrf": {
      "enabled": true,
      "include": [
        "**/*ctrf.json"
      ]
    }
    ...
  }
}

Metadata

You can attach metadata to CTRF test results by configuring the metadata section:

json
{
  "collect": {
    ...
    "ctrf": {
      "enabled": true,
      "include": [
        "**/*ctrf.json"
      ],
      "metadata": {
        "test-user": "{{ env.USER }}",
        "build-environment": "{{ env.BUILD_ENV }}"
      }
    }
    ...
  }
}

Excluding paths

To exclude any paths from collection configure exclude section with required globs.

json
{
  "collect": {
    ...
    "ctrf": {
      "exclude": [
        "**/*excluded.json",
        "/any/excluded/glob/**/"
      ]
    }
    ...
  }
}