skip to main content
10.1145/3555228.3555280acmotherconferencesArticle/Chapter ViewAbstractPublication PagessbesConference Proceedingsconference-collections
research-article

TEMPY: Test Smell Detector for Python

Published: 05 October 2022 Publication History

Abstract

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

References

[1]
Wajdi Aljedaani, Anthony Peruma, Ahmed Aljohani, Mazen Alotaibi, Mohamed Wiem Mkaouer, Ali Ouni, Christian Newman, Abdullatif Ghallab, and Stephanie Ludi. 2021. Test Smell Detection Tools: A Systematic Mapping Study. In International Conference of East-Asian Association for Science Education (EASE). Cornell University, Shizuoka, Japan.
[2]
Gabriele Bavota, Abdallah Qusef, Rocco Oliveto, Andrea Lucia, and Dave Binkley. 2015. Are Test Smells Really Harmful? An Empirical Study. Empirical Software Engineering 20, 4 (2015), 1052–1094.
[3]
Jonas De Bleser, Dario Di Nucci, and Coen De Roover. 2019. Assessing diffusion and perception of test smells in scala projects. In 16th International Conference on Mining Software Repositories (MSR). IEEE, Montreal, QC, Canada, 457–467.
[4]
Arie Van Deursen, Leon Moonen, Alex Van Den Bergh, and Gerard Kok. 2001. Refactoring test code. In 2nd international conference on extreme programming and flexible processes in software engineering (XP2001). CWI (Centre for Mathematics and Computer Science), NLD, 92–95.
[5]
Daniel Fernandes, Ivan Machado, and Rita Maciel. 2021. Handling Test Smells in Python: Results from a Mixed-Method Study. Association for Computing Machinery, New York, NY, USA, 84–89.
[6]
Vahid Garousi and Barış KUÇUK. 2018. Smells in software test code: A survey of knowledge in industry and academia. Journal of Systems and Software 138 (2018), 52 – 81.
[7]
Anthony Peruma, Khalid Almalki, Christian D. Newman, Mohamed Wiem Mkaouer, Ali Ouni, and Fabio Palomba. 2019. On the Distribution of Test Smells in Open Source Android Applications: An Exploratory Study. In Proceedings of the 29th Annual International Conference on Computer Science and Software Engineering(CASCON ’19). IBM Corp., USA, 193–202.
[8]
A. Qusef, M. O. Elish, and D. Binkley. 2019. An Exploratory Study of the Relationship Between Software Test Smells and Fault-Proneness. IEEE Access 7(2019), 139526–139536.
[9]
Davide Spadini, Fabio Palomba, A. Zaidman, M. Bruntink, and A. Bacchelli. 2018. On the Relation of Test Smells to Software Code Quality. In International Conference on Software Maintenance and Evolution (ICSME). IEEE, Madrid, Spain, 1–12.
[10]
Davide Spadini, Martin Schvarcbacher, Ana-Maria Oprescu, Magiel Bruntink, and Alberto Bacchelli. 2020. Investigating Severity Thresholds for Test Smells. In Proceedings of the 17th International Conference on Mining Software Repositories(MSR). ACM, New York, USA, 311–321.
[11]
Suresh Thummalapenta, Saurabh Sinha, Nimit Singhania, and Satish Chandra. 2012. Automating test automation. In 34th International Conference on Software Engineering (ICSE). IEEE, Zurich, Switzerland, 881–891.
[12]
Tongjie Wang, Yaroslav Golubev, Oleg Smirnov, Jiawei Li, Timofey Bryksin, and Iftekhar Ahmed. 2021. PyNose: A Test Smell Detector For Python. In 36th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, Melbourne, Australia, 593–605. https://doi.org/10.1109/ASE51524.2021.9678615

Cited By

View all
  • (2024)How Aware Are We of Test Smells in Quantum Software Systems? A Preliminary Empirical EvaluationProceedings of the XXIII Brazilian Symposium on Software Quality10.1145/3701625.3701676(383-393)Online publication date: 5-Nov-2024
  • (2024)A Road to Find Them All: Towards an Agnostic Strategy for Test Smell DetectionProceedings of the XXIII Brazilian Symposium on Software Quality10.1145/3701625.3701662(231-241)Online publication date: 5-Nov-2024
  • (2024)Software Development Practices and Tools for University-Industry R&D projectsProceedings of the XXIII Brazilian Symposium on Software Quality10.1145/3701625.3701627(426-437)Online publication date: 5-Nov-2024
  • Show More Cited By

Index Terms

  1. TEMPY: Test Smell Detector for Python
      Index terms have been assigned to the content through auto-classification.

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Other conferences
      SBES '22: Proceedings of the XXXVI Brazilian Symposium on Software Engineering
      October 2022
      457 pages
      ISBN:9781450397353
      DOI:10.1145/3555228
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 05 October 2022

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. Automated Software Testing
      2. Python
      3. Test Code Quality
      4. Test Smells

      Qualifiers

      • Research-article
      • Research
      • Refereed limited

      Funding Sources

      • CNPq
      • FAPESB

      Conference

      SBES 2022
      SBES 2022: XXXVI Brazilian Symposium on Software Engineering
      October 5 - 7, 2022
      Virtual Event, Brazil

      Acceptance Rates

      Overall Acceptance Rate 147 of 427 submissions, 34%

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)36
      • Downloads (Last 6 weeks)1
      Reflects downloads up to 15 Feb 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)How Aware Are We of Test Smells in Quantum Software Systems? A Preliminary Empirical EvaluationProceedings of the XXIII Brazilian Symposium on Software Quality10.1145/3701625.3701676(383-393)Online publication date: 5-Nov-2024
      • (2024)A Road to Find Them All: Towards an Agnostic Strategy for Test Smell DetectionProceedings of the XXIII Brazilian Symposium on Software Quality10.1145/3701625.3701662(231-241)Online publication date: 5-Nov-2024
      • (2024)Software Development Practices and Tools for University-Industry R&D projectsProceedings of the XXIII Brazilian Symposium on Software Quality10.1145/3701625.3701627(426-437)Online publication date: 5-Nov-2024
      • (2024)The Lost World: Characterizing and Detecting Undiscovered Test SmellsACM Transactions on Software Engineering and Methodology10.1145/363197333:3(1-32)Online publication date: 15-Mar-2024
      • (2024)Enhancing Code Smell Detection Performance in Python Programming Language : A Comparative Study2024 IEEE 2nd International Conference on Electrical Engineering, Computer and Information Technology (ICEECIT)10.1109/ICEECIT63698.2024.10859904(354-359)Online publication date: 22-Nov-2024

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      HTML Format

      View this article in HTML Format.

      HTML Format

      Figures

      Tables

      Media

      Share

      Share

      Share this Publication link

      Share on social media