Test Coverage
This article is part of a series I am writing about testing. It refers to an article I wrote on test isolation, which is important reading for this topic. Test coverage measures the actual amount of code your test suite hits. It usually gives you a percentage of the overall lines of code in the system covered and the ability to see which lines of code the tests ran. This allows you to adjust your tests so that they cover more code. However, it is a much-maligned metric, and understandably so. It doesn’t measure the quality of your tests. It only measures quantity. It can be a misleading figure because an app can have 100% code coverage and still be very buggy. Some teams get caught up in green fever (blindly chasing the green-colored coverage metric) to reach 100% test coverage. This...