doctornuke home page

 Location:  Home » books » The Art of Unit Testing: With Examples in .Net  
safe buy by amazon
Categories
books
ipod
hdtv
musical inst.
speakers
dvd
mobile phone
imac
macbook
notebook
circuit kits
cameras
software
kindle
Subcategories
Paperback
Mass Market
Trade
dn shop

The Art of Unit Testing: With Examples in .Net

The Art of Unit Testing: With Examples in .Net

enlarge enlarge 
Author: Roy Osherove
Publisher: Manning Publications
Category: Book

List Price: $39.99
Buy New: $25.06
You Save: $14.93 (37%)



New (20) Used (9) from $24.94

Rating: 4.5 out of 5 stars 25 reviews
Sales Rank: 28873

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:

Clean Code: A Handbook of Agile Software Craftsmanship
Clean Code: A Handbook of Agile Software Craftsmanship
Agile Principles, Patterns, and Practices in C#
Agile Principles, Patterns, and Practices in C#
Working Effectively with Legacy Code
Working Effectively with Legacy Code
Pro ASP.NET MVC 2 Framework, Second Edition (Expert's Voice in .NET)
Pro ASP.NET MVC 2 Framework, Second Edition (Expert's Voice in .NET)
xUnit Test Patterns: Refactoring Test Code
xUnit Test Patterns: Refactoring Test Code

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)
3 out of 3 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 (Charlottesville, VA 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


product search
nunit  software testing  tdd  typemock  unit testing  
amazon store
Save money with InstrumentPro special promotions. Buy Tascam from Our affiliate store , safe up to 30%!


seo by doctornuke at TH

about us | privacy policy | terms and conditions

Doctornuke store , tech , php books , softwares , ipod , iphone , circuit , mobile phone , computer
notebooks , imac , accessories and apparels
credit card
amazon astore affiliates
sponsored links
Learn To Profit From eBay - Sponsored Link
Ad - www.InsiderOnlineSecrets.com Sep 2 2010 8:23PM GMT
Limited Edition Speck "Fitted Artsprojekt" Cases Now Available for iPhone 4 -- Exclusively at Best Buy
Stockhouse Canada Sep 2 2010 8:23PM GMT
iOS 4.1 to Finally Fix iPhone 4 Proximity Sensor (PC World)
Yahoo! News Sep 2 2010 8:23PM GMT
Healthcare a Niche Market for Smartphones
Hospi Medica Sep 2 2010 8:18PM GMT
Verizon Smartphone Pre-Paid service made official
Huliq.com Sep 2 2010 8:18PM GMT
Mophie Juice Pack for iPhone 4 coming next week?
MacNN Sep 2 2010 8:17PM GMT
O2, Vodafone expected to enter German iPhone market
MacNN Sep 2 2010 8:16PM GMT
Verizon to sell smartphones for prepaid service
San Jose Mercury News Sep 2 2010 8:08PM GMT
Summary Box: UN telecom chief says BlackBerry manufacturer should compromise on data-sharing
South Florida Sun-Sentinel Sep 2 2010 8:07PM GMT
THE MICROSOFT INVESTOR: Microsoft Thinks It Can Catch Up To Apple's iPhone In China (MSFT, AAPL)
Silicon Alley Insider Sep 2 2010 8:07PM GMT
RUMOR: T-Mobile to get Apple iPhone soon in U.S.; source: definitely
Mac Daily News Sep 2 2010 8:06PM GMT
iOS 4.1 to Finally Fix iPhone 4 Proximity Sensor
Yahoo! News Sep 2 2010 8:05PM GMT
Starbucks' brand new BlackBerry app doesn't work with RIM's brand new flagship BlackBerry, the Torch.
Silicon Alley Insider Sep 2 2010 8:05PM GMT
See what iPhone users are listening to with SongStumblr
Macworld Sep 2 2010 8:01PM GMT
iPhone's mTrip app uses augmented reality
MSNBC Sep 2 2010 7:59PM GMT
Deutsche Telekom to lose German iPhone exclusivity - report
Telecompaper Sep 2 2010 7:58PM GMT
Big in Japan, Creator of Top Barcode-Scanning App ShopSavvy, Releases Standalone QR Code Reader for iPhone
Street Insider Sep 2 2010 7:52PM GMT
Verizon to sell smart phones for prepaid service, with data plan
Canadian Business Magazine Sep 2 2010 7:52PM GMT
Big in Japan, Creator of Top Barcode-Scanning App ShopSavvy, Releases Standalone QR Code Reader for iPhone
Street Insider Sep 2 2010 7:51PM GMT
Verizon to sell smart phones for prepaid service
Boston Globe Sep 2 2010 7:49PM GMT
Verizon unveils prepaid option for smartphones
Reuters India Sep 2 2010 7:46PM GMT
Verizon to sell smart phones for prepaid service
Cleveland Live Sep 2 2010 7:42PM GMT
UN official: BlackBerry should share users' data
Gulf News Sep 2 2010 7:36PM GMT
Korean smartphone usage differs from global trends
Joon Ang Ilbo Sep 2 2010 7:35PM GMT
Limited Edition Speck ?Fitted Artsprojekt? Cases Now Available for iPhone 4 ? Exclusively at Best Buy
Fierce Wireless Sep 2 2010 7:34PM GMT
Verizon launches prepaid data for Android, BlackBerry phones
Fierce Wireless Sep 2 2010 7:34PM GMT
Starwood Hotels & Resorts Launches Its First Application for BlackBerry Smartphones
WiredHotelier.com Sep 2 2010 7:34PM GMT
BlackBerry Remote Employer award winners announced
Business Matters Magazine Sep 2 2010 7:31PM GMT
Epic Citadel - Unreal 3 tech demo on iPhone/iPad
NAG Sep 2 2010 7:27PM GMT
BlackBerry requests legitimate
Straits Times Sep 2 2010 7:25PM GMT
BlackBerry Torch 9800 also coming to Bell & Telus on September 24th
Gadgetell Sep 2 2010 7:24PM GMT
stat