Device for implementing general use pile function in unit test and implementing method thereof

A technology of unit testing and implementation methods, applied in software testing/debugging, etc., can solve problems such as high requirements for testing tools, small implementation difficulty, and heavy workload, and achieve the goals of reducing compilation times, improving reusability, and improving flexibility Effect

Inactive Publication Date: 2008-01-23
ZTE CORP
View PDF0 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] The present invention aims to solve the problems in the prior art that the workload is heavy when manually writing stub functions and the requirements for testing tools are high when stub functions are automatically generated, and provides a device and an implementation method for realizing general stub functions in unit testing. It reduces the workload of writing stub functions in the unit test process, and the implementation difficulty is small, and it can be implemented in various operating systems and compilation environments

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
  • Device for implementing general use pile function in unit test and implementing method thereof
  • Device for implementing general use pile function in unit test and implementing method thereof
  • Device for implementing general use pile function in unit test and implementing method thereof

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0052]Fig. 1 is a structural block diagram of the test system in the present invention, the system 100 includes an extraction module 110, a symbol table module 120, a driver function module 130, a tested module 140, a general stub function module 150, a buffer module 160 and a client terminal 170, Wherein the user inputs the test cases (parameters, global variables and return values ​​after the execution of the called function) into the buffer module 160 through the user terminal 170, and the general stub function module 150 is the main part of the present invention, by interacting with the buffer module 160 , obtain the output parameter value, global variable value and return value of the stub function, and set the corresponding stack and register; the buffer module 160 is a buffer for storing the output parameter value, global variable value and return value of the stub function, and The application program interface (API) to access the buffer, the buffer module structure mai...

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

A device and an implementation method thereof used to realize the general stub function. The device comprises a module under test which is used to store the function to be tested; a withdrawn module used to analyze the function to be tested of the module under test, so as to obtain the information concerning the function to be tested; a symbol table module used to store the information of the function to be tested; a buffer module used to store the parameter information which is demanded for realizing the stub function. The general stub function module can obtain the parameter information from the buffer module; the parameter information is demanded by the stub function; the relevant warehouse and the register shall be arranged and the stub function shall be realized. The driving function module can drive the function to be tested in the module under test and the function to be tested can be jumped to the general stub function module as the function is used. The device reduces the workload as editing the stub function in the process of the unit test. Also, the realization can be easily made. Therefore, the realization of the general stub function can be achieved in various operating systems and editing conditions.

Description

technical field [0001] The invention relates to software testing technology, in particular to a device and a method for realizing general stub functions in unit testing. Background technique [0002] The so-called stub function refers to the simulation of a function that exists or does not exist. It is consistent with the real function in some input and output characteristics, but the internal logic of the function is simple. The value of the stub function is that the external characteristics of the function are as similar as possible to the replaced function, and the workload of implementation is minimized. Otherwise, if the workload is heavy, it is better to use the real function directly. [0003] The stub function is mainly used in the following scenarios: [0004] 1. The function under test calls an unwritten function, you can write a stub function to replace the called function; [0005] 2. The stub function is also used to realize the test distance. Since the operat...

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 & Authority Applications(China)
IPC IPC(8): G06F11/36
Inventor 马亮马军
Owner ZTE CORP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products