-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Milestone
Description
Expand Test Coverage
Priority
P2 (Medium) - Quality assurance
Labels
testingqualityP2
Estimated Effort
Ongoing (2-3 weeks initially)
Description
Add comprehensive test suite to ensure correctness and prevent regressions. Current test coverage is limited.
Current State
Location: core/tests/
Some tests exist for:
schema/- Schema parsing testspackage_config/- Package config testsautodoc/- Autodoc tests
Coverage is unknown and likely insufficient.
Acceptance Criteria
- Unit tests for all parsers (pest/chosen parser)
- Integration tests for full compilation pipeline
- Regression tests for all fixed bugs
- Property-based testing (fuzzing) for parser
- Performance benchmarks for critical paths
- Test coverage >70% (measured with
cargo tarpaulinor similar) - CI/CD running tests on every PR
Tasks
Unit Tests
- Parser tests (all schema features)
- IR compilation tests (each AST node type)
- CAS storage tests (blob, tree, commit)
- Version diffing tests
- Package resolution tests
- Error message tests
Integration Tests
- End-to-end schema compilation
- Multi-file imports
- Package with dependencies
- Version bumping scenarios
- Code generation pipeline
Property-Based Testing
- Fuzz parser with random
.idsfiles - Fuzz CAS with random data
- Invariant testing (parse → compile → freeze → unfreeze should be identity)
Performance Tests
- Parser benchmarks (small, medium, large schemas)
- Compilation benchmarks
- CAS lookup benchmarks
- Memory usage profiling
CI/CD Setup
- GitHub Actions workflow
- Run tests on Linux, macOS, Windows
- Check test coverage
- Enforce minimum coverage threshold
- Run benchmarks and track performance
Tools
cargo test- Standard test runnercargo bench- Benchmarkingcargo tarpaulin- Code coveragecargo fuzz- Fuzz testingproptest- Property-based testing
Dependencies
- Should track all P0 and P1 tasks (tests for each feature)
Blocks
None
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo