.NET Zone is brought to you in partnership with:

Tim Murphy is a Solutions Architect at PSC Group, LLC (www.psclistens.com). He has been an IT Consultant since 1999 specializing in Microsoft technologies and Software Architecture. Tim is a co-founder of the Chicago Information Technology Architects Group as well as a contributing author of the book The Definitive Guide to the Microsoft Enterprise Library and part of the Influceners program on the geekswithblogs.net site. He has also spoken at the nPlus1 ArcSummit in Chicago, the Chicago Code Camp and has appeared on the Thirsty Developer podcast. Tim is a DZone MVB and is not an employee of DZone and has posted 55 posts at DZone. You can read more from them at their website. View Full User Profile

Review: TypeMock Isolator 7

07.19.2012
| 2770 views |
  • submit to reddit

I was recently given an opportunity to review the TypeMock Isolator v7 framework.  This is a very feature rich add-in for Visual Studio which simplifies unit testing by putting all the features you need right at your finger tips.  Below is an abbreviated list of features found in the product.

Components

  • AutoRunner
  • Failed Test Analyzer
  • Coverage
  • Test Auto-Complete

The biggest productivity feature is the unit testing dashboard which drops down from the top of your Visual Studio code window. It provides helpful information about coverage and current state of tests that cover that portion of your code. You are able to drill down into the coverage for a particular method.  This is especially benefitial if there are multiple tests that cover the method.  It even give warnings that the test may be too long to be considered a unit test and should be broken down. From the dashboard you can even start debugging the unit test directly from the code window.  Speed and efficiency were definitely the driving factors here.

image

AutoRunner give you the features of continuous integration on your desktop.  After each build it runs any tests that cover code that was changed since the last build.  Of course that means that the flashing lights are only ever going off at your desk, but on the plus side you are the only one see that you broke the build.

The Failed Test Analyzer is like having the system monitor each of your tests and record the actual error messages that caused you test to fail.  This easily allows you to find where you may have left out fake code in your setup or identify actual bugs in your code.  It isn’t going to solve everything for you, but it will shorten the time it takes to look at your failed tests.  Your will no longer have to step through the test code for each case.

image 

While code coverage can be an over emphasized metric, it is a good feature for making you aware of where you may be missing tests.  The nice thing about the Coverage feature in Isolator is that you can plug in your favorite coverage tool to be leveraged.

Test Auto-Complete goes beyond the usual IDE capability of creating a shell of test and give you intellisense juiced up on mountains of caffeine.  If you a mock object the auto-complete will allow you to automatically generate statements that will fake many of the most common test conditions.

image

As I started investigating the tools I could see ways to do tests that involved difficult third party components and database calls that I had previously thought were nearly impossible.  This mainly comes from the power of the Isolate class which manages the faking features of the framework.  Being able to isolate a single condition in your code is always a challenge.  Defining

A good place to start when investigating TypeMock Isolator is the string of webinars and YouTube videos that they have available.  Roy Osherove of ISerializable fame presents several of them which I think gives them a lot of credibility. I would also suggest looking at the Mocking On Steroids link from the welcome page of the Developer’s Guide.

The one thing I would like to see improved with Isolator is the documentation.  It is note very verbose in it’s explanations of the product features.  This leaves you searching the we in many cases for answers.  If you are going to create a great product it should come with great documentation.

Overall I believe that Isolator is a great tool to have.  I could not justify the price for my personal projects that I don’t get paid for, but I think an IT shop would get a return on its money very quickly with the savings in time and reduction in application maintenance cost.  Be sure you take some time and check it out.

Published at DZone with permission of Tim Murphy, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)