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

Method for evolving and generating path coverage test data facing defects

A path coverage testing, defect-oriented technology, applied in the field of computer software testing, can solve the problems 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., and achieves high efficiency. , improve efficacy, targeted effect

Inactive Publication Date: 2014-07-30
CHINA UNIV OF MINING & TECH
View PDF4 Cites 0 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

[0029] The embodiments of the present invention will be described in detail below with reference to specific drawings and examples.

[0030] Step 1. Establishment of mathematical model

[0031] 1.1 Decision variables

[0032] Consider a program under test, because different input data will traverse different paths of the program, and different defects on the path may be detected. Therefore, when establishing a mathematical model of defect-oriented path coverage test data generation problem, select the program under test 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 tested program, x i , I=1, 2,..., n is the component of the input data, which can be real numbers, integers, or even characters, etc. For example, in a bubble sorting program of 5 integers, n=5, x i , I=1, 2,..., 5 is an integer.

[0033] 1.2 Constraint function

[0034] The path representation method when calculating layer proximity refers to...

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 for a designated program path. This method is different from the original method in that the generated test data can effectively expose the defects in the program under test. 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 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 test. The core of software automatic testing is to generate effective test data without passing a large number of samples in a short period of time to discover the defects of the software. How to automatically generate software test data has become a very important research topic in the software en...

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 Patents(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