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"
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"
Each test result is sent individually to /api/v1/test_record/create/:
{
"label": "test_sample.py::test_pass",
"timestamp": "2024-01-01T12:00:00+00:00",
"logs": "",
"success": true
}
Release files for pytest-test-radar 0.0.1a5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest_test_radar-0.0.1a5.tar.gz | 22.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_test_radar-0.0.1a5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.7 kB
Release files / pytest_test_radar-0.0.1a5.tar.gz
| Download URL | pytest_test_radar-0.0.1a5.tar.gz |
|---|---|
| Size | 22.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
400ac319c9f99766c3bf4241d714b02532379a1faf63333add5204fb3eb090c9
|
|
BLAKE2b-256 checksum How to use checksums |
4a96127d1036e588b77b27a4dd446646f799295ee6a5d1f664817234471bd588
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.13.6 Darwin/24.3.0
|
Release files / pytest_test_radar-0.0.1a5-py3-none-any.whl
| Download URL | pytest_test_radar-0.0.1a5-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85e19c2bace648163036d7ea849000857f1b20b1a57f3bf6f62d738331393bb7
|
|
BLAKE2b-256 checksum How to use checksums |
9a90d9a6d4feecaff342bf137a31b3f2a2d7c4b506345db12dd023bd6159abfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.13.6 Darwin/24.3.0
|