基于注入测试的重构
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。