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

C-sharp

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.

NUnit for C-sharp

NUnit

The most known XUnit framework, 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 NUnit is a unit-testing framework for .NET applications in which the entire application is isolated into diverse modules. Each module is tested independently to ensure that the objective is met. The NUnit Framework caters a range of attributes that are used during unit tests. They are used to define Test -Fixtures, Test methods, ExpectedException and Ignore methods. The NUnit Test Adapter allows you to run NUnit tests inside Visual Studio.

Connect NUnit and Sellenium has many benefits http://stackoverflow.com/questions/15077274/why-would-i-need-to-use-nunit-with-selenium-webdriver

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

C# syntax sample CLI syntax sample F# syntax sample

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 (but there is NUnit Test Adapter)
  • No auto generation of test code
  • No automatic linking of bugs and need configuration