New Unit Testing Books
I picked up a couple of new books recently that cover testing topics related to development.
1. Pragmatic Unit Testing - In C# with NUnit [Andrew Hunt and David Thomas]
Some of you might recognize the authors of this book if you've read "The Pragmatic Programmer". This book has served as my introduction to Unit Testing and I'm glad I chose to read this book first. It introduces you to NUnit and explains how to use the NUnit libraries (NUnit.Framework, NUnit.Core, etc.) to create test classes and test methods. It also introduces you to the NUnit GUI and the NUnit command line ways of testing those classes and methods once you've written them. Beyond using NUnit though, I really appreciate how this book helps you realize that there's much more to unit testing than just using NUnit. In chapter 4 they take you through the RIGHT BICEP concept and then in the next chapter take you through the CORRECT concept (both RIGHT BICEP and CORRECT are acronyms that stand for a particular series of checks to put your code through, just like ACID is to transactions). So far I'm about 70 pages through this book which believe it or not, is about half-way. I'll report back on what the second half of the book covers and how it further improves your knowledge of unit testing.
2. Test-Driven Development in Microsoft .NET [James W. Newkirk and Alexei A. Vorontsov]
I've been seeing this book endorsed all over the place, so I thought I'd give it a try. I haven't begun reading it yet but, glancing at the table of contents it looks like it should be a fun read. Especially after I've finished book #1. There's an NUnit primer including as an appendix but, I'm thinking I won't need it after finishing book #1. This book looks to get deeper into unit testing and steps outside the realm of simple examples to cover ASP.NET Web Services, transactions and other common development situations. I'll post again once I've read this book with my opinion/review.
These two books definitely seem like a good one-two punch if you're looking to learn about unit testing. The first book explains exactly what unit testing is, and how to do it with NUnit, while the second book assumes you're familiar with NUnit and goes through some more advanced unit testing scenarios.