Testing Strategy¶
Purpose¶
Define a practical validation ladder for safe changes.
Validation Ladder¶
flowchart TD
Unit["Unit/Service"] --> View["View/Integration"]
View --> Smoke["Smoke"]
Smoke --> Full["Full Regression"] Execution Order¶
- targeted module tests
- smoke suite
- full regression for broad/high-risk changes
Core Commands¶
./scripts/run_smoke_tests.sh
./scripts/run_tests.sh
docker compose run --rm app sh -c "pytest requirements_mgmt/tests -v"
docker compose run --rm app sh -c "pytest requirements_mgmt/tests/test_views.py::RequirementListViewTests::test_filters_visible -v"
Change-Type Coverage Guidance¶
| Change Type | Minimum Validation |
|---|---|
| view/template | affected views + smoke |
| model/migration | model/integration + affected views + smoke |
| auth/security | affected domains + security-sensitive flows + smoke |
| cross-domain refactor | targeted suites + full regression |
Failure Triage¶
- isolate failing module boundary
- rerun smallest failing test slice
- verify fixture/state assumptions
- re-run smoke suite after fix
Flaky failure triage
Re-run failing tests in isolation, then with related suites before full regression.