Skip to main content
QUICK REVIEW

[Paper 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 TechniquesComputer Science42 references11 citations
TL;DR

This paper proposes a novel near-duplicate detection technique for web application model inference using Tree Kernel (TK) functions to compare the tree-structured Document Object Model (DOM) of web pages. Evaluated on a 100k-page pair dataset, the TK-based approach outperforms state-of-the-art methods, achieving a 5% F1 improvement on the training set and a 1% improvement on the test set over the best baseline, Perceptual Diff.

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.

Motivation & Objective

  • To address the problem of near-duplicate states in automated web application model inference.
  • To improve model compactness and quality by detecting functionally identical but structurally varied web pages.
  • To evaluate the effectiveness of Tree Kernel functions in detecting near-duplicates in web application testing.
  • To provide a more efficient and accurate alternative to visual-based or basic string-based similarity methods.

Proposed method

  • The approach represents web pages as tree-structured DOMs and applies Tree Kernel (TK) functions to compute similarity between them.
  • A similarity vector is extracted for each web page pair using the KeLP library’s implementation of TK functions.
  • A Support Vector Machine (SVM) classifier is trained on the similarity vectors using a dataset of 100k manually annotated web page pairs.
  • The method is evaluated using macro-averaged F1 scores on both training and test sets, comparing performance against 10 baseline techniques.
  • The approach is designed to be efficient and DOM-based, avoiding computationally expensive visual comparison methods.
  • Future extensions aim to customize TK functions for web page structure and integrate them into open-source crawlers like Crawljax.

Experimental results

Research questions

  • RQ1Can Tree Kernel functions effectively detect near-duplicate web pages in the context of automated model inference?
  • RQ2How does the proposed TK-based method compare in performance to existing state-of-the-art near-duplicate detection techniques?
  • RQ3Does the TK-based approach maintain high accuracy while being more efficient than visual-based methods like Perceptual Diff?
  • RQ4Can custom-designed Tree Kernel functions further improve detection accuracy for web application states?
  • RQ5What impact does near-duplicate detection have on the quality and efficiency of model-based testing?

Key findings

  • The TK-based approach achieved a 5% higher macro-averaged F1 score on the training set compared to the best baseline, Perceptual Diff.
  • On the test set, the TK-based method improved F1 by 1% over Perceptual Diff, the top-performing baseline.
  • The TK-based method outperformed all 10 baseline techniques, including DOM-based methods like RTED and Levenshtein distance.
  • The approach improved classification performance by approximately 10% over the best DOM-based baselines (RTED and Levenshtein) on both datasets.
  • The method is more efficient than visual-based techniques like Perceptual Diff, which processes only 4 states per minute, while DOM-based methods can process up to 25 states per minute.
  • The results suggest that TKs are a promising, scalable, and accurate solution for near-duplicate detection in web application model inference.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.