- Install Rust.
- Install testing tools.
cargo install --locked cargo-tarpaulin cargo-mutants
- Calculate coverage -> 100%.
cargo tarpaulin
- List available mutations.
cargo mutants --list
- Run mutation tests -> not all mutations are caught.
cargo mutants
- Uncomment line #12 in
src/math.rs
. - Run mutation tests again -> all mutations are caught.
cargo mutants