Replies: 1 comment 2 replies
-
For integration and unit tests, we can start with https://lib.rs/crates/cargo-llvm-cov to get line and region coverage. Branch and MC/DC are both experimental. The notion of coverage in e2e tests is generally going to be too abstract I think. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Test coverage is a commonly used metric for quality of code and testing. It can be used as an OKR.
Methodology
Decide what we want to collect coverage on: e2e only, any integration-style tests, or also including the unit tests? There are tradeoffs.
Coverage of E2E only:
Coverage of unit tests:
Coverage of library "integration" tests (exercising the public API):
Decision: instrument unit and integration tests (i.e. roughly anything run by
cargo test --workspace
with no external setup).Short-term goals
Start with some coverage testing to work out the technical details and set up workflows.
Quality standards and OKR
Would it make sense to commit to a target coverage figure, or would it be shambolic?
A non-decrease in coverage can certainly be a PR quality gate.
Beta Was this translation helpful? Give feedback.
All reactions