TestRelic for pytest
testrelic-pytest is a generic reporter for any pytest project. Install it, set one environment variable, and run pytest — every test result is sent to the TestRelic cloud with no code changes and no conftest.py wiring.
Zero-config value
The plugin auto-registers through a pytest11 entry point, so there is nothing to import. Once installed it observes your normal test run and reports results. On top of standard reporting, it adds zero-config HTTP API auto-detection: tests that make httpx or requests calls are automatically classified as rest API tests and open the API Session Workspace instead of the Web workspace.
How results flow
The path from a local test run to the cloud is straightforward:
- Test run — you run
pytestas usual. - Plugin — the auto-registered
pytest11plugin captures results, HTTP calls, assertions, and CI/git metadata. - TestRelic cloud — results are uploaded to
https://platform.testrelic.ai/api/v1and appear in your dashboard.
If the cloud is unreachable, uploads are written to a local offline queue (.testrelic/queue/) and can be replayed later.
Requirements
| Requirement | Version |
|---|---|
| Python | >=3.9 |
| pytest | >=7.0 |
| httpx | >=0.27 |
See Python and the pytest documentation for base tooling.
Where results land
Uploaded runs surface in the TestRelic cloud dashboard. rest API runs open the API Session Workspace, where you can inspect captured requests, responses, and assertions. Web-style runs surface in the standard run views.