论文标题
注射测试支持的重构
Injection testing backed refactoring
论文作者
论文摘要
基于注射的测试在重构时是一种模式,可最大程度地减少在改变代码库的行为时手动编辑的需求。它也不依赖于编译或链接过程,也不依赖于代码结构的假设。因此,它对于用脚本语言编写的重构代码特别有用,并特别针对研究和工程环境。我们描述了模式,并为其应用提出了一组功能。通过特定示例,用于衍生单元和集成测试,强调了代码注入用于重构的适用性。最后,我们对模式的自定义进行评论,并为其实施提供实用建议。
Injection-based testing while refactoring is a pattern that minimizes the need for manual editing when altering the behaviour of a code base. Neither does it rely on a compilation or a linking process nor does it make assumptions on the structure of the code. Thus, it can be particularly useful for refactoring code that has been written in scripting languages, and specifically targets the research and engineering context. We describe the pattern and propose a set of functions for its application. The applicability of code injection for refactoring is highlighted via specific examples for deriving unit and integration tests. Finally, we comment on the customizing of the pattern and give practical advice for its implementation.