摘要
结构性测试中,进化测试是一种高效的自动生成高质量测试用例的技术。然而,当程序中出现非结构化特征时,在面向节点的测试标准下,其效率极其低下甚至不及随机测试生成方法。在考虑循环体内部出现跳转(goto、return)语句的情况下,提出了一种适应度计算方法。该方法在结合传统进化测试适应度计算的基础上,充分考虑了循环次数对于进化搜索的影响。实验结果表明,本适应度函数可以很好地引导进化搜索,并以较小的代价生成测试用例。
Evolutionary testing is a highly effective technique for automatically generating high quality test data, which is used for structural testing. However, under the criterion of Node-oriented, testing of unstructured programs is inefficient and leading the technique degenerates to random testing. In this paper, with regard to the unstructured programs that contain arbitrary jump statement inner a loop body, a method of fitness calculation based on traditional approach was proposed, in which the impact of the number of iteration for evolutionary search was adequately considered. The experiments were then presented and the results show that the fitness function could effectively guide evolutionary search to find required test data at low cost.
出处
《计算机科学》
CSCD
北大核心
2009年第8期149-152,181,共5页
Computer Science
基金
"十一五"部委预研项目(513150601)资助
关键词
进化测试
非结构化控制流
循环
适应度
进化搜索
Evolutionary testing, Unstructured control flow, Loop, Fitness, Evolutionary search