A First Look at the Inheritance-Induced Redundant Test Execution
Open Access
- 12 April 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1-12
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.Keywords
This publication has 37 references indexed in Scilit:
- A snowballing literature study on test amplificationJournal of Systems and Software, 2019
- An Insight Into Test Case Optimization: Ideas and Trends With Future PerspectivesIEEE Access, 2019
- SPOON: A library for implementing analyses and transformations of Java source codeSoftware: Practice and Experience, 2015
- Coverage‐based regression test case selection, minimization and prioritization: a case study on an industrial systemSoftware Testing, Verification and Reliability, 2015
- Regression testing minimization, selection and prioritization: a surveySoftware Testing, Verification and Reliability, 2012
- Using complexity, coupling, and cohesion metrics as early indicators of vulnerabilitiesJournal of Systems Architecture, 2011
- Higher Order Mutation TestingInformation and Software Technology, 2009
- Class movement and re-location: An empirical study of Java inheritance evolutionJournal of Systems and Software, 2009
- A controlled experiment on inheritance depth as a cost factor for code maintenanceJournal of Systems and Software, 2003
- A metrics suite for object oriented designIEEE Transactions on Software Engineering, 1994