Skip to main content
QUICK REVIEW

[论文解读] Web Application Testing: Using Tree Kernels to Detect Near-duplicate States in Automated Model Inference

Anna Corazza, Sergio Di Martino|arXiv (Cornell University)|Aug 30, 2021
Software Testing and Debugging Techniques参考文献 42被引用 11
一句话总结

本文提出了一种新颖的基于树核(Tree Kernel, TK)函数的近似重复检测技术,用于网页应用模型推理,通过比较网页的树状文档对象模型(DOM)结构来实现。在包含10万对网页的测试数据集上,基于TK的方法优于当前最先进的方法,在训练集上较最佳基线方法Perceptual Diff提升了5%的F1分数,在测试集上提升了1%。

ABSTRACT

In the context of End-to-End testing of web applications, automated exploration techniques (a.k.a. crawling) are widely used to infer state-based models of the site under test. These models, in which states represent features of the web application and transitions represent reachability relationships, can be used for several model-based testing tasks, such as test case generation. However, current exploration techniques often lead to models containing many near-duplicate states, i.e., states representing slightly different pages that are in fact instances of the same feature. This has a negative impact on the subsequent model-based testing tasks, adversely affecting, for example, size, running time, and achieved coverage of generated test suites. As a web page can be naturally represented by its tree-structured DOM representation, we propose a novel near-duplicate detection technique to improve the model inference of web applications, based on Tree Kernel (TK) functions. TKs are a class of functions that compute similarity between tree-structured objects, largely investigated and successfully applied in the Natural Language Processing domain. To evaluate the capability of the proposed approach in detecting near-duplicate web pages, we conducted preliminary classification experiments on a freely-available massive dataset of about 100k manually annotated web page pairs. We compared the classification performance of the proposed approach with other state-of-the-art near-duplicate detection techniques. Preliminary results show that our approach performs better than state-of-the-art techniques in the near-duplicate detection classification task. These promising results show that TKs can be applied to near-duplicate detection in the context of web application model inference, and motivate further research in this direction.

研究动机与目标

  • 解决自动化网页应用模型推理中近似重复状态的问题。
  • 通过检测功能相同但结构不同的网页,提升模型的紧凑性与质量。
  • 评估树核函数在网页应用测试中检测近似重复的效能。
  • 提供一种比基于视觉或基础字符串匹配的相似性方法更高效、更准确的替代方案。

提出的方法

  • 该方法将网页表示为树状DOM结构,并应用树核(TK)函数计算其间的相似性。
  • 使用KeLP库实现的TK函数,为每对网页提取相似性向量。
  • 利用10万对人工标注的网页对数据集,基于相似性向量训练支持向量机(SVM)分类器。
  • 通过在训练集和测试集上计算宏平均F1分数,将该方法与10种基线技术进行性能对比。
  • 该方法设计为高效且基于DOM,避免了计算成本较高的视觉比较方法。
  • 未来扩展计划包括为网页结构定制TK函数,并将其集成到开源爬虫工具如Crawljax中。

实验结果

研究问题

  • RQ1在自动化模型推理背景下,树核函数能否有效检测近似重复的网页?
  • RQ2所提出的基于TK的方法相较于现有最先进的近似重复检测技术,在性能上表现如何?
  • RQ3基于TK的方法是否在保持高精度的同时,比基于视觉的方法(如Perceptual Diff)更高效?
  • RQ4自定义设计的树核函数是否能进一步提升网页应用状态的检测准确率?
  • RQ5近似重复检测对基于模型的测试质量与效率有何影响?

主要发现

  • 基于TK的方法在训练集上的宏平均F1分数比最佳基线方法Perceptual Diff高出5%。
  • 在测试集上,基于TK的方法相比Perceptual Diff(表现最佳的基线)F1分数提升了1%。
  • 基于TK的方法优于全部10种基线技术,包括RTED和Levenshtein距离等基于DOM的方法。
  • 该方法在两个数据集上相较最佳的基于DOM的基线方法(RTED和Levenshtein),分类性能平均提升了约10%。
  • 该方法比基于视觉的技术(如Perceptual Diff,每分钟仅处理4个状态)更高效,而基于DOM的方法每分钟可处理高达25个状态。
  • 结果表明,树核(TKs)是网页应用模型推理中近似重复检测的一种有前景、可扩展且准确的解决方案。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。