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

Method for generating failed test case by using generative network

A test case generation and test case technology, applied in biological neural network models, neural learning methods, software testing/debugging, etc., can solve problems such as poor effect, low training efficiency of deep neural network, unfavorable training of high-dimensional data, etc. , to achieve the effect of improving the effect, improving the effect, and alleviating the problem of data imbalance

Active Publication Date: 2021-12-24
CHONGQING UNIV
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When considering the use of generative networks, there is another very important problem: the scale of the network model program is usually large and the number of statements is large, but the code that causes the program error is usually only a few lines or even one line; Finally, there will be high-dimensional data that is not conducive to training, resulting in low training efficiency and poor effect of deep neural network, and ultimately makes it impossible to generate effective failure test 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
  • Method for generating failed test case by using generative network
  • Method for generating failed test case by using generative network
  • Method for generating failed test case by using generative network

Examples

Experimental program
Comparison scheme
Effect test

test Embodiment T

[0072] S100: Randomly select a defective program P and a set of original test cases T, the defective program P contains N executable statements, the number of test cases contained in the original test case T is M, and the i-th test case in the original test case T The test case is T i , and T i With respect to the known output of program P as A i ;

Embodiment T

[0073] S110: Use P to execute the i-th test case T in T i , get the i-th test case T i Statement coverage information in program P and i-th test case T i Actual output B after program P i ;

[0074] S120: Contrast A i and B i , if A i and B i are the same, then the label Y of the i-th test case i is 0, if A i and B i different, then the label Y of the i-th test case i is 1;

[0075] S130: Repeat S110 and S120, traverse all test cases in T, and obtain statement coverage information of all test cases and labels of all test cases;

[0076] The statement coverage information of all test cases forms a coverage matrix X, where the dimension of X is M×N;

[0077] The labels of all test cases form a label vector y, where the dimension of y is M×1;

[0078] S200: Perform feature selection processing on the coverage matrix X to obtain a feature space X' after screening and dimensionality reduction; here, an improved principal component analysis method is used for processing...

test Embodiment t7 and t8

[0141] Set the labels of t7 and t8 to 1 according to the steps in the method, indicating that they are failed test cases. After adding t7 and t8 to the original test case set we get a new test case set containing 4 successful test cases and 4 failed test cases. Such as Figure 6 As shown, there are three lists in descending order. With the original set of test cases as input, the output of GP02 is {s7, s8, s9, s12, s10, s11, s14, s15, s16, s1, s2, s3, s13, s6, s4, s5}, where After using the improved principal component analysis algorithm for feature selection, the five sentences s5, s8, s14, s15, and s16 were screened out. At this time, the output of GP02 is {s7, s9, s12, s10, s11, s1, s2, s3, s13, s6, s4}. In the case of the new test case set added by t7 and t8 as input, the output of GP02 is {s12, s9, s7, s3, s1, s2, s13, s10, s11, s6}. It can be seen that when the original test case is used as input, the defect statement s3 ranks 12th in the GP02 localization model. Af...

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 relates to a method for generating a failure test case by using a generative network, which comprises the following steps of: firstly, carrying out dimensionality reduction on an original coverage matrix by using a feature selection algorithm so as to obtain a low-dimensional feature space of the original coverage matrix; and taking the low-dimensional feature space as training data, and performing parameter updating by using a back propagation algorithm so as to train a generator capable of generating a failed test case. And generating failed test cases by using the generator until the number of the failed test cases is the same as that of the successful test cases. And finally, integrating the newly added failed test case into the original test case set, and carrying out defect positioning. According to the method, an improved principal component analysis algorithm is used for carrying out dimensionality reduction on an original matrix, and a condition auto-encoder is used for generating a failure test case, so that the problem of data imbalance is relieved, and the purpose of improving the defect positioning effect is achieved.

Description

technical field [0001] The invention relates to the technical field of software testing, in particular to a method for generating failed test cases using a generative network. Background technique [0002] In the process of software development and maintenance, the purpose of software debugging is to find and fix errors in the software. It is a time-consuming and labor-intensive process that often requires a significant investment of effort and time from developers. In order to reduce the cost of debugging, researchers have proposed many methods to help debuggers find defects in programs. A typical process of locating program defects is as follows: Assume that there is a program P with a test case set T constructed from the input field. After the program P executes all the test cases in T, it will generate a coverage matrix and a failure vector. Coverage Matrices are usually represented in the form of matrices. Then use various defect localization methods (such as Spectru...

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/36G06K9/62G06N3/04G06N3/08
CPCG06F11/3684G06F11/366G06N3/084G06N3/045G06F18/2135
Inventor 胡安林谢欢雷晏刘春燕李茂锦
Owner CHONGQING UNIV
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