A Buildkite plugin for uploading JSON or JUnit files to Buildkite Test Analytics ✨
To upload a JSON file to Test Analytics from a build step:
steps:
- label: "🔨 Test"
command: "make test"
plugins:
- test-collector#v1.0.0:
files: "test/junit-*.xml"
format: "junit"
To upload a JSON file to Test Analytics from a build step:
steps:
- label: "🔨 Test"
command: "make test"
plugins:
- test-collector#v1.0.0:
files: "test-data-*.json"
format: "json"
files
 — Required — String — Pattern of files to upload to Test Analyticsformat
 — Required — String — Format of the file. Possible values:"junit"
,"json"
api-token-env-name
 — Optional — String — Name of the environment variable that contains the Test Analytics API token. Default value:"BUILDKITE_ANALYTICS_TOKEN"
timeout
 — Optional — Number — Maximum number of seconds to wait for each file to upload before timing out. Default value:30
debug
 — Optional — Boolean — Print debug information to the build output. Default value:false
. Can also be enabled with the environment variableBUILDKITE_ANALYTICS_DEBUG_ENABLED
.
You can use the bk cli to run the whole pipeline locally, or just the tests using Docker Compose directly:
docker-compose run --rm tests
Bug reports and pull requests are welcome on GitHub at https://github.com/buildkite-plugins/test-collector-buildkite-plugin
The package is available as open source under the terms of the MIT License.