Test Driver And Test Stubs Assignment Help | Test Driver And Test Stubs Homework Help

Test Driver And Test Stubs

In order to test a single module, we need complete environment to provide all that is necessary for execution of the module. That is besides the module under test itself, we need the following, in order to be able to test the module:

•    The procedures the module under test calls and which do not belong to it.
•    Non-local data structures that the module accessed.
•    A procedure to call the functions of the module under test with appropriate parameters.

Thus, in order to test a single module, we have to provide a complete environment for its execution. However, since the required modules (which either call or are called by the module under test) are usually not available until they too have been unit tested. Stubs and drivers are designed to provide the complete environment for a module. The role of stubs and drivers modules is shown below:

Unit testing with the help of driver and stubs modules

A stub procedure for a given procedure is a dummy procedure that has the same I/O parameters of the given procedure but has a highly simplified behavior. For example, a stub procedure may produce the expected behavior using table look up. A under test, and would also have to code to call the different functions of the module with appropriate parameters values.

For more help in Test Driver And Test Stubs click the button below to submit your homework assignment