arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2509.19136cs.SEcs.AI
收藏

关于LLM智能体执行自然语言编写测试用例的可靠性与一致性研究

On the Soundness and Consistency of LLM Agents for Executing Test Cases Written in Natural Language

LIMOS - UMR CNRS 6158, Clermont Auvergne University, UCA, Aubière, France(克莱蒙特奥弗涅大学);Department of Computing, Main University, MySecondTown, MyCountry(计算机系,主大学)

Sébastien Salva, Redha Taguelmimt

AI总结:

针对自然语言测试用例执行的不可靠与不一致问题,提出带护栏机制的执行算法与专用验证智能体,定义相关评估指标与弱不可靠性概念,实验验证大模型在GUI测试中的潜力与局限。

摘要:

使用自然语言(NL)测试用例验证图形用户界面(GUI)应用,正逐渐成为替代人工编写可执行测试脚本的潜力方向——后者开发成本高且维护难度大。大语言模型(LLM)的最新进展,让LLM智能体直接执行NL测试用例成为可能。本文围绕这一方向展开研究,重点关注NL测试用例的不可靠性问题,以及测试用例执行的一致性情况。NL测试用例本身存在固有不可靠性:由于指令模糊或智能体行为不可预测,可能产生误报的失败结果。此外,同一NL测试用例的重复执行可能导致结果不一致,削弱测试可靠性。为应对这些挑战,我们提出了一种带护栏机制的NL测试用例执行算法,以及可动态验证每个测试步骤正确执行的专用智能体。我们提出了评估LLM测试执行能力的多项指标,以及一项量化执行一致性的指标。我们还提出了弱不可靠性的定义,用于界定相对于工业质量水平六西格玛(Six Sigma)而言,NL测试用例执行结果仍可接受的场景。我们使用8个参数规模从3B到70B不等的公开可用LLM开展实验评估,揭示了当前LLM智能体用于GUI测试的潜力与现存局限。实验结果显示,Meta Llama 3.1 70B在NL测试用例执行中表现出可接受的能力,且执行一致性较高(高于3-sigma水平)。我们提供了原型工具、测试套件与实验结果。

英文摘要:

The use of natural language (NL) test cases for validating graphical user interface (GUI) applications is emerging as a promising direction to manually written executable test scripts, which are costly to develop and difficult to maintain. Recent advances in large language models (LLMs) have opened the possibility of the direct execution of NL test cases by LLM agents. This paper investigates this direction, focusing on the impact on NL test case unsoundness and on test case execution consistency. NL test cases are inherently unsound, as they may yield false failures due to ambiguous instructions or unpredictable agent behaviour. Furthermore, repeated executions of the same NL test case may lead to inconsistent outcomes, undermining test reliability. To address these challenges, we propose an algorithm for executing NL test cases with guardrail mechanisms and specialised agents that dynamically verify the correct execution of each test step. We introduce measures to evaluate the capabilities of LLMs in test execution and one measure to quantify execution consistency. We propose a definition of weak unsoundness to characterise contexts in which NL test case execution remains acceptable, with respect to the industrial quality levels Six Sigma. Our experimental evaluation with eight publicly available LLMs, ranging from 3B to 70B parameters, demonstrates both the potential and current limitations of current LLM agents for GUI testing. Our experiments show that Meta Llama 3.1 70B demonstrates acceptable capabilities in NL test case execution with high execution consistency (above the level 3-sigma). We provide prototype tools, test suites, and results.

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

↑