4 ms·
Depends on what kind of software you are building. If you are a 5 man team trying to move very fast and deliver new features, I think rigorous unit testing can
by owaislone 6y ago
Depends on what kind of software you are building. If you are a 5 man team trying to move very fast and deliver new features, I think rigorous unit testing can take enough time that it won't be worth the effort but if you are working on something with a couple dozen other developers where no one person might be able to fit the whole system in their head, I think unit testing is invaluable. A few days ago I saw another HN post that discounted testing as well stating that you already need to know what to test in order to verify the behavior but that is not even the purpose of tests in large projects maintained by large teams. Tests serve two purposes in such projects. They act as internal documentation for contributors that is far easier to keep up to data as it complains loudly when it fails and they detect breaking that would otherwise go completely unnoticed and end up shipping. This is invaluable for large projects and software that is shipped to be installed like libraries and installable binaries. If you are writing a service that you deploy in your own environment to serve some API requests then sure, too much tests will have diminishing returns.