Boundary Value Test Input Generation Using Prompt Engineering with LLMs: Fault Detection and Coverage Analysis
Xiujing Guo, Chen Li, Tatsuhiro Tsuchiya
TL;DR
The paper addresses boundary value test input generation for white-box software testing and proposes a framework that leverages prompt-engineered LLMs to generate boundary-focused inputs. It systematically compares LLM-generated inputs against traditional methods (Random Testing, MLBVA) and concolic testing (Klee), using fault-detection rates and code-coverage metrics derived from Gcov across eight programs. Findings show that LLMs can match or exceed baseline performance in some cases, with a notable positive correlation between branch coverage and fault detection ($R^2$) for boundary-focused inputs, though gains are not universal and increasing input counts yields diminishing returns. The work suggests practical guidance for prompt design and hybrid strategies that combine LLM-based generation with established techniques to advance automated boundary value testing.
Abstract
As software systems grow more complex, automated testing has become essential to ensuring reliability and performance. Traditional methods for boundary value test input generation can be time-consuming and may struggle to address all potential error cases effectively, especially in systems with intricate or highly variable boundaries. This paper presents a framework for assessing the effectiveness of large language models (LLMs) in generating boundary value test inputs for white-box software testing by examining their potential through prompt engineering. Specifically, we evaluate the effectiveness of LLM-based test input generation by analyzing fault detection rates and test coverage, comparing these LLM-generated test sets with those produced using traditional boundary value analysis methods. Our analysis shows the strengths and limitations of LLMs in boundary value generation, particularly in detecting common boundary-related issues. However, they still face challenges in certain areas, especially when handling complex or less common test inputs. This research provides insights into the role of LLMs in boundary value testing, underscoring both their potential and areas for improvement in automated testing methods.
