Font Size: a A A

Research On Automatic Generation Method Of Stru Cture Test Data Based On Ant Colony Algorithm

Posted on:2021-11-13Degree:MasterType:Thesis
Country:ChinaCandidate:X Y HuFull Text:PDF
GTID:2518306047998759Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
The application of automated testing is becoming more and more widespread.Am ong them,the automatic generation method of test data based on heuristic search algo rithm has attracted wide attention due to its strong coverage and fast generation speed.Path coverage has been proven to be the coverage standard with the strongest ability to find errors,so this article starts with the path,first uses the test data based on th e key point path to automatically generate a model for path pre-processing,and screen s out easy-to-cover and infeasible paths.The rest Difficult-to-cover paths are covered with a globally strong ant colony algorithm.This paper first proposes improvements to the infeasible detection methods in key point models,then proposes improvements to ant colony algorithms,and finally combines them into a complete test model.The m ain work of this article is as follows:Firstly,Aiming at the problem that the infeasible path detection method in the critical point path model detects incomplete and time-consuming problems,a dynami c and static infeasible path detection method is proposed,and the advantages of the static method and the dynamic method are combined in the analysis stage.On the basis of the existing methods for extracting the correlation between conditional judg ment statements by using correlation analysis,data flow analysis is introduced to ext ract the correlation between assignment statements and conditional judgment statemen ts,which effectively improves the accuracy of detection.Then,in order to solve the problems of random local search at the initial stage of the basic ant colony algorithm,which leads to too slow convergence and low o verall coverage,an ant colony algorithm with an evolution strategy is proposed.An evolutionary strategy is added to the local search,and the Gaussian mutation operato r is used to make the ants no longer move randomly and enhance the local search ability of the ants.A new definition of pheromone has been added to prevent ants f rom accessing branches that have been traversed,avoid redundant solutions,and incr ease the ability to develop new paths.A new Boolean fitness function is added.If t he current ant has successfully traversed at least one new branch,the global transfer is not required and the generation speed is accelerated.Finally,a number of benchmark programs suitable for assessing branch reachabi lity are selected for comparison experiments,and the experimental results are analyz ed based on multiple indicators to compare the performance of the algorithm in this paper with the algorithm before improvement and the existing general algorithms.E xperiments show that the method in this paper can improve the coverage of the gen erated test data,accelerate the convergence speed,and is valuable for the automation of testing of numerical pools.
Keywords/Search Tags:Software Test, Automatic Data Generation, Infeasible Path, Ant Colony Algorithm, Evolutionary Strategy
PDF Full Text Request
Related items