The `buildkite-test-collector` is the official Python adapter for Buildkite Test Engine, designed to collect and report test results, primarily from `pytest` suites, to the Buildkite Test Engine dashboard. It integrates seamlessly with CI environments and is actively maintained with frequent updates.
pip install buildkite-test-collectorVerified import paths — ran on the pinned version, not inferred.
To quickly start collecting test data, first install the library and pytest. Then, set the `BUILDKITE_ANALYTICS_TOKEN` environment variable with your Buildkite Test Engine API token and run your pytest suite as usual. The collector will automatically send test results to Buildkite. For local testing, ensure `BUILDKITE_ANALYTICS_TOKEN` is set, or mock it.
Upgrade your Python environment to 3.9 or newer.
For common CI systems, upgrade to v1.3.1 or later. For unknown CI systems or older versions, ensure the `CI` environment variable is set to any value, e.g., `CI=true`.
Upgrade to v1.3.0 or later to ensure teardown failures are correctly reported.
Upgrade to v1.4.0 or later to ensure correct reporting of subtest results without overwriting the parent test's outcome.
Always set the `BUILDKITE_ANALYTICS_TOKEN` securely in your CI environment or locally during development.
Refer to the Buildkite documentation for the correct `span detail` format and update any custom tracing implementations.