A First Look at the Inheritance-Induced Redundant Test Execution
Dong Jae Kim, Jinqiu Yang, Tse-Hsun Chen
Abstract
Inheritance, a fundamental aspect of object-oriented design, has been leveraged to enhance code reuse and facilitate efficient software development. However, alongside its benefits, inheritance can introduce tight coupling and complex relationships between classes, posing challenges for software maintenance. Although there are many studies on inheritance in source code, there is limited study on using inheritance in test code. In this paper, we take the first step by studying inheritance in test code, with a focus on redundant test executions caused by inherited test cases. We empirically study the prevalence of test inheritance and its characteristics. We also propose a hybrid approach that combines static and dynamic analysis to identify and locate inheritance-induced redundant test cases. Our findings reveal that (1) inheritance is widely utilized in the test code, (2) inheritance-induced redundant test executions are prevalent, accounting for 13% of all execution test cases, (3) bypassing these redundancies can help reduce 14% of the test execution time, and finally, (4) our study highlights the need for careful refactoring decisions to minimize redundant test cases and identifies the need for further research on test code quality.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2f693fed-f080-4b64-a23d-6cc76ea7da80Builds on6
- Large Language Models are Few-shot Testers: Exploring LLM-based General Bug ReproductionSungmin Kang, Juyeon Yoon, Shin YooICSE 2023 · 163 citations
- ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolutionary SearchRongqi Pan, Taher Ahmed Ghaleb, Lionel C. BriandICSE 2023 · 22 citations
- Studying Test Annotation Maintenance in the WildDong Jae Kim, Nikolaos Tsantalis, Tse-Hsun Peter Chen, Jinqiu YangICSE 2021 · 20 citations
- An automatic refactoring framework for replacing test-production inheritance by mocking mechanismXiao Wang, Lu Xiao, Tingting Yu, Anne Woepse et al.FSE 2021 · 15 citations
- How disabled tests manifest in test maintainability challenges?Dong Jae Kim, Bo Yang, Jinqiu Yang, Tse-Hsun (Peter) ChenFSE 2021 · 9 citations
Related papers
- What's DAT Smell? Untangling and Weaving the Disjoint Assertion Tangle Test SmellMonil Narang, Hang Du, James A. JonesASE 2025
- Efficient Detection of Test Interference in C ProjectsFlorian Eder, Stefan WinterASE 2024 · 2 citations
- Identify and Update Test Cases When Production Code Changes: A Transformer-Based ApproachXing Hu, Zhuang Liu, Xin Xia, Zhongxin Liu et al.ASE 2023 · 15 citations
- Paired Code Smells and Test Smells: A Fine-Grained Longitudinal Empirical StudyZiwen CaiISSTA 2026
- To Share, or Not to Share: Exploring Test-Case Reusability in Fork EcosystemsMukelabai Mukelabai, Christoph Derks, Jacob Krüger, Thorsten BergerASE 2023 · 4 citations
