ISSN 1000-1239 CN 11-1777/TP

计算机研究与发展 ›› 2016, Vol. 53 ›› Issue (3): 550-558.doi: 10.7544/issn1000-1239.2016.20148329

• 软件技术 • 上一篇    下一篇

基于错误传播网络的回归测试用例排序方法

潘伟丰1,李兵2,周晓燕3,何鹏3   

  1. 1(浙江工商大学计算机与信息工程学院 杭州 310018); 2(武汉大学国际软件学院 武汉 430072); 3(软件工程国家重点实验室(武汉大学) 武汉 430072) (wfpan1982@163.com)
  • 出版日期: 2016-03-01
  • 基金资助: 
    国家自然科学基金项目(61202048,61273216,61272111);浙江省自然科学基金项目(LY15F020004,LY13F020010);浙江省科技厅公益技术研究项目(2014C23008)

Regression Test Case Prioritization Based on Bug Propagation Network

PanWeifeng1,LiBing2,ZhouXiaoyan3,HePeng3   

  1. 1(School of Computer Science and Information Engineering, Zhejiang Gongshang University, Hangzhou 310018); 2(International School of Software, Wuhan University, Wuhan 430072); 3(State Key Laboratory of Software Engineering (Wuhan University), Wuhan 430072)
  • Online: 2016-03-01

摘要: 测试用例排序技术通过对测试用例进行排序以提高回归测试的效率.针对现有方法未能充分利用软件结构信息的不足,提出了基于错误传播网络的测试用例排序方法.该方法在类粒度将软件抽象成加权类依赖网络(weighted class dependency network,WCDN)模型,并基于WCDN分析错误在网络上的传播行为,构造错误传播网络(bug propagation network,BPN).测试用例排序时,首先在BPN中定位变更类和可能受变更类波及的类,从而计算类的测试重要性,最后以测试用例覆盖类的测试重要性总和作为最终的排序依据.实例研究表明,基于错误传播网络的测试用例排序方法在错误检出率上相比于其他经典方法有一定的提高,并且具有较好的稳定性.

关键词: 错误传播, 测试用例排序, 复杂网络, 软件网络, 回归测试

Abstract: Test case prioritization (TCP), as one of the regression testing techniques, can greatly improve the efficiency of regression testing. Considering that most of the existing TCP techniques neglect to use software structure information, this paper proposes a new regression test case prioritization technique based on bug propagation network. It uses weighted class dependency network (WCDN) to represent the topological structure of a piece of software at the class level of granularity, and then analyzes the propagation process of bugs on WCDN to construct the BPN. When performing regression test case prioritization, it first locates the modified classes and the potential impacted classes. Then it calculates the test influence for each class. Finally, the test importance for each test case, the sum of the test importance of all classes it covered, is calculated as the criteria to prioritize regression test cases. Case studies on several real world open-source software systems show that, compared with other test case prioritization techniques, the proposed technique has better effectiveness and comparable stability.

Key words: bug propagation, test case prioritization (TCP), complex network, software network, regression testing

中图分类号: