Testing comparisons

Property-based vs. mutation testing

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

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.

Property-based vs. mutation testing
Observed problemProperty-based responseMutation-testing response
Inputs cluster below £50Generate or specify the threshold deliberately.Check whether a changed threshold survives.
Every assertion allows a zero chargeAdd an independent expected-charge rule.Try replacing the charge calculation with zero.
One harmful change survivesReduce the input that exposes the discrepancy.Save the mutation, location and run configuration.
Suite becomes expensiveFocus 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

Your next release starts here

Keep building.
Put testing to work.

Give Cue April your next testing challenge. Let your AI quality lead coordinate the checks, so your team can focus on what comes next.

Create account

Create your account, connect a repository and review your proposed setup before approving a run.