Skip to content

Testing Strategy

  • rim-domain: pure state transition tests
  • rim-application: use-case and orchestration tests with test ports
  • rim-infra-*: adapter and persistence roundtrip tests
  • rim-app: keep logic here thin enough that heavy testing is rarely required

The repository uses workspace compilation of tests as a broad safety net:

Terminal window
cargo test --workspace --no-run

That is useful, but it is not enough on its own. New behavior should still be covered at the owning layer.

  • 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

Refactors must preserve:

  • workspace session snapshots
  • undo history files
  • swap behavior

Add or update roundtrip tests whenever persistence-adjacent code changes.

  • only testing through the runtime loop
  • putting pure domain tests behind storage or terminal setup
  • changing serialized formats without explicit justification