节点文献
基于测试代码变化的重构意图推测方法
Inferring Refactoring Intention from Test Case Modification
【摘要】 已有的重构工具主要在传统开发模式下,针对源代码的变化来推测重构.对于目前流行的测试驱动开发方法,缺乏有效的工具指导实施测试驱动重构.为此,本文提出了一种基于测试代码变化的重构意图推测方法,在测试驱动开发过程中,通过实时监控捕获测试代码的变化,并依据启发式规则推测可能的重构操作.该方法在两个实际的测试驱动开发项目上进行了验证.结果表明该方法比现有方法更为高效准确,其准确率提高约15%,查全率提高了33.3%~42.8%.
【Abstract】 Existing tools/methods are used to infer refactoring according to production code change in traditional development mode.In the test-driven development(TDD),there are few tools can be used to guide test driven refactoring.In this paper,an approach was proposed to inferring refactoring intension from test case modifications.Firstly,the test code modification was captured with a monitor,and then the potential refactoring was inferred from the captured modification according to predefined heuristics.The proposed approach has been implemented and evaluated with two real applications.Evaluation results show that compared with existing approach the precision increases by 15% and the recall increases by 33.3%~42.8%.
【Key words】 refactoring intention; code smell; test-driven; test case;
- 【文献出处】 北京理工大学学报 ,Transactions of Beijing Institute of Technology , 编辑部邮箱 ,2017年05期
- 【分类号】TP311.5
- 【被引频次】1
- 【下载频次】85