3 ms·
If you are specifically asking about unit tests and not testing in general, they don't save my day as much as give me confidence that my code is working as it i
by mping 8y ago
If you are specifically asking about unit tests and not testing in general, they don't save my day as much as give me confidence that my code is working as it is supposed, specially at the edge cases. I'm not a fan of mocking alot of stuff because it takes time to maintain, so in general terms I prefer testing higher in the pyramid (eg integration testing).
As for saving the day, I find that they are very helpful with refactoring, specially in dynamic languages. When the business rules change, first thing I do is rewrite the test, the just make it pass.