针对模拟退火算法,遗传算法应用于测试数据的自动生成的局限性,提出了一种基于GEMGA(基因表达散乱遗传算法)的结构化测试数据的自动生成的方法。讨论了路径的选择,提出了将控制流图与数据流图结合起来生成测试路径,通过TriType的分析结果说明了该方法的可行性。根据得到的测试路径将GEMGA应用到测试数据的自动生成,TriType的实验结果表明,GEMGA能生成更高质量的数据,并适用于较大规模的程序。
The limitations of simulated annealing and genetic algorithms applied to test data generation automatically are investigated, and an automated approach based on GEMGA for generating such data is proposed. A method that a control flow graph combined with a data flow graph generates the feasible path to avoid the important computation for the infeasible path is proposed. The preliminary analysis results show that the method is practical from the view of the software engineering practice. Based on GEMGA, solving F(X) for the branch function of the generated feasible path and comparison with other automated testing methods, the experimental results of TriType show that it can generate higher quality test data more efficiently, and can be applied to larger applications.