locked
Is NUnit really much faster than MSTest? RRS feed

  • Question




  • Roy Osherove, has commented that of the many things NUnit supposedly does better, it being much faster is one of them.

    My question is how much faster though, if at all? Are we talking an order of magnitude? 10%? 50%?

    I'm asking this because for the moment I can't compare the two. I am trying to setup my test project to be in a dual-mode so that I can switch between them. Unfortunately, I am having a problem with NUnit integrating with the latest version of Microsoft Moles, and also NUnit is conflicting with a third party library (appears log4net related) .

    So far MSTest seems so much easier to use within Visual Studio 2008. All of the version issues and compatibility problems with NUnit (at least for me) is steering me towards choosing MSTest as the framework for the project (though I may keep the dual mode option). Another plus for MSTest is that I can still use most of NUnit asserts with:

    using Assert = NUnit.Framework.Assert;
    using Is = NUnit.Framework.Is;

    But.... If speed is truly much faster in NUnit, then I'd prefer to use it, despite the pain points.

    Lastly, has there been any speed improvement in VS2010 for MSTest ?

    Monday, September 27, 2010 2:59 AM

Answers

  • MsTest has performance tuning options (like /noisolation switch) that can be used to improve performance of MsTest from default options (depending on your tests isolation requirements).

    Enhancing integration & performance of MsTest is part of backlog that MS is working on at this time. The goal is to continue providing best in class integrated experience with VS and improve performance.

    Saturday, October 30, 2010 2:49 AM

All replies

  • MsTest has performance tuning options (like /noisolation switch) that can be used to improve performance of MsTest from default options (depending on your tests isolation requirements).

    Enhancing integration & performance of MsTest is part of backlog that MS is working on at this time. The goal is to continue providing best in class integrated experience with VS and improve performance.

    Saturday, October 30, 2010 2:49 AM
  • MSTest is actually quicker in most cases than nunit... when you use the Testdriven.Net DTE test runner. In all other cases (Resharper, VS test runner), nunit will be quicker. 

    Now for the most important part, is does not matter much in timings. Think of difference in magnitude of 100 milliseconds per test run. Yes, it does add up, but in my opinion the MSTest is just easier to use.

    Kind regards,
    Tom de Koning


    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
    • Proposed as answer by Tom de Koning Monday, November 1, 2010 11:32 PM
    Monday, November 1, 2010 11:32 PM