Originally posted by Doug Wang:
When are we done unit testing?
How do we know that we've tested enough during this phase and are to move to next step?
Ah! A trick question
Unit testing isn't a a milestone or phase in the development process. It's a pervasive practice that takes place as your coding. It's just like compiling, or commiting changes to version control, or all those other things that go on. Unit testing is just an aspect of coding.
How do you know you're done? When you've written tests for all the stuff you can think might go wrong with the method you've just written. And how do you know you've thought of everything? Well, in reality you never will know that, but in practice the book is chock full of ideas and acronyms that might help.
The kind of testing that goes at the end of a phase is more likely to be functional testing, and that's a totally separate beast. Unit testing is solely for the benefit of developers, and takes place minute by minute.
Cheers
Dave