3 ms·
1. Test the outcomes (what), not implementation (how) 2. 1 good e2e test worth thousands unit tests (because unit tests tend to fall into "testing how" categor
by aristofun 1y ago
1. Test the outcomes (what), not implementation (how)
2. 1 good e2e test worth thousands unit tests (because unit tests tend to fall into "testing how" category).
3. Unit tests are more often useless than not, they give false sense of reliability.
4. Write explicit straightforward tests, avoid too sophisticated dynamic tests (unless specific requirements call for it). Tests are for people to maintain and fix quickly, not for machines to have fun.
5. Test coverage for the sake of it is a stupid metric. You better cover well 1% of the most important end user use cases than cover 99% of everything else.