An empirical study into the relationship between class features and test smells
Amjed Tahir, Steve Counsell, Stephen G. MacDonell

TL;DR
This study investigates how properties of production classes, such as complexity metrics, relate to the presence of test smells in associated unit tests across five open source systems, revealing key predictors for test smell occurrence.
Contribution
It provides empirical evidence linking production class complexity metrics to test smell presence, highlighting predictors for improving test code quality.
Findings
Cyclomatic Complexity and WMC are strong indicators of test smells.
LCOM correlates with the presence of test smells.
Certain metrics predict specific test smells like Eager Test and Duplicated Code.
Abstract
While a substantial body of prior research has investigated the form and nature of production code, comparatively little attention has examined characteristics of test code, and, in particular, test smells in that code. In this paper, we explore the relationship between production code properties (at the class level) and a set of test smells, in five open source systems. Specifically, we examine whether complexity properties of a production class can be used as predictors of the presence of test smells in the associated unit test. Our results, derived from the analysis of 975 production class-unit test pairs, show that the Cyclomatic Complexity (CC) and Weighted Methods per Class (WMC) of production classes are strong indicators of the presence of smells in their associated unit tests. The Lack of Cohesion of Methods in a production class (LCOM) also appears to be a good indicator of…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Open Source Software Innovations
