A unit is the smallest possible testable software component.It can be characterized in several ways. For example, a unit in a typical procedure-oriented software system:
• performs a single cohesive function;
• can be compiled separately;
• is a task in a work breakdown structure (from the manager‘s pointof view);
• contains code that can fit on a single page or screen.
A unit is traditionally viewed as a function or procedure implemented in a procedural (imperative) programming language. In object-oriented systems both the method and the class/object have been suggested by researchers as the choice for a unit [1-5]. The relative merits of each of these as the selected component for unit test are described in sections that follow. A unit may also be a small-sized COTS component purchased from an outside vendor that is undergoing evaluation by the purchaser, or a simple module retrieved from an in-house reuse library.