pytest plugin that streams runs, results, and step trees to Devant Cloud's /v1/runs API.
Project description
pytest-devant-cloud
pytest plugin that streams runs, results, and per-test step trees into
Devant Cloud as your suite
executes — the Python sibling of @devant-net/playwright-reporter.
Install
pip install pytest-devant-cloud
The plugin auto-registers via the pytest11 entry-point group. No
conftest.py changes are needed.
Configure
Set env vars before invoking pytest:
| Var | Default | Notes |
|---|---|---|
DEVQ_API_URL |
http://localhost:32124 |
Your tenant's URL |
DEVQ_TOKEN |
dev-admin-token |
Bearer token (CI/CD settings) |
DEVQ_PROJECT_ID |
1 |
Devant Cloud project id |
DEVQ_RUN_NAME |
pytest — <ISO date> |
Display name on the run |
DEVQ_RUN_ID |
(unset) | Attach to an externally-created run instead of creating one |
Or with CLI flags:
pytest \
--devant-api-url=https://acme.devq.cloud \
--devant-token=$DEVQ_TOKEN \
--devant-project-id=1
To disable the plugin for one run without uninstalling:
pytest -p no:devant_cloud
How tests bind to test cases
Each pytest item resolves to a Devant Cloud test_case row in this order:
@pytest.mark.devant("DEF-AB12")marker on the test — looked up viaGET /v1/test-cases/by-key/DEF-AB12.- Exact name match (
<file>::<test>nodeid) in the project →GET /v1/test-cases?search=…. - Auto-create →
POST /v1/test-cases. The plugin prints the new key:[devant] minted DEF-XYZ9 for "tests/test_auth.py::test_login" — add @pytest.mark.devant("DEF-XYZ9") to bind it
Bind the key in source once and future runs (even with renames) reuse the same case.
What gets sent
| pytest hook | Devant Cloud call |
|---|---|
pytest_sessionstart |
POST /v1/runs (skipped if DEVQ_RUN_ID is set) |
pytest_runtest_makereport (wrapper) |
stashes setup/call/teardown reports on the item |
pytest_runtest_logreport (teardown phase) |
resolve test case → POST /v1/runs/:id/results with step tree |
pytest_sessionfinish |
POST /v1/runs/:id/complete (skipped if DEVQ_RUN_ID is set) |
The step tree includes one node per phase (setup / call / teardown) with
status, duration, and longrepr captured as error_message.
CI metadata
Auto-detected for GitHub Actions, GitLab CI, CircleCI, Jenkins, and Azure
DevOps, plus a generic CI=true fallback. Populates the ci_* columns
on the run so the dashboard can deep-link to commits and PRs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_devant_cloud-0.1.1.tar.gz.
File metadata
- Download URL: pytest_devant_cloud-0.1.1.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4761495020992e95ef09812f03a874daa985e4cecadee7283167eeddddf9b25e
|
|
| MD5 |
3ed5afc67106823ca75d50538240e6ac
|
|
| BLAKE2b-256 |
8eff7e116343f7bb490c2ff2597ea520a033862f7d1e126202decf41906ccbfa
|
File details
Details for the file pytest_devant_cloud-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pytest_devant_cloud-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84a4d187e44afde06debc48b5b70c54765f37a33ada325a2f1f17747c635bb9f
|
|
| MD5 |
e92f71619c25a1cc355112d5f9a14ce0
|
|
| BLAKE2b-256 |
e24cf7b7e5c881c83c9533bed7a0f45009ddbe9bf290e37e3752442d8937dad2
|