HSM Test Coverage
Test coverage analysis for HSM modules.
Usage
/hsm-coverage [module-number]
What You Do
Run Coverage:
cargo tarpaulin --all --out Lcov
Or for specific module:
cd crates/<module> && cargo tarpaulin --out Lcov
Parse Results:
Extract:
- Line coverage %
- Branch coverage %
- Uncovered lines/functions
Compare Against Target:
Target: >90% line coverage per module
Identify Gaps:
Report uncovered code paths with suggestions:
Uncovered:
src/asymmetric/rsa.rs:145-152 - Error handling for invalid key
Suggested:
- test_rsa_invalid_key_size()
- test_rsa_error_recovery()
Recommend Test Types:
- Unit tests for basic functionality
- Property tests for invariants
- Fuzz tests for robustness
- Integration tests for workflows
Target Coverage
All modules: >90% line coverage