摘要
针对路径覆盖测试的可行性,提出了一种新的路径测试覆盖准则(Length_N准则)。首先把测试用例生成归纳为多目标函数的优化问题,其有效方法是根据程序运行结果指导生成过程,通过不断迭代,生成符合要求的测试数据集。为了提高生成效率,对遗传模拟退火算法的编码、适应度函数、交叉概率做了一定的改进;并在此基础上来自动生成测试用例。实验结果表明该方法在效率上较遗传算法、随机测试数据生成方法有很明显的提高,在可行性上比路径覆盖准则也有很大的改善。
For the feasibility of integrity path-tested coverage, a new path-tested coverage criterion, named length_ N criterion, was prompted. Firstly the automated approach for generating test data was proposed by solving multiobject function. An efficient approach to automated generation of structural test data is to breed search iteratively by profiling of program execution. Some improvements were made at encoding, fitness function and annealing gene, and utilize the result and instrumentation theory to generate test data. Experimental results showed this approach has better effect than random method and genetic algorithm.
出处
《四川大学学报(工程科学版)》
EI
CAS
CSCD
北大核心
2008年第3期132-137,共6页
Journal of Sichuan University (Engineering Science Edition)
基金
国家中小企业创新基金资助项目(06C26225101730)
四川省科技厅基金资助重点项目(05GG021-003-2)