Trade in your item
Get a £3.22
Gift Card.
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 2 images

The Art of Unit Testing: with Examples in .NET Paperback – 8 Jul 2009


See all formats and editions Hide other formats and editions
Amazon Price New from Used from
Paperback
"Please retry"
£54.63 £19.42

There is a newer edition of this item:




Trade In this Item for up to £3.22
Trade in The Art of Unit Testing: with Examples in .NET for an Amazon Gift Card of up to £3.22, which you can then spend on millions of items across the site. Trade-in values may vary (terms apply). Learn more

Product details

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

More About the Author

Discover books, learn about writers, and more.

Product Description

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:

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

4.3 out of 5 stars
Share your thoughts with other customers

Most Helpful Customer Reviews

12 of 12 people found the following review helpful By John Mcloughlin on 14 Sep 2009
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.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
4 of 4 people found the following review helpful By Robert Cooper on 21 July 2009
Format: Paperback
This is the summary taken from my full book review published here: [...]

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? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
2 of 2 people found the following review helpful By Martin J. Hart on 5 Nov 2009
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? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
1 of 1 people found the following review helpful By J. S. Hardman TOP 1000 REVIEWERVINE VOICE on 9 April 2012
Format: Paperback Verified Purchase
"The Art of Unit Testing" by Roy Osherove is a good, introductory book re. unit testing for those working with .Net, particularly for those using (or planning to use) NUnit and RhinoMocks.

It's an easy read, that goes through what makes a good unit test, how to write a simple unit test using NUnit, how to replace dependencies with manually created stubs, how to manually create mocks, then how to use a mocking framework (e.g. RhinoMocks) to dynamically creates stubs and mocks. There's useful advice on things like naming conventions, how to organise projects and folders, integrating into the build system, how to introduce unit testing into an organisation, and how to work with legacy code. There's also advice on OOD for testability, including interface driven development and use of inheritance in order to break dependencies or allow insertion of objects to allow unit testing to take place (this has been a serious mental block for some developers I have worked with in the past - not being able to recognise that, with a little re-factoring, code that they thought could only be tested using integration/system testing can have dependencies broken to allow unit testing to take place). Together with numerous links/references to other tools and materials, this is a great, easy to read, and fairly short, introduction. It's one of a short list of books that I think all .Net developers should read.

This is not, however, the complete guide to unit testing in the .Net world. For example, it touches on Inversion of Control containers (e.g. Castle Windsor) but doesn't go into any detail. It mentions patterns for unit testing, but directs the reader elsewhere for more information. It touches on Test Driven Development, but doesn't really follow it through.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Most Recent Customer Reviews



Feedback