Seeds and Tests
Objective
Provide a reliable testing and development data foundation so features can be validated with repeatable tests and realistic data.
Scope
Seed Data
- CLI command to populate the database with test data
- At least three test users
- Sample matches in PENDING, SUBMITTED, APPROVED, and DECLINED states
- Game results for stats and workflow testing
- Edge cases such as users with no matches
Test Infrastructure
- Pytest factories for users, matches, and games
- Database fixtures that reset state per test
- Authentication helpers for obtaining tokens
- FastAPI test client configuration
Coverage
- Authentication flows
- Permission and access control
- Match lifecycle (create → submit → approve/decline)
- Stats calculations
- Failure and edge cases
Success Criteria
Test Quality
pytest passes locally and in CI
- Test suite completes in under 30 seconds
- No flaky or nondeterministic tests
- Core workflows are covered
Seed Data
- Supports manual QA and development
- Can be reset and re-run easily
- Includes all match states and game types
Developer Experience
- New developers can run tests immediately
- Test failures provide clear, actionable output
- Regressions are caught before release
Current State
- Basic pytest configuration exists
- One health check test is present
- No factories, fixtures, or seed data
- No authentication helpers
- Minimal overall test coverage
Dependencies
Seeds and Tests
Objective
Provide a reliable testing and development data foundation so features can be validated with repeatable tests and realistic data.
Scope
Seed Data
Test Infrastructure
Coverage
Success Criteria
Test Quality
pytestpasses locally and in CISeed Data
Developer Experience
Current State
Dependencies