Before we validate the entire software, units or modules must be validated. Units must also be validated to ensure that every unit of software has been built in the right manner in conformance with user requirements.
The module where the required inputs for the module under test are simulated for the purpose of module or unit testing is known as a driver module.
Suppose module B is under test. In the hierarchy, module A is a superordinate of module B. Suppose module A is not ready and B has to be unit tested. In this case, module B needs inputs from module A. Therefore, a driver module is needed which will simulate module A in the sense that it passes the required inputs to module B and acts as a main program for module B in which its being called.
The module under testing may also call some other module which is not ready at the time of testing. Therefore, these modules need to be simulated for testing. A stub can be defined as a piece of software that works similar to a unit which is referenced by the unit being tested, but it is much simpler than the actual unit.
The benefit of designing drivers and stubs is that a unit will work/behave in the simulated environment as in the actual software environment.
Drivers, gives input to other’s. → Full functionality is needed. Stubs, receive input from other’s. → even a simple message works to check the functionality.
Integration is the activity of combining the modules together when all the modules have been prepared.
Three types →