07.02.05

Books on Test Driven Development

Posted in Programming at 7:42 pm

Someone asked me the other day what books would be the best place to start grokking test driven development. I know he has the memory of a senile gnat on crack and happens to read this so I’m repeating myself. Plus I thought it might be helpful for others, too.

Disclaimer: I’m in a Java shop so this list might be a little Java-centric.

I’ve listed the books in the order that I would read them. The first two are short, and could be read in a weekend each.

Test Driven Development: By Example by Kent Beck.

This one is one of the first books on the subject I had read. I think it’s an extremely helpful book if you don’t really grok the concept of test driven (or test first) development. You have to work through the examples, but they’re reasonably short so it’s definitely worth the time.

The best example, is xUnit, builds up the equivalent of JUnit in Python from the ground-up. The theory here is, if you can build a unit test framework test-first, then you can build anything test-first. This section alone is worth the book. (For the Java-heads, it’s easy enough follow along in Java, I’ve done it.)

This one also happens to exist on the Safari Bookshelf.

Pragmatic Unit Testing in Java with JUnit by Andy Hunt and Dave Thomas.

This is a good intro book, and probably even useful for handing to managers who don’t “get it”. It is a little light on examples, but that’s what the previous book is for. It’s essentially a good overview, and it happens to round out the trilogy of the other books in the Pragmatic Starter Kit and I felt the need to have the whole set. :)

JUnit Recipes : Practical Methods for Programmer Testing by J.B. Rainsberger.

I wouldn’t suggest this book as a place to start. It is set up more as a reference, than a book to read cover to cover. But, if you’ve found yourself asking “How do I test my EJBs?” or “How do I test a Value Object?” this is the place to go.

This book is more useful as a reference, but it is still useful to read through sections of the book so you know what tools are available.

There are definitely other good books on the subject, but I think these books get you to actually programming this way fastest. That’s where the actual understanding comes from, once you see it in practice and start thinking in the test-first mind-set.

RSS feed for comments on this post · TrackBack URL

Leave a Comment