Skip to main content

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:

  1. @pytest.mark.devant("DEF-AB12") marker on the test — looked up via GET /v1/test-cases/by-key/DEF-AB12.
  2. Exact name match (<file>::<test> nodeid) in the project → GET /v1/test-cases?search=….
  3. Auto-createPOST /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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_devant_cloud-0.1.0.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_devant_cloud-0.1.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file pytest_devant_cloud-0.1.0.tar.gz.

File metadata

  • Download URL: pytest_devant_cloud-0.1.0.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for pytest_devant_cloud-0.1.0.tar.gz
Algorithm Hash digest
SHA256 95f0913699a4a94523fdc9e79d731cee41d9b3fd153c545ecb11bfc5cb32d3f2
MD5 3b59e2240dff06bd0a7b920354a7e845
BLAKE2b-256 ae15b9c89dcacd069cad72d63e58733a6779e0298cf6c59d8c42b6a97154d14b

See more details on using hashes here.

File details

Details for the file pytest_devant_cloud-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_devant_cloud-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b0d0535de319940cd4e4ca114e4be800d926e8379a84d31672dc9c9d1fc8c11
MD5 8d0170fde616f8a6c6e21f23e6f6afc7
BLAKE2b-256 03f07bb26733b23807817f0eac72e57935f9910858133ddc578b04d673161e95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page