对于测试用例生成的遗传算法改进① - 计算机系统应用.pdf

对于测试用例生成的遗传算法改进① - 计算机系统应用.pdf

对于测试用例生成的遗传算法改进① - 计算机系统应用

计 算 机 系 统 应 用 2016 年 第 25 卷 第 8 期 ① 对于测试用例生成的遗传算法改进 吴 昊, 李浩然, 万交龙 (湖南大学 信息科学与工程学院, 长沙 410082) 摘 要: 软件测试技术中, 高效的测试用例生成能够大幅简化测试工作, 提高测试效率, 节省软件开发成本. 遗 传算法作为一种高效的搜索寻优算法已被广泛应用到测试用例自动生成的研究中, 然而传统的遗传算法虽然具 有良好的全局搜索能力, 但对于局部空间的求精问题却不是很有效, 存在早熟问题. 针对这些问题, 结合禁忌搜 索算法, 对传统的遗传算法在适应度函数、遗传算子方面进行改进, 并进行遗传导向控制, 能够有效控制遗传早 熟问题, 提高遗传算法的局部寻优能力. 实验结果表明, 本文所建议的方法在测试用例生成的效率和效果方面均 优于基于传统遗传算法的测试用例方法. 关键词: 软件工程; 软件测试; 遗传算法; 禁忌算法; 测试用例生成 Improved Genetic Algorithm Used in Test Cases WU Hao, LI Hao-Ran, WAN Jiao-Long (School of Information Science and Engineering, Hunan University, Changsha 410082, China) Abstract: In software testing process, efficient test case generation can dramatically simplify testing, improve test efficiency and save software development costs. As an effective search algorithm, genetic algorithm has been widely applied to the study on automatic generation of test cases, and has good global search capability. However, some inherent limits of this algorithm exist, such as low optimization efficiency, premature convergence, etc. This paper proposes a modified genetic algorithm combined with tabu search algorithm, improves the select and crossover operator of genetic algorithm against the shortcomings of premature convergence, and adopt the optimal preservation strategy for improving search capabilities in the local space and the overall operating efficiency. Experiments result shows that the new algorithm has obvious advantages in efficiency and effectiveness compared with traditional genetic algorithm for test case generation. Key words: software engineering; software testing; genetic algori

文档评论(0)

1亿VIP精品文档

相关文档