Test Collector Buildkite Plugin
A Buildkite plugin for uploading JSON or JUnit files to Buildkite Test Analytics ✨
Example
Upload a JUnit file
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"
Upload a JSON file
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"
Properties
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
.
⚒ Developing
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
👩💻 Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/buildkite-plugins/test-collector-buildkite-plugin
📜 License
The package is available as open source under the terms of the MIT License.