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.
- Daka, Ermira; Fraser, Gordon. A Survey on Unit Testing Practices and Problems. 2014 IEEE 25th International Symposium on Software Reliability Engineering.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 Scholar
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- Wohlin, C.; Runeson, P.; Host, M.; Ohlsson, M. C.; Regnell, B.; Wesslen. A. Experimentation in software engineering. Springer Science & Business Media, 2012Google ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarCross Ref
Index Terms
- Behavior-based test smells refactoring: toward an automatic approach to refactoring eager test and lazy test smells
Recommendations
Analyzing Test Smells Refactoring from a Developers Perspective
SBQS '22: Proceedings of the XXI Brazilian Symposium on Software QualityTest smells represent a set of poorly designed tests, which can harm a test code’s maintenance and quality criteria. Although fundamental steps to understand test smells have been investigated, there is still an evident lack of studies evaluating the ...
Refactoring Test Smells: A Perspective from Open-Source Developers
SAST '20: Proceedings of the 5th Brazilian Symposium on Systematic and Automated Software TestingTest smells are symptoms in the test code that indicate possible design or implementation problems. Their presence, along with their harmfulness, has already been demonstrated by previous researches. However, we do not know to what extent developers ...
Test behaviour detection as a test refactoring safety
IWoR 2018: Proceedings of the 2nd International Workshop on RefactoringWhen refactoring production code, software developers rely on an automated test suite as a safeguard. However, when refactoring the test suite itself, there is no such safeguard. Therefore, there is a need for tool support that can verify if a ...
Comments