The Art of Unit Testing: with Examples in .NET

The Art of Unit Testing: with Examples in .NET by Roy Osherove

The Art of Unit Testing: with Examples in .NET

Binding:
Paperback
Number of Pages:
320
ISBN:
1933988274
Product Group:
book
Publisher:
Manning Publications
Publication Date:
June 3, 2009
BooksForGeeks.com ID:
3786

Reviews for The Art of Unit Testing: with Examples in .NET

  1. A must read.

    Rated 5 out of 5 stars, March 12th, 2010

    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.
  2. Suggested to who wants to develop software in c# professionally

    Rated 4 out of 5 stars, January 12th, 2010

    In this book a lot of interesting tools for testing are reviewed or mentioned.
    And a lot of testing techniques as well.
    I suggest you this book after reading the "pragmatic programmer".
  3. New to unit testing? Check this out.

    Rated 5 out of 5 stars, November 12th, 2009

    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.
  4. Fantastic for those new to Unit Testing

    Rated 4 out of 5 stars, September 12th, 2009

    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.

  5. Great for New/Novice Unit Testers

    Rated 4 out of 5 stars, July 12st, 2009

    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!

Our Network

BooksForGeeks.com is a participant in the Amazon Europe S.à r.l. Associates Programme, an affiliate advertising programme designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.co.uk