Answers are grounded in this paper and cite their sources.
Appropriate test-case generation is critical in software testing and significantly impacts testing quality. Requirements-Based Test Generation (RBTG) derives test cases from software requirements to verify whether or not the system's behavior aligns with user needs and expectations. Requirements are often documented in Natural Language (NL), with use-case descriptions being a popular method for capturing functional behaviors and interaction flows in a structured, readable form. Recently, Large Language Models (LLMs) have shown strong potential for automating test generation directly from NL requirements (including use-case descriptions). However, current LLM-based approaches may not provide comprehensive, non-redundant coverage. They may also fail to capture complex conditional logic in requirements, resulting in incomplete test cases. To address these limitations, we propose a new end-to-end approach that automatically generates test cases from NL use-case descriptions, called Test Generation based on LLM-generated Control Flow Graphs (LLMCFG-TGen). LLMCFG-TGen comprises the following three main steps: (1) CFG Generation: An LLM transforms a use case into a structured, JSON-based Control Flow Graph (CFG) that encapsulates all potential branches; (2) Test-Path Extraction: The generated CFG is traversed to extract a finite set of execution paths; and (3) Test-Case Creation: Finally, the execution paths are used to generate the test cases. To evaluate the proposed approach, we conducted experiments on six use-case datasets covering diverse application domains. The results show that LLMs can effectively construct well-structured CFGs from NL use cases. Compared with two baseline approaches, LLMCFG-TGen generates more complete and structurally consistent test cases by more effectively capturing requirement behaviors and execution flows. Both LLM-based and practitioner-based evaluations further confirm that LLMCFG-TGen produces more comprehensive and logically coherent test cases while reducing manual effort. The findings suggest that combining LLM-based semantic reasoning with structured modeling effectively bridges the gap between NL requirements and systematic test generation.
No takes yet. Share an insight, caveat, or question.
A 2026 study studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: