All of these techniques have been shown to increase quality. And, if we look closely we can see why: all of them force us to reflect on our code. That’s the magic, and it’s why unit testing works also. When you write unit tests, TDD-style or after your development, you scrutinize, you think, and often you prevent problems without even encountering a test failure.
I've been thinking more and more about my own testing behaviors these days, especially with my endeavors of teaching TDD and mentoring other developers on unit testing and the use of mock objects.