使用检索增强型大语言模型从自然语言需求生成测试场景:一项工业研究
Generating Test Scenarios from NL Requirements using Retrieval-Augmented LLMs: An Industrial Study
AI总结:
本文提出 RAGTAG,将 RAG 与 LLM 结合,从工业双语自然语言需求中自动生成测试场景,并通过专家访谈验证其相关性、覆盖度、正确性、连贯性与可行性。
摘要:
测试场景是测试用例的具体实例,描述用于验证特定软件功能的操作。通过概述软件运行的条件和预期结果,测试场景确保软件功能以集成方式得到测试。测试场景对于在各种条件(包括边缘情况)下系统地测试应用程序至关重要,可识别潜在问题并保证整体性能与可靠性。明确测试场景十分繁琐,需要深入理解软件功能及底层领域,还要求本就受时间和预算限制的需求工程师与测试团队投入大量精力和资源。本文提出一种自动化方法 RAGTAG,利用大语言模型(LLM)的检索增强生成(RAG)技术生成测试场景。RAG 允许将特定领域知识与 LLM 的生成能力相结合。我们在奥地利邮政两个具有德语和英语双语需求的工业项目上评估了 RAGTAG。我们对四名专家进行访谈调查,从相关性、覆盖度、正确性、连贯性和可行性五个维度获得的结果,证实了 RAGTAG 在自动化测试场景生成方面的潜力。具体而言,结果表明,尽管分析双语需求任务困难,RAGTAG 仍能生成与底层需求高度一致的场景,并覆盖预期功能的不同方面。生成的场景易于专家理解,且可在项目环境中用于测试。总体正确性被认为令人满意;然而,在捕捉精确操作序列和领域细微差别方面仍存在差距,这凸显了应用 LLM 时领域专业知识的必要性。
英文摘要:
Test scenarios are specific instances of test cases that describe actions to validate a particular software functionality. By outlining the conditions under which the software operates and the expected outcomes, test scenarios ensure that the software functionality is tested in an integrated manner. Test scenarios are crucial for systematically testing an application under various conditions, including edge cases, to identify potential issues and guarantee overall performance and reliability. Specifying test scenarios is tedious and requires a deep understanding of software functionality and the underlying domain. It further demands substantial effort and investment from already time- and budget-constrained requirements engineers and testing teams. This paper presents an automated approach (RAGTAG) for test scenario generation using Retrieval-Augmented Generation (RAG) with Large Language Models (LLMs). RAG allows the integration of specific domain knowledge with LLMs' generation capabilities. We evaluate RAGTAG on two industrial projects from Austrian Post with bilingual requirements in German and English. Our results from an interview survey conducted with four experts on five dimensions -- relevance, coverage, correctness, coherence and feasibility, affirm the potential of RAGTAG in automating test scenario generation. Specifically, our results indicate that, despite the difficult task of analyzing bilingual requirements, RAGTAG is able to produce scenarios that are well-aligned with the underlying requirements and provide coverage of different aspects of the intended functionality. The generated scenarios are easily understandable to experts and feasible for testing in the project environment. The overall correctness is deemed satisfactory; however, gaps in capturing exact action sequences and domain nuances remain, underscoring the need for domain expertise when applying LLMs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。