3 ms·
Stop using Code Coverage as a Quality metric
- cratermoon 3y ago"paradoxically, setting code coverage as a sole target can jeopardise overall code quality and maintainability." Campbell-Goodhart's law, as stated by Marilyn Strathern: "When a measure becomes a target, it ceases to be a good measure"
- meepmorp 3y agoI'm mostly joking, but the ideal system is probably having a set of (somewhat?) conflicting metrics and picking one at random on a regular basis as the most significant measure for an organization. You can't stop people from trying to win the game, that's human nature; instead, just keep changing up the rules.
- pfdietz 3y agoI remember one result from Csmith, the C compiler random tester. It finds bugs in any C compiler that has never been randomly tested. But when they checked to see if it increased coverage over (just) ordinary compiler test suites, they found no significant increase in coverage.
- sidcool 3y agoI think it's not about stopping it. It's about using it as one of the metrics and not the only one.