Thursday, October 4, 2012

Unit Testing

In testing terminology, the smallest testable part of the code is called Unit. Unit testing is the testing technique in which the units of code are tested to check whether they are functional according to the requirements or not. The code is tested thoroughly, thus we can say that it comes under the White Box Testing method.

Unit Tests are generally written and performed by the code programmers. It ensures the programmers that the piece of code they wrote is proper and functional.

Unit Testing also proves to be very useful at the time of integration. If the programmer has unit tested the program properly, the integration-time issues generally doesn't show up and if they do show up, they are solved too quickly as the programmer has a clear idea where the problem resides. One should keep in mind that a properly done Unit Testing makes the integration easier, but it doesn't replace the Integration Testing which is a very important part of the testing phase.

It is obvious that a small bug in a code, if left unsolved, can grow into a big issue as the system and code grows. Thus if a programmer solves the bug at the initial level through Unit Testing the code, it saves the extra time and efforts that the programmer will waste in solving the same grown-up issue at the later stage.


Advantages
  • If any error exists in the code, it is found and solved on the very initial level.
  • Proper unit testing makes the integration process easier.
  • It reduces the work load of QA department. If the Unit tests are properly done and test cases are maintained, the QA people can focus on other important aspects of testing the system.

Disadvantages
  • Unit Testing can be time consuming and tedious. Patience and dedication is required on the part of the development team.
  • It is not possible to find the integration bugs, system bugs, etc in Unit Testing


Unit Testing is a very important part of software development as it ensures the quality of the software from the beginning.

2 comments:

  1. nicely written, easy to understand.... thanks, it really helped me

    ReplyDelete
  2. Greetings! Do you somehow check if your own content is exclusive in the whole blogosphere and there is no such a person who is it without your awareness?

    ReplyDelete