This release is a pre-release and may not be stable for production use.
pytest-test-radar
pytest-test-radar is a pytest plugin designed to send test execution statistics to a centralized server. This allows teams to monitor flaky tests, track performance, and identify redundant or overly stable tests that might not be adding value to the test suite.
Features
- Collects test execution statistics, including:
- Test name
- Outcome (passed, failed, skipped)
- Execution duration
- Sends data to a configured HTTP endpoint.
- Easy integration with any centralized monitoring system.
Installation
You can install it to your project dependencies:
pip install pytest-test-radar
Usage
Run pytest with --radar-endpoint and --radar-token options to specify
the server URL and agent token:
pytest --radar-endpoint="http://your-server.com" --radar-token="ci_your_token_here"
You can also configure both via pyproject.toml:
[tool.pytest.ini_options]
radar_endpoint = "http://your-server.com"
radar_token = "ci_your_token_here"
# Optional
radar_include_setup = true # False by default; --radar-include-setup
The token is obtained from the Test Radar web UI when creating or regenerating
an agent for a project. It is sent as an Authorization: Token <token> header
with every request.
Example
Create a sample test file:
# test_sample.py
def test_pass():
assert 1 == 1
def test_fail():
assert 1 == 2
Run the tests with the plugin:
pytest test_sample.py --radar-endpoint="http://localhost:8000" --radar-token="ci_your_token_here"
Test results are accumulated and sent in batches to /api/v1/test_record/bulk_create/:
{
"session_id": "550e8400-e29b-41d4-a716-446655440000",
"started_at": "2024-01-01T12:00:00+00:00",
"environment": {
"os": "Linux",
"os_version": "6.6.0",
"arch": "x86_64"
},
"context": {
"branch": "main",
"commit_hash": "abc123def456"
},
"records": [
{
"label": "test_sample.py::test_pass",
"timestamp": "2024-01-01T12:00:00+00:00",
"logs": "",
"success": true
},
{
"label": "test_sample.py::test_fail",
"timestamp": "2024-01-01T12:00:00+00:00",
"logs": "KLUv/QBY...",
"success": false
}
]
}
The logs field for failed tests contains base64-encoded zstd-compressed traceback text.
Metadata
Release files for pytest-test-radar 0.0.1a12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytest_test_radar-0.0.1a12.tar.gz | 32.4 kB | Without provenance | Details for pytest_test_radar-0.0.1a12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_test_radar-0.0.1a12-py3-none-any.whl | Python 3 | none | any | Details for pytest_test_radar-0.0.1a12-py3-none-any.whl |
Total release size: 39.1 kB
Release files / pytest_test_radar-0.0.1a12.tar.gz
| Download URL | pytest_test_radar-0.0.1a12.tar.gz |
|---|---|
| Size | 32.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fec1b584db9f37bde52f78cb432a661e52093ea48c70f9fbb36c2638b9141f46
|
|
BLAKE2b-256 checksum How to use checksums |
38192782598c9584b7b745e07d7a0596b8a36c4bbb4c1bff7bec350be9a19c4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.6 Darwin/25.6.0
|
Release files / pytest_test_radar-0.0.1a12-py3-none-any.whl
| Download URL | pytest_test_radar-0.0.1a12-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00fe8ab7f10ac537b1679972bbfbb7f27fe1f4a5027488217230a833c8886a83
|
|
BLAKE2b-256 checksum How to use checksums |
5f0e2d964d59a34892ef078a001bf8e51a7b39274d800f5ad5f3b30c38bcd063
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.14.6 Darwin/25.6.0
|
Security for pytest-test-radar 0.0.1a12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.