Font Size: a A A

Research And Implementation Of Automatic Test Case Generation Method Based On Basic Path Coverage

Posted on:2019-08-13Degree:MasterType:Thesis
Country:ChinaCandidate:C N FengFull Text:PDF
GTID:2428330578972802Subject:Software engineering
Abstract/Summary:PDF Full Text Request
The basic path test is a widely used white box testing technique.For a program with complex logical relationships,there are still many problems with existing test case generation methods based on basic path tests.In this paper,the automatic generation method of test cases based on the basic path test and the automatic generation of software for the test case is developed.The main research work of the thesis is as follows:(1)In this paper,An improved method for detecting unreachable paths was had proposed in this paper.,which combines the two techniques of "record the subroutine summary of the call point" and"update call point context".It can improve the accuracy of detection without increasing the time cost.The results of the experiment show that the method can accurately detect the presence of a subroutine,which is an average of 39.21%.(2)Had improved the existing genetic algorithm to increase the efficiency of test cases.First,in the aspect of individual adaptive evaluation criteria,the fitness function is composed of the layer proximity and the branching distance,and the exponential function transformation is performed on the basis of the original fitness function to adjust the distribution of the differences among individuals in the initial population of the algorithm;Second,the crossover operation,using dynamic control intersection position of crossover strategy,expand the search space;Lastly,on that variation operator,optimal individual reservation method was used to improve the searching ability of genetic algorithm in local space and improve the overall operation efficiency of the algorithm.Through MATLAB,three sets of simulation experiments showed that the improved genetic algorithm possesses the highest search success rate and the best stability.In addition,the improved algorithm performance is better in terms of iteration number and running time.(3)Had used the above research results,a software test case based on basic path coverage was designed and implemented to automatically generate software,which can generate test cases based on the source code of the Java program,and implemented the automation of the test case generation.The test case automatic generation software can automatically generate an effective test case to override the different paths of the software program,and improve the efficiency and quality of the software system's white box test.At the same time,the work of the algorithm has a very important reference to other test cases that have been used to automate the generation of technology.
Keywords/Search Tags:Test case, Basic path, Subroutine call, Genetic algorithm
PDF Full Text Request
Related items