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

Active Publication Date: 2015-07-22
GRG BAKING EQUIP CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0013] 3. The initial or executing state of the hardware will affect the result of the hardware program processing instructions;
[0019] From the analysis of the input and expected output content, the testers focus on the interface and hardware performance, and between the input and output, the data flow is complexly converted, and the general test cannot fully cover this process. At this time A big black box is generated between the input and the expected output. Whether the various processing procedures of the intermediate data stream are correct can not be accurately tested only through the output check of the interface and hardware. In the actual test process, all input and output situations are traversed. The efficiency is very low, and the uncertainty of the internal state of the hardware prevents testers from traversing all hardware state inputs

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for testing driver
  • Method and system for testing driver
  • Method and system for testing driver

Examples

Experimental program
Comparison scheme
Effect test

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 ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

Disclosed are a method and a system for testing a driver. The method comprises: sending test parameters to a driver; receiving a command frame sent according to the test parameters by the driver; sending a preset response frame to the driver, wherein the preset response frame corresponds to an expected output and the expected output is a result that is output in the case where the driver is correct and after the preset response frame is processed; acquiring an actual output that is output according to the preset response frame by the driver; if the actual output conforms to the expected output, it indicating that the output of the driver is correct; and if the actual output does not conform to the expected output, it indicating that the output of the driver is incorrect. In the present invention, the preset response frame can be used to simulate the scenario that cannot be implemented by the hardware, so as to fully test the driver, eliminate the limitations caused by operating the hardware in the test process, and reduce the workload of manually inputting the test parameters and comparing the test results. Therefore, the solutions provided by the present invention can fully test the driver and improve the test efficiency.

Description

technical field [0001] The present invention relates to the field of program testing, more specifically, to a method and system for testing driver programs. Background technique [0002] The driver program is a program implemented by the upper computer (PC side), which sends commands to the lower computer (embedded system or single-chip microcomputer, the program processed by the lower computer is called the hardware program hereinafter) with a certain communication protocol to achieve the purpose of controlling the hardware output. Drivers are generally provided to upper-layer users in the form of interfaces (functions). [0003] The driver program test is mainly to test the functionality of the host computer (PC terminal) program to control the hardware device, and whether it can provide the upper-level users with a control program with correct functions and superior performance. [0004] The general approach to current driver testing is: [0005] Step 1, the input of th...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & AuthorityPatents(China)
IPC IPC(8): G06F11/36
CPCG06F11/3692
Inventor刘思伟邱彦卿汤飞王全胜王庆华
OwnerGRG BAKING EQUIP CO LTD