“When a measure becomes a target, it ceases to be a good measure” - Goodhart's Law
This is a straw man. Of course if you write bad unit tests, coverage of your code by those unit tests isn't going to be useful.
The point here is to not make Code coverage a "management target"
Quoting Eliyahu Goldratt, "Tell me how you measure me, and I will tell you how I will behave"
When code coverage becomes a target, and devs are enforced to increase coverage, it doesn't always translate to quality, as indicated in the article.
Code quality is a different issue. If you have people merging in bad code just to meet test coverage targets, you have bigger issues.
This is a straw man. Of course if you write bad unit tests, coverage of your code by those unit tests isn't going to be useful.
The point here is to not make Code coverage a "management target"
Quoting Eliyahu Goldratt, "Tell me how you measure me, and I will tell you how I will behave"
When code coverage becomes a target, and devs are enforced to increase coverage, it doesn't always translate to quality, as indicated in the article.
Code quality is a different issue. If you have people merging in bad code just to meet test coverage targets, you have bigger issues.