首页 | 本学科首页   官方微博 | 高级检索  
     

基于UML活动图及混合遗传算法的测试场景生成
引用本文:王馨樱,蒋夏军.基于UML活动图及混合遗传算法的测试场景生成[J].计算机工程与应用,2017,53(1):57-62.
作者姓名:王馨樱  蒋夏军
作者单位:南京航空航天大学 计算机科学与技术学院,南京 210016
摘    要:有效降低测试成本是软件测试优化的重要研究问题。将遗传算法引入到软件测试中,对生成测试场景提供了必要的动力,然而遗传算法局域搜索能力差,在进化后期搜索效率低,导致算法比较费时。基于UML活动图提出了混合遗传算法生成测试场景的方法,该方法结合遗传算法和爬山法,有效地加快了测试场景的生成速度。为了避免局部性问题,在算法每次进行爬山操作之前调用种群生成函数。实验结果表明,与简单的遗传算法相比,混合遗传算法不仅有效地解决了局部性问题,而且较大地提高了生成测试场景的效率,降低了软件测试成本。

关 键 词:软件测试  测试场景  UML活动图  遗传算法  爬山法  局部性  

Generating test scenarios from UML activity diagram using hybrid genetic algorithm
WANG Xinying,JIANG Xiajun.Generating test scenarios from UML activity diagram using hybrid genetic algorithm[J].Computer Engineering and Applications,2017,53(1):57-62.
Authors:WANG Xinying  JIANG Xiajun
Affiliation:School of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 210016, China
Abstract:Reducing cost of software testing is the essential issue in the study of software testing optimization. Genetic Algorithm(GA) is introduced into the software testing, which provides necessary impetus to get divergent test scenarios. However, the GA is time-consuming because of having a poor local search and slow convergent speed at later evolution process. This paper presents the Hybrid Genetic Algorithm(HGA) in test scenarios generation based on Unified Modeling Language’s(UML) activity diagram, it contains genetic algorithm and hill climbing algorithm. This new algorithm accelerates the speed of generation of the test scenarios from the UML activity diagram, adding new members at the beginning of each operation of the hybrid genetic algorithm to avoid localized optimization. Experimental results show that the approach not only solves the localized optimization effectively but also greatly improves the efficiency of the generation of test scenarios compared with the simple genetic algorithm and reduces the software testing cost.
Keywords:software testing  test scenarios  UML activity diagram  genetic algorithm  hill climbing  localized optimization  
点击此处可从《计算机工程与应用》浏览原始摘要信息
点击此处可从《计算机工程与应用》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号