or
Sign in to turn on 1-Click ordering.
or
Amazon Prime free trial required. Sign up when you check out. Learn more
More Buying Choices
Have one to sell? Sell yours here
or
Get a Ł8.10 Amazon.co.uk Gift Card
The Art of Unit Testing: with Examples in .NET
 
 
Tell the Publisher!
I’d like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

The Art of Unit Testing: with Examples in .NET [Paperback]

Roy Osherove
4.4 out of 5 stars  See all reviews (14 customer reviews)
RRP: Ł28.99
Price: Ł22.09 & this item Delivered FREE in the UK with Super Saver Delivery. See details and conditions
You Save: Ł6.90 (24%)
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
In stock.
Dispatched from and sold by Amazon.co.uk. Gift-wrap available.
Only 10 left in stock--order soon (more on the way).
Want guaranteed delivery by Monday, May 28? Choose Express delivery at checkout. See Details
Trade In this Item for up to Ł8.10
Trade in The Art of Unit Testing: with Examples in .NET for an Amazon.co.uk gift card of up to Ł8.10, which you can then spend on millions of items across the site. Trade-in values may vary (terms apply). Find more products eligible for trade-in.

Frequently Bought Together

The Art of Unit Testing: with Examples in .NET + Dependency Injection in .NET + C# in Depth
Price For All Three: Ł81.57

Show availability and delivery details

Buy the selected items together
  • In stock.
    Dispatched from and sold by Amazon.co.uk.
    This item Delivered FREE in the UK with Super Saver Delivery. See details and conditions

  • Dependency Injection in .NET Ł28.89

    In stock.
    Dispatched from and sold by Amazon.co.uk.
    This item Delivered FREE in the UK with Super Saver Delivery. See details and conditions

  • C# in Depth Ł30.59

    In stock.
    Dispatched from and sold by Amazon.co.uk.
    This item Delivered FREE in the UK with Super Saver Delivery. See details and conditions



Product details

  • Paperback: 320 pages
  • Publisher: Manning Publications; 1 edition (5 July 2009)
  • Language English
  • ISBN-10: 1933988274
  • ISBN-13: 978-1933988276
  • Product Dimensions: 23.8 x 18.7 x 1.8 cm
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (14 customer reviews)
  • Amazon Bestsellers Rank: 5,873 in Books (See Top 100 in Books)

More About the Author

Roy Osherove
Discover books, learn about writers, and more.

Visit Amazon's Roy Osherove Page

Product Description

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 http://www.ISerializable.comISerializable.com.


Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

Tags Customers Associate with This Product

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

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

What Other Items Do Customers Buy After Viewing This Item?


Customer Reviews

Most Helpful Customer Reviews
8 of 8 people found the following review helpful
Format:Paperback
I thought this book was excellent, but it came to me 6 years too late! If you're just starting out down the unit testing/TDD route then I would highly recommend you get this book and give it a read. It's broken up into 4 parts, each part building on the concepts from the previous part.

The first part sets the arena for the rest of the book by providing concise definitions of what Unit and Integration tests are, as well as introducing the reader to the concept of Test Driven Development (TDD). Part 1 ends with chapter 2 that walks the reader through an example of putting together their first unit test.

The second part then starts looking at ways of making your code loosely coupled so that you can test more effectively and start using Fake objects. Roy does this by introducing the concept of Dependency Injection (DI), otherwise known as Inversion of Control (IoC), and then how you can utilise DI to make use of Stub and Mock objects in your tests. The second part ends with the introduction of Isolation Frameworks and looks at how they can ease the complexity of using Stubs and Mocks in your Unit Tests.

The third part then starts moving in to the more practical side of Unit testing now that the groundwork has been established in the first 2 parts. Roy takes the reader through the various patterns that can be used for test classes and how you can utilise them in a Test Hierarchy. Roy highlights that a Automated Build process is essential for running your test regularly to pick up any breaking changes that may have occurred in your application. Chapter 7 then moves onto the critical area of how to write tests that are maintainable, trustworthy and readable.

The final part is aimed at the the devs out there who are coming from existing organisations that don't do Unit Testing, but want to introduce it, or have started Unit Testing in their new app, but want to start Unit Testing their legacy code. Roy provides some good pointers on how to get Unit Testing accepted by teams less than eager to pursue new practices :)

The book also contains 2 appendices, one attempts to answer the question of how much testing should influence the design process and the second provides a good overview of the Isolation Frameworks, Tools and Test Frameworks currently available to make your life a little bit easier when you're testing.

Summary

If you're looking for a good book to get yourself, your fellow developers or team up to speed with good Unit Testing practices, then I'd highly recommend this book. If however you're a TDD guru, or have been unit testing for a while you probably won't get as much out of this as those who are new to Unit Testing.
Comment | 
Was this review helpful to you?
4 of 4 people found the following review helpful
Format:Paperback
This is the summary taken from my full book review published here: http://bit.ly/b25iX

An excellent book, I would recommend it if:

* You are completely new to Unit Testing.
* You have been Unit Testing for a short while and looking to see what the next step for you is.

If you have been a hardcore TDD practitioner for years, then I would expect that this book is not for you since you would have likely hashed all the issues covered in the book.

There are a lot of great anecdotes in the book, many of which rang home with me and personal experience. Which (for me) just affirms that the content is good.

A real nice, relatively short read. Great job Roy!
Comment | 
Was this review helpful to you?
2 of 2 people found the following review helpful
Format:Paperback
I have been 'playing' with Unit Tests for a couple of years now, and have never felt comfortable implanting them because I knew I wasn't doing it right, I was making silly mistakes (both design and implantation), but didn't know exactly what I should be doing to resolve this.

After reading this book I have a very clear vision of what's right and what's not. I is written in a very easy-to-understand way with clear examples and well reasoned explanations. It shows the novice (and not so novice) test writer how they should go about writing clear, reliable and maintainable tests. There is some really great advice to get the reader up and running in no time at all, and best of all, with the confidence that what they are writing will stand the test of time in any development environment.

It also make very clear how to implement stubs and mocks and what rôle they play in the testing environment.

A truly great read and very highly recomended.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
Must-Read for developers starting out with Unit Testing
As more and more job adverts are requiring understanding and experience of unit testing, I decided it was time to take the plunge and learn how to do it properly. Read more
Published 1 month ago by Dave Mason
Good introduction to unit testing of .Net projects. Easy read.
"The Art of Unit Testing" by Roy Osherove is a good, introductory book re. unit testing for those working with . Read more
Published 1 month ago by J. S. Hardman
Nice place to start
The book is ideal for those people new on TDD trying to figure out how to proceed. My edition have some minor errors, but it is a great reading.
Published 2 months ago by Jordi
Must read this
This book is now mandatory reading for all my development staff. They all have a copy and are expected to read and apply the wisdom within. Need I say more? Read more
Published 9 months ago by Haughtonomous
Easy on the mind
This book is an easy read. Good to get you started on unit testing. Simple on the mind as well.
Published 14 months ago by olu
Introductory level
I have read Roy Osherove's blog now and again and found it useful over the years to develop my knowledge of unit testing. Read more
Published 14 months ago by E. L. Wisty
Not what I expected
I must admit: I expected to have a .Net equivalent of xUnit Test Patterns: Refactoring Test Code (Addison Wesley Signature) and, unfortunately, all I got was a very condensed and... Read more
Published 15 months ago by Dmitri N.
Essential distilled wisdom
I'm a software developer using the Microsoft .NET framework in the main (along with NUnit) - and for me, until now, unit testing has never been a pleasurable experience. Read more
Published 23 months ago by shinysteve
Another one on the 'essential' list
As this is already the de facto book on unit testing for .NET developers, then it's pretty much advised that any .NET developer owns a copy. Read more
Published 23 months ago by B. Eaton
A must read.
You certainly should read this book if you're interested in unit testing with NUnit, but it will also give you a solid background on unit testing in general.
Published on 29 Mar 2010 by Wietze Talsma
Search Customer Reviews
Only search this product's reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Listmania!


Look for similar items by category


Look for similar items by subject


Feedback


Amazon.co.uk Privacy Statement Amazon.co.uk Delivery Information Amazon.co.uk Returns & Exchanges