Skip to main content
QUICK REVIEW

[Paper Review] A Tool for Test Case Scenarios Generation Using Large Language Models

Abdul Malik Sami, Zeeshan Rasheed|arXiv (Cornell University)|Jun 11, 2024
Software Testing and Debugging TechniquesComputer Science3 citations
TL;DR

This paper presents a web-based tool that leverages GPT-3.5 via prompt engineering and an LLM-based agent to automatically generate test case scenarios from prioritized user stories and requirements. The system produces structured, exportable CSV test suites in under 2 seconds per requirement, demonstrating high efficiency and accuracy in test scenario automation for software testing workflows.

ABSTRACT

Large Language Models (LLMs) are widely used in Software Engineering (SE) for various tasks, including generating code, designing and documenting software, adding code comments, reviewing code, and writing test scripts. However, creating test scripts or automating test cases demands test suite documentation that comprehensively covers functional requirements. Such documentation must enable thorough testing within a constrained scope and timeframe, particularly as requirements and user demands evolve. This article centers on generating user requirements as epics and high-level user stories and crafting test case scenarios based on these stories. It introduces a web-based software tool that employs an LLM-based agent and prompt engineering to automate the generation of test case scenarios against user requirements.

Motivation & Objective

  • To address the challenge of manually creating comprehensive test case scenarios from functional requirements and user stories in software testing.
  • To automate the generation of test case scenarios using Large Language Models (LLMs) to improve efficiency and coverage in software quality assurance.
  • To enable seamless integration of generated test cases with existing test management tools via CSV export functionality.
  • To evaluate the performance, accuracy, and limitations of LLM-based test scenario generation in real-world software engineering workflows.

Proposed method

  • The tool ingests prioritized user stories and requirements in JSON format as input for test case generation.
  • An LLM-based agent, powered by OpenAI’s GPT-3.5, processes each requirement using carefully engineered prompts to generate detailed test case scenarios.
  • The system applies prompt engineering and hyperparameter tuning (e.g., temperature) to improve output consistency and reduce hallucinations.
  • Generated test cases are parsed using regular expressions and validated through iterative testing to ensure alignment with expected behavior.
  • Test case suites are exported in CSV format for direct import into tools like JIRA, Azure DevOps, and RE management platforms.
  • Content analysis and performance evaluation are conducted on LLM outputs to assess accuracy and completeness.

Experimental results

Research questions

  • RQ1How can large language models be effectively applied to generate test case scenarios from user stories and functional requirements?
  • RQ2What are the key challenges and limitations in using LLMs for test suite generation, particularly regarding hallucination and accuracy?
  • RQ3How efficient and accurate is the automated generation of test case scenarios using LLMs in a real-world software testing context?
  • RQ4What improvements can be made to enhance the reliability and scalability of LLM-based test scenario generation?

Key findings

  • The tool generates test case scenarios for each prioritized user requirement in an average of 2 seconds, demonstrating high-speed automation.
  • The system successfully produces contextually relevant test cases that align with specified requirements, including edge cases and constraint-based scenarios.
  • Content analysis confirms that the LLM-generated outputs match expected behaviors across multiple test scenarios, including complex constraints like GDPR compliance.
  • The use of prompt engineering and hyperparameter tuning significantly improves output consistency and reduces hallucination risks.
  • The CSV export functionality enables seamless integration with mainstream test management tools such as JIRA and Azure DevOps.
  • Despite strong performance, challenges remain, including LLM hallucinations, high API costs, and the need for automated content validation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.