Skip to main content
QUICK REVIEW

[Paper Review] Automated User Story Generation with Test Case Specification Using Large Language Model

Tajmilur Rahman, Yuecai Zhu|arXiv (Cornell University)|Apr 2, 2024
Persona Design and ApplicationsComputer Science6 citations
TL;DR

The paper presents GeneUS, a tool that uses GPT-4 and Refine and Thought (RaT) prompting to automatically generate user stories and test cases from requirements documents, outputting JSON for downstream integration. It also validates quality via a RUST survey with practitioners.

ABSTRACT

Modern Software Engineering era is moving fast with the assistance of artificial intelligence (AI), especially Large Language Models (LLM). Researchers have already started automating many parts of the software development workflow. Requirements Engineering (RE) is a crucial phase that begins the software development cycle through multiple discussions on a proposed scope of work documented in different forms. RE phase ends with a list of user-stories for each unit task identified through discussions and usually these are created and tracked on a project management tool such as Jira, AzurDev etc. In this research we developed a tool "GeneUS" using GPT-4.0 to automatically create user stories from requirements document which is the outcome of the RE phase. The output is provided in JSON format leaving the possibilities open for downstream integration to the popular project management tools. Analyzing requirements documents takes significant effort and multiple meetings with stakeholders. We believe, automating this process will certainly reduce additional load off the software engineers, and increase the productivity since they will be able to utilize their time on other prioritized tasks.

Motivation & Objective

  • Reduce the effort in transforming requirements into actionable user stories and test cases in Agile environments.
  • Automate the RE phase outputs to support downstream integration with project management tools.
  • Develop and validate a prompting technique (RaT) to improve LLM performance on long, complex requirements texts.
  • Demonstrate the feasibility and acceptance of auto-generated user stories among software engineering professionals.

Proposed method

  • Prompt engineering to extract functional and non-functional requirements from requirements documents.
  • Refine and Thought (RaT) prompting, a two-step refinement and thought process, as a variant of Chain-of-Thought to reduce meaningless tokens and improve consistency.
  • A three-stage RaT prompting chain to generate user stories, deliverables, and test cases from extracted requirements.
  • An automated REST API to test the GeneUS workflow.
  • Evaluation with seven RE documents and a 50-person developer survey using the RUST questionnaire.
  • Output in JSON format to facilitate integration with Jira, Azure DevOps, and other tools.

Experimental results

Research questions

  • RQ1RQ1: Can RaT prompting improve LLM-generated user stories and test specifications from requirements documents?
  • RQ2RQ2: Are the automatically generated user stories and test cases acceptable to software engineering professionals across diverse backgrounds?

Key findings

  • RaT prompting improves consistency and reduces hallucinations compared to non-RaT prompts.
  • GeneUS outputs detailed user stories with a defined 'Done', functional/non-functional constraints, and test specifications in JSON.
  • In a survey of 50 developers, the generated stories were rated as Good (4/5) overall, with room for improvement in Specifiability and Technical Aspects.
  • Process tested on seven RE documents showed high acceptance by SE professionals, with median RUST scores around 4.
  • The study reports 5% missing technical details, 1% ambiguous task descriptions, and 0.5% duplicates in the generated outputs.

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.