All posts tagged 'Unit Testing Tools TDD BDD'

.NET Musings

Wandering thoughts of a developer, architect, speaker, and trainer


Why You Should Add Test Driven .NET To Your Toolbox

Technorati Tags: ,,,

For those of you that follow this blog or have seen me speak at conferences know that I am very passionate about testing.  I am also very vocal about development rhythm (after all, computers can multi-task but people cannot!). 

You will no doubt also know that I use ReSharper (aka R#), and have for a long time.  If you are not using a productivity add in like ReSharper (JetBrains), CodeRush (DevExpress), or JustCode (Telerik), you are wasting your time and your clients money.  The reason that I have been using R# is the test runner built into it and the support from the third party test frameworks that I use (Gallio/MbUnit and MSpec).

I like my visuals – and the ReSharper test runner adds several windows to give my traffic lights (Red/Green/Yellow).  But I don’t like leaving the keyboard to go to the mouse to run tests when I am in the middle of T/BDD or refactoring.

Today I installed TD.NET Version 3 (RC) to give it a spin.  On the advice of a friend of mine (Brian Genisio), I mapped three new keyboard short cuts:

  • alt-T – Run Test(s)
  • alt-D – Debug Test(s)
  • alt-R – Rerun Test(s)

The benefits were immediate.  As I code, I now run my tests through the keyboard short cuts, and no longer have to touch the mouse.  This is way cool, and sped up my development significantly.  But the coup-de-grace that proved the value of TD.NET was when I was refactoring my line of business code due to a failing test, I re-ran the test without moving my cursor!  I hit “alt-R”, the test ran again, and I was able to stay in my line of business code the entire time. No switching windows, no moving my hands. No context switching!

If that fact alone isn’t worth the price of admission, I don’t know what is.  Do the math.  How much time saved by you when programming will it take to pay for the tool?  At what point will the cost be covered, and then the savings will continue to pile up?  Those are the questions that you need to calculate, then approach your manager and show them the money. I would be surprised if they said no.

Am I going to stop using the test runner built into R#?  No. Not at all.  It still has a great deal of value for me.  But the friction of window switching and hand switching between the keyboard and mouse while working on those fine grained test details are gone thanks to TD.Net.  I will be using both tools for what they are best suited for.

It’s like peanut butter and chocolate.  Both are good independently.  But when you combine them, they’re awesome!

Happy Coding!

Managed Windows Shared Hosting by OrcsWeb