Test Smell: A Parasitic Energy Consumer in Software Testing

📅 2023-10-23
🏛️ arXiv.org
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the underexplored relationship between test code quality and energy consumption in software testing, identifying “test smells” as a critical yet overlooked driver of excessive energy use. Method: Employing a mixed-methods approach, we conducted static analysis and empirical energy measurements across Apache projects, complemented by surveys and interviews with 62 professional developers. Contribution/Results: We provide the first empirical evidence that test smells significantly increase testing energy consumption—by an average of 10.92%, with certain types exhibiting markedly higher overhead. Targeted refactoring of these smells demonstrably reduces energy usage. The study identifies high-energy-consumption smell patterns and reveals a widespread lack of green testing awareness among practitioners. These findings establish the first empirically grounded foundation for energy-aware testing practices and offer actionable guidelines for green software engineering, bridging a critical gap in sustainable software development at the testing phase.
📝 Abstract
Traditionally, energy efficiency research has focused on reducing energy consumption at the hardware level and, more recently, in the design and coding phases of the software development life cycle. However, software testing's impact on energy consumption did not receive attention from the research community. Specifically, how test code design quality and test smell (e.g., sub-optimal design and bad practices in test code) impact energy consumption has not been investigated yet. This study examined 12 Apache projects to analyze the association between test smell and its effects on energy consumption in software testing. We conducted a mixed-method empirical analysis from two dimensions; software (data mining in Apache projects) and developers' views (a survey of 62 software practitioners). Our findings show that: 1) test smell is associated with energy consumption in software testing. Specifically smelly part of a test case consumes 10.92% more energy compared to the non-smelly part. 2) certain test smells are more energy-hungry than others, 3) refactored test cases tend to consume less energy than their smelly counterparts, and 4) most developers lack knowledge about test smells' impact on energy consumption. We conclude the paper with several observations that can direct future research and developments.
Problem

Research questions and friction points this paper is trying to address.

Software Testing
Energy Consumption
Code Quality
Innovation

Methods, ideas, or system contributions that make the work stand out.

Energy Consumption
Test Code Quality
Software Testing Optimization
🔎 Similar Papers
No similar papers found.
Md Rakib Hossain Misu
Md Rakib Hossain Misu
Phd Student at University of California Irvine (UCI)
Software EngineeringProgramming Language
J
Jiawei Li
University of California, Irvine, Irvine, CA, USA
A
A. Bhattiprolu
University of California, Irvine, Irvine, CA, USA
Y
Yang Liu
University of California, Irvine, Irvine, CA, USA
E
E. Almeida
Federal University of Bahia, Salvador, Bahia, Brazil
Iftekhar Ahmed
Iftekhar Ahmed
Associate Professor, University of California, Irvine
Software EngineeringSoftware TestingMachine Learning