Investigating the Readability of Test Code: Combining Scientific and Practical Views
<|reference_start|>Investigating the Readability of Test Code: Combining Scientific and Practical Views: The readability of source code is key for understanding and maintaining software systems and tests. Several studies investigate the readability of source code, but there is limited research on the readability of test code and related influence factors. We investigate the factors that influence the readability of test code from an academic perspective complemented by practical views. First, we perform a Systematic Mapping Study (SMS) with a focus on scientific literature. Second, we extend this study by reviewing grey literature sources for practical aspects on test code readability and understandability. Finally, we conduct a controlled experiment on the readability of a selected set of test cases to collect additional knowledge on influence factors discussed in practice. The result set of the SMS includes 19 primary studies from the scientific literature. The grey literature search reveals 62 sources for information on test code readability. Based on an analysis of these sources, we identified a combined set of 14 factors that influence the readability of test code. 7 of these factors were found in scientific and grey literature, while some factors were mainly discussed in academia (2) or industry (5) with limited overlap. The controlled experiment on practically relevant influence factors showed that the investigated factors have a significant impact on readability for half of the selected test cases. Our review of scientific and grey literature showed that test code readability is of interest for academia and industry with a consensus on key influence factors. However, we also found factors only discussed by practitioners. For some of these factors we were able to confirm an impact on readability in a first experiment. Therefore, we see the need to bring together academic and industry viewpoints to achieve a common view on the readability of software test code.<|reference_end|>
@article{winkler2024investigating,
    title={Investigating the Readability of Test Code: Combining Scientific and
  Practical Views},
    author={Dietmar Winkler, Pirmin Urbanke, Rudolf Ramler},
    journal={Empir Software Eng 29, 53 (2024)},
    year={2024},
    doi={10.1007/s10664-023-10390-z},
    archivePrefix={arXiv},
    eprint={2403.16639},
    primaryClass={cs.SE}
}