Abstract
Software testing is essential to ensure the reliability of software. To that end, test suites are often executed repeatedly, due to frequent developer validation runs, and practices like continuous integration. This repeated execution leads to substantial energy consumption and thus potential environmental impact. In this paper, we conduct an exploratory study to examine whether current Large Language Models (LLMs) are capable of reengineering unit tests to improve their energy efficiency while maintaining test effectiveness. Our results indicate that, using a straightforward prompt, only a small subset of unit tests shows improved energy efficiency, with negligible impact on test effectiveness. Subsequently, we scrutinize our results for potential reasons for the relatively low number of energy-reengineered unit tests. We observe that energy efficiency related information is scarce on prominent platforms like StackOverflow and GitHub. This scarcity of information potentially affects how LLMs can be trained on the topic of energy efficiency.
| Original language | English |
|---|---|
| Title of host publication | FSE Companion 2026 - Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering |
| Editors | Shin Hwei Tan, Foutse Khomh |
| Place of Publication | New York, NY |
| Publisher | Association for Computing Machinery (ACM) |
| Pages | 1529-1538 |
| Number of pages | 10 |
| ISBN (Electronic) | 9798400726361 |
| DOIs | |
| Publication status | Published - 2026 |
| Event | ACM International Conference on the Foundations of Software Engineering, FSE 2026 - Montreal, Canada Duration: 5 Jul 2026 → 9 Jul 2026 |
Conference
| Conference | ACM International Conference on the Foundations of Software Engineering, FSE 2026 |
|---|---|
| Country/Territory | Canada |
| City | Montreal |
| Period | 5/07/26 → 9/07/26 |
UN SDGs
This output contributes to the following UN Sustainable Development Goals (SDGs)
-
SDG 7 Affordable and Clean Energy
Keywords
- energy measurement
- green testing
- sustainable software engineering
Fingerprint
Dive into the research topics of 'Can LLMs Make Software Testing Greener? An Empirical Study on JUnit Test Energy Reengineering'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver