Real world Test Driven Development (TDD) - Does it work?
I've been investing significant time in learning the test-driven development approach for my upcoming projects ( for CrazyEngineers IO ) and frankly speaking, I'm on the edge. On one side, I see the immense benefits of TDD. If you break something, you get to know about the bug right away and can fix it. Of course, it doesn't entirely replace the need of dedicated software testing effort; but you can definitely take care of several stupid mistakes that all developers do.
But on the other hand, what's putting me back is the amount of time and efforts involved in writing tests. Frameworks solve that to some extent; but on a small project that I recently did, I found out that I was struggling more to write a valid test case than actually writing the code to 'pass' the test.
I'm curious to know how many of our fellow engineers here do the TDD in their real-world projects. How does it help and what's your argument in favour or against it?