liveBook · Manning

Code coverage

As explained in "Looks Good to Me"

A measure of the proportion of source code elements or execution paths exercised by tests.

Code coverage measures how much source code or how many execution paths tests exercise. In review, it helps teams decide whether testing is sufficient for the change. section 3.3.2

Make coverage part of an explicit review agreement:

  • Decide whether missing tests block approval. section 3.3.2
  • Question tests that exist only to increase coverage without protecting meaningful behavior. section 3.3.2
  • Check that new functionality and significant use cases are covered by unit tests. section 4.4.4
  • Allow exceptions only when reviewers understand why accompanying tests are unnecessary. section 3.3.2

A practical review question

Instead of treating a coverage percentage as an automatic approval gate, ask: “Are the important behaviors and significant use cases tested?” This keeps review attention on risk rather than superficial numbers. section 3.3.2 section 4.4.4

How "Looks Good to Me" covers it

How deep it goes
Frames coverage through review-policy questions and missing-test checks, without explaining measurement methods.
Examples
Uses missing unit tests, uncovered significant use cases, and tests written only to raise coverage as review cases.
What you can do after
Evaluate whether new functionality and significant use cases have adequate unit-test coverage during review.
How it connects
Connects unit testing and code review with review focus and issue identification.

Also explained in

Compare how 14 books explain code coverage →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of "Looks Good to Me". The section links point to the parts of the book it draws on.