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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com