Share via


Unit Testing Framework?

My new team at work is at the point where we need to pick a unit testing framework.  So far, we think it's a choice between VSTS and nUnit but we're not sure which to pick or if there are any other logical choices.  Anyone have thoughts on which one to pick (and why)?

Comments

  • Anonymous
    June 13, 2007
    At the moment i have one more question. Why not MbUnit? http://www.mertner.com/confluence/display/MbUnit/Home

  • Anonymous
    June 13, 2007
    If you have access to VSTS I'd say go for it! James Newkirk was the original developer of nUnit and then was hired on by Microsoft to lend his expertise in unit testing to VS. As a result, the unit testing experience is an incredibly integrated experience within VSTS and is an improvement over the basic capabilities found in nUnit. I'm not discounting nUnit, which will get the job done, but things like debugging code from within nUnit are more difficult as you have to attach the debugger to the nUnit process each time you want to debug. Not sure about the active-ness of nUnit development either, last time I used it there were crashes from time to time. If you're using VSTS with TFS, you get some additional niceties such as the ability to set check-in policy such that your unit tests must pass before checkin.

  • Anonymous
    June 13, 2007
    VSTS would provide a more integrated environment for unit testing and associated activities such as bug tracking, coding standards assessment, builds and project management (and even Scrum now!) but its licensing costs are not insignificant even for a relatively small team. If you already have invested in Visual Studio licences then it's easy enough to automate unit testing with NUnit in the IDE either by targetting it as a debugger or by purchasing TestDriven.NET which makes the whole process seamless.

  • Anonymous
    June 14, 2007
    I think that MSDN Forums or Microsoft Newsgroup are more appropriate fort this kind of questions than a Blog...

  • Anonymous
    June 14, 2007
    Taavi, I didn't know about MbUnit.  I'll check it out. Sean & Geraint, We already have VSTS at our disposal so it sounds like that might be an argument for using VSTS.  I didn't hear any strong arguments for nUnit other than it doesn't cost a lot.  Any other advantages for going with nUnit? Lorenzo, I wanted to stay away from forums that are all about one or the other (VSTS or nUnit) because I don't consider them "neutral territory".  And I don't think a question like this is inappropriate for my blog. But your post did make me consider checking out VSTS and nUnit forums in addition to this blog post.  Thanks for the idea.