Automated Software Test Case Generation Using Directional Partially Weighted Ensemble Large Language Models With Retrieval-Augmented Generation (RAG)

Read full text
Authors: Wantana Sisomboon, Jakkrit Kaewyotha, Wararat Songpan
Cited by: 3
References: 27

Abstract

Ensuring software quality relies on testing practices that can reliably confirm whether delivered systems meet user requirements. While Acceptance Test-Driven Development (ATDD) encourages early collaboration between stakeholders and developers, creating comprehensive acceptance test cases remains a human task that heavily depends on domain expertise. Recent progress in Large Language Models (LLMs) has made automated test case generation feasible. However, approaches based on a single model often suffer from performance instability, uneven test coverage, and a limited ability to generalize across heterogeneous requirements. This study proposes an automated test case generation framework that combines directional partially weighted ensemble large language models (LLMs) with Retrieval-Augmented Generation (RAG). The framework assigns model influence dynamically according to directional performance trends and degrees of partial correctness and consolidates candidate outputs through a weighted majority-voting mechanism and cross-validation conducted over multiple folds. Five state-of-the-art LLMs, Claude, ChatGPT, Gemini, Qwen, and Mistral, were evaluated using 16 criteria derived from four widely adopted black box testing techniques: Boundary Value Analysis, Equivalence Partitioning, Use Case testing, and State Transition testing. Under the evaluated experimental conditions, the proposed framework achieved 100% test coverage, indicating complete consistency with the defined gold-standard acceptance criteria. Cross-validation results further demonstrate improved robustness, stronger generalization to previously unseen requirements, and linear scalability, supporting practical deployment in real-world software development environments, and complexity analysis to confirm linear throughout growth (O(n)), which supports efficient deployment under increasing workloads.

Fields of Study & Subjects

Software Testing and Debugging Techniques Machine Learning and Algorithms Software Reliability and Analysis Research

Publication details

Journal / source
IEEE Access
Publisher
Institute of Electrical and Electronics Engineers (IEEE)
Volume
14
Pages
31124–31145
Publication date
1 January 2026