3 ms·
Unit tests are only potentially of value if the code is changing. And 90% of code never changes. And 99% of unit tests never fail. Almost all of the value of un
by fijiaarone 4y ago
Unit tests are only potentially of value if the code is changing. And 90% of code never changes. And 99% of unit tests never fail.
Almost all of the value of unit tests come at the time of writing (a tiny percentage of) them.
After that, they become a liability that slows down builds, makes changes brittle and code based schlerotic.
A few good unit tests are a lot better than a bunch of bad ones. And even from your statement we can tell a much more pernicious risk — the false beliefs that code coverage measures whether code is tested and that a code coverage percentage is a mark of quality or safety in its own right.