Skip to content

.tip

· one of the small things

Read coverage as a map of missing tests, not as a score

A 90 percent target gets you tests that run lines without asserting anything, just to move the number. Read the coverage report as a map instead, and it shows you the module that handles money sitting at 20 percent.

Look at the uncovered lines in the code paths that matter, and write tests for the behaviour there. Ignore the number in the summary.

testingengineering-practice