Handling Test Smells in Python: Results from a Mixed-Method Study
Resumo
Software testing is an activity in the software development process that looks for defects. Automated testing is composed of code that allows run software testing scenarios more quickly, avoiding manual rework. However, testers are likely to employ practices that might negatively impact test quality regarding maintainability, understandability, and effectiveness when writing test code. Such bad practices are also known as test smells. Although test smells are a language-independent concept, different programming languages could present different occurrence standards. Therefore, studies in one programming language may not be generalizable. This study aims to investigate how test smells occurrence in Python test files. Python became the most widely used programming language globally in 2020. However, most research on test code quality only considers the Java language. To accomplish our goals, we built a dataset with 5,303 test files from 90 Python projects collected from GitHub repositories to understand and analyze strategies for handling test smells in Python. This analysis allowed us to propose four new test smells, discussing their potential problems. We carried out a preliminary evaluation with 40 Python developers to validate their thoughts on the proposed test smells. These results are part of an ongoing research project aiming to propose a foundation to better support automation tests in Python.
Publicado
29/09/2021
Como Citar
FERNANDES, Daniel; MACHADO, Ivan; MACIEL, Rita.
Handling Test Smells in Python: Results from a Mixed-Method Study. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 35. , 2021, Joinville.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2021
.