Unit test method and its device

A technology for unit testing and being tested, applied in the field of unit testing methods and devices, can solve problems such as inconvenient code version management, and achieve the effect of facilitating unified management, reducing differences, and maintaining integrity

Inactive Publication Date: 2008-12-31
GLOBAL INNOVATION AGGREGATORS LLC
View PDF0 Cites 19 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] 2) The test code of the tested module and the actual release code are mixed together, which brings inconvenience to code version management

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
  • Unit test method and its device
  • Unit test method and its device
  • Unit test method and its device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0042] The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments, but not as a limitation of the present invention.

[0043] Take PowerPc CPU as example below, describe the realization method of dynamic piling of the present invention in detail, as figure 1 As shown, it is the stub function call relationship and path of the present invention, figure 2 Describes the unit test flow chart of the present invention; before explaining the implementation method, first explain the use method, and use it in several steps:

[0044] a1) Carry out piling, the form is as follows:

[0045] install_stub(B, stub_B, NULL);

[0046] The final parameter NULL is the condition function _condition(). Before executing the stub function, use the _condition() function to judge whether to execute the stub function stub_B() or return to the original function B() to continue execution;

[0047] a2) The path control function path_ctr...

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

The invention discloses a unit testing method and a corresponding apparatus used for realizing the unit test of a software system comprising a module to be tested. The invention is characterized in that the method includes the following steps: step 1. a corresponding test module is generated according to the module to be tested and an execution file is generated by compiling the module to be tested and the test module; step 2. the execution file is executed and then the module to be tested is linked with the test module by dynamic driving to execute the test; step 3. the compiling strategy is modified to remove the compiling to the test module and generate a release version. The adoption of the invention can preserve the integrity of the module to be tested, reduce the difference between the test version and the release version and bring convenience for the collective management to test codes, thus making the integrated test easier and largely enhancing the practical availability of the unit test theory.

Description

technical field [0001] The invention relates to software testing technology, in particular to a unit testing method and its device. Background technique [0002] Unit testing is an important part of quality assurance in software development. Unit testing includes the following processes: [0003] 1), design the corresponding test module according to the tested module, the test module includes the test logic and the test interface, the test logic needs to construct the environment variable of the tested module, and design the test case, wherein the stub function is the most important kind of environment variable; and The test interface is the entrance of a certain test; [0004] 2) Modify the module under test so that the module under test can refer to the stub function in the test module, usually using additional global variables or macros to determine whether to refer to the stub function or the original function; [0005] 3), compile the modified tested module and test ...

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 GLOBAL INNOVATION AGGREGATORS LLC
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