Automated web GUI testing (AWGT) relies on exploration strategies that exercise web applications through GUI actions to maximize code coverage, spanning traditional model-based, reinforcement learning (RL)-based, and emerging large language model (LLM)-based approaches. State abstraction, which detects pages with the same functionality to avoid repeated testing, has long been recognized as critical to guiding exploration. However, how exploration strategies and state abstractions jointly affect testing effectiveness remains underexplored. We present an empirical study analyzing both factors from the perspectives of code coverage and failure revelation. We compare representative model-based, RL-based, and LLM-based approaches; investigate how six state abstractions influence model-based and RL-based approaches; examine LLM-based approaches under different history representations, which act as a form of state abstraction; and compare the failures exposed by different approaches. Our results show that no single strategy excels across all dimensions; instead, categories exhibit complementary strengths in code coverage, state coverage, and failure discovery. State abstraction is a key factor: strict, fine-grained abstractions favor model-based strategies, while compact ones better support RL-based strategies. History representation substantially affects LLM-based strategies, where concise, functionality-level context performs best. We also find that code coverage is weakly correlated with failure-revealing ability, underscoring the need for multi-dimensional evaluation. These findings offer practical guidance for selecting exploration strategies and designing effective state abstractions for AWGT.
翻译:自动化Web GUI测试(AWGT)依赖于通过GUI操作执行Web应用程序的探索策略,以最大化代码覆盖率,涵盖传统的基于模型、基于强化学习(RL)以及新兴的基于大型语言模型(LLM)的方法。状态抽象通过检测功能相同的页面以避免重复测试,长期以来被视为指导探索的关键因素。然而,探索策略与状态抽象如何共同影响测试有效性仍缺乏深入研究。我们提出了一项经验研究,从代码覆盖率和故障揭示两个角度分析这两个因素。我们比较了代表性的基于模型、基于RL和基于LLM的方法;研究了六种状态抽象如何影响基于模型和基于RL的方法;考察了不同历史表示(可作为状态抽象的一种形式)下的基于LLM的方法;并比较了不同方法所暴露的故障。结果表明,没有任何单一策略在所有维度上表现卓越;相反,各类策略在代码覆盖率、状态覆盖率和故障发现方面展现出互补优势。状态抽象是一个关键因素:严格细粒度的抽象有利于基于模型的策略,而紧凑的抽象则更好地支持基于RL的策略。历史表示显著影响基于LLM的策略,其中简洁的功能级上下文表现最佳。我们还发现代码覆盖率与故障揭示能力弱相关,这凸显了多维评估的必要性。这些发现为选择探索策略和设计有效的AWGT状态抽象提供了实践指导。