Unit Testing - Definition, Execution, Disadvantages

Unit Testing:

Click on the image for zoom view

A unit is smallest testable piece of software :

  • Can be compiled, linked, loaded
  • E.g functions/procedures, classes, interfaces
  • Normally done by programmer
  • Test cases written after coding

This type of testing is performed by the developers before the setup is handed over to the testing team to formally execute the test cases.
  • Unit testing is performed by the respective developers on the individual units of source code assigned areas.
  • The developers use test data that is separate from the test data of the quality assurance team.
  • The goal of unit testing is to isolate each part of the program and show that individual parts are correct in terms of requirements and functionality.

Unit Testing Execution:

Click on the image for zoom view

Disadvantages / Limitations of Unit Testing:


  • Testing cannot catch each and every bug in an application.
  • It is impossible to evaluate every execution path in every software application. The same is the case with unit testing.
  • There is a limit to the number of scenarios and test data that the developer can use to verify the source code. So after he has exhausted all options there is no choice but to stop unit testing and merge the code segment with other units.


  1. hope it is the first and foremost level of software testing phase.

  2. i'm a fresher and planned to start my career in software testing. is that GOOD? guide me pls.

  3. @Jai Yup. You can find many mistakes on other's work. Will be interesting :)


Share your feedback and queries here. Your feedback are more valuable to us!