Test code refactoring: from developers' perspectives to automated solutions

Nome do aluno Railana Santana Lago
Título do trabalho Test code refactoring: from developers' perspectives to automated solutions
Resumo do trabalho Test refactoring aims to improve the internal structure of test code without altering its external behavior. However, the quality of test code, regarding design practices and writing standards, is rarely prioritized in the software industry. Test smells are anti-patterns that can hinder the comprehensibility, maintainability, and overall reliability of software tests. Although prior research has investigated the relationship between test smells and test code quality, there remain significant gaps in understanding how developers approach and perform test code refactoring in practice. In this context, this research has two main goals: (1) to investigate the state of the art on test code refactoring, and (2) to understand how refactorings involving multiple test smells occur in software projects. Based on the insights gained, we aim to propose guidelines and tools to support and automate test code refactoring. To achieve these goals, we first conducted a systematic mapping study that analyzed 42 primary studies on test refactoring. The analysis revealed that most studies propose generic refactorings applicable to both production and test code. Some anti-patterns present multiple refactoring strategies, whereas others lack well-defined approaches. Regarding tool support, we observed that existing tools are predominantly academic and rarely evolve after publication, compromising their sustainability. Moreover, refactoring strategies are often weakly evaluated from an empirical perspective. We also investigated the effect of refactoring on the co-occurrence of test smells and found that test code restructuring can relocate or remove multiple instances of test smells at once. These findings provide an opportunity to propose guidelines for multi-test smell refactoring, including recommendations on the order in which refactorings should be applied to minimize the amount of prescribed code changes. As a future step, we plan to automate these guidelines and evaluate them with software industry professionals.
Orientador Ivan do Carmo Machado
Membro externo 1 (com afiliação) Érica Ferreira de Souza (UTFPR)
Link para o curriculum lattes http://lattes.cnpq.br/8904855809524041
Membro interno 1 (com afiliação) Carla Ilane Moreira Bezerra (UFC)
Link para o curriculum lattes http://lattes.cnpq.br/4277471687235814
Suplente do membro externo (com afiliação) Heitor Augustus Xavier Costa (UFLA)
Link para o curriculum lattes http://lattes.cnpq.br/1320324289662918
Suplente do membro interno (com afiliação) Baldoino Fonseca dos Santos Neto (UFAL)
Link para o curriculum lattes http://lattes.cnpq.br/0306751604362704
Data do exame 17 Dec, 2025
Horário do exame 2:00 PM

 

Data da Defesa: 
17/12/2025 - 14:00
Tipo de Defesa: 
Qualificação de Doutorado