or
Sign in to turn on 1-Click ordering.
 
 
Express Checkout with PayPhrase
What's this? | Create PayPhrase
Sorry!
More Buying Choices
14 used & new from $21.38

Have one to sell? Sell yours here
 
   
The Art of Unit Testing: with Examples in .NET
 
See larger image
 
Tell the Publisher!
I’d like to read this book on Kindle

Don’t have a Kindle? Get your Kindle here.
 
  

The Art of Unit Testing: with Examples in .NET (Paperback)

~ Roy Osherove (Author)
4.8 out of 5 stars  See all reviews (12 customer reviews)

List Price: $39.99
Price: $26.39 & this item ships for FREE with Super Saver Shipping. Details
You Save: $13.60 (34%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Usually ships within 1 to 3 weeks.
Ships from and sold by Amazon.com. Gift-wrap available.

9 new from $26.39 5 used from $21.38

Frequently Bought Together

The Art of Unit Testing: with Examples in .NET + Clean Code: A Handbook of Agile Software Craftsmanship + Agile Principles, Patterns, and Practices in C#
Price For All Three: $102.22

Some of these items ship sooner than the others. Show details

  • This item: The Art of Unit Testing: with Examples in .NET by Roy Osherove

    Usually ships within 1 to 3 weeks.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Agile Principles, Patterns, and Practices in C# by Robert C. Martin

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details


Customers Who Bought This Item Also Bought

Agile Principles, Patterns, and Practices in C#

Agile Principles, Patterns, and Practices in C#

by Robert C. Martin
4.4 out of 5 stars (23)  $36.66
Microsoft® .NET: Architecting Applications for the Enterprise (PRO-Developer)

Microsoft® .NET: Architecting Applications for the Enterprise (PRO-Developer)

by Dino Esposito
4.8 out of 5 stars (20)  $29.69
Working Effectively with Legacy Code

Working Effectively with Legacy Code

by Michael Feathers
4.9 out of 5 stars (30)  $33.84
Pro ASP.NET MVC Framework

Pro ASP.NET MVC Framework

by Steven Sanderson
4.8 out of 5 stars (37)  $31.49
ASP.NET MVC in Action

ASP.NET MVC in Action

by Jeffrey Palermo
3.9 out of 5 stars (7)  $29.69
Explore similar items

Editorial Reviews

Product Description

Unit testing, done right, can mean the diff erence between a failed project and a successful one, between a maintainable code base and a code base that no one dares touch, and between getting home at 2 AM or getting home in time for dinner, even before a release deadline.

The Art of Unit Testing builds on top of what's already been written about this important topic. It guides you step by step from simple tests to tests that are maintainable, readable, and trustworthy. It covers advanced subjects like mocks, stubs, and frameworks such as Typemock Isolator and Rhino Mocks. And you'll learn about advanced test patterns and organization, working with legacy code and even untestable code. The book discusses tools you need when testing databases and other technologies. It's written for .NET developers but others will also benefit from this book.

Table of Contents:

  1. The basics of unit testing
  2. A first unit test
  3. Using stubs to break dependencies
  4. Interaction testing using mock objects
  5. Isolation (mock object) frameworks
  6. Test hierarchies and organization
  7. The pillars of good tests
  8. Integrating unit testing into the organization
  9. Working with legacy code


About the Author

The chief architect at Typemock, Roy Osherove is one of the original ALT.NET organizers. He consults and trains teams worldwide on the gentle art of unit testing and test-driven development. He frequently speaks at international conferences such as TechEd and JAOO. Roy's blog is at ISerializable.com.

Product Details

  • Paperback: 320 pages
  • Publisher: Manning Publications (June 28, 2009)
  • Language: English
  • ISBN-10: 1933988274
  • ISBN-13: 978-1933988276
  • Product Dimensions: 9.2 x 7.3 x 0.8 inches
  • Shipping Weight: 1.2 pounds (View shipping rates and policies)
  • Average Customer Review: 4.8 out of 5 stars  See all reviews (12 customer reviews)
  • Amazon.com Sales Rank: #13,136 in Books (See Bestsellers in Books)

    Popular in these categories: (What's this?)

    #6 in  Books > Computers & Internet > Programming > Languages & Tools > C#
    #16 in  Books > Computers & Internet > Programming > Java

What Do Customers Ultimately Buy After Viewing This Item?

The Art of Unit Testing: with Examples in .NET
90% buy the item featured on this page:
The Art of Unit Testing: with Examples in .NET 4.8 out of 5 stars (12)
$26.39
C# in Depth
3% buy
C# in Depth 4.8 out of 5 stars (34)
$29.69
Clean Code: A Handbook of Agile Software Craftsmanship
2% buy
Clean Code: A Handbook of Agile Software Craftsmanship 4.4 out of 5 stars (45)
$39.17
Pro ASP.NET MVC Framework
2% buy
Pro ASP.NET MVC Framework 4.8 out of 5 stars (37)
$31.49

Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(7)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

 

Customer Reviews

12 Reviews
5 star:
 (10)
4 star:
 (2)
3 star:    (0)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.8 out of 5 stars (12 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
7 of 7 people found the following review helpful:
5.0 out of 5 stars Approachable Yet Thorough, June 9, 2009
By Mark Seemann (Copenhagen, Denmark) - See all my reviews
(REAL NAME)   
This book covers unit testing in .NET from a pragmatic, yet thourough and passionate, perspective. In brief, it covers many important dimensions of unit testing from simple "hello world" tests over the use of Stubs and Mocks to how you write maintainable test code. It also covers organizational topics such as how you introduce unit testing in an organization and how to do code reviews of tests.

Although unit testing has become somewhat synonymous with Agile practices, such as Test-Driven Development (TDD), the book never assumes that you will be using TDD. It is valuable wether you write your tests before or after your code.

Roy Osherove clearly has a lot of experience with unit testing, and he willingly shares so we can learn from his mistakes and successes. As a long-term practitioner of TDD myself, I can vouch for most of the advice imparted by this book: It is based on established patterns and best practices that the unit testing community have arrived at through years of experimentation.

Being the anal-retentive perfectionist that I am, I would have liked to see the book adopt the Pattern Language of xUnit Test Patterns: Refactoring Test Code (Addison-Wesley Signature Series), but at least the guidance of those two books are very much in harmony, even if the terminology differs.

In summary, you can say that this book is a very readable and useful introduction to unit testing. If you are a beginner to intermediate unit test developer, you should definitely read this book - and then, as you become more advanced, you should still read xUnit Test Patterns :)
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
3 of 3 people found the following review helpful:
5.0 out of 5 stars Best book on Unit Testing - Ever, July 5, 2009
By BOO (Roanoke, VA USA) - See all my reviews
This book is not an evolutionary book to other unit testing books out there; it's revolutionary.

First of all it's not a thinly disguised book trying to sell you on TDD (as some unit testing books that I've read are), but rather it's a book that truly lives up to it's title - the art of unit testing.

Secondly, the discussions and examples in the book take real world considerations in mind. These are not simple contrite 'Hello World' tests, or 'perfect world' sets of code. It discuss' writing tests on both green and brown field applications.

A third aspect that is truly helpful is that there is an entire section for dealing with implementing unit testing in an organization and the politics you might face while doing so. Because the book isn't biased towards a particular software discipline, tool, or language, but on the 'art' of unit testing, these are tips and tricks you can take with you anywhere.

If you found books like 'The Pragmatic Programmer' or 'The Inmates are Running the Asylum' getting you revved up to write better software, then this book will drive you to a whole new level of unit testing.

I've been doing unit testing for several years now, but it wasn't until after I read this book, that it no longer was a chore that I checked off my 'TODO' list.

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
1 of 1 people found the following review helpful:
5.0 out of 5 stars Succinct, Pragmatic and Actionable, July 19, 2009
By R. Garibay (Phoenix, Arizona) - See all my reviews
(REAL NAME)   
The Art of Unit Testing: with Examples in .NET

In short, if you want a tactical book on unit testing that distills the passion and love of an expert practitioner into a very readable yet reference-friendly text on unit testing, this is it.

If you are new to unit testing or TDD, this book will demystify the practices, tools and techniques that would otherwise take years and lots of frustration to get right.

If you are an experienced practitioner of unit testing and TDD, and are already practicing SOLID, TOOD, and BDD not just as a flavor of the week but as a way of life, this book will provide unambiguous insight into different approaches that will help you refine your existing techniques or at a minimum, validate your approach which is always valuable to any developer who has an opportunity to review his/her techniques with a seasoned master. This book will afford you that opportunity.

While the book cites excellent references for TDD and design patterns, if there is one thing that I thought was missing was a narrative- even if by way of an appendix- that ties all of the techniques covered together in an example of building the example Logger component using TDD. I understand that this book is not about TDD, but at the same time, that's like a book on scuba equipment that teaches you precisely how to pressurize your CO2 tank, keep your mask from fogging up and care and maintenance of your scuba suit not being about scuba diving.

That said, knowing Roy, it must have been painful to resist a detailed examination on TDD, but, for this book to be effective, it had to be relatively short, to the point and most of all pragmatic for it to succeed at filling the void on the topic of unit testing techniques and practices. To that end, Roy hits the mark very elegantly without being pretentious, catering to those who test first, test last or don't (yet) test at all. While I would love for everyone to pick this book up and start doing TDD today, even if you aren't yet convinced on TDD, applying these techniques to writing code that is testable, and learning how to test the right things will be an instant asset to your product, your team and your organization.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

5.0 out of 5 stars Thought-provoking, change-inducing coverage of unit testing
First off, I've been doing unit testing for a while now. Very basic testing, at that. My existing tests, before I read this book, were rather hack-and-slash, with no serious... Read more
Published 8 days ago by Bradford G. Palin

4.0 out of 5 stars Great, Practical Guidance For Unit Testing
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,... Read more
Published 21 days ago by Cal Zant

5.0 out of 5 stars Great Book on Unit Testing with .NET
I have been a .NET developer for over 6 years now and honestly have not had a real need for unit testing until recently. Read more
Published 1 month ago by Frank Stepanski

5.0 out of 5 stars The Best
I would agree with most of the other reviews here. Roy's book is simply one of the best books ever written on unit testing. Read more
Published 1 month ago by Damien White

5.0 out of 5 stars Changed my Thinking about Unit Testing
This book was a huge breakthrough for me as far as understanding the type of testing that goes on in our organization, integration testing, not unit testing! Read more
Published 1 month ago by Steve Byrd

5.0 out of 5 stars Review by Philippe Vialatte
It is no longer needed to discuss the need for unit tests. Indeed, this technique becomes increasingly widespread in the computer world, whatever the language, and, when those... Read more
Published 3 months ago by Developpez.com writers

5.0 out of 5 stars This book is close to perfect
As a rule, I do not leave reviews - too lazy for that. But for this book I'll make an exception. Here is why I liked it:
- Biggest problem with unit testing is that if used... Read more
Published 3 months ago by Sergey Aldoukhov

5.0 out of 5 stars Textbook for Teaching Unit Testing
I am a software developer on a team which presently numbers 15. We have a large corporate intranet portal with hundreds of separate and interrelated applications, and have never... Read more
Published 4 months ago by Fred Sawtelle

4.0 out of 5 stars Unit tests are code too and need similar attention as production code!!
In the book's preface, the author recounts an experience he had with a failed project where although unit tests were getting written, they apparently were so brittle (e.g. Read more
Published 4 months ago by Techie Evan

Only search this product's reviews



Customer Discussions

This product's forum
Discussion Replies Latest Post
Must-Have Books for your shelf 2 June 2009
See all discussions...  
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
   




Product Information from the Amapedia Community

Beta (What's this?)


Look for Similar Items by Category


Look for Similar Items by Subject

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Your Recent History

 (What's this?)

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.