views:

555

answers:

9

I would consider myself fairly well versed in the concepts of Unit Testing. I am curious though if there is a publication that is considered the definitive book on Unit Testing.

This would be along the same lines as Martin Fowler's Refactoring: Improving the Design of Existing Code being considered (arguably) the definitive book on Refactoring.

+2  A: 

I'm fond of Pragmatic Unit Testing (C# and Java flavors) and the Code Complete chapter on testing.

tvanfosson
Pragmatic Unit Testing is great as an introductory text. We're reading it as a department right now to help many members of the team get up to speed on the basics.
Mike
+9  A: 

Test-Driven Development: By Example. You can ignore all the TDD methodology stuff if you're inclined to. Beck still shows how unit testing should be done.

Bill the Lizard
+2  A: 

Test-Driven Development: By Example by Kent Beck

Garry Shutler
A: 

Two books that I recommend: Test Driven Development: By Example and xUnit Test Patterns.

Stephen Doyle
+7  A: 

"Test Driven Development: by Example" and by Kent Beck is a very good introduction to TDD and unit testing.

xUnit patterns by Gerard Meszaros is more academic, but is longuish. I'd say it's the definitive reference on the topic.

philippe
+2  A: 

As TDD and unit testing are so closely linked you may want to check out some of the resource in this question.

John Nolan
I wouldn't say this is a dupe, and I did an extensive search on SO before posting. That post is related directly to TDD. My question is more generic Unit Testing, not necessarily in concert with TDD.
steve_c
Just trying to direct you to some more resource I noticed that your accepted answer is TDD by example.. the 2 are linked which makes your decision to vote down incongruous. Perhaps you should edit your question to state that you are not interested in TDD?
John Nolan
That may be the case, but you stated this question was somewhat of a duplicate, which it isn't. Perhaps you should edit your answer if you are interested in linking to some additional resources.
steve_c
No way I'm right and you are wrong.... Only joking ;)
John Nolan
:) I removed my downvote. Thanks, John!!
steve_c
A: 

I'd consider investing the time & money on "Pragmatic Unit testing" from the Pragmatic series, another book I recommend is "The Pragmatic Programmer"

joeysim
A: 

I would recommend The Art of Unit Testing by Roy Osherove.

It should be up to date with the latest practices and could well become the definitive guide as Roy has tried to provide an unbiased opinion and he is one of the leading experts on this subject.

Campbell
+3  A: 

"Working Effectively With Legacy Code" by Micheal Feathers. The definitive guide on applying unit tests to existing code.

MrWiggles