BTerminal/.claude/rules/06-testing.md
Hibryda b659a6a6bd chore: add 17 operational rules and rule index
- Create .claude/rules/ with all 17 standard rule files (01-security through 17-document-imports)
- Add Operational Rules section with Rule Index to .claude/CLAUDE.md
2026-03-05 23:14:34 +01:00

24 lines
817 B
Markdown

# Testing
Assume nothing about correctness — prove it with tests.
## Unit Tests
- Write the test first for non-trivial logic (TDD). Implement until it passes.
- Every new function/method/module with logic gets unit tests.
- Run existing tests after every change. Fix breaks before moving on.
## Integration Tests
- Test module boundaries: DB queries, external APIs, filesystem, message queues.
- Use real dependencies (or containers) — not mocks. Mocks belong in unit tests.
- Target 70/20/10 ratio: unit/integration/E2E.
## End-to-End Tests
- Critical user journeys only (~10% of suite). Test API endpoints with integration tests, not E2E.
## After Every Change
- Run the test suite, report results, fix failures before continuing.
- If no test framework exists, flag it and propose a testing strategy.