About Us | Contact Us | Help
Windsorbooks.com

 Location:  Home » Books » The Art of Unit Testing: With Examples in .Net  
Categories
Books
Audio Books
Video Games
Music
Movies
Text Books
Times Best Sellers
Best of 2007
Gift Ideas
Subcategories
Paperback
Mass Market
Trade
Related Categories
• Textbook Buyback
Specialty Stores
Books
• General
Java
Programming
Computers & Internet
Subjects
• C#
Languages & Tools
Programming
Computers & Internet
Subjects
• General
Languages & Tools
Programming
Computers & Internet
Subjects
• Testing
Software Design, Testing & Engineering
Programming
Computers & Internet
Subjects
• General
Programming
Computers & Internet
Subjects
Books
• Paperback
Binding (binding)
Refinements
Books
• Printed Books
Format (feature_browse-bin)
Refinements
Books
• Programming Languages
Computer Science
New & Used Textbooks
Specialty Boutique
Books
• General AAS
Computer Science
New & Used Textbooks
Specialty Boutique
Books
• General AAS
New & Used Textbooks
Specialty Boutique
Books

The Art of Unit Testing: With Examples in .Net

The Art of Unit Testing: With Examples in .NetAuthor: Roy Osherove
Publisher: Manning Publications
Category: Book

List Price: $39.99
Buy New: $24.96
as of 7/29/2010 12:07 EDT details
You Save: $15.03 (38%)



New (21) Used (11) from $24.96

Seller: pbshop
Rating: 4.5 out of 5 stars 25 reviews
Sales Rank: 12021

Media: Paperback
Edition: 1
Pages: 320
Number Of Items: 1
Shipping Weight (lbs): 1.2
Dimensions (in): 9.2 x 7.3 x 0.8

ISBN: 1933988274
Dewey Decimal Number: 005.14
EAN: 9781933988276
ASIN: 1933988274

Publication Date: June 3, 2009
Availability: Usually ships in 1-2 business days

Features:
  • ISBN13: 9781933988276
  • Condition: New
  • Notes: BUY WITH CONFIDENCE, Over one million books sold! 98% Positive feedback. Compare our books, prices and service to the competition. 100% Satisfaction Guaranteed

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



Customer Reviews:
Showing reviews 1-5 of 25



5 out of 5 stars This book introduced me to Typemock Isolator   April 17, 2010
Neil
0 out of 1 found this review helpful

And Typemock Isolator is the greatest thing ever. Isolate.WhenCalled(() => ProblematicMethodThatInteractsWithTheFileSystemOrInternetOrDatabase()).IgnoreCall()! Thank you Roy! You are my god!


4 out of 5 stars Best Unit Testing Book i have read to date   March 17, 2010
ncage (Central IL)
2 out of 2 found this review helpful

Ok yes i didn't rate it at 5 stars but i think its definitely a book everyone should have on their shelf. A lot of books i read go up for sale after i'm done this won't happen to this book. Its a keeper. Don't kid yourself. Unit testing is hard especially if your working on a system that wasn't designed / architected for unit testing. This book allowed me to "start" implementing unit testing in our internal app that i thought in the past would be impossible to add unit test to. Roy does a lot show you how to break down a system (dependencies mainly) to be able to unit test it. He has great standards to start from (naming, construction, ect...). He also adds enough info about TDD (Test-Driven Development) to show the advantages but doesn't turn into a testing zealot.

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.



4 out of 5 stars Something for every level   March 14, 2010
wiredweird (Earth, or somewhere nearby)
Osherove covers new ground in this brief, dense book: unit testing. Although unit testing has become something of an article of faith among the Xtremists and in many industrial settings, the only way to learn it has been under the guidance of an experienced tester. (I recently had a shocking experience with an undergraduate class. Apparently, testing had never come up in their four years, and some didn't even know that a test should distinguish correct from incorrect behavior.) This isn't really a formal program of study, but it's the best how-to I've seen to date.

The author covers the topic at many levels. For the beginner, he presents the fundamentals like what a unit test is and even why unit testing is a good thing - which, believe it or not, some people still argue against. He shows how unit testing interacts with other parts of the design cycle, such as refactoring. Among other things, testing a module in isolation requires that the code be isolated, that its dependencies be clearly identified and be amenable to replacement by test fixtures. I didn't see Osherove state this outright, but one benefit of the unit test lifestyle is that test-friendly code has fewer dependencies and more explicit ones - something that makes maintenance enormously easier, or even possible in some cases.

Large parts of this book refer to specifics of the .NET environment or of specific tools, of which dozens seem to exist. Even if you don't use those tools or that environment, there are still important lessons in these sections, since concepts are often transferable even if particulars aren't. He adds new meaning to common knowledge, too. For example, he defends some cases of redundant tests written by different people, on the grounds that they're likely to test different things. This puts new words to the "N-version programming" concept familiar in the fault-tolerance world. There, the hope is that different implementations will contain different defects; here, the observation is that different implementations often detect different defects.

Of course, I found a few things to disagree with. Osherove makes little mention of randomized testing, something that I often find useful - directed tests cover the cases I was thinking about, but randomized testing often reveals cases I wasn't thinking about. And, although I generally agree with his premise that tests themselves shouldn't contribute to the debug burden, I find that looping over data elements that specify test cases can decrease global test complexity at some cost in local complexity.

Beginners shouldn't expect to understand everything that Osherove presents. Likewise, experienced testers should be patient with the introductory material that leads up to the advanced discussion. All of this book will have value to one reader or another, but any one reader might not find all of it useful. Also, unit test tools are still maturing, so discussing the many tools available makes parts of this book seem scattered. Still, if you don't have a test guru to study with (or even if you do), I strongly recommend this book.

-- wiredweird



4 out of 5 stars Great introduction to unit testing   March 12, 2010
Nelson H. Ferrari (Alpharetta, GA United States)
I bought this book because I had to start writing some serious unit tests and I didn't have a good idea of what to do.

Of course, if you are at the point you have to write unit tests, you have a job programming, so this book is certainly not for beginners (at least not in computing). The examples are in C# but the language is not very important for this book

He uses a different set of programs as the base of his examples, but this doesn't matter much, because the techniques he presents are very useful. The very first unit test I wrote after reading only a couple of chapters was way better, and easier to write and understand than the one I wrote just before it. And the one after I finished the book was even better.

As he mentions somewhere in the book, any type of testing is viewed as a waste of time, but the quality of the code improves a lot. He presents not only how and why to start writing unit tests but how to convince your company how to do it.

The book paid for itself a couple of times already, even though I only had it for about a month.



4 out of 5 stars Must read for NUnit Testing   February 11, 2010
Steven Koh (Singapore)
0 out of 2 found this review helpful

This is a good book for the intermediate developer.
For beginner to NUnit, I would recommend the Pragmatic Series.



Showing reviews 1-5 of 25


CERTAIN CONTENT THAT APPEARS ON THIS SITE COMES FROM AMAZON SERVICES LLC. THIS CONTENT IS PROVIDED ‘AS IS’ AND IS SUBJECT TO CHANGE OR REMOVAL AT ANY TIME.
Copyright © Windsorbooks.com 1996 – 2008.
Online since 1996
Ad unit2 160x90
Sponsors Ad
Ad unit3 120x240
Sponsors Ad
Your Title Here globalpetvillage
Sponsors Ad
books and gifts