Module (Unit) Testing
Glenford J. Myers, Tom Badgett, Corey Sandler · 2012
Module testing (or unit testing) is a process of testing the individual subprograms, subroutines, classes, or procedures in a program. More specifically, rather than initially testing the program as a whole, testing is first focused on the smaller building blocks of the program. The motivations for doing this are threefold: (1) Module testing is a way of managing the combined elements of testing, since attention is focused initially on smaller units of the program. (2) Module testing eases the task of debugging and finally (3); module testing introduces parallelism into the program testing process. The purpose of module testing is to compare the function of a module to some functional or interface specification defining the module. This chapter discusses the varied aspects of module testing from three points of view: (1) the manner in which test cases is designed. (2) The order in which modules should be tested and integrated. (3) Advice about performing the tests.