Method and system for testing driver
A driver and test-driven technology, applied in software testing/debugging, error detection/correction, instruments, etc., can solve the problems of hardware internal state uncertainty, low efficiency, and testers' inability to traverse input, etc., to achieve comprehensive test drive program, reduce workload, improve test accuracy and test efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0059] See figure 2 as shown, figure 2 Shown is a method of testing a driver, applied to a test system, including:
[0060]Step S21, sending test parameters to the driver;
[0061] Wherein, the test system mentioned in this embodiment is a virtual system for simulating real hardware, which belongs to test software. The following embodiments will describe the test system in detail.
[0062] The test system can pre-store all test parameters in a database or a table, such as an Excel table. When the test system sends the test parameters, it needs to read the test parameters from the database or table according to the stored order, and then the test system sends the test parameters just read to the driver.
[0063] Step S22, receiving the command frame sent by the driver according to the test parameters;
[0064] Wherein, after the driver program receives the test parameters, it needs to analyze the test parameters, and the driver program sends a command frame to the test sy...
Embodiment 2
[0076] See image 3 as shown, image 3 What is shown is a method for testing the driver, which is applied to the test system, and is specifically used for testing the accuracy of the analysis hardware response packet content of the driver.
[0077] The test implemented in this implementation can also be realized directly by testing the hardware, but the input of the initial or running state of the hardware can only be realized by manual operation of the external hardware, and this manual operation cannot cover all the instructions in the communication protocol Response to the content of the dataset, so testing on real hardware doesn't work well.
[0078] Specifically, the test method provided in this embodiment includes the following steps:
[0079] Step S31 , input parameters required by the test case to the interface of the driver program, and execute the interface function of the driver program.
[0080] Step S32 , according to the requirements of the use case, the teste...
Embodiment 3
[0098] In the second embodiment, the virtual device only simulates the content of the data field of the response packet, ignoring the simulation of the abnormal situation of the handshake protocol, and the communication between the virtual device and the driver is performed in the normal handshake process by default. The virtual device in the second embodiment cannot test the handshake protocol of the driver. Therefore, on the basis of the driving device testing system proposed in the second embodiment, this embodiment continues to propose another driving testing method, and uses the four major module structures of the testing system: the driver program to be tested, the virtual communication module software, the virtual device, and The automated test script is only a partial redesign of the virtual device, so that the virtual device simulates the communication handshake protocol layer of the hardware.
[0099] See Figure 5 as shown, Figure 5 What is shown is a method for ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 