Module testing (also called unit or component testing) is the
testing of one individual component (that is, one program module, one
functional unit, or one subroutine). The objective of module testing is to
determine if the module functions according to its specifications.
Module testing is usually conducted by the programmer of the
module being tested. It is closely tied to the programmer’s development of the
code and often becomes an iterative process of testing a component, finding a
problem, debugging (finding the reason for the problem in the code), fixing
the problem, and then testing again. Module testing is therefore often
considered part of the implementation rather than part of the testing phase.
Module testing should nevertheless be recognized as a separate function, and
should be disciplined. The tester must develop a test plan for the component
and must document test cases and procedures. Too often, this discipline is
overlooked and testing of individual components becomes “ad hoc” testing with
no records about the actual cases, the procedures, or the results.