Published November 21, 2023 | Version v1
Presentation Open

Towards Automated Refactoring of Smelly Test Code

  • 1. ROR icon Federal University of Bahia

Description

Test Refactoring improves the internal aspects of the software test without modifying its external behavior. However, the test code quality, i.e., design and writing standards, is not commonly prioritized within the industry. Test smells are anti-patterns that can harm the software testing understanding and maintenance. Although academia has constantly explored issues related to test smells and test code quality, there are still opportunities to improve how developers handle test code refactoring. This study initially provides a systematic mapping of the literature, which analyzed 42 primary works about test refactoring. The majority of the studies presented generic refactorings suitable for both production and test code. Some anti-patterns had multiple refactoring strategies, while others lacked a clear strategy. Existing tools have not evolved significantly since their inception, and many refactoring strategies have yet to be evaluated. Also, we investigated the effect of refactoring on the co-occurrence of test smells and observed that restructuring the test code can relocate or remove multiple test smell instances together. In this context, this study seeks to contribute with guidelines for refactoring multiple test smells, providing the order in which the refactoring should be applied to reduce the changes in test code. Furthermore, we intend to automate these guidelines and evaluate them with practitioners. 

Files

wepgcomp23-railana-santana.pdf

Files (2.4 MB)

Name Size Download all
md5:20d6a9195d1b18187f4913dbdf144db4
2.4 MB Preview Download