Unit Testing Frameworks

  Web   Unit  Testing  Framework  Nunit  Xunit  Cloudy Move  

Popular C# unit testing frameworks are NUnit, XUnit and Built-in Visual Studio testing tools. All of these unit testing frameworks offer a similar end goal, to help make writing unit tests faster, simpler and easier. But there are still a few key differences between them. Some are more focused towards powerful complex tests, while others rank simplicity and usability as a higher priority.

Built-in Visual Studio testing tools

1. Built in testing framework supported by Microsoft.

2. Add tags such as [TestClass] and [TestMethod] to your code in order to get testing.

3. Visual Studio UI test panel found under Test -> Windows -> Test Explorer.


1. NUnit is installed via a NuGet package, which you can search for within Visual Studio.

2. Adding tags to a [TestClass] as a [TestFixture], and a [TestMethod] as simply a [Test].

3. Test are run in NUnit using command line or install a GUI based plugin. http://nunit.org/docs/2.4/nunit-gui.html

4. Write test cases with arguments, then easily run the same test with a range of unique data.

5. Integrates with Resharper test suites.


1. XUnit is an open source testing platform with a larger focus in extensibility and flexibility.

2. XUnit is also installed via a NuGet package, http://xunit.github.io/

3. Option of installing a GUI-based plugin for Visual Studio.

4. Tags used are [InLineData], [Fact] tag and Theories.

5. XUnit is also extensible providing overridable base methods [FactAttribute] and [TraitAttribute].

6. XUnit supports is running your tests in parallel.

7. XUnit has features like parameterized tests.

8. Single object instance per test method.



DreamozTech Tokens

Our content management platform lets you manage your custom web apps at an affordable price. Interested in posting a blog or advertising a product?

Leave a message

Full Name