Skip to content

TestNG ​

The Buildnote CLI collects TestNG XML test results and sends them to Buildnote. TestNG is commonly used by Java frameworks and applications.

Configuration ​

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

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

Metadata ​

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

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

Excluding paths ​

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

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

Buildnote Limited
Registered in England and Wales, Reg: 16140412