# Property-based testing vs mutation testing

> Use a threshold rule to compare generated inputs and deliberate code changes. Inspect what a surviving mutation reveals about an existing property.

Source: https://cueapril.com/compare/property-based-vs-mutation-testing
Updated: 2026-12-01
Index: https://cueapril.com/llms.txt

## 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.

Choose generated inputs or deliberate code changes to improve a suite. See what a surviving threshold mutation reveals about an existing property.

Cue April editorial assessment. The sources identify documented capabilities. Suggested pilot checks are evaluation criteria.

## 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.

Property-based vs. mutation testing

| 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.

## Primary documentation

- [Hypothesis quickstart](https://hypothesis.readthedocs.io/en/latest/quickstart.html)
- [Stryker mutation testing concepts](https://stryker-mutator.io/docs/mutation-testing-elements/mutant-states-and-metrics/)

By Cue April. Updated 2026-12-01.

## Related

- [Testing comparisons](https://cueapril.com/compare): Compare testing tools and methods against a release decision. Inspect the required evidence, maintenance work and checks each approach can provide.
- [Property-based testing](https://cueapril.com/testing/property-based-testing): Run a fast-check property-based testing example: find a delivery-rule boundary fault, replay its seed and counterexample, and verify the fix.
- [Mutation testing](https://cueapril.com/testing/mutation-testing): Run a Stryker mutation testing example. Inspect a surviving delivery-boundary mutant, add the missing assertion and compare native reports.
