节点文献

基于混合禁忌退火遗传算法的测试数据生成的研究

Research of Test Data Generation Based on Hybrid Tabu Annealing Genetic Algorithm

【作者】 罗帆

【导师】 沈刚;

【作者基本信息】 华中科技大学 , 软件工程, 2016, 硕士

【摘要】 作为软件质量的保障之一,软件测试在软件开发中扮演着至关重要的角色。人工测试造成了软件开发中的大量的成本和时间开销。同时,自动化测试过程中测试数据的优劣对测试的效率与效果影响极大。因此,对测试数据生成的研究有着巨大意义。测试数据生成问题是典型的软件工程问题,而将软件工程问题转化成搜索问题往往可以得到比较优的解。遗传算法在寻找最优解的问题上有其独到的优点。可以使用遗传算法对测试数据进行搜索生成,通过对源程序的输入进行编码并产生个体,在遗传操作过程中,利用适应度函数来进化种群,最终可以得到目标测试数据。然而输入参数往往是多个,对每个参数进行编码会影响算法的效率,因此可以通过级联编码的方式进行个体的生成。在目标路径上,对源代码进行插桩,得到分支函数并以此构造适应度函数。但是遗传算法也有其缺点,迭代速度过快往往会陷入局部解,将退火过程加入到交叉和变异操作中,增大次优解的存活率,从而有助于的跳出局部解。变异操作后通过禁忌搜索可以有效的减少迂回搜索过程,增大种群的多样性,从而加快种群的迭代过程。由此,可以使用优化后的混合禁忌退火遗传算法进行测试数据的产生。建立混合禁忌退火遗传算法模型,对典型的三角形分类问题进行路径测试,通过对操作过程中参数的单一控制,对算法进行了优化。将优化后的混合算法同优化前传统算法相比较,混合算法在测试数据产生的效率上有了很大的提高。将混合算法同经典研究以及近些年热门研究做对比,混合算法在测试数据生成效果上以及迭代时间上也有很大的优势。

【Abstract】 As one of the assurance of software quality,software testing plays a vital role in the software life cycle.Manual testing brings many problems,such as high cost,long time,low efficiency and poor reliability and so on.At the same time,the quality of test data in automated software testing affects the efficiency and effectiveness of the testing directly.Test data generation is a typical problem of software engineering,and the problem of software engineering turn into a search problem can often get relatively good solutionGenetic algorithm has its unique advantages in searching for the optimal solution.Genetic algorithm can be applied to the test data generation problem by encoding the input parameters of the source program to generate the individual,then evoluting the generation by measure the fieness of the individual,finally getting the test date of the target path.However,the input parameters are often more than one,the encoding of each parameter will affect the efficiency of the iterative process,so cascade coding is used in the encoding.On the target path,the branch function is obtained by inserting the branch node into the branching function,which is used to construct the fitness function.And the genetic algorithm has its shortcomings,too fast convergence will often sink into the local optimal solution,the simulated annealing process added to the crossover and mutation operation,can improve the climbing characteristics of the algorithm,which can be better to jump out.Using tabu search can effectively reduce the roundabout search process after mutation operation,which can increase the diversity of the population and accelerate the process of population iteration.Thus optimized tabu annealing genetic hybrid algorithm can be used to genetate the test data.Through the model of hybrid tabu annealing genetic algorithm,the typical triangulation problem is tested by path,and the algorithm is optimized by the single control of parameters in the process of operation.Compared with the traditional genetic algorithm and annealing genetic algorithm,the hybrid algorithm has been greatly improved in the efficiency of test data generation.Compared with the classical test data generation algorithm and the popular research in recent years,the hybrid algorithm has a great advantage in the test data generation efficiency and the iteration number.

  • 【分类号】TP18;TP311.53
  • 【下载频次】59
节点文献中: 

本文链接的文献网络图示:

本文的引文网络