What problem does it solve?
Use when writing or extending test coverage for backend code — pure-function unit tests inside src/domain/services/<name>_service.rs, or end-to-end integration tests under tests/<scenario>.rs that boot the real HTTP kernel + real Postgres and hit endpoints with authentic auth tokens. Covers the decision between unit vs integration tests, the shared boilerplate (reset_database / run_cli / boot_api / send_json), authenticated-request patterns, fixture construction, and test-database safety. Does NOT cover frontend component or E2E tests (no vitest / playwright set up yet), benchmarks, property-based tests, or Forge framework tests.
Core Features & Use Cases
- Unit tests live alongside the tested module, using a #[cfg(test)] mod tests to exercise pure functions in the domain service.
- Integration tests live under tests/ and exercise HTTP endpoints with a real database, including authentication.
- Shared boilerplate and patterns: reset_database, run_cli, boot_api, send_json, fixture builders, and test helpers to ensure safe, repeatable tests.
Quick Start
Begin by adding a unit test for a function in the target service, then create an integration test scenario under tests/ that boots the real kernel and hits an endpoint with a valid auth token.