项目名称: 软件重构对回归测试用例的影响及其修复方法研究
项目编号: No.61272169
项目类型: 面上项目
立项/批准年度: 2013
项目学科: 自动化技术、计算机技术
项目作者: 刘辉
作者单位: 北京理工大学
项目金额: 80万元
中文摘要: 软件重构通过调整软件的内部结构以提高软件的可扩展性和可维护性。虽然重构不得改变软件的外部行为特性,但它却有可能导致回归测试的失效(编译错误或运行错误)或失败(运行结果与预期不符)。为此,本项目计划研究软件重构对回归测试的影响,并尝试自动修复受损测试用例。通过理论分析及重构历史挖掘,对测试用例失效或失败的原因进行分析和归类,进而明确各种软件重构对测试用例的影响模式。针对工具可识别的软件重构(根据重构工具的记录或借助重构识别技术),计划采用基于模式的测试用例修复方法。对于难以准确识别的软件重构,计划研究基于执行路径的测试用例修复方法。在测试驱动的开发模式下,程序员必须先修改测试用例之后再实施重构操作。为此,计划通过挖掘测试用例的修改情况以及被测程序内的代码坏味,推测用户的重构意图,进而自动完成测试用例的修改及软件重构操作。本项目的研究将有助于降低软件重构的成本并提高重构的可靠性。
中文关键词: 软件重构;回归测试;接口;软件维护;
英文摘要: Software refactoring improves extensibility and maintainability of software systems by restructuring their internal structures. Though software refactoring would not change the external behaviors of software systems, they might make regression tests obsolete (with syntax and runtime errors) or fail. To this end, this project will analyze the impact of software refactoring on regression tests, and try to repair impacted tests. We would first analyze the reasons why tests become obsolete with theoretical analysis and refactoring history analysis. For refactorings recognized by tools (according to logs of refactoring tools or by refactoring identification technologies), we would propose a pattern-based test repairing approach. For refactorings that could not be automatically recognized by tools, we would propose a path-based test repairing approach. With test-driven development, tests should be updated before refactorings could be applied. To this end, we would propose an approach to identify refactoring intent by analyzing changes on tests and bad smells within corresponding production code. The research would help to reduce software refactoring cost, and improve the reliability of software refactoring.
英文关键词: Software refactoring;Regression testing;Interface;Software maintenance;