< Back to previous page

Publication

Test code

Book - Dissertation

Subtitle:a new frontier in code cloning research
As software has become ever important in our lives, all that code needs to be of a high quality. A common way to achieve this is via software testing, where additional "test code" is written with the sole purpose of finding mistakes in the original code, or "production code". As test code has the large responsibility of ensuring qualitative software, it is critical that the test code itself is of high quality as well. However, while the quality of test code is often synonymous with its ability to find bugs, it is equally important to ensure readability and maintainability of test code to allow agile teams working incrementally to update, extend, and maintain the test code each iteration. The presence of code duplication, or "code clones", can affect the readability and maintainability of code. While code clones have already been extensively researched in production code, research on test code duplication is limited. And yet, duplicate tests are a common occurrence, as the quickest way for a developer to test a new feature is to copy, paste, and modify an existing test. In this thesis, we address this gap in the literature by answering two research questions. First, we investigate whether the structure of test code can be exploited to detect semantic code clones. Second, we investigate whether test code duplication should be considered independently of production code duplication. In the end, we show that test code is a rich source for studying clones and that further investigation is warranted.
Number of pages: 104
Publication year:2023
Keywords:Doctoral thesis
Accessibility:Open