
Structural Testing and Code Coverage

#139 - A Developer's Guide to Effective Software Testing - Mauricio Aniche
Topic 7 of 13
Published Jul 3, 2023 · Clip 30:17–35:36 (5:19)
Mauricio explains structural testing—using the program's structure (lines, branches, conditions) as inspiration for tests via code coverage tools. He addresses the industry's hatred of coverage metrics: cheating is easy, targets like 90% force useless tests, and 100% doesn't mean perfection. Instead, coverage should complement specification-based testing by revealing untested areas and prompting reflection on why something wasn't covered. He cites academic papers from the 1990s to 2010 showing correlation between coverage and test suite effectiveness, concluding low coverage signals room for improvement while 100% yields no more useful information.