Skip to main content
QUICK REVIEW

[論文レビュー] Automatic Generation of Acceptance Test Cases from Use Case Specifications: an NLP-based Approach

Chunhui Wang, Fabrizio Pastore|arXiv (Cornell University)|Jul 19, 2019
Software Engineering Research参考文献 102被引用数 12
ひとこと要約

本稿では、自然言語での使用ケース仕様とドメインモデルを用いて、意味役割ラベリングと制約マイニングを活用して実行可能でシステムレベルの受入テストケースを自動生成するNLPベースの手法UMTGを提示する。2つの産業界での事例研究において、UMTGは使用ケース手順を形式的制約に変換する際に95%の正確性を達成し、以前に見過ごされていた重要なテストシナリオを特定した。

ABSTRACT

Acceptance testing is a validation activity performed to ensure the conformance of software systems with respect to their functional requirements. In safety critical systems, it plays a crucial role since it is enforced by software standards. Test engineers need to identify all the representative test execution scenarios from requirements, determine the runtime conditions that trigger these scenarios, and finally provide the input data that satisfy these conditions. Given that requirements specifications are typically large and often provided in natural language, the generation of acceptance test cases tends to be expensive and error-prone. In this paper, we present UMTG, an approach that supports the generation of executable, system-level, acceptance test cases from requirements specifications in natural language, with the goal of reducing the manual effort required to generate test cases and ensuring requirements coverage. More specifically, UMTG automates the generation of acceptance test cases based on use case specifications and a domain model for the system under test, which are commonly produced in many development environments. Unlike existing approaches, it does not impose strong restrictions on the expressiveness of use case specifications. We rely on recent advances in natural language processing to automatically identify test scenarios and to generate formal constraints that capture conditions triggering the execution of the scenarios, thus enabling the generation of test data. In two industrial case studies, UMTG automatically and correctly translated 95% of the use case specification steps into formal constraints required for test data generation; furthermore, it generated test cases that exercise not only all the test scenarios manually implemented by experts, but also some critical scenarios not previously considered.

研究の動機と目的

  • 安全で重要なシステムの受入テストにおける手作業の負荷を低減し、カバレッジを向上させるために、自然言語要件からテストケース生成を自動化すること。
  • 制御された自然言語、形式的モデル、または多数の手作業モデリングを必要とする従来のアプローチの限界を是正すること。
  • 追加の動作モデリングを必要とせず、使用ケース仕様やクラス図といった既存の開発アーティファクトを活用して、実行可能なテストケースを自動生成すること。
  • 自然言語手順から形式的制約をマイニングすることで、テストカバレッジのトレーサビリティと完全性を保証すること。

提案手法

  • テストシナリオの特定のため、使用ケース手順の分析と述語-目的構造の抽出に意味役割ラベリング(SRL)を用いる。
  • 自然言語の条件を形式的制約に変換するため、制約マイニング技術を適用してテストデータ生成を支援する。
  • 実行パス(ループや分岐を含む)を表す有向グラフとして、使用ケーステストモデル(UCTM)を構築する。
  • テストシナリオ生成中にサブタイプおよび条件カバレッジを最大化するために、カバレッジ駆動型のアルゴリズムを採用する。
  • 形式化された制約に基づいて実行可能なテスト入力を生成するために、Alloy制約ソルバを統合する。
  • 使用ケース要素の意味的解釈の検証と拡張に、ドメインモデル(クラス図)を用いる。

実験結果

リサーチクエスチョン

  • RQ1NLP技術を用いて、自然言語使用ケース仕様から実行可能なテストシナリオを効果的に抽出できるか?
  • RQ2自然言語要件から形式的制約を自動的に導出できる程度はどの程度か? これはテストデータ生成を支援する。
  • RQ3制御された自然言語や追加モデリングを必要としない本手法が、包括的なテストカバレッジを達成するのにどの程度有効か?
  • RQ4産業界の現場において、手作業でのテスト設計で見過ごされていた重要なテストシナリオを、本手法が特定できるか?

主な発見

  • 2つの産業界の事例研究において、UMTGは使用ケース仕様の手順の95%を、テストデータ生成に必要な形式的制約に成功して変換した。
  • 本手法は、専門家が手作業で実装したすべてのシナリオをカバーするテストケースを生成したほか、以前に見過ごされていた重要なシナリオも特定した。
  • 理論的な最悪計算量がO(N³)であるものの、実際の使用ケースでは条件手順とリーフの数が少なかったため、実用的な性能が達成された。
  • ループを引き起こす条件手順の数は、平均で全手順の18%にとどまり、リーフはたった8%に留まった。このため、計算コストの増加は最小限に抑えられた。
  • 生成された最大のUCTMは154ノードを有しており、理論的な複雑性が高くても実用的なシステムは管理可能であることを示している。
  • 本手法は実産業界システム(BodySenseおよびHOD)において実現可能であることを示した。NLPベースのテスト生成が産業現場において実用的であることが裏付けられた。

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。