3 ms·
It's interesting to think about the Cost Benefit analysis of testing. I can say from my own personal experience that test driven development actually speeds up
by roder 17y ago
It's interesting to think about the Cost Benefit analysis of testing. I can say from my own personal experience that test driven development actually speeds up my results and it seems that I get a test for free.
- geebee 17y agoI agree - when unit testing is working well for me, it feels "free". I realized I've always been "unit testing", in that my approach has usually been to write a bit of code, test it with a short main(), write a bit more, and so on. Unit testing, when it feels natural, is no different. I just keep the tests instead of throwing them out. This is more of a parallel testing approach than a TDD, but it seems to lead to good code coverage. The part where I start to feel like the benefit isn't worth the cost is when I feel like I'm unit testing a framework rather than my own code.