What is the difference between the .NET Unit Testing platform?

I have heard many different opinions regarding what makes him better than the other. But can anyone give a technical explanation why I should choose one single test platform over another. For example, I use Visual Studio Team System. Why should I choose the Open Source testing environment (NUnit, xUnit, MbUnit, etc.) over the capabilities of the built-in testing of Visual Studio modules? Does it matter?

Edit: To be clear, I am not looking for an opinion about “which unit testing system is better” ... I am looking for technical details about how they differ from each other.

+4
source share
3 answers

This compares the differences in attributes and claims between NUnit, MbUnit, MSTest, and xUnit.net at http://www.codeplex.com/xunit/Wiki/View.aspx?title=Comparisons

as for the MSTest vs OpenSource solution, it is widely known that open source packages, in particular MBUnit and xUnit.net, are where the innovation around unit testing takes place.

However, now Peli de Halleux works for MS and produces inovation, for example Pex everything can change.

+7
source

I only worked with the version of NUnit and Microsoft. In my opinion, they are more similar than others. However, depending on your project setup, there are a number of financial considerations that may make a difference.

Microsoft testing frameworks are not available in their less expensive / free SKUs, but as soon as you pay for the whole package (which is not inexpensive, I know), you get unit test, test runner and code coverage in one package, which is very convenient.

If you switch to NUnit, you will either have to refuse VS integration, or get a test runner, for example, TestDriven.NET or Resharper. When I looked at them, they both required a license for commercial use. That is, the cost of one developer increases. In addition, these tools do not have code coverage, so you need to get something like NCover. Again, this was a license for commercial use when I checked.

It’s clear that some time has passed since I studied this, so licensing can change, but the additional costs for the developer were part of the reason why we decided to go with the Microsoft solution. Maybe VS Express plus other tools are cheaper than VS Team Foundation, but since we had to go with VS TF, in any case, that is of little use to us.

If you are engaged in open / non-profit projects, I believe that you can get free versions.

+5
source

I worked with several unit testing modules for .NET and did not find any of them significantly different from the other for my purposes.

The initial argument against using unit testing, which is part of the Visual Studio Team System, was that people using a smaller version of Visual Studio could not run your tests. Now this is less of a problem since I believe VS Pro now includes unit testing. I liked the fact that Visual Studio can generate many test harnesses for you automatically.

While you are actually writing unit tests, I don’t think it matters which tool you choose.

+2
source

All Articles