Take the 2-minute tour ×

I'm trying to find good comparison about performance of mstest(VS 2008) and nunit(newest).

I have found only articles about features, not examples about times of execution :/

I would be grateful for help

share|improve this question
Why is it so important? Just use the one that fits you the most and has all the features you need –  the_drow Aug 19 '10 at 8:01
I want to use NUnit, but my project manager want to have numbers :/ –  user278618 Aug 19 '10 at 8:11
Neither framework actually DOES anything other than new up classes and call methods. The code being tested is what takes the time. But if you really need the number. Auto generate a set of 100 fixtures with say 50 tests each that do a set of basic assertions (1 == 1). Run them and time them. I would be shocked if there was much difference. –  ryber Aug 22 '10 at 21:31

2 Answers 2

I have experience with using MSTest and NUnit. From my experience, MSTest is much slower than NUnit. The actual execution of tests may be almost the same, however, the setup and teardown time for MSTest is significantly more.

Note that I have run the MSTest unit tests through the integrated VS GUI, which is probably why it's so slow (compared to the light-weight NUnit GUI). Apparently you can run MSTest through the command line, which may improve the setup and teardown time.

There are other things to consider though. MSTest is missing a bunch of features that NUnit has and NUnit has been around longer is more mature. Also, bug fixes will arrive much faster with NUnit than MSTest (how often are service packs released?).

Also NUnit works without visual studio, which means you can run these tests on a server without needing another VS license. I have read ways to get MSTest running without VS, but it involves copying files, which may or may not violate the licensing terms.

share|improve this answer

The test runner actually does quite a lot - it has to find all your test classes, and then identify all the test methods before calling them (probably by means of reflection, but possibly not). It also has to assemble and report the results. All of these can be efficient or otherwise, so there could be a noticeable difference in performance especially with a large number of tests in the suite.

share|improve this answer

Your Answer


