Tuesday, January 13, 2009

Interesting unit testing thoughts from Michael Feathers

Michael Feathers is well known within the agile community for his efforts and thoughts around testing. He has a very thoughtful post entitled The Flawed Theory Behind Unit Testing. The main takeaway that I glean from the posting was how tests make us slow down and reflect on our code. From the blog entry:

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.

No comments:

Post a Comment