CATSPY: um catálogo de test smells para Python - Meneses, Marayah Sabelle Carvalho (2025)
This work presents CATSPY, a catalog of test smells specifically designed for Python, developed to address the lack of studies focused on this language in the context of test smells. The catalog was created through the analysis of existing catalogs, detection tools, and academic literature, adapting test smells from other languages. Software test quality is a crucial factor for the reliability and maintainability of systems, and the presence of test smells can significantly compromise the effectiveness of automated tests. However, most research and tools aimed at detecting and correcting test smells focus on statically typed languages such as Java, leaving gaps for dynamically typed languages like Python. Given this scenario, this work proposes CATSPY, a catalog developed through the analysis of existing catalogs, detection tools, and academic literature, adapting test smells from other languages. Additionally, this research introduces two new test smells never before documented in the literature: Over-Patching and Mocking Native Functions, based on recurring practices observed in the community. To validate CATSPY, three steps were conducted: comparison with existing catalogs, severity ranking of test smells, and practical validation by experts. The comparison highlighted that the catalog offers unique features such as diverse examples, detailed refactorings, internationalization, and filtering by category, severity, and detectors. The structured classification process labeled the 40 test smells into high, medium, and low severity, ensuring a well-founded categorization. Finally, the practical validation demonstrated a high level of acceptance of the catalog, reinforcing its applicability in improving the quality of Python tests. The results of this research emphasize CATSPY as a tool for developers and testers, promoting cleaner, more maintainable, and reliable test code.