Automated web application testing is a critical component of modern software development, with frameworks like Selenium widely adopted for validating functionality through browser automation. Among the essential aspects of such testing is the ability to interact with and validate web forms, a task that requires syntactically correct, executable scripts with high coverage of input fields. Despite its importance, this task remains underexplored in the context of large language models (LLMs), and no public benchmark or dataset exists to evaluate LLMs on form interaction generation systematically. This paper introduces a novel method for training LLMs to generate high-quality test cases in Selenium, specifically targeting form interaction testing. We curate both synthetic and human-annotated datasets for training and evaluation, covering diverse real-world forms and testing scenarios. We define clear metrics for syntax correctness, script executability, and input field coverage. Our empirical study demonstrates that our approach significantly outperforms strong baselines, including GPT-4o and other popular LLMs, across all evaluation metrics. Our work lays the groundwork for future research on LLM-based web testing and provides resources to support ongoing progress in this area.


翻译:自动化Web应用测试是现代软件开发的关键组成部分,其中Selenium等框架通过浏览器自动化被广泛用于功能验证。此类测试的核心环节之一是与Web表单交互并验证其功能,这需要生成语法正确、可执行的脚本,并实现对输入字段的高覆盖率。尽管该任务至关重要,但在大型语言模型(LLMs)背景下仍缺乏深入探索,且目前尚无公开的基准或数据集用于系统评估LLMs在表单交互生成方面的性能。本文提出一种新颖的方法,通过训练LLMs生成高质量的Selenium测试用例,特别针对表单交互测试。我们构建了合成数据与人工标注数据集用于训练和评估,涵盖多样化的真实世界表单及测试场景。我们明确定义了语法正确性、脚本可执行性及输入字段覆盖率的评估指标。实证研究表明,我们的方法在所有评估指标上均显著优于包括GPT-4o及其他主流LLMs在内的强基线模型。本工作为基于LLM的Web测试研究奠定了基础,并为该领域的持续发展提供了资源支持。

0
下载
关闭预览

相关内容

Python图像处理,366页pdf,Image Operators Image Processing in Python
Kaggle知识点:伪标签Pseudo Label
AINLP
40+阅读 · 2020年8月9日
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员