Skip to content
Documentation /Develop

Testing

NosoGraph separates fast offline checks from infrastructure-dependent and browser checks. Test counts describe software validation coverage; they are not evidence of scientific validity.

Local gates

Use the repository's local gate before a contribution:

make ci-local

The release metadata records 2,445 offline tests selected in the v0.2.1 release suite. That number is a labeled snapshot, not a live collect-gate. Suite growth since v0.2.1 is new unit modules (DEMO_MODE, a11y, harvest, license SBOM, public-metadata, CSP), on the order of +34 tests; passed vs collected can differ by skips, so CI does not assert an exact live integer.

Test tiers

Command Requirement Purpose
make test-offline Python environment Fast unit tier without Redis.
make test-integration Redis Offline integration (fixture-backed). The target sets CELERY_TASK_ALWAYS_EAGER=true like hosted CI, so job-lifecycle tests do not need a Celery worker. A live worker is still required for production-shaped async jobs.
make test-browser Playwright Chromium Deterministic dashboard a11y, Evidence Workspace, and Evidence Explorer workflows. Install once with python -m playwright install chromium.
make typecheck Mypy environment Explicit Makefile file-list ratchet. After PR #102, CI has a strict standalone typecheck job (no continue-on-error). The Tests aggregator requires lint, security, test, integration-tests, and typecheck, so typecheck is merge-blocking via the required Tests check. License-check/SBOM runs in the security job. make ci-local runs lint, locks, license policy, import/metadata/font/harvest checks, and serial offline pytest; it does not run typecheck or Playwright.
python scripts/check_registry_harvest.py Python environment Harvest catalog vs on-disk disease-module drift (also part of make ci-local and the lint job).

For a single pytest test, pass -n 0 because the project config enables xdist by default. Browser tests that exercise the dashboard are separate from the offline CLI path.

Documentation checks

.venv/Scripts/python.exe -m mkdocs build --strict
.venv/Scripts/python.exe scripts/check_public_fonts.py
.venv/Scripts/python.exe scripts/check_public_metadata.py

Use .venv/bin/python on macOS/Linux.

Continue