Define “Stub” and “Driver” classes and describe the difference between them.
Stub:-
Stub is a subordinate modules that are called by the module to be tested.
It is nothing but a dummy sub-program that does minimal data manipulation, provides verification of entry and returns the returns the module under testing.
Driver:-
Driver is a main program that accepts test case data, passes that data to the component to be tested and prints the related or obtained results.
Following are the differences between "stub" and "driver":
1. Stub is a Top Down integration whereas driver is a Bottom up integration.
2. Stub is allowed to test the upper levels of code when the lower levels of code are not yet developed. whereas Driver is allowed to test lower level when upper level of code is not developed yet.
3. Stub id the called program whereas the driver is the calling program.
Get Answers For Free
Most questions answered within 1 hours.