Visual-studio – NUnit vs Visual Studio 2010’s MSTest

cruisecontrol.netmstestnunitvisual studiovisual studio 2010

I realise that there are many older questions addressing the general question of NUnit v MSTest for versions of Visual Studio up to 2008 (such as this one).

Microsoft have a history of getting things right in their 3rd version. For MSTest, that is VS2010.

Have they done so with MSTest? Would you use it in a new project in preference to NUnit?

My specific concerns:

  • speed
  • running tests within CruiseControl.NET (either commandline or MSBuild task)
  • code coverage reports from CC.NET
  • can you run MSTest tests in debug mode

(We use ReSharper, so test-runners are not an issue for us. We have used NUnit for the last few years. We do not have TFS.)

Best Answer

  • List item speed is same, but MsTest may be a bit slower because it creates folder for test run every time
  • MSBuid and CC.Net is big pain. You can't run MSTest on computer without VS on it (not 100 sure about 2010, but with 2008 it is so)
  • not sure, sorry
  • yes you can, from visual studio

My recommendation is following: if NUnit satisfies you - use it, forget about MSTest