Abstract
Automated Web GUI Testing (AWGT) faces a persistent "breadth vs. depth" dilemma: traditional tools explore widely but lack semantic understanding, while LLM-based approaches possess reasoning capabilities but struggle with scale and cost. We introduce Temac (TEsting using Multi-Agent Collaboration), a framework that bridges this gap. Temac utilizes a three-phase approach: initial exploration via reinforcement learning, knowledge-base construction using multimodal LLMs, and task execution through specialized Navigator and Executor agents. Our evaluation demonstrates that Temac significantly outperforms state-of-the-art methods, increasing average code coverage from 12.5% to 60.3% and identifying 445 unique faults in top-tier real-world applications.
Introduction: The Breadth-Depth Dilemma
Modern web applications are increasingly complex, requiring automated testing tools to navigate intricate UIs and execute multi-step workflows. Traditional methods, such as random traversal or reinforcement learning (RL), excel at breadth—quickly visiting numerous pages—but are "semantically blind." They often fail at tasks requiring context, such as completing a multi-page registration form.
Conversely, Large Language Model (LLM) based agents offer the semantic intelligence needed for depth. However, these models are often slow, expensive, and prone to hallucinations when faced with the raw complexity of modern HTML. Temac addresses these challenges by combining the efficiency of traditional tools with the reasoning power of a multi-agent LLM system.
The Temac Framework
Temac operates in three distinct phases to maximize both exploration efficiency and task-specific depth.
1. Exploration (Breadth)
The process begins with a lightweight, RL-based tool (WebRLED) that "scouts" the application for a set duration. This phase builds a State Transition Graph (STG) and collects essential data, including screenshots, HTML structures, and initial code coverage reports. This phase provides the raw material for the subsequent "intelligent" phases.
2. Knowledge-Base Construction (Context)
To prevent the LLM from becoming overwhelmed by raw data, Temac transforms the exploration results into a structured knowledge base:
- Summarizer Agent: A multimodal LLM converts screenshots and STG data into concise natural-language descriptions of the application's features.
- Reviser Agent: This agent analyzes existing code coverage to identify untested functionalities, generating a prioritized list of "Future Testing Tasks."
3. Task Execution (Depth)
Temac employs specialized agents to execute the complex tasks identified by the Reviser:
- Navigator: Uses the STG as a map to find the optimal path to the "key state" required for a task.
- Executor: Decoupled into a Planner (high-level logic) and an Actor (UI interaction). This separation allows the system to use specialized models for precise component localization while the LLM focuses on task strategy.
For example, a task might involve navigating to a specific administrative sub-menu to manage departments. While a random crawler might never find this path, Temac's Navigator uses the previously built STG to reach the target state efficiently.
Evaluation and Impact
The researchers evaluated Temac across six open-source benchmarks (e.g., Timeoff, Gadael, Parabank) and the top 20 global websites.
Key Results
- Coverage Gains: Temac improved average code coverage from 12.5% to 60.3% compared to state-of-the-art baselines.
- Bug Discovery: In real-world testing, Temac identified 445 unique faults, including JavaScript errors and security policy violations.
- Cost Efficiency: By utilizing LLMs only for high-value tasks, the system maintains a low operational cost of approximately $1.70 per hour of testing.
Discussion and Future Work
The success of Temac lies in using traditional tool data as "domain knowledge" for the LLM. By providing a structured knowledge base instead of raw HTML, the framework reduces hallucinations and stays within the LLM's context window.
However, challenges remain. The current sequential nature of exploration and knowledge construction creates a bottleneck. Future iterations may explore parallelizing these phases. Additionally, while Temac handles many complexities, extremely dynamic or non-deterministic pages can still challenge the stability of the State Transition Graph. Reducing LLM latency through the use of smaller, fine-tuned local models is also a key area for future development.
Summary updated