Monday, May 14, 2012


I am back!  OK I really didn't go anywhere I just haven't posted anything in a long time.

So thanks to my buddy Dan, I am going to rave about a new tool called NCrunch.

NCrunch is an automated parallel continuous testing tool.

Holy cow what does that mean?

Well it means that after installing the plugin, Visual Studio will continuously run your unit tests, or any tests you tell it to run.  It will also place indicator dots on every line of code indicating if that line of code is covered by a test and if so if that test is passing.  These dots also give you performance indications as well so you can easily find areas in your methods that run a little slow.

I know what you are saying, I already can run unit tests and find coverage out of the box.  True, and I was skeptical at first as well, but after using NCrunch for one week I am amazed.  I only have to type code and the indicators update automatically.  I do not have to compile, I do not have to run anything myself.  I don't have to wait.  I get instant feedback from tests, and I save time.

Did I mention the tool makes me feel guilty?  Now when I open up a class and see black dots, or white in my case since you can customize the indicator colors, I feel guilty that there are no tests covering the class and the first thing I do is figure out how to write some useful unit tests.  As I write the dots turn Red then to green, assuming the code was correct.

A couple drawbacks, NCrunch still does not work with Silverlight test projects or Silverlight UI projects.  If you have tests that rely on these type of projects then you can tell the tool to ignore them.  I would also recommend ignoring specification tests that invoke the UI, like Specflow with Selenium.

Configuration of the tool is simple with the built in wizard.  you can tell it how many processors to use and if tests should be run in asynchronously or not.

Cost, of is currently free.  However judging by the website once they release version 1.0 there will be cost to the tool.  I have a feeling like resharper I will not be able to live with out it.

Now to the screenshots
Untested Code Indicator Dots

Tested Passing Code Indicator Dots