Production Test Coverage
Priority: Ongoing | Phase: Throughout | Milestone: v1.0 MVP
Comprehensive test coverage for v1.0 release.
When to Work On
- Write tests as each feature is implemented (TDD preferred)
- Add integration tests after features stabilize
- Final coverage audit before v1.0 release
Coverage Targets
| Layer |
Target |
Approach |
| Domain |
90%+ |
Pure unit tests |
| Storage |
85%+ |
In-memory SQLite, temp directories |
| Core |
80%+ |
Mock sources/storage, integration tests |
| Source |
75%+ |
Recorded HTTP responses, mock servers |
| CLI |
Key paths |
End-to-end tests with temp configs |
New Test Categories
Integration Tests
Full install/update/uninstall flows:
Error Path Testing
- Network failures during download
- Corrupt archives
- Checksum mismatches
- Permission errors on deploy
- Invalid config files
- Missing dependencies
- Circular dependencies
Migration Tests
- DB schema upgrades from v0.7.x to v1.0 (V6 migration)
- Config file format changes (hooks in games.yaml)
End-to-End Tests
Tools
go test with -cover flag
- Consider adding
go test -race to CI
- Mock HTTP server for NexusMods API tests
- Recorded responses for reproducible API tests
Production Test Coverage
Comprehensive test coverage for v1.0 release.
When to Work On
Coverage Targets
New Test Categories
Integration Tests
Full install/update/uninstall flows:
Error Path Testing
Migration Tests
End-to-End Tests
Tools
go testwith-coverflaggo test -raceto CI