---
title: "Mutation testing"
url: "https://docs.phux.sh/mutation-testing"
source: "https://github.com/no-phux/phux/blob/06139f37fe877c59ea6c10a70f8a79b4b21dc352/docs/mutation-testing.md"
projectVersion: "0.119.0"
protocolVersion: "1.0.0"
stability: "stable"
---

# Mutation testing

Regression tests belong in the ordinary suite; mutation runs are a bounded, opt-in way to find tests that would not notice a change.

```sh
just mutation-rust-install                                     # pinned cargo-mutants
just mutation-rust                                             # default scope
just mutation-rust --file crates/phux-core/src/window.rs --limit 16
just mutation-rust --in-diff origin/main --list
```

A caught mutant is evidence for that test; a missed one is a place to look,
not necessarily a test to add. Unviable mutants and timeouts are not
evidence of anything.

See [Development](/development#validating-a-change) for the ordinary gates.