Story: Test infrastructure
Table of Contents
This page documents a story in Sprint 03. It captures the goal, current status, acceptance criteria, and the tasks that compose it.
Goal
Bring the test infrastructure to a state where (a) tests don't share state with the dev database, (b) test data is built from generators rather than ad-hoc fixtures, and (c) each Catch2 suite shows up as its own ctest entry on the dashboard.
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent sprint | Sprint 03 |
| Now | Story closed for the items that landed; CTest-per-suite carries over BLOCKED into a successor sprint. |
| Waiting on | None at this story level. The CTest shows only one test per test suite follow-up is tracked separately as carry-over. |
| Next | None. |
| Last touched | 2025-12-01 |
Continued in: Test infrastructure follow-up (sprint 04) — the BLOCKED CTest item lands there.
Acceptance
- A dedicated test database, separate from the application database.
- A library of generators that build representative test inputs.
- Each Catch2 test suite registered as a ctest entry.
Tasks
| Task | State | Start | End | Description |
|---|---|---|---|---|
| Separate test database from application | DONE | 2025-12-01 | 2025-12-01 | Use a dedicated Postgres database for tests so they don't collide with the dev/app database. |
| Add generators for test data generation | DONE | 2025-12-01 | 2025-12-01 | Add deterministic data generators so each test can build representative input without ad-hoc fixtures. |
| Add tests at suite level to ctest | DONE | 2025-12-01 | 2025-12-01 | Register each Catch2 suite as its own ctest entry so the dashboard reports per-suite status. |
Decisions
- Generators over fixtures
- keeps tests independent of the database state; matches the temporal-aware shape of the domain types.
- Suite-level ctest registration
- gives readable dashboards without doubling the CTest configuration time.
Out of scope
- Property-based testing.
- Mutation testing.
See also
- ores.testing — the testing component this story extended.
- How do I run the tests? — recipe that exercises the pipeline.
- CMake setup — preset / output-directory reference used by the test pipeline.
- ores.sql — Postgres setup the test-database isolation builds on.