Friday, May 17, 2019

Introduction - NUnit



NUnit is a unit testing framework for .NET. It is the most used framework for writing unit test cases.

What is Unit testing :  


Every software is composed of various modules. Each module is composed of various classes. Classes composed of various functions. Function is the smallest unit of code in the application.

When we test individual function behavior without touching any other functions and determine whether it works exactly as per the requirements or not that is called Unit Testing.


Some of the advantages of Unit Testing:

  1. Defects found early in development life cycle
  2. Reliable Code
  3. Maintainable code
  4. Faster testing by only single click of action

 Test Runners :
it is a UI tool which actually run NUnit test cases and show the result of test cases whether they are passed or failed. We'll learn about test runners in Environment Setup in next post.

                                            Nunt  = Attributes + Assertion  

 

Unit has two different ways to run your tests.

 console runner : nunit-console.exe, is the fastest to launch, but is not interactive.
 gui runner :  nunit.exe, is a Windows Forms application that allows you to work selectively with your tests and provides graphical feedback

 

 

No comments:

Post a Comment