The driver module (Driver Module) is an auxiliary program used in unit testing to simulate the upper-level components of the module under test. It falls within the scope of traditional unit testing terminology. Its main function is to receive test data and pass it to the module under test, execute it, and output the results to verify the module’s functionality. It is often used as an entry point in the testing framework [1].
This module automatically calls the tested function by simulating user interface operations and can execute the test process without interacting with the actual interactive interface. In unit testing, it needs to be combined with the stub module (stub) to respectively replace the upstream and downstream components of the module under test. The separation principle should be used simultaneously with the driver module and the stub module [2].
The driver module can be implemented at the code level through the main program. For example, in C language or Java, the main function is used to pass test parameters and receive and verify the returned results. In test cases, module verification can be completed by simulating the headlight function or browser interaction.
Traditional unit testing includes the driver module (driver) and the stub module (stub). The purpose of the driver module is very simple; it is to access the attributes and methods of the class library to detect whether the function of the class library is correct;
Normal 0 0 2 false false false EN-US KO X-NONE MicrosoftInternetExplorer4 If the functions in the module under test are provided for other functions to call, when designing test cases, a driver module (Driver) should be designed.
For example: The driver module (Driver) can automatically call the functions in the module under test by simulating a series of user operation behaviors, such as selecting a certain option on the user interface or pressing a certain button. The settings of the driver module (Driver) make the testing of the module not need to interact with the actual user interface.


Leave a comment
Your email address will not be published. Required fields are marked *