Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there real differences between NUnit and Microsoft's Unit Testing Framework (VS 2008)? [closed]

With the framework that Visual Studio 2008 has, am I missing anything great by NOT using an external tool like NUnit? From what I can tell it seems like using NUnit would be more of a hassle with manually creating test classes and methods versus the right clicking native to the IDE. That being said, am I missing features that NUnit provides that VS doesn't contain? Having a simple GUI for my QA people to access is fine and all, but using nAnt and the build dependencies on unit tests passing, am I missing cool features?

like image 772
bryan Avatar asked Mar 11 '10 03:03

bryan


2 Answers

Roy Osherove just wrote a recent blog post summarizing the differences between NUnit and MSTest. I think it answers your question.

He concludes that NUnit wins for Unit Testing, but MsTest has much better abilities for integration based testing and team testing with Team System.

like image 137
Paddyslacker Avatar answered Oct 17 '22 06:10

Paddyslacker


I have used both NUnit and MSTest. Yes, there are differences. NUnit is an older, more established unit testing framework designed to do exactly one thing - unit testing. MSTest is newer so it does not have the same level of maturity in its API. For example, NUnit offers more Assert methods than MSTest. (See http://geekswithblogs.net/sdorman/archive/2009/01/31/migrating-from-nunit-to-mstest.aspx for more information. To add some of the missing Assert methods, see http://geekswithblogs.net/sdorman/archive/2009/01/31/adding-custom-assertions-to-mstest.aspx).

I have not really found performance to be an issue with either framework.

Some of the bigger differences are:

  • MSTest requires a Visual Studio instance on the build server in order to run. It does not contain a standalone test runner like NUnit.
  • MSTest provides test results and code coverage results directly within Visual Studio. NUnit provides test results in its own UI and requires additional tools to perform code coverage analysis.
like image 24
Scott Dorman Avatar answered Oct 17 '22 04:10

Scott Dorman