Injection testing backed refactoring
Thomas Mejstrik, Clara Hollomey

TL;DR
This paper introduces an injection-based testing pattern that facilitates refactoring by enabling testing without code compilation or structural assumptions, especially useful for scripting languages.
Contribution
It proposes a novel injection testing pattern and provides practical functions and examples for its application in refactoring scripting language code.
Findings
Effective for refactoring scripting languages
Reduces manual editing during code changes
Provides practical implementation guidance
Abstract
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Software Engineering Research · Software Reliability and Analysis Research
