Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Unit testing system and method supporting table-driven underlying input

A unit test and low-level input technology, applied in software testing/debugging, etc., can solve problems such as incorrect assignment results, increased test-driven code costs, incorrect variable assignment results, etc., to improve efficiency, improve reusability, and simplify The effect of management and maintenance

Active Publication Date: 2015-06-24
GUANGZHOU KAILE SOFTWARE TECH
View PDF6 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0026] c. You cannot directly put the low-level inputs such as composite types, arrays, and control pointers in the form. For the low-level inputs of composite types, you need to write code first to decompose the composite type into basic types, and then move the data of the basic types to the table. , which may require writing and maintaining a large amount of additional test-driven code when dealing with complex types;
[0027] d. For the assignment process of the bottom layer input, the overall memory shallow copy method is adopted. When faced with complex objects, such as complex C++ objects, the assignment result of the variable may be incorrect, and it cannot satisfy only certain requirements for compound variables. These members set the requirements of the underlying input;
[0028] e. Since whether to set the underlying input is implemented by the test-driven code, it is essentially driven by the test code, not a real form-driven. When the underlying simulation code exists in the test-driven code, no matter whether it is set in the form value, will cause the simulation of the underlying function. In this way, multiple use cases in the data table cannot control whether the underlying function calls the actual code, that is, it is impossible to set the underlying input for some use cases in the table, and call the actual code for some use cases.
[0029] To sum up, the existing technology is not really table-driven for the underlying input, but is driven by additional test-driven codes, especially for composite types, the number of additional test-driven codes may be large, which increases debugging and maintenance The cost of test-driven code requires manually moving the data into the table. The data table does not support the underlying input of composite numbers, and the memory copy assignment method of the underlying input may cause the variable assignment result to be incorrect, and it cannot satisfy only setting Requirements for some members or only set some use cases

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 testing system and method supporting table-driven underlying input
  • Unit testing system and method supporting table-driven underlying input
  • Unit testing system and method supporting table-driven underlying input

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0064] figure 1 It is a schematic diagram of the general structure of an embodiment of the present invention, such as figure 1 As shown, this embodiment includes the following devices: type analysis device 101; tree table device 102; assignment device 103; bottom variable setting device 104; bottom input setting device 105; function call interception device 106.

[0065] The sample codes of the present invention are written in C language or C++ language, but it does not mean that the present invention is only applicable to C language and C++ language. The example codes listed in the present invention are only for illustrating the technical solutions of the present invention, and do not mean to limit the present invention.

[0066] The device 101 parses the data type definition to obtain type information. Type information is a general term in this field. Different programming languages ​​may have different type information. Generally speaking, type information includes: type ...

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 system and method supporting table-driven underlying input. The system comprises a type resolver, a tree table device, an assigner, an underlying variable setting device, an underlying input setting device and a function calling interceptor; the type resolver is used for resolving a data type definition to obtain type information; the tree table device is composed of a tree control and a table control; the assigner is used for assigning a variable to an input value in the tree table device; the underlying variable setting device is used by a user to designate an underlying variable and add the same to the tree table; the underlying input setting device is used for querying the underlying variable which the user sets and calling the assigner and / or allowing an underlying function to continue executing; the function calling interceptor is used for intercepting calling of the underlying function and calling the underlying input setting device. The unit testing system and method has the advantages that underlying input is table driven, namely underlying input is totally controlled via a table, test data is simple to manage and maintain, test data is more reusable, unit test obstacles formed by calling coupling of the function are overcome, and unit testing efficiency is greatly improved.

Description

technical field [0001] The invention relates to software testing technology, in particular to software unit testing technology. Background technique [0002] Unit testing is an important means to ensure code quality and improve development productivity in the software development process. [0003] The basic method of unit testing is to use test-driven code, set input and expected output, execute the program under test, and automatically judge whether the actual output meets expectations. The input data and expected output are called test cases, that is, test data, which is the basic element of unit test work, and the process of assigning values ​​to inputs and comparing processes of judging output is the core of the unit test execution process. [0004] A major hurdle in implementing unit testing is low-level typing issues. The underlying input is the input obtained by calling the underlying function. The underlying function is the associated function called by the test f...

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 GUANGZHOU KAILE SOFTWARE TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products