The Testing Workflow
The recommended Claude Code testing workflow, combining all tools:
- Write implementation code
- Write unit tests — informed by property-based testing for data transformations
- Run tests —
pytest/swift test/npm test/dotnet test - Validate test quality —
mutmut run/npx stryker run/muter/dotnet stryker - Kill surviving mutants — additional tests MUST be written targeting gaps
- Security scan —
semgrep scan+bandit/pip-audit/npm auditMUST be run - E2E verification — Playwright for web UIs, platform test runners for native
This creates a closed loop: AI generates tests, deterministic tools validate those tests actually catch bugs, AI writes more tests to close gaps.