arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2501.14465cs.SE
收藏

使用大语言模型提示工程的边界值测试输入生成:故障检测与覆盖率分析

Boundary Value Test Input Generation Using Prompt Engineering with LLMs: Fault Detection and Coverage Analysis

Xiujing Guo, Chen Li, Tatsuhiro Tsuchiya

AI总结:

本文提出框架,通过提示工程评估大语言模型生成边界值测试输入的有效性,比较故障检测率与覆盖率,揭示其优势与挑战。

摘要:

随着软件系统变得越来越复杂,自动化测试对于确保可靠性和性能已变得至关重要。传统的边界值测试输入生成方法可能耗时,并且难以有效处理所有潜在的错误情况,尤其是在边界复杂或高度可变的系统中。本文提出了一个框架,通过提示工程来评估大语言模型(LLMs)在白盒软件测试中生成边界值测试输入的潜力。具体来说,我们通过分析故障检测率和测试覆盖率来评估基于LLM的测试输入生成的有效性,并将这些LLM生成的测试集与使用传统边界值分析方法生成的测试集进行比较。我们的分析展示了LLMs在边界值生成中的优势和局限性,特别是在检测常见的边界相关问题方面。然而,它们在某些领域仍面临挑战,尤其是在处理复杂或不太常见的测试输入时。这项研究提供了关于LLMs在边界值测试中作用的见解,强调了它们在自动化测试方法中的潜力以及需要改进的领域。

英文摘要:

As software systems grow more complex, automated testing has become essential to ensuring reliability and performance. Traditional methods for boundary value test input generation can be time-consuming and may struggle to address all potential error cases effectively, especially in systems with intricate or highly variable boundaries. This paper presents a framework for assessing the effectiveness of large language models (LLMs) in generating boundary value test inputs for white-box software testing by examining their potential through prompt engineering. Specifically, we evaluate the effectiveness of LLM-based test input generation by analyzing fault detection rates and test coverage, comparing these LLM-generated test sets with those produced using traditional boundary value analysis methods. Our analysis shows the strengths and limitations of LLMs in boundary value generation, particularly in detecting common boundary-related issues. However, they still face challenges in certain areas, especially when handling complex or less common test inputs. This research provides insights into the role of LLMs in boundary value testing, underscoring both their potential and areas for improvement in automated testing methods.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑