Background & current state
Tests hand-build fixtures inconsistently across the backend/frontend suites, causing duplication and brittle setups. There are no shared factories/seeders.
Goal
Provide deterministic test-data factories + seed scripts for campaigns, participants, API keys, and on-chain fixtures.
Technical design
- Factory helpers (e.g.,
makeCampaign(overrides), makeParticipant(...)) producing valid, deterministic objects; seed scripts to populate a DB/local devnet (NEW-090) for E2E.
- Shared between backend + frontend where sensible; deterministic via seeded RNG.
Edge cases
- Determinism (seeded RNG) for reproducible tests.
- Keeping factories in sync with schema changes.
- Realistic edge fixtures (windows, caps, allowlists).
Task breakdown
Acceptance criteria
Testing & verification
- Refactor a representative suite; assert determinism.
Out of scope
Dependencies / related
- Supports all test epics; uses NEW-090.
Difficulty: easy · Effort: S–M · dx
Background & current state
Tests hand-build fixtures inconsistently across the backend/frontend suites, causing duplication and brittle setups. There are no shared factories/seeders.
Goal
Provide deterministic test-data factories + seed scripts for campaigns, participants, API keys, and on-chain fixtures.
Technical design
makeCampaign(overrides),makeParticipant(...)) producing valid, deterministic objects; seed scripts to populate a DB/local devnet (NEW-090) for E2E.Edge cases
Task breakdown
Acceptance criteria
Testing & verification
Out of scope
Dependencies / related
Difficulty: easy · Effort: S–M · dx