Just like any other code, test code contains large amounts of duplicate code, also known as code clones. For test code, we can use specific techniques to reduce the number of code clones contained in test suites. In this thesis we present PyTeRor, an automated refactoring tool which refactors pytest test suites by combining Type 2 code clones using parametrization. We evaluate the performance of PyTeRor on nine open-source Python repositories. Our results demonstrate that the refactoring was generally successful, with clones being removed from each repository’s test suite, though there is large variation in the number of clones removed.
Git repository: https://github.com/semaki2000/PyTeRor
(DOI: https://doi.org/10.5281/zenodo.11145543)
Thesis: PDF (DOI coming soon)
Date of defense: 2024-06-14, 14:00, "Procyon" (IFI)
External examiner: Melina Mongiovi (UFCG, Brazil)
Supervisor: Volker Stolz