Інтелектуальна модель генерації адаптивних веб-селекторів на основі GNN
Автор
Морозов, О. С.
Яровий, А. А.
Morozov, O. S.
Yarovyi, A. A.
Дата
2025Metadata
Показати повну інформаціюCollections
Анотації
У статті розглянуто проблему нестабільності DOM-селекторів, яка є однією з ключових причин появи flaky-тестів у сучасних системах автоматизованого тестування веб-ресурсів. Показано, що традиційні підходи до формування селекторів – як ручні, так і автоматизовані – не враховують глобальний контекст DOM-структури та є малоефективними у випадку динамічних змін інтерфейсу. Обґрунтовано доцільність використання графових нейронних мереж (GNN) як інструменту моделювання DOM-дерева у вигляді орієнтованого графа з урахуванням семантичних, атрибутивних та структурних ознак вузлів. Запропоновано теоретичну модель побудови адаптивних DOM-селекторів, що поєднує GNN з агентом прийняття рішень. Розроблено математичне подання DOM-графа, систему ознак вузлів (one-hot кодування тегів, бінарні атрибути id/class/data-testid, глибина, кількість нащадків, позиція серед сусідів), а також формалізовано метрики оцінювання селекторів: унікальність, точність, повнота, F1-міра та довжина. Сформовано функцію винагороди агента, яка оптимізує баланс між точністю, стабільністю та компактністю селектора. Показано, що поєднання графових репрезентацій DOM (Document object model) та механізму оптимізації рішень дає змогу створювати селектори, стійкі до структурних змін веб-сторінок, а також скорочує потребу у ручній підтримці тестів. Запропонована модель формує теоретичне підґрунтя для створення інтелектуальних систем автоматизованого тестування, здатних адаптувати локатори під час зміни DOM без необхідності повного аналізу інтерфейсу тестувальником. The article discusses the problem of DOM or instability, which is one of the key reasons for flaky tests in modern automated web resource testing systems. It is shown that traditional approaches to or formation, both manual and automated, do not take into account the global context of the DOM structure and are ineffective in the case of dynamic interface changes. The feasibility of using graph neural networks (GNN) as a tool for modelling the DOM tree in the form of a directed graph, taking into account the semantic, attributive, and structural features of nodes, is justified.
A theoretical model for building adaptive DOM ors, combining GNN with a decision-making agent, is proposed. A mathematical representation of the DOM graph, a system of node features (one-hot tag encoding, binary attributes id/class/data-testid, depth, number of descendants, position among neighbours) has been developed, and or evaluation metrics have been formalised: uniqueness, accuracy, completeness, F1-measure and length. An agent reward function has been formed that optimises the balance between accuracy, stability, and compactness of the or.
It has been shown that the combination of DOM (Document object model) graph representations and a decision optimisation mechanism allows the creation of ors that are resistant to structural changes in web pages and reduces the need for manual test maintenance. The proposed model forms the theoretical basis for the creation of intelligent automated testing systems capable of adapting locators during DOM changes without the need for a complete analysis of the interface by the tester.
URI:
https://ir.lib.vntu.edu.ua//handle/123456789/50630

