Unit testing

Hi Guys, Unit testing is becoming more and more popular in software development and it’s good to have application with unit tested. There are numerous frameworks, tools, and development processes can be used to perform unit testing. Here in this post, I am going to provide basic introduction of unit testing.

What is unit testing?

Unit testing is the code through which units of source code (actual functionality code) are tested to verify. Performing unit tests is a way to ensure that all functionalities of an application are working as they should.

It is not mandatory to implement unit test for each and every method and functionality. But it should cover all the main functionality code.

Unit testing framework.

There are number of unit testing frameworks are available in market. Each has it’s own matrix and features. Based on your project requirement, you can select unit testing framework.

Two most popular unit testing frameworks in the .NET world is the open source NUnit and the commercial MsTest.

Benefits of Unit Testing.

One of the main benefits of unit testing is that, it makes the coding process more Agile and improve quality of the code.

Issues are found at an early stage, so unit testing helps reduce the cost of bug fixes.

Unit testing reduces defects in the newly developed features or reduces bugs when changing the existing functionality.

Unit testing helps simplify the debugging process. If a test fails, then only the latest changes made in the code need to be debugged.

In next post, we will cover basic sample example of unit test project and different tools which we can use in our unit test project for better result….

 

Advertisements