I worked on a team with a metric and associated goal of x% code coverage. So of course, even negotiating what x should be resulted in a week's worth of meetings over a quarter. And the "branch coverage versus line coverage" war was long and ugly. When the metric was finally in place, it was of course immediately gamed to test getters and setters and to avoid the hard to test, sensitive integrated parts of the code.
This, in the same organization where another team was told by it's VP, "don't schedule time for unit tests, we are too far behind schedule for a luxury like that".
All this to say, #3 "coverage is not a substitute for thinking" really hit me in the (grumpy) feels.
Comments
I worked on a team with a metric and associated goal of x% code coverage. So of course, even negotiating what x should be resulted in a week's worth of meetings over a quarter. And the "branch coverage versus line coverage" war was long and ugly. When the metric was finally in place, it was of course immediately gamed to test getters and setters and to avoid the hard to test, sensitive integrated parts of the code.
This, in the same organization where another team was told by it's VP, "don't schedule time for unit tests, we are too far behind schedule for a luxury like that".
All this to say, #3 "coverage is not a substitute for thinking" really hit me in the (grumpy) feels.