Subscribe | Alerts via Email
View All Quotes
“It's OK to figure out murder mysteries, but you shouldn't need to figure out code. You should be able to read it.”
-Steve McConnell
<July 2010>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

©2010 Cal Zant
Sign In
Total Posts: 106
This Year: 5
This Month: 1
This Week: 0
Comments: 2

By Roy Osherove
320 pages
http://www.amazon.com/Art-Unit-Testing-Examples-NET/dp/1933988274

So, I ordered this book along with a few others when my team was about to start writing unit tests.  Of all the books I ordered, this one was the most packed with realistic, hands-on guidance on how to organize your tests, and wide-ranging best practices and test patterns for how to write tests that are easy to maintain.

Roy Osherove has a lot of experience helping companies with “the art” of unit testing.  He believes the key to successful unit testing rests on three pillars: maintainability, readability, and trustworthiness.  He explains in the book what those things actually look like in real-world examples and why you might not be getting everything you could be out of your tests if you overlook one of those.

Roy also includes a fairly detailed comparison of the latest tools and frameworks you have to choose from.  This section alone could save a ton of research time by getting a fairly unbiased, expert’s view of the pros and cons for these types of tools and frameworks:

  • Test Frameworks: NUnit, MSTest, MbUnit, Gallio, xUnit, Pex
  • Isolation Frameworks: Moq, Rhino Mocks, Typemock Isolator, NMock, NUnit.Mocks
  • IoC Containers: StructureMap, Unity, Castle Windsor, Autofac, Common Service Locator (CSL), Spring.NET, Managed Extensibility Framework (MEF), Ninject
  • Web Testing: Ivonna, VS Team System Web Test, NUnitAsp, Watir, WatiN, Selenium
  • UI Testing: NUnitForms, Project White, Team System UI Tests
  • Thread-Related Testing: Typemock Racer, Microsoft CHESS
  • Acceptance Testing: FitNesse, StoryTeller

This book was a short 320 pages, but there is a ton of practical and applicable tips jammed between the covers.  But, I have to mention that this book isn’t as polished as you would probably expect with most published works.  It isn’t anything major, but just a few things in the text or code samples that should have been caught by testers or an editor.  These issues don’t really take away from the content, but it just wasn’t up to the standard I expect when buying a published work.  (And that is possibly the worst cover I have ever seen ... yes, I get the reference to "The Art of War").

If you are remotely interested in this topic, you should listen to a recent podcast Roy did with Scott Hanselman on “The Art of Unit Testing.”  Although the podcast is kind of like a cliff-notes version of the book … it isn’t a replacement.  If you find the podcast remotely helpful, order the book.

Tuesday, October 13, 2009 7:47:21 AM (Central Standard Time, UTC-06:00)  #