Web Element Locator Algorithm for Dynamic Web Application Testing Using Machine Learning
No Thumbnail Available
Date
8/10/2021
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Addis Ababa University
Abstract
Software testing is one of the software development life cycle for detect or discovers errors of the software. It ensures the correctness, completeness, and quality of software that has been developed. Automated software testing is a good strategy for reducing software testing effort during web application testing. During web applications, testers develop a web element locator to find web elements on a page using a query through test scripts. Developers apply changes to their web applications to meet new requirements, adding new functionalities, fixing bugs, etc. During those times web elements attribute like identifier (ID), name and classes of the web application dynamic and keeps changing. A simple modification of the application programming interface (API) affects locators, which leads to unable to select the desired web elements on the web application that may cause a test to fail. The main reason for the appearance of test case breakage is the failure of the element’s locator on the dynamic web application (DWA). It disturbs those who use test automation so much. To repair these fragility problems, test engineers must debug and rewrite those test cases. Because the locators that are used to select the web element may no longer be valid in the updated version. This process takes additional time for testing dynamic web applications.
In this research, to improve the accuracy and performance of DWA testing, we proposed a web element locator algorithm (WELA) using machine learning which automatically identifies web elements. The algorithm covers structural, logical, and presentation types of changes of web elements that may cause the breakage of the web element locator. It can identify a similar pattern based on web element features to adjust the locator according to the change. This makes the test more reliable and maintainable, by reducing the time and effort required to maintain web element locators. The testing process begins after the correct web elements have been identified.
An experiment is performed in ten web applications to prove the effectiveness of WELA in terms of accuracy and performance. The result is promising, which shows the proposed approach effectively repairs 97% of broken web test scripts and generates the test with the relatively shortest execution time on the evolved versions of a DWA.
Description
Keywords
Automated Testing, Dynamic Web Application Testing, Web Application Change, Web Element Locator, Machine Learning