TEMPY: Test Smell Detector for Python

  • Daniel Fernandes UFBA
  • Ivan Machado UFBA
  • Rita Maciel UFBA


Automated software testing is a process in software development that aims to extend software quality through test code. Thus, we can avoid manual and repetitive rework and have fast test runs. When writing test code, testers may execute bad practices, known as test smells, which are coding patterns that can negatively impact test quality in terms of maintainability, understandability, and defect detection effectiveness. Python became the most widely used programming language in the world in 2020, however, most research on test code quality is conducted for the Java language. In a previous work, we analyze occurrences of test smells in Python, so we developed TEMPY, an open-source test smells detection tool for Python, which detects 10 types of test smells, 5 of them not yet present in other Python detection tools. TEMPY achieved 100% accuracy on validation with our oracle. We evaluated TEMPY through interviews with 10 Python developers, obtaining 99% agreement on the detections pointed out by TEMPY. We hope TEMPY can support Python developers to improve test code quality, thereby supporting software testing activities. Tool Demonstration: https://youtu.be/NxuQOJmQnKA

Palavras-chave: Test Smells, Automated Software Testing, Test Code Quality, Python
Como Citar

Selecione um Formato
FERNANDES, Daniel; MACHADO, Ivan; MACIEL, Rita. TEMPY: Test Smell Detector for Python. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 36. , 2022, Uberlândia. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2022 . p. 214–219.