4 ms·
It doesn't need to be perfect to be perfectly useful. Not testing because it can't be perfect is a fallacy.
by Okkef 6y ago
It doesn't need to be perfect to be perfectly useful.
Not testing because it can't be perfect is a fallacy.
- postalrat 6y agoI believe the fallacy is believing that since some testing is good more must be better.
- jerzyt 6y agoI really like that. I've seen code so full of trivial unit tests, yet no integration or regression testing. A good unit test should be written with the mindset of a hacker - how can I break it - rather than just a few assertions. It's not easy to do, and that's why there's so much bad stuff.
- User23 6y agoIn my experience the best tests have the structure of a specification. Some flavor of test-first discipline is the easiest way I know of to achieve this. This way when requirements change, you change the tests such that they match the new specification. Sometimes this reveals that large chunks of the code need to be thrown out and replaced, but that's OK.