Automated test generation for web forms has been a longstanding challenge, exacerbated by the intrinsic human-centric design of forms and their complex, device-agnostic structures. We introduce an innovative approach, called FormNexus, for automated web form test generation, which emphasizes deriving semantic insights from individual form elements and relations among them, utilizing textual content, DOM tree structures, and visual proximity. The insights gathered are transformed into a new conceptual graph, the Form Entity Relation Graph (FERG), which offers machine-friendly semantic information extraction. Leveraging LLMs, FormNexus adopts a feedback-driven mechanism for generating and refining input constraints based on real-time form submission responses. The culmination of this approach is a robust set of test cases, each produced by methodically invalidating constraints, ensuring comprehensive testing scenarios for web forms. This work bridges the existing gap in automated web form testing by intertwining the capabilities of LLMs with advanced semantic inference methods. Our evaluation demonstrates that FormNexus combined with GPT-4 achieves 89% coverage in form submission states. This outcome significantly outstrips the performance of the best baseline model by a margin of 25%.
翻译:Web表单的自动化测试生成长期以来一直是一个挑战,其难度因表单本质上的以人为中心设计以及复杂且不依赖设备的架构而加剧。我们提出了一种名为FormNexus的创新方法,用于自动化Web表单测试生成,该方法强调从单个表单元素及其相互关系中提取语义信息,利用文本内容、DOM树结构和视觉邻近性。所收集的语义被转化为一种新的概念图——表单实体关系图(FERG),该图提供机器友好的语义信息提取。借助大语言模型(LLM),FormNexus采用一种反馈驱动机制,基于实时表单提交响应生成并优化输入约束。该方法的最终成果是一套健壮的测试用例,每个用例通过系统性地使约束失效而生成,从而确保Web表单的全面测试场景。本工作通过将LLM的能力与高级语义推理方法相结合,弥合了现有自动化Web表单测试中的空白。我们的评估表明,FormNexus结合GPT-4在表单提交状态上实现了89%的覆盖率,这一结果以25%的幅度显著优于最佳基线模型的性能。