arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.00950cs.SE
收藏

Web表单测试生成的语义约束推断

Semantic Constraint Inference for Web Form Test Generation

Parsa Alian, Noor Nashid, Mobina Shahbandeh, Ali Mesbah

AI总结:

针对Web表单自动化测试生成难题,提出FormNexus方法,通过构建表单实体关系图(FERG)提取语义信息,并利用LLMs基于反馈机制生成和优化输入约束,结合GPT-4实现89%的表单提交状态覆盖率,显著超越基线模型。

摘要:

Web表单的自动化测试生成一直是一个长期存在的挑战,表单固有的以人为中心的设计及其复杂的、与设备无关的结构加剧了这一问题。我们引入了一种名为FormNexus的创新方法,用于自动化Web表单测试生成,该方法强调利用文本内容、DOM树结构和视觉邻近性,从单个表单元素及元素间的关系中提取语义洞察。收集到的洞察被转换为一种新的概念图——表单实体关系图(FERG),它提供了机器友好的语义信息提取。利用LLMs,FormNexus采用了一种基于反馈的机制,根据实时表单提交响应生成和优化输入约束。该方法的最终成果是一套稳健的测试用例,每个用例都通过有条理地使约束失效来生成,从而确保了Web表单测试场景的全面性。这项工作通过将LLMs的能力与高级语义推断方法相结合,弥合了自动化Web表单测试中现有的差距。我们的评估表明,FormNexus结合GPT-4在表单提交状态中实现了89%的覆盖率。这一结果以25%的优势显著超越了最佳基线模型的性能。

英文摘要:

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%.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑