计算机应用 ›› 2016, Vol. 36 ›› Issue (4): 1070-1074.DOI: 10.11772/j.issn.1001-9081.2016.04.1070

• 计算机软件技术 • 上一篇    下一篇

基于失效聚集度改进自适应随机测试算法

侯韶凡, 于磊, 李志博, 李刚   

  1. 1. 信息工程大学, 郑州 450001;
    2. 数学工程与先进计算国家重点实验室(信息工程大学), 郑州 450001
  • 收稿日期:2015-09-16 修回日期:2015-11-23 出版日期:2016-04-10 发布日期:2016-04-08
  • 通讯作者: 侯韶凡
  • 作者简介:侯韶凡(1991-),女,河南郑州人,硕士研究生,主要研究向:软件测试; 于磊(1974-),男,山东青岛人,副教授,博士,CCF会员,主要研究方向:软件工程、软件质量管理; 李志博(1982-),女,河南商丘人,讲师,博士研究生,主要研究方向:软件测试; 李刚(1991-),男,陕西西安人,硕士研究生,主要研究方向:软件测试。
  • 基金资助:
    国家自然科学基金资助项目(61402525);郑州市普通科技攻关项目(141PPTGG383)。

Improved adaptive random testing algorithm based on crowding level of failure region

HOU Shaofan, YU Lei, LI Zhibo, LI Gang   

  1. 1. Information Engineering University, Zhengzhou Henan 450001, China;
    2. State Key Laboratory of Mathematical Engineering and Advanced Computing(Information Engineering University), Zhengzhou Henan 450001, China
  • Received:2015-09-16 Revised:2015-11-23 Online:2016-04-10 Published:2016-04-08
  • Supported by:
    This work is partially supported by the National Natural Science Foundation of China (61402525), the General Key Scientific and Technological Projects of Zhengzhou (141PPTGG383).

摘要: 对于现有的自适应随机测试(ART)算法针对点状失效模式普遍存在有效性和效率均比随机测试(RT)差的问题,提出一种基于失效聚集度的自适应随机测试(CLART)算法,对传统的ART——固定候选集(FSCS)、区域排除随机测试(RRT)等算法进行改进。首先,根据被测程序的输入域估计主失效聚集度,确定局部搜索区域;然后,在区域内使用传统ART算法生成若干测试用例(TC)进行测试;若未发现错误,重新选择局部区域生成TC;重复这一过程直至发现错误。仿真实验显示在点状失效模式和块状失效模式下CLART算法的有效性比FSCS算法提高约20%,效率比FSCS算法提高约60%。实验结果表明CLART算法利用多个局部区域依次搜索可以快速锁定引发失效输入分布密集高的失效区域,从而提高测试的有效性和效率。

关键词: 软件测试, 随机测试, 自适应随机测试

Abstract: Focusing on the issues that the effectiveness and efficiency of existing Adaptive Random Testing (ART) algorithms are not as good as Random Testing (RT) for point failure pattern, an improved ART algorithm based on the concept of crowding level of failure region, namely CLART, was proposed to improve the traditional ART algorithm: Fixed Sized Candidate Set (FSCS) and Restricted Random Testing (RRT), etc. Firstly, the main crowding level was estimated according to the input region to determine the local search region. Secondly, some Test Cases (TCs) were generated by traditional ART algorithms in the local region. Finally, if no failure was found, a new local region was re-selected and some TCs were generated again until the first failure was found. The simulation results show that the effectiveness of the proposed CLART algorithm is about 20% higher than that of FSCS algorithm, and the efficiency is about 60% higher than that of FSCS algorithm. The experimental results indicate that the CLART algorithm can quickly locate the concentrated failure regions by searching several regions one by one to improve the effectiveness and efficiency.

Key words: software testing, Random Testing (RT), Adaptive Random Testing (ART), effectiveness, efficiency

中图分类号: