PofoliaDaily literature tracker

ACM Transactions on Software Engineering and Methodology· 2026Q1

LLMCFG-TGen: Using LLM-Generated Control Flow Graphs to Automatically Create Test Cases from Use Cases

Zhenzhen Yang, Chenhui Cui, Tao Li, Rubing Huang et al.

Short summary

LLMCFG-TGen automatically generates test cases from natural language use cases by first creating a Control Flow Graph (CFG) using an LLM, then extracting execution paths from the CFG, and finally creating test cases from these paths.

AI-generated from the title and abstract; the full text is not read.

Key points

  • LLMCFG-TGen uses LLM-generated Control Flow Graphs (CFGs) to derive test cases from natural language use cases.
  • The process involves CFG generation, test-path extraction, and test-case creation.
  • LLMCFG-TGen effectively captures complex conditional logic and execution flows in requirements.
  • Evaluations show LLMCFG-TGen generates more comprehensive and logically coherent test cases than baseline approaches.
  • The approach reduces manual effort in test case generation.

AI-generated from the title and abstract; the full text is not read.

Abstract

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.

The authors' abstract, as published at the source. ACM Transactions on Software Engineering and Methodology, 2026 · DOI ↗

TakeawaysPremium Ask the paperFree account

Continue with a free account

Ask the paper: 5 free questions a day about this paper; save it, get its citation, new summaries every day for your field. Takeaways are Premium.

Continue free on the web

Sign in with Google or Apple; no card needed. You come back to this paper.

On your phone:

Field: Software

SoftwareComputer Science