Registry / testing / buildkite-test-collector

buildkite-test-collector

JSON →
library1.9.0pypypi✓ verified 27d ago

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-collector
INSTALL
IMPORT
SIG · BUILDKITE-TEST-COL
B
buildkite-test-collector
testingpythonv1.9.0
Install
3.5s avg
Import
—
Disk
34MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.9.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 35.2MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 3.5s · import 0.000s · 36MB
34MB installed
● package 34MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pytest_plugin
✓ The library acts as a pytest plugin; no explicit import is typically required for basic functionality.
Functionality is automatically enabled when `buildkite-test-collector` is installed alongside `pytest`.

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.

import os # test_example.py def test_passing_example(): assert True def test_failing_example(): assert False # To run: # 1. Set the Buildkite Analytics Token: # export BUILDKITE_ANALYTICS_TOKEN='your-api-token' # 2. Run pytest: # pytest # You can use os.environ.get('BUILDKITE_ANALYTICS_TOKEN', '') for local testing # but in CI, it must be properly set as an environment variable.
Debug
Known issues
breakingPython 3.8 is no longer supported. The library now requires Python >= 3.9.
fix
Upgrade your Python environment to 3.9 or newer.
affects: >=1.1.0
gotchaThe requirement for the `CI` environment variable for uploads has changed multiple times. While v1.3.1 introduced automatic detection for common CI systems (Buildkite, GitHub Actions, CircleCI), older versions or less common CI systems might still require it.
fix
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`.
affects: <1.3.1
breakingTeardown failures were previously ignored and not reported as failed tests. This was fixed in v1.3.0.
fix
Upgrade to v1.3.0 or later to ensure teardown failures are correctly reported.
affects: <1.3.0
gotchaSubtest reports in pytest might have incorrectly overwritten the parent test result in versions prior to v1.4.0.
fix
Upgrade to v1.4.0 or later to ensure correct reporting of subtest results without overwriting the parent test's outcome.
affects: <1.4.0
gotchaThe `BUILDKITE_ANALYTICS_TOKEN` environment variable is mandatory for the collector to upload test results. Without it, tests will run but results won't be sent to Buildkite.
fix
Always set the `BUILDKITE_ANALYTICS_TOKEN` securely in your CI environment or locally during development.
affects: All versions
breakingThe format for `span detail` objects in tracing was fixed in v1.2.0 to align with Buildkite's documentation. If you were manually crafting span data, its format might need adjustment.
fix
Refer to the Buildkite documentation for the correct `span detail` format and update any custom tracing implementations.
affects: <1.2.0
Upgrade
Version history
1.9.0latest on PyPI · released Aug 24, 2026
Audit
Dependencies
pytestrequiredThe collector primarily functions as a pytest plugin to gather test results and requires pytest to run tests.
Agent activity
24 hits · last 30 days
node
22
OpenAI (training)
1
Resources
buildkite-test-collector — pip install buildkite-test-collector · libregistry