针对方法声明演化的单元测试用例修复方法  

Repairing Unit Test Cases for Evolving Method Declarations

在线阅读下载全文

作  者:张琼宇[1] 杨秋辉[1] 张光渝[1] 程雪梅[1] 孙琳[1] 

机构地区:[1]四川大学计算机学院,成都610065

出  处:《计算机科学与探索》2015年第12期1450-1458,共9页Journal of Frontiers of Computer Science and Technology

基  金:四川省应用基础研究项目~~

摘  要:软件演化会造成一部分测试用例失效,如果直接将其从测试用例集中移除,会影响测试用例集检测缺陷的能力,降低回归测试的有效性。测试用例修复技术可以减少测试维护的工作量,增强回归测试的有效性。研究了针对方法声明演化的单元测试用例修复方法,首先使用反射机制得到方法声明演化信息,识别演化类型,再针对方法名称改变、方法参数改变和返回参数类型改变,分别提出了相应的修复策略。在修复过程中使用动态符号化执行技术得到测试数据,提高了测试用例修复的范围。实验表明,该方法能有效修复由方法声明演化引起编译错误的测试用例,平均修复率为60%左右,证明了该方法的可行性。Some of test cases may become obsolete because of software system evolution. Discarding these test cases will weaken fault detection ability, and reduce the effectiveness of regression testing. Automatically repairing test cases can reduce the maintenance workload of developers, and improve the efficiency of regression testing. This paper proposes a method for automatically repairing test cases that become obsolete because of the changes in method declarations. Firstly, the information of method declaration changes is got by using reflection mechanism. Then, the declaration change types, such as method name change, method parameters change and method return type change,are identified. Finally, different repairing strategies are put forward for different declaration change types. When repairing test cases, some of test data are obtained by using dynamic symbolic execution tool, which can expand the range of test case repairing. The experiment shows that the proposed method can repair nearly 60% obsolete test cases because of method declaration change, this proves the feasibility of the proposed method.

关 键 词:单元测试用例修复 方法声明演化 反射机制 符号化执行 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象