3 ms·
The first time, no, and regretted it. The second time, yes, and it was worth it. With 90% coverage, you'll save yourself and your team several days per month
by twobyfour 9y ago
The first time, no, and regretted it.
The second time, yes, and it was worth it. With 90% coverage, you'll save yourself and your team several days per month of click testing and bug fixes; and probably a whole bunch of production bugs.
That's for code that'll go into production, though.
Proof-of-concept code is different. If the code is doing something highly complex or quantitative calculations, I'll write unit tests to verify output for various inputs. It's just faster to develop that way. But no tests for generic CRUD code.