- Paperback: 320 pages
- Publisher: Manning Publications; 1 edition (July 8, 2009)
- Language: English
- ISBN-10: 1933988274
- ISBN-13: 978-1933988276
- Product Dimensions: 7.4 x 0.7 x 9.2 inches
- Shipping Weight: 1.3 pounds
- Average Customer Review: 4.5 out of 5 stars See all reviews (47 customer reviews)
- Amazon Best Sellers Rank: #838,808 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
The Art of Unit Testing: with Examples in .NET 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
Prepare for your professional certification with study guides and exam prep tools from Wiley. See more
Customers who bought this item also bought
What other items do customers buy after viewing this item?
About the Author
Browse award-winning titles. See more
If you are a seller for this product, would you like to suggest updates through seller support?
Top Customer Reviews
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 :)
That being said the book isn't perfect (reason for 4 instead of 5 stars). First he talks very briefly in the early chapters (forgot which one) about Inversion of Control containers (IOC). He talks about IOC somewhere around where he is talking about constructor injection. He then goes on to say that IOC are beyond the scope of the book. I definitely disagree with this and think a good amount of space in the book (maybe a chapter or part of a chapter) should have been taken discussing the principles of IOC and where/why/how to use it. Its an integral part of constructor injection. If its beyond the scope of a unit testing book then where does it belong? IOC is beyond the scope of the book yet a discussion on a productivity tool (resharper) is (which i have to say i didn't mind because i found it interesting)? I just think this is a big omission in this book and is the main reason for the (-1 star) and not my 2nd point i'm about to make.
Ok the 2nd thing is the author works for TypeMock. He finally tells you that in later chapters. He seems to push Typemock a wee to much i think. Yes TypeMock is definitely the best mocking framework out there. It will allow you to mock things that you generally couldn't mock with other frameworks (Static/Shared methods) but after looking at the cost its more than a little expensive. It would have helped us greatly but the licensing cost are unreasonable (especially when you compare it to the other frameworks...FREE). Anyways, back to the topic at hand. I think the author seems to push it a little to much in the book though i will have to give it to him for using RhinoMock (free) for almost all his examples in the book.
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.
Most Recent Customer Reviews
Writing unit tests is not always easy, even when you did programming for...Read more