Continuous Testing in .Net with NCrunch

Continuous Testing, running unit tests continually, has existed in the Ruby community for some time. NCrunch brings continuous testing to the .Net community! NCrunch runs your unit tests continually while you type reducing the TDD loop from Write Tests->Write Code->Compile->Run Tests->Write Tests… to Write Tests -> Write Code -> Write Tests.

I’ll start off my saying I have never done pure TDD and I still remain skeptical of it. However, I find focusing on making code testable leads to more manageable and loser coupling and I hope NCrunch can help make writing testable code easier, without bombarding me with my failing tests.

After using it for 2 days I don’t know if I can do without it! I find even when writing code and neglecting to write  unit tests, it makes you conscious of code that requires testing. It also highlights dependencies in your code such as the dependency between the [Setup] and [Test] methods within your Test classes. At a glance it highlights areas lacking tests which is very convenient.

Below is tidbit demoing the integration withing Visual Studio’s GUI.

Image

On my Quad-Core machine and small project it runs excellently. I am curious to see how it runs on a large project with a large number of source files. I’m so far impressed and I will be trying it out on a larger project in the near future.

NCrunch: http://www.ncrunch.net/

Code Sample using NCrunch: https://github.com/marksl/register

Advertisements
This entry was posted in .Net, C#, NCrunch, Unit Testing. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s