Testing: Coverage Reports Considered Dangerous
Software testing is one of those topics that you don't discuss in bars, along with religion, politics, and logging methodology. Everyone seems to have a different understanding of how testing should be accomplished, and many of us are over-zealous in defending our stances. However, I believe everyone would agree that the real issue surrounding testing methodology is how best to achieve some level of confidence in your software. When written properly, tests can be liberating, allowing you to refactor endlessly (within the constraints of backward compatibility, of course). When written poorly, tests act like a Ziploc bag, locking everything - even bugs - inside an airtight barrier. However, when you're seeking confidence through testing, perhaps the worst thing you can do is to look at a test coverage report. Consider my own recent experience... Recently, I spent quite a bit of time refactoring Maven's assembly plugin. I'm sorry to say that I was fooled when I started by the siren song of coverage reporting, ...

