Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.
Regis128 edited this page Feb 11, 2017 · 5 revisions

C-sharp

NUnit for C-sharp

Possibilities:

  1. Testing C#, F#, even c++.

NUnit links:

https://www.nunit.org/ https://github.com/nunit/docs/wiki http://www.nunit.org/index.php?p=quickStart&r=2.6.4

Motivation:

The reason of testing C# is making sure all of the functionalities of backend are working. We'll be testing execution of algorythms written in C# or F# or just execution of matlab algorithms. Furthermore we need to test all the actions regarding database or returning results. We have to make sure that every action user does, it works properly.

xUnit frameworks:

-NUnit

The most known, extensible and portable(yes, you can run your tests on Mono for Linux and Mac) unit-testing framework in the .Net world. It comes with descent test adapters for Visual Studio 2013 - ... as well as standalone GUI and command line runners

-MSTest (Visual Studio Test)

The most conservative and slow evolving unit testing framework with only one good thing: it is built-in to the Visual Studio. So, you can always rely it is there.

-xUnit

The "bleeding edge" unit testing framework, beloved by many developers, even from Microsoft. This is community based open source project, written by the original inventor of NUnit 2.0

-Gallio Icarus and MbUnit

The most feature reach Test Runner, Test Reporter and Unit testing framework. It is still popular in many .NET shops, especially for running Selenium WebDriver UI tests... Unfortunately, it is not being maintained since 2012. 💀

Tool+Description

CSUnit

XUnit based framework which supports all .NET languages and integrated with Resharper

Pros:

  • Open Source
  • Easy to use GUI
  • Statistics per test
  • Search capabilities across test, output & statistics
  • Parameterized & data-based testing
  • Rich set of attributes & assertions

Cons:

  • Doesn't support .NET 4.0 but does for .Net 3.5 & earlier versions
  • No autogeneration of test code
  • No automatic linking of bugs and need configuration

NUnit

xUnit based framework and supports all .NET languages. One of the popular & reliable tool. This is integrated with Resharper

Pros:

  • Open Source
  • Independent test runner
  • Fast
  • Integration with 3rd Party tools for continuous Integration( Jenkins etc)
  • Selective running of test cases
  • Reliable tool
  • Reports generation
  • Asynchronous execution

Cons:

  • Not tightly integrated with Visual Studio
  • No auto generation of test code
  • No automatic linking of bugs and need configuration

MSTest

Command line visual studio unit framework for executing visual studio generated unit tests

Pros:

+Integrates with Visual Studio +Code Coverage is integrated +Build Server is integrated +Auto generation of unit tests +Automatically links bugs in Team Foundation Server

Cons:

+Slower +Tricky to integrate with 3rd party tools for Continuous integration +Rich Reporting not available +No asynchronous test execution

XUnit.Net

Free and community based .NET unit testing tool

Pros:

  • Freshly written framework for the evolved .NET platform
  • Flexible & cleaner code
  • Create Test as Objects instead of methods
  • Integrated tightly with MSBuild and stop the build in case of any failures in test run
  • Features lot similar to NUnit

Cons:

  • Lack of documentation
  • Cannot run ignore test manually like Nunit
  • Don't provide text message for failed assertion
  • No auto generation of test code
Clone this wiki locally