Listen "118: Code Coverage and 100% Coverage"
Episode Synopsis
Code Coverage or Test Coverage is a way to measure what lines of code and branches in your code that are utilized during testing. Coverage tools are an important part of software engineering. But there's also lots of different opinions about using it. Should you try for 100% coverage? What code can and should you exclude? What about targets?I've been asked many times what I think about code coverage or test coverage. This episode is a train of thought brain dump on what I think about code coverage.We'll talk about:how I use code coverage to help me write source codeline coverage and branch coveragebehavior coverageusing tests to ask and answer questions about the system under testhow to target coverage just to the code you care aboutexcluding codegood reasons and bad reasons to exclude codeAnd also the Pareto Principle or 80/20 rule, and the law of diminishing returns and how that applies (or doesn't) to test coverage.Links:Coverage.pypytest-cov
More episodes of the podcast Test & Code
238: So Long, and Thanks for All the Fish
15/08/2025
237: FastAPI Cloud - Sebastián Ramírez
11/08/2025
236: Git Tips for Testing - Adam Johnson
30/07/2025
235: pytest-django - Adam Johnson
22/07/2025
ZARZA We are Zarza, the prestigious firm behind major projects in information technology.