Skip to main content
QUICK REVIEW

[Paper Review] Automatic Creation of Acceptance Tests by Extracting Conditionals from Requirements: NLP Approach and Case Study

Jannik Fischbach, Julian Frattini|arXiv (Cornell University)|Feb 2, 2022
Software Engineering Techniques and PracticesComputer Science6 citations
TL;DR

This paper presents CiRA, a tool-supported NLP approach that automatically generates minimal acceptance test cases from conditional statements in informal natural language requirements. By extracting fine-grained cause-effect relationships and modeling them as Cause-Effect Graphs, CiRA achieves 71.8% automatic test case generation from manually created cases and identifies 80 previously missed test cases in a real-world case study with three industry partners.

ABSTRACT

Acceptance testing is crucial to determine whether a system fulfills end-user requirements. However, the creation of acceptance tests is a laborious task entailing two major challenges: (1) practitioners need to determine the right set of test cases that fully covers a requirement, and (2) they need to create test cases manually due to insufficient tool support. Existing approaches for automatically deriving test cases require semi-formal or even formal notations of requirements, though unrestricted natural language is prevalent in practice. In this paper, we present our tool-supported approach CiRA (Conditionals in Requirements Artifacts) capable of creating the minimal set of required test cases from conditional statements in informal requirements. We demonstrate the feasibility of CiRA in a case study with three industry partners. In our study, out of 578 manually created test cases, 71.8 % can be generated automatically. Additionally, CiRA discovered 80 relevant test cases that were missed in manual test case design. CiRA is publicly available at www.cira.bth.se/demo/.

Motivation & Objective

  • Address the challenge of labor-intensive, error-prone manual acceptance test case creation in software testing.
  • Overcome the lack of tool support for automatically deriving test cases from informal, unrestricted natural language requirements.
  • Develop an approach that generates the minimal set of required test cases while ensuring full requirement coverage.
  • Improve test design quality by identifying missing test cases overlooked in manual processes.

Proposed method

  • Apply NLP techniques to detect conditional statements in informal natural language requirements.
  • Extract fine-grained cause-effect relationships from conditionals using a sequence labeling approach with subword tokenization.
  • Model extracted relationships as a Cause-Effect Graph (CEG) to represent logical dependencies between conditions and outcomes.
  • Derive the minimal set of required test cases from the CEG using combinatorial test design principles.
  • Integrate the output with existing test automation tools (e.g., Selenium, Robot Framework) for execution.
  • Leverage transfer learning and subword embeddings to improve robustness to out-of-vocabulary words and grammatical variations.

Experimental results

Research questions

  • RQ1RQ1: How can conditional statements in natural language requirements be effectively extracted and their implied cause-effect relationships modeled in fine-grained form for test case derivation?
  • RQ2RQ2: Can the automated approach generate the same test cases as the manual design process?
  • RQ3RQ3: What are the root causes of discrepancies between manually created and automatically generated test cases?

Key findings

  • CiRA successfully generated 71.8% of the 578 manually created test cases in the case study, demonstrating strong alignment with manual test design.
  • The tool discovered 80 relevant test cases that were completely missed during manual test case design, highlighting its ability to improve test coverage.
  • The approach outperforms prior NLP-based methods by handling out-of-vocabulary words and grammatical variations through subword tokenization.
  • The use of sequence labeling instead of dependency parsing improved robustness and generalization on real-world, informal requirement texts.
  • The Cause-Effect Graph model effectively captures logical dependencies, enabling derivation of the minimal required test case set.
  • The tool is publicly available with source code, annotated datasets, and a live demo, supporting reproducibility and industrial adoption.

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.