# Why high code coverage can miss a bug

> See why high code coverage can miss a faulty delivery charge, and how a mutation test reveals whether the suite checks the result a customer sees.

Source: https://cueapril.com/knowledge/explanations/coverage-and-fault-detection
Updated: 2026-12-02
Index: https://cueapril.com/llms.txt

## Why can tests with high code coverage still miss bugs?

Code coverage records which code ran. A test can execute a branch without checking the result that matters. Mutation testing examines whether the tests detect selected changes in behaviour, which gives a different view of the strength of their assertions.

## What can coverage tell you?

An unexecuted branch is a clear place to investigate. A measured branch hit tells you the path ran during the test, while the test’s assertions determine whether a wrong result would be noticed. Read both the inputs and the expected outcomes before interpreting a coverage percentage.

## What does a mutation score add?

A mutation run makes small changes and records how the suite responds. Review surviving changes alongside the scope, tool’s treatment of timeouts, excluded code and changes that have equivalent behaviour. A percentage calculated for one selection of changes cannot describe every possible defect.

## Worked example: The unexamined delivery charge

A test requests a quote, receives a successful response and covers the branch that adds a delivery charge. Changing the charge from five pounds to zero still leaves a successful response. An assertion against an agreed quote total exposes the change and explains exactly what the first test missed.

## Try it on your pull request

Choose a change in your repository and tell Cue April what should happen. Review the proposed checks before they run.

[Try Cue April on your repository](https://app.cueapril.com/sign-up/?next=%2Fquality-start)

## Related reading

- [How to investigate a surviving mutant](https://cueapril.com/knowledge/how-to/investigate-a-surviving-mutant)

- [Check that the tests can catch a fault](https://cueapril.com/knowledge/playbook/challenge-the-test-results)

- [How to choose a test oracle](https://cueapril.com/knowledge/how-to/select-a-test-oracle)

[Browse the Knowledge base](https://cueapril.com/knowledge)
