betaFeedback

WorksComputer Science

Specializing LLM Agents for Natural Language GUI Test Execution

Abstract

Executing natural language (NL) test cases directly on graphical user interfaces (GUIs) with large language model (LLM) agents can reduce the cost of developing and maintaining test scripts. However, existing approaches use relatively general-purpose agent architectures, limiting their ability to exploit differences between LLMs across testing capabilities. We address this limitation with a five-agent framework that decomposes GUI test execution into specialized agents and enables capability-specific LLM assignment based on measured performance for each task. To obtain reliable capability measurements, we introduce verified interaction with context replacement, which detects silent interaction failures and prevents corrupted GUI states from propagating to subsequent evaluations. Experiments with 11 locally deployable LLMs reveal substantial performance differences across capabilities, which supports the need for optimizing the agent assignement.

Introduction and Preliminaries

GUI acceptance testing verifies whether applications satisfy expected user requirements. Conventional approaches implement these tests as executable scripts tied to implementation-specific GUI details, such as element locators, making them costly to develop and maintain. Natural language (NL) test cases provide an easier and a more user-oriented alternative, but reliably executing them on GUIs with large language models (LLMs) remains challenging.

Recent work Salva and Taguelmimt [1] addresses these challenges through a three-agent framework that separates NL test execution into three capabilities: navigation, readiness checking (whether the GUI is ready to perform the action), and assertion evaluation. Although this separation improves control over the execution process, it treats these capabilities relatively broadly and uses the same LLM across the different agents. In

particular, navigation involves different types of GUI interactions, such as click and fill, for which both execution and readiness requirements can differ substantially. Moreover, LLMs may exhibit different capabilities across these tasks, making a single-model configuration potentially suboptimal for a heterogeneous testing pipeline.

In this paper, we develop and present a five-agent architecture, with dedicated agents for each task. This decomposition enables the performance of LLMs to be measured separately for each capability and, consequently, allows different LLMs to be assigned to different agents according to their measured performance. Such capability-specific assignment requires reliable evaluation: a silent navigation error can corrupt the GUI context and propagate to subsequent agent decisions, making measured performance dependent not only on the evaluated capability but also on upstream execution failures.

To address this issue, we introduce *verified navigation with context replacement. Each navigation step is checked against a trusted execution, and when an error is detected, the corrupted GUI context is replaced before subsequent evaluation continues. This prevents navigation failures from contaminating measurements of downstream capabilities.

Capability-Specialized Multi-Agent Framework

We introduce a five-agent architecture that decomposes navigation and readiness according to the type of the GUI action. The resulting framework consists of five specialized agents:

  • Navigation agents (agentcnavagent_{cnav} and agentfnavagent_{fnav}) handle click and fill actions, respectively. Given an action aia_i and the current GUI gi−1g_{i-1}, they produce the GUI operations required to execute the action and return the resulting state gig_i. In this work, we consider only these two navigation action types. The architecture can be extended to additional action types by introducing corresponding specialized agents.

  • Readiness agents (agentcreadagent_{cread} and agentfreadagent_{fread}) determine whether the GUI is ready for a click or fill action, respectively, using an LLM.

  • Assertion agent (agentassertagent_{assert}) evaluates an assertion AjA_j on the resulting GUI state using an LLM.

This decomposition enables LLM performance to be measured independently for each capability. For each LLM mm and capability cc, we estimate the performance and consistency from repeated executions, producing a capability profile that can guide the configuration of the multi-agent system. Rather than requiring a single LLM to perform all testing tasks, our framework allows potentially different LLMs to be selected for the five capabilities based on their measured performance. The assignment can also take into account practical constraints such as model size, inference cost, and available computational resources. This enables the framework to support heterogeneous LLM configurations adapted to the requirements and resources of a given testing environment.

Verified Navigation and Reliable Capability Evaluation

Capability-specific evaluation is only meaningful if failures in one capability do not contaminate the evaluation of subsequent capabilities. This is particularly important for navigation. When executing an NL action, a navigation agent may perform the correct operation, explicitly report a failure, or silently reach an incorrect GUI state while reporting success. In the last case, subsequent agents operate on an incorrect context, and their decisions may be incorrectly classified. Hence, a navigation failure can propagate through the remainder of a test case and falsify the measured performance of readiness and assertion capabilities.

We address this problem with verified navigation with context replacement. For each navigation action, the evaluated navigation agent and a trusted reference agent (an LLM-as-a-judge) independently execute the same action from the same initial GUI state, producing states geg_e and gtg_t, respectively. We compare these states using a GUI equivalence predicate E(ge,gt)\mathcal{E}(g_e,g_t) based on state information (see Figure 1). If the states are equivalent (i.e., E(ge,gt)\mathcal{E}(g_e,g_t) holds), the execution continues using the evaluated state. Otherwise, the navigation step is considered faulty and the evaluated agent context is replaced by the trusted agent state:

Illustration of a verified navigation with context replacement

Figure 1. Illustration of a verified navigation with context replacement for reliable capability evaluation.

gnext={geif E(ge,gt),gtotherwise.g_{\mathrm{next}} = \begin{cases} g_e & \text{if } \mathcal{E}(g_e,g_t),\\ g_t & \text{otherwise.} \end{cases}

Rather than terminating after detecting an incorrect navigation step, context replacement allows the remaining test actions to be evaluated under a valid GUI context. This is important for our goal: we seek to isolate downstream capability measurements from upstream navigation failures and allow the performance of each agent to be evaluated independently.

Experimental Evaluation

We evaluate the proposed framework using 11 locally deployable LLMs ranging from 3B to 27B parameters, all supporting tool calling, which is required for GUI interaction. LLM inference is performed locally using Ollama on a server equipped with an NVIDIA L40 GPU with 48 GB of memory. We conduct 2 experiments to evaluate the capability performances and the impact of the proposed navigation evaluation.

For the first experiment, each LLM is evaluated independently on each capability through repeated executions of the corresponding agent. This allows us to estimate both its mean success rate and consistency, producing a capability profile for each LLM. Figure 2 shows substantial performance differences across LLMs and capabilities. In particular, performance varies not only between models but also between click and fill operations for the same model. For example, Mistral-nemo 12B, which is a small and fast model, achieves a 100% success rate on readiness and fill navigation but is less effective on the other capabilities. This suggests assigning it to the former agents and selecting stronger LLMs, based on the measured profiles. Future work could investigate evaluating different coalitions of agents end to end.

Six-panel comparison of LLM capabilities

Figure 2. Top figures: comparison of LLM performance on the 5 capabilities. Bottom figures: comparison of LLM agent capabilities with (left bars) and without (right bars) verified navigation. Mean accuracies are averaged over 20 runs.

The second experiment quantifies how far capability measurements obtained without verification diverge from those obtained with verified navigation. We use the three-agent configuration and compare repeated evaluations with and without verified navigation. For the trusted agent, we use Llama3.3 70B, which is larger the the evaluated models and the highest performing LLM given in Salva and Taguelmimt [1]. Figure 2 shows that measurements without verification deviate from verified ones by up to 44% (see navigation with Qwen2.5 3B). This indicates that silent navigation failures can significantly affect the evaluations and that context replacement provides a more stable basis for comparing LLM capabilities. Additional results are given in the appendix.

References

  1. [1]Salva, S. and Taguelmint, R. (2026). On the soundness and consistency of LLM agents for executing test cases written in natural language. In ENASE 2026, pages 1007–1018.arxiv.org/abs/2509.19136

Paper details

vlnc:W_ddr5xza8
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC0-1.0
Usage

views · 4

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents