Should the team first improve its input coverage or challenge its existing assertions?
Use property-based testing when the team can state a rule but wants to try more inputs. Use mutation testing when existing tests pass and you want to know which deliberate changes they detect. They work together when a surviving change exposes either a gap in the generated inputs or a weak assertion.
Read both sides of a surviving threshold change
Suppose free shipping begins at £50. A property that the charge is never negative can hold even when the code charges everyone. Changing the threshold comparison might survive thousands of generated baskets. Inspect whether any basket reached exactly £50 and whether the property checked the required charge at all.
| Observed problem | Property-based response | Mutation-testing response |
|---|---|---|
| Inputs cluster below £50 | Generate or specify the threshold deliberately. | Check whether a changed threshold survives. |
| Every assertion allows a zero charge | Add an independent expected-charge rule. | Try replacing the charge calculation with zero. |
| One harmful change survives | Reduce the input that exposes the discrepancy. | Save the mutation, location and run configuration. |
| Suite becomes expensive | Focus inputs on the valid product domain. | Limit a pilot to the changed billing component. |
Change one thing and run the same challenge
First add £50 explicitly. Then strengthen the expectation using the published shipping rule and keep the same mutation. If the mutated program now fails, keep both the minimal input and meaningful assertion. If the change is equivalent within the supported domain, explain that conclusion instead of adding tests whose only purpose is to change a score.