skip to main content
10.1145/3510454.3517059acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Behavior-based test smells refactoring: toward an automatic approach to refactoring eager test and lazy test smells

Published:19 October 2022Publication History

ABSTRACT

Software testing is an essential part of the development process, and like many software artifacts, tests are affected by smells, harming comprehension and maintainability. Several studies are related to test smell identification, but few studies are related to refactoring. Most proposed approaches are semi-automated, with the developer as a safety net. This paper presents a proposal for automatic refactoring of Eager Test and Lazy Test smells based on identifying the behavior of tests and, consequently, the behavior of the System Under Test (SUT). The approach will be evaluated with private source code repositories to identify its impact on quality attributes.

References

  1. Daka, Ermira; Fraser, Gordon. A Survey on Unit Testing Practices and Problems. 2014 IEEE 25th International Symposium on Software Reliability Engineering.Google ScholarGoogle Scholar
  2. Yamashita, Aiko. Assessing the capability of code smells to explain maintenance problems: an empirical study combining quantitative and qualitative data. Empirical Software Engineering (2014). Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Sousa, Leonardo da Silva. 2016. Spotting design problems with smell agglomerations. In Proceedings of the 38th International Conference on Software Engineering Companion (ICSE '16). Association for Computing Machinery, New York, NY, USA, 863--866. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Khomh, Foutse; Vaucher, Stephane; Guéhéneuc, Yann-Gaël; Sahraoui, Houari. BDTEX: A GQM-based Bayesian approach for the detection of antipatterns, Journal of Systems and Software, 2011 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Cortellessa, Vittorio; Di Marco, Antinisca; Trubiani, Catia. An approach for modeling and detecting software performance antipatterns based on first-order logics. Software and Systems Modelling (2014). Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Khan, Y.A., El-Attar, M. Using model transformation to refactor use case models based on antipatterns. Information Systems Frontiers 18, 171--204 (2016). Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Sharma, Tushar; Fragkoulis, Marios; Spinellis, Diomidis. 2016. Does your configuration code smell? In Proceedings of the 13th International Conference on Mining Software Repositories (MSR 16). Association for Computing Machinery, New York, NY, USA, 189--200. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Arnaoudova, Venera; Di Penta, Massimiliano; Antonio, Giuliano; Gueheneuc, Yann-Gael. 2013. A New Family of Software Anti-patterns: Linguistic Anti-patterns. In Proceedings of the 2013 17th European Conference on Software Maintenance and Reengineering (CSMR '13). IEEE Computer Society, USA, 187--196. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Jaafar, Fehmi; Gueheneuc, Yann-Gael; Hamel, Sylvie; Khomh, Foutse. Mining the relationship between anti-patterns dependencies and fault-proneness. In: 2013 20th Working Conference on Reverse Engineering (WCRE), Koblenz, Germany, 2013 pp. 351--360. Google ScholarGoogle ScholarCross RefCross Ref
  10. Bavota, Gabriele; Qusef, Abdallah; Oliveto, Rocco; De Lucia, Andrea; Binkley, David. An empirical analysis of the distribution of unit test smells and their impact on software maintenance. 2012 28th IEEE International Conference on Software Maintenance (ICSM), 2012, pp. 56--65 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Spadini, Davide; Palomba, Fabio; Zaidman, Andy; Bruntink, Magiel; Bacchelli, Alberto. On the Relation of Test Smells to Software Code Quality. 2018 IEEE International Conference on Software Maintenance and Evolution (ICSME), 2018, pp. 1--12 Google ScholarGoogle ScholarCross RefCross Ref
  12. Spadini, Davide; Schvarcbacher, Martin; Oprescu, Ana-Maria; Bruntink, Magiel; Bacchelli, Alberto. 2020. Investigating Severity Thresholds for Test Smells. In 17th International Conference on Mining Software Repositories (MSR '20), October 5--6, 2020, Seoul, Republic of Korea. ACM, New York, NY, USA, 11 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Abad, Zahra Shakeri Hossein; Karimpour, Reza; HO, Jason; Didar-Al-Alam, S.M.; Ruhe, Guenther; TSE, Edward; Barabash, Kevin; Hargreaves, Ian. Understanding the Impact of Technical Debt in Coding and Testing: An Exploratory Case Study. 2016 3rd International Workshop on Software Engineering Research and Industrial Practice.Google ScholarGoogle Scholar
  14. Campos, Denivan; Rocha, Larissa; Machado, Ivan. Developers' perception on the severity of test smells: an empirical study. 2021. In: XXIV Ibero-American Congress on Software Engineering (Virtual Event)Google ScholarGoogle Scholar
  15. Aljedaani, Wajdi; Peruma, Anthony; Aljohani, Ahmed; Alotaibi, Mazen; Mkaouer, Mohamed Wiem; Ouni, Ali; Newman, Christian D.; Ghallab, Abdullatif; Ludi, Stephanie. 2021. Test Smell Detection Tools: A Systematic Mapping Study. In Evaluation and Assessment in Software Engineering (EASE 2021) June 21--23, 2021, Trondheim, Norway. ACM, New York, NY, USA, 11 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. van Bladel, Brent; Demeyer, Serge. 2018. Test behaviour detection as a test refactoring safety. In Proceedings of the 2nd International Workshop on Refactoring (IWoR 2018). Association for Computing Machinery, New York, NY, USA, 22--25. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Bleser, Jonas; Di Nucci, Dario; Roover, Coen. Assessing Diffusion and Perception of Test Smells in Scala Projects. 2019 IEEE/ACM 16th International Conference on Mining Software Repositories (MSR).Google ScholarGoogle Scholar
  18. Alomar, Eman Abdullah; Peruma, Anthony; Mkaouer, Mohamed Wiem; Newman, Christian; Ouni, Ali; Kessentini, Marouane. How we refactor and how we document it? On the use of supervised machine learning algorithms to classify refactoring documentation. Expert Systems with Applications, volume 167, 2021 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Lambiase, Stefano; Cupito, Andrea; Pecorelli, Fabiano; De Lucia, Andrea; Palomba, Fabio. 2020. Just-In-Time Test Smell Detection and Refactoring: The DARTS Project. In Proceedings of the 28th International Conference on Program Comprehension (ICPC '20). Association for Computing Machinery, New York, NY, USA, 441--445. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Palomba, Fabio; Zaidman, Andy; De Lucia, Andrea. Automatic Test Smell Detection Using Information Retrieval Techniques. 2018. IEEE International Conference on Software Maintenance and Evolution (ICSME), 2018, pp. 311--322 Google ScholarGoogle ScholarCross RefCross Ref
  21. Dragan, Natalia; Collard, Michael L.; Maletic, Jonathan I. Reverse Engineering Method Stereotypes. 2006 22nd IEEE International Conference on Software Maintenance, 2006, pp. 24--34 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Wohlin, C.; Runeson, P.; Host, M.; Ohlsson, M. C.; Regnell, B.; Wesslen. A. Experimentation in software engineering. Springer Science & Business Media, 2012Google ScholarGoogle ScholarCross RefCross Ref
  23. Buse, Raymond P.L.; Weimer, Westley R. 2008. A metric for software readability. In Proceedings of the 2008 international symposium on Software testing and analysis (ISSTA '08). Association for Computing Machinery, New York, NY, USA, 121--130. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Posnett, Daryl; Hindle, Abram; Devanbu, Premkumar. 2011. A simpler model of software readability. In Proceedings of the 8th Working Conference on Mining Software Repositories (MSR '11). Association for Computing Machinery, New York, NY, USA, 73--82. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Kaur, A. A Systematic Literature Review on Empirical Analysis of the Relationship Between Code Smells and Software Quality Attributes. Arch Computat Methods Eng 27, 1267--1296 (2020). Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Behavior-based test smells refactoring: toward an automatic approach to refactoring eager test and lazy test smells
        Index terms have been assigned to the content through auto-classification.

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          ICSE '22: Proceedings of the ACM/IEEE 44th International Conference on Software Engineering: Companion Proceedings
          May 2022
          394 pages
          ISBN:9781450392235
          DOI:10.1145/3510454

          Copyright © 2022 ACM

          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 the author(s) 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: 19 October 2022

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          Overall Acceptance Rate276of1,856submissions,15%

          Upcoming Conference

          ICSE 2025
        • Article Metrics

          • Downloads (Last 12 months)52
          • Downloads (Last 6 weeks)3

          Other Metrics

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader