Writing a proper test case is a problem in and of itself. When first writing the tests against a class, a programmer tends to write test cases that will obviously pass, because they only handle the cases they had in mind when implementing the class. This still helps prevent future maintenance from breaking the class’s established behavior, but hardly proves the class is bug-free (or meets the specifications under a design-by-contract model). Splitting up the team (NASA-style) makes logical sense, but doesn’t sound practical for most projects.
Personally, I’m in Cas’s camp: I’m the only one working on my code right now. Stack traces tell me where the code breaks. Inserting System.err.println’s helps me debug the problem. I don’t even use an IDE debugger (but sometimes use VisualVM to inspect state at runtime). I also agree with Roquen’s comment on (not) treating computer scientists as code monkeys.
I’ve never been on a design-by-contract project. In such an environment, are unit tests entirely redundant/unnecessary, or can unit tests still be constructed per the contract (by Team A), then run against the code being developed (by Team B)?