NUnit vs Visual Studio 2010's MSTest?

David White picture David White · Mar 3, 2010 · Viewed 20.1k times · Source

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.)

Answer

Andrey picture Andrey · Mar 3, 2010
  • 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