Please use this identifier to cite or link to this item: https://doi.org/10.21256/zhaw-25672
Publication type: Article in scientific journal
Type of review: Peer review (publication)
Title: Test smells 20 years later : detectability, validity, and reliability
Authors: Panichella, Annibale
Panichella, Sebastiano
Fraser, Gordon
Sawant, Anand
Hellendoorn, Vincent
et. al: No
DOI: 10.21256/zhaw-25672
Published in: Empirical Software Engineering
Issue Date: 2022
Publisher / Ed. Institution: Springer
ISSN: 1382-3256
1573-7616
Language: English
Subjects: Test generation; Test smell; Software quality
Subject (DDC): 005: Computer programming, programs and data
Abstract: Test smells aim to capture design issues in test code that reduces its maintainability. These have been extensively studied and generally found quite prevalent in both human-written and automatically generated test-cases. However, most evidence of prevalence is based on specific static detection rules. Although those are based on the original, conceptual definitions of the various test smells, recent empirical studies indicate that developers perceive warnings raised by detection tools as overly strict and non-representative of the maintainability and quality of test suites. This leads us to re-assess test smell detection tools’ detection accuracy and investigate the prevalence and detectability of test smells more broadly. Specifically, we construct a hand-annotated dataset spanning hundreds of test suites both written by developers and generated by two test generation tools (EvoSuite and JTExpert) and performed a multistage, cross-validated manual analysis to identify the presence of six types of test smells in these. We then use this manual labeling to benchmark the performance and external validity of two test smell detection tools – one widely used in prior work and one recently introduced with the express goal to match developer perceptions of test smells. Our results primarily show that the current vocabulary of test smells is highly mismatched to real concerns: multiple smells were ubiquitous on developer-written tests but virtually never correlated with semantic or maintainability flaws; machine-generated tests actually often scored better, but in reality, suffered from a host of problems not wellcaptured by current test smells. Current test smell detection strategies poorly characterized the issues in these automatically generated test suites; in particular, the older tool’s detection strategies misclassified over 70% of test smells, both missing real instances (false negatives) and marking many smell-free tests as smelly (false positives). We identify common patterns in these tests that can be used to improve the tools, refine and update the definition of certain test smells, and highlight as of yet uncharacterized issues. Our findings suggest the need for (i) more appropriate metrics to match development practice, (ii) more accurate detection strategies to be evaluated primarily in industrial contexts.
Further description: Erworben im Rahmen der Schweizer Nationallizenzen (http://www.nationallizenzen.ch)
URI: https://digitalcollection.zhaw.ch/handle/11475/25672
Related research data: https://zenodo.org/record/3337892#.XswWby-w3yU
Fulltext version: Submitted version
License (according to publishing contract): Licence according to publishing contract
Departement: School of Engineering
Organisational Unit: Institute of Applied Information Technology (InIT)
Published as part of the ZHAW project: COSMOS – DevOps for Complex Cyber-physical Systems of Systems
Appears in collections:Publikationen School of Engineering

Files in This Item:
File Description SizeFormat 
2022_Panichella-etal_Test-smells-20-years-later_EMSE.pdfSubmitted Version420.55 kBAdobe PDFThumbnail
View/Open


Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.