Font Size: a A A

Test Case Generation Between Similar Programs Using Function Influence And Gated Graph Neural Network

Posted on:2023-07-31Degree:MasterType:Thesis
Country:ChinaCandidate:J SongFull Text:PDF
GTID:2568306806473254Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Software testing is a very important task in software development,which can help developers find software vulnerabilities comprehensively and quickly,thereby effectively improving software quality and user experience.Designing and selecting reasonable test cases can improve the testing efficiency of software and reduce the workload of developers.With the continuous improvement of software functions,its scale and complexity continue to increase,the traditional test case generation method is inefficient,and it is difficult to meet the needs of current software testing.Therefore,how to improve the efficiency of test case generation still needs further research.Based on this,this thesis discusses the efficiency of automatic generation of path coverage test cases.Aiming at the problem of test case generation between similar programs in regression testing,this thesis proposes a method of reusing the test information of similar programs before the change,and generating new test cases for the evolution of the program after the change through the designed fitness function.The method uses the constructed function call graph to identify key functions,and then detects the similar parts of programs according to the similarity of the key functions,and designs a fitness function according to the influence of the function to adjust the fitness value of the individual,and retain the excellent individuals with high fitness value.The test cases of the new program in the regression test are formed by reusing the test cases of the similar parts before the change,and the test cases of the changed parts generated by the evolution.The experimental results show that the test case reuse and generation method between similar programs using function influence is better than other comparative methods in target path coverage on small and medium-scale and large-scale industrial programs.Aiming at the problem of test case generation between similar programs in non-regression testing,this thesis proposes a reuse and generation strategy of test cases between similar programs based on gated graph neural network.Firstly,the gated graph neural network model is constructed by the data flow and control flow of the program,which can be used to obtain the information of the tested program,so as to generate the feature matrix of the model more efficiently.The binary cross-entropy function is directly embedded into the decoding model to detect program similarity.In the evolution process,test cases with high fitness among similar programs are introduced,so that the population individuals continuously cross these test cases,so as to quickly cover the target path.The experimental results show that the test case reuse and generation method between similar programs based on the gated graph neural network is more effective than other comparison methods on the target path coverage.It studies the problem of test sharing among similar programs to improve the efficiency of test case generation.On the one hand,it detects the similarity before and after the program change,uses the function influence as the fitness function,judges the individual pros and cons in the evolution process,and reuses the test cases of similar parts,which makes the test cases fully utilized in the test;On the one hand,the similarity between programs is measured by building a program similarity detection model based on gated graph neural network,and test cases of similar programs are introduced in the evolution process to improve the efficiency of test case generation.This plays a very important guiding role in the research on test case generation.
Keywords/Search Tags:test case, program similarity, function influence, critical function, gated graph neural network
PDF Full Text Request
Related items