4 ms·
It depends on the kind of code you're writing, and where it is in its lifecycle. Briefly: * Humans can determine if your code does what it's supposed to. * A
by itamarst 10y ago
It depends on the kind of code you're writing, and where it is in its lifecycle.
Briefly:
* Humans can determine if your code does what it's supposed to.
* Automated tests can keep your code stable, i.e. make sure it doesn't change.
If you care about correctness you want manual testing and code review. If you care about stability you want automated testing like unit tests.
If you care about both correctness and stability you need both kinds of testing.
Personally I've mostly written libraries, where stability is very important, so yes, lots of unit tests.
Longer version: https://codewithoutrules.com/2017/03/26/why-how-test-software/ https://codewithoutrules.com/2017/03/26/why-how-test-softwar...