Test coverage is a measure of how much of a codebase's behavior or structure is exercised by automated tests.
Code coverage measures how much of a codebase’s behavior or structure automated tests exercise. It provides a useful signal when assessing current-state complexity: stronger tests increase confidence and reduce the risk of change. section 12.4.3
Use coverage as one input to a broader assessment:
Assess how well the current code is tested before planning modernization or refactoring. section 12.4.3
Inspect test quality rather than treating the coverage figure as a complete account of system safety. section 12.4.3
Combine coverage with code understanding, layering integrity, subdomain alignment, and quality attributes to judge change risk. section 12.4.3
How Architecture Modernization: Socio-technical alignment of software, strategy, and structure covers it
How deep it goes
Uses coverage as a confidence signal but stops short of treating it as sufficient without examining test quality.
Examples
Applies coverage when assessing legacy code before refactoring and pairs the metric with direct inspection of test quality.
What you can do after
Diagnose change risk by combining coverage with qualitative inspection and broader architectural indicators.
How it connects
Connects test coverage with code quality, code understanding, layering integrity, subdomain alignment, and quality attributes.
branch coverageincludes · Branch coverage is a test coverage metric measuring the proportion of a program’s control-flow branches executed by tests.
testmeasures · A test is a procedure or check that evaluates behavior using specified inputs or evidence against expected results or criteria.
evaluation suitemeasures · An evaluation suite is an organized collection of tests, cases, or tasks used to assess a system against specified behaviors or criteria.
go testmeasured by · go test is the Go command that builds and runs tests for specified packages and can also execute benchmarks and report coverage.
This explainer was generated by Manning's knowledge graph from the text of Architecture Modernization: Socio-technical alignment of software, strategy, and structure. The section links point to the parts of the book it draws on.