| 注册
首页|期刊导航|计算机科学与探索|针对方法声明演化的单元测试用例修复方法

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

张琼宇 杨秋辉 张光渝 程雪梅 孙琳

计算机科学与探索2015,Vol.9Issue(12):1450-1458,9.
计算机科学与探索2015,Vol.9Issue(12):1450-1458,9.DOI:10.3778/j.issn.1673-9418.1504032

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

Repairing Unit Test Cases for Evolving Method Declarations

张琼宇 1杨秋辉 1张光渝 1程雪梅 1孙琳1

作者信息

  • 1. 四川大学 计算机学院,成都 610065
  • 折叠

摘要

Abstract

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.

关键词

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

Key words

unit test case repairing/method declaration evolving/reflection mechanism/symbolic execution

分类

信息技术与安全科学

引用本文复制引用

张琼宇,杨秋辉,张光渝,程雪梅,孙琳..针对方法声明演化的单元测试用例修复方法[J].计算机科学与探索,2015,9(12):1450-1458,9.

基金项目

The Basic Research for Application Foundation of Sichuan Province under Grant No. 2014JY0112 (四川省应用基础研究项目) . (四川省应用基础研究项目)

计算机科学与探索

OA北大核心CSCDCSTPCD

1673-9418

访问量0
|
下载量0
段落导航相关论文