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.2.tar.gz (19.2 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.2-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest_devant_cloud-0.1.2.tar.gz
  • Upload date:
  • Size: 19.2 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.2.tar.gz
Algorithm Hash digest
SHA256 2ce8b2a9e86ca0b2e900e35fb5a1d0eba7edf920329eec4cee66d2080345ba3d
MD5 d488cceea7a199b187ca4887d6ba057d
BLAKE2b-256 a326c72dd9ce2992349fe1a1227f1d939f2862e587b184d453a6ae3cb4df3841

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytest_devant_cloud-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 336a60c4c97921f40cdd47e017dfa80ded2ca42a337c48739f49e9e0c5c78897
MD5 28ab38a744108bf71f19b5ec128ba092
BLAKE2b-256 8e0bfe6c011d21eb4bd156ccc1d682f7e7d53c1a8bd2d2e83b26adb6da0dac0d

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