Problem
Unit test coverage is currently below the desired quality threshold. This makes parser changes riskier, especially as more application protocols and detection heuristics are added.
Goal
Raise unit test coverage to at least 80% and keep it stable in CI.
Suggested scope
- Measure current coverage with a reproducible tool such as
cargo llvm-cov or the coverage tool used by CI.
- Identify parser modules with low or missing test coverage.
- Add focused unit tests for protocol detection, parser success paths, malformed packets, truncated packets, and invalid field values.
- Prioritize recently changed or high-risk modules such as application protocol detection, DNS/mDNS/LLMNR/SSDP classification, SRVLOC, DHCP/DHCPv6, S7Comm, and OPC UA.
- Document the coverage command in the README or contributor notes if it is not already documented.
Acceptance criteria
- Unit test coverage reaches at least 80%.
- The coverage command is reproducible locally.
- CI either enforces the threshold or documents the current threshold clearly.
- New tests pass with
cargo test.
- Clippy remains clean with
cargo clippy --all-targets -- -D warnings.
Problem
Unit test coverage is currently below the desired quality threshold. This makes parser changes riskier, especially as more application protocols and detection heuristics are added.
Goal
Raise unit test coverage to at least 80% and keep it stable in CI.
Suggested scope
cargo llvm-covor the coverage tool used by CI.Acceptance criteria
cargo test.cargo clippy --all-targets -- -D warnings.