Testing Strategy
Testing Strategy
Section titled “Testing Strategy”Test By Layer
Section titled “Test By Layer”rim-domain: pure state transition testsrim-application: use-case and orchestration tests with test portsrim-infra-*: adapter and persistence roundtrip testsrim-app: keep logic here thin enough that heavy testing is rarely required
Current Baseline
Section titled “Current Baseline”The repository uses workspace compilation of tests as a broad safety net:
cargo test --workspace --no-runThat is useful, but it is not enough on its own. New behavior should still be covered at the owning layer.
Good Test Placement
Section titled “Good Test Placement”- cursor movement bug:
rim-domain - save/reload flow bug:
rim-application - swap/session format bug:
rim-infra-storage - terminal resize/render issue:
rim-infra-ui
Persistence Compatibility
Section titled “Persistence Compatibility”Refactors must preserve:
- workspace session snapshots
- undo history files
- swap behavior
Add or update roundtrip tests whenever persistence-adjacent code changes.
Anti-Patterns
Section titled “Anti-Patterns”- only testing through the runtime loop
- putting pure domain tests behind storage or terminal setup
- changing serialized formats without explicit justification