Research on using Large Language Models (LLMs) in system development is expanding, especially in automated code and test generation. While E2E testing is vital for ensuring application quality, most test generation research has focused on unit tests, with limited work on E2E test code. This study proposes a method for automatically generating E2E test code from product documentation such as manuals, FAQs, and tutorials using LLMs with tailored prompts. The two step process interprets documentation intent and produces executable test code. Experiments on a web app with six key features (e.g., authentication, profile, discussion) showed that tests generated from product documentation had high compilation success and functional coverage, outperforming those based on requirement specs and user stories. These findings highlight the potential of product documentation to improve E2E test quality and, by extension, software quality.
翻译:在系统开发中运用大型语言模型(LLMs)的研究正在扩展,特别是在自动化代码和测试生成领域。虽然端到端测试对于确保应用程序质量至关重要,但大多数测试生成研究都集中在单元测试上,针对端到端测试代码的研究有限。本研究提出了一种方法,利用经过定制提示的大型语言模型,从产品文档(如手册、常见问题解答和教程)中自动生成端到端测试代码。该过程分为两步:解读文档意图并生成可执行的测试代码。在一个包含六个关键功能(例如身份验证、个人资料、讨论)的Web应用程序上进行的实验表明,基于产品文档生成的测试具有较高的编译成功率和功能覆盖率,其表现优于基于需求规格和用户故事生成的测试。这些发现凸显了产品文档在提升端到端测试质量乃至软件质量方面的潜力。