4 ms·
Why should you write unit tests (2021)
- logicalmonster 4y agoNo personal offense against the author is intended as this piece is written well, but I think articles that repeat conventional feel-good wisdom are dreadfully boring, especially when they don't even examine any potential counterpoints to the convention wisdom. I can think of circumstances where unit tests are counterproductive. Imagine if you have a hard deadline for a "bet-the-company" project (say you're doing some backend that's meant to support a Super Bowl ad that absolutely has to launch by X date/time). Sucks to be you, but you get a bunch of last minute change requests that absolutely must happen. What now? Are you risking holding back launch by making sure everything is fully tested in a conventional picture perfect software engineering way, or in the real world are you focusing on ensuring the problem is done on time first?