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

Method for evolving and generating path coverage test data facing defects

A path coverage test, defect-oriented technology, applied in the field of automatically generating test data that traverses the target path, can solve the problem that the program cannot run normally or can be found by the compilation system, cannot be detected by the compilation system, and the program running result is incorrect, etc. problems, to achieve high efficiency, improved effectiveness, and strong pertinence

Inactive Publication Date: 2011-08-03
CHINA UNIV OF MINING & TECH
View PDF4 Cites 25 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

There are many forms of defects. Some defects directly cause the program to fail to run normally or can be found by the compilation system. Such defects are also easy to be found by software developers and corrected. Therefore, the tested programs put into testing generally do not contain such defects. Defects; some defects are hidden in the program under test and cannot be detected by the compilation system, and do not affect the operation of the program. As long as the test data crosses the path where the defect is located, it will be triggered, resulting in incorrect program operation results, and thus easy It is found by the test data; there is another type of defect that cannot be detected by the compilation system, and not all the test data that traverses the path where the defect is located can find it, and it needs special test data to effectively detect it. This type of defect is called It is a small probability defect, so generating test data that can effectively detect small probability defects will have great significance for software testing
Although the existing path coverage test data generation method can generate test data that traverses the target path, it may not be able to find the defects hidden in the target path of the program under test, especially the small probability defects

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 for evolving and generating path coverage test data facing defects
  • Method for evolving and generating path coverage test data facing defects
  • Method for evolving and generating path coverage test data facing defects

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] Embodiments of the present invention will be described in detail below in conjunction with specific drawings and examples.

[0031] Step 1. Establishment of mathematical model

[0032] 1.1 Decision variables

[0033] Considering a program under test, because different input data will traverse different paths of the program, and may detect different defects on the path, therefore, when establishing a mathematical model of the defect-oriented path coverage test data generation problem, choose the program under test The input of is used as the decision variable, denoted as x(x 1 , x 2 ,...,x n ), where n is the number of data that needs to be input to run the program under test, x i , i 1.2,..., n is the component of the input data, which can be a real number, an integer, or even a character, etc. For example, in a bubble sorting program with 5 integers, n=5, x i , i=1, 2, . . . , 5 are integers.

[0034] 1.2 Constraint function

[0035] The path representation meth...

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 method for evolving and generating path coverage test data facing defects, which aims to expose the defects in a target path as much as possible from the generated test data so as to effectively enhance the quality of the test data. The method comprises the following steps of: firstly, establishing a math model for generating the path coverage test data facing the defects by using a path, in which the largest number of defects are found during tested procedure execution by the test data and the danger level of the defects is highest, as a target under the condition of a restraint that the test data must pass through the target path; and secondly, designing a restraining method for optimizing a plurality of targets so as to solve the problem, and evolving and generating the through target path by using a genetic algorithm, and effectively exposing the test data of the defects at the same time. By the method, the problem that the test data generated by the conventional method can only just pass through the target path instead of effectively exposing the defects in the target path, in particular some small-probability defects, can be solved; and the method can be used for generating the test data for a white box test or a regression test, so the efficiency of the software test can be improved greatly.

Description

technical field [0001] The invention relates to the field of computer software testing, and designs a new method for automatically generating test data crossing a target path. The difference between this method and the original method is that the generated test data can effectively expose the specified type of defects in the target path. Background technique [0002] Software testing is an important means to ensure software quality. It is divided into static testing and dynamic testing, both of which are used to find possible defects in the program code, but the former does not execute the program code, while the latter runs the program code based on the test data. Generation is the key to this type of testing. The core of software automatic testing is to generate effective test data in a short period of time without passing a large number of samples to find software defects. Therefore, automatic generation of software test data has become a very important research topic in...

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 CHINA UNIV OF MINING & 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