Skip to content

JUnit ​

The Buildnote CLI collects JUnit XML test results and sends them to Buildnote. JUnit XML is used across the JVM ecosystem, by JavaScript testing frameworks (Mocha, Jest), and by many other testing tools.

Configuration ​

To collect JUnit test results, add this section to your buildnote.json config file:

json
{
  "collect": {
    ...
    "junit": {
      "enabled": true,
      "include": [
        "**/TEST-*.xml"
      ]
    }
    ...
  }
}

Metadata ​

To attach your own metadata to JUnit test results, add a metadata section:

json
{
  "collect": {
    ...
    "junit": {
      "enabled": true,
      "include": [
        "**/TEST-*.xml"
      ],
      "metadata": {
        "test-user": "{{ env.USER }}"
      }
    }
    ...
  }
}

Excluding paths ​

To leave some paths out of collection, list their globs under exclude:

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

Buildnote Limited
Registered in England and Wales, Reg: 16140412