4 ms·
I think articles like these miss that the appropriate amount of testing is very different for different sorts of applications. If you're building a low-level i
by lacker 5y ago
I think articles like these miss that the appropriate amount of testing is very different for different sorts of applications.
If you're building a low-level infrastructure component, like the storage engine for a database, or an encryption library, then basically every line of code, every piece of functionality should be tested. In these situations tests are pretty straightforward to run, the "right thing" for your software to do doesn't change very much, and without tests it's easy to introduce an accidental bug.
On the other end of the spectrum is things like video games. If you're scripting the behavior for a new object in a video game, it's often very hard to test it does exactly what you want. And you're likely to change your mind about this behavior, and a test isn't very useful when you simply change the test every time you change the feature. In situations like these, tests often aren't useful.
So basically the question of "how much unit testing should I do" is a perfect recipe for the two sides to argue past each other based on very different experiences.