Testing Guide¶
This project targets 85%+ total coverage for core modules.
Latest measured result (CI): 87% (2026-02-09).
Test Structure¶
tests/: unit and integration-oriented test modules
Run Tests¶
make test
make cov
Coverage Policy¶
- CI runs tests on Python
3.10to3.14. - All matrix versions are required (no allow-fail matrix entry).
- Python
3.14is treated as stable support, not preview support. - Coverage report is generated as
coverage.xml. - Codecov upload runs in CI for Python
3.10jobs.
Test Scope Summary¶
- Core API generation: decorator metadata, OpenAPI JSON/YAML output
- CLI behavior: command parsing, generation/validation command paths
- Security behavior: sanitization/validation and scanner checks (Bandit/Semgrep in CI)
Adding New Tests¶
When adding a feature:
- Add happy-path tests.
- Add error and validation edge cases.
- Add regression tests for fixed bugs.
- Keep tests isolated and deterministic.