3 ms·
This is the kind of shortcut that gets easily forgotten after a while IMHO. Why you write tests is important, and for instance coverage numbers are not that. M
by makeitdouble 3y ago
This is the kind of shortcut that gets easily forgotten after a while IMHO.
Why you write tests is important, and for instance coverage numbers are not that. Most automated coverage assessments still won't guarantee you're testing all the critical patterns (you just need enough to touch all the paths) and a low number doesn't always mean it's not enough.
I understand the use as an heuristic's, but as it gets widely adopted it also becomes more and more useless. I mean, today we see people eyeing at LLMs to boost their coverage numbers automatically, and that trend of writing low effort tests has been going all for a while IMO.
- godelski 3y ago> I understand the use as an heuristic's, but as it gets widely adopted it also becomes more and more useless. I too am a big fan of Goodhart's Law. It seems many took this as advice and not a warning.
- ffsm8 3y agoIt's like that common misconception about the testing pyramid. The reason it's smaller at the top isn't because you should have numerically more tests at the bottom then at the top. It just shows that if you're doing a higher level test, you're also testing the layers below this. As an unrealistic example: if you'd have 1 IT and 1 UT, you'd still have double coverage at the bottom. You're probably still gonna create more UT then ITs though, as they're easier to write... so this is probably more academic pedantry then anything insightful