Running Tests¶
Fast checks¶
Run these checks before changing integration code:
The suite includes harness unit tests, distribution checks, schema registry checks, artifact tests, parser tests, offline checks, SQLite constraint semantics, and non-container durability baselines.
All non-container tests¶
The performance benchmark test is small by default. The 500 migration and scale tests require their explicit environment variables.
Integration tests¶
Run one suite while developing:
DBWARDEN_HARNESS_RUN_INTEGRATION=1 uv run pytest -q suites/round_trip/test_generate_models_integration.py
Use -k to select a backend. The backend matrix uses this same mechanism to
avoid starting unrelated containers in each job:
Certify a candidate wheel¶
The harness tests the installed distribution, so pointing it at a build rather than at PyPI is a matter of installing that build first:
uv build --wheel -o dist # in the dbwarden checkout
uv pip install --reinstall-package dbwarden dist/dbwarden-*.whl
DBWARDEN_HARNESS_RUN_INTEGRATION=1 uv run --no-sync pytest -m integration
--no-sync keeps uv run from resolving the pinned release back over the
candidate. Restore the declared release with uv sync when finished, and check
harness/provenance.py output in artifacts if there is any doubt about which
artifact a result belongs to.
Select provider versions¶
The provider lifecycle suite supports DBWARDEN_HARNESS_BACKEND and
DBWARDEN_HARNESS_VERSIONS:
DBWARDEN_HARNESS_RUN_INTEGRATION=1 \
DBWARDEN_HARNESS_BACKEND=postgres \
DBWARDEN_HARNESS_VERSIONS=14,17 \
uv run pytest -m integration suites/round_trip/test_providers.py
Slow suites¶
The 500 migration benchmark is opt in:
Artifacts¶
DBWARDEN_HARNESS_ARTIFACT_DIR=artifacts \
DBWARDEN_HARNESS_RUN_INTEGRATION=1 \
uv run pytest -m integration suites/round_trip
On failure, the artifact directory contains command output, temporary project files, generated migrations, model state, provenance, and provider logs when the provider is available to the pytest hook.