Sustainability Analysis of Prompt Strategies for SLM-based Automated Test Generation
Pragati Kumari, Novarun Deb

TL;DR
This study systematically evaluates how different prompt engineering strategies affect the environmental sustainability and effectiveness of automated test generation using Small Language Models, highlighting trade-offs between test quality and resource consumption.
Contribution
First comprehensive analysis of prompt engineering's impact on sustainability in SLM-based automated testing, considering multiple environmental and performance metrics.
Findings
Prompt strategies significantly influence sustainability outcomes independently of model choice.
Reasoning strategies like Chain of Thought improve coverage but increase resource consumption.
Simpler strategies like Zero-Shot offer a good balance of coverage and environmental impact.
Abstract
The growing adoption of prompt-based automation in software testing raises important issues regarding its computational and environmental sustainability. Existing sustainability studies in AI-driven testing primarily focus on large language models, leaving the impact of prompt engineering strategies largely unexplored - particularly in the context of Small Language Models (SLMs). This gap is critical, as prompt design directly influences inference behavior, execution cost, and resource utilization, even when model size is fixed. To the best of our knowledge, this paper presents the first systematic sustainability evaluation of prompt engineering strategies for automated test generation using SLMs. We analyze seven prompt strategies across three open-source SLMs under a controlled experimental setup. Our evaluation jointly considers execution time, token usage, energy consumption, carbon…
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.
