Element Locator Recommendation System for UI Test Maintenance
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Web application tests often fail due to UI changes, such as element location or property changes, leading to significant time spent by test automation engineers in reviewing and updating tests, as these changes can be dynamic and sensitive to environmental factors.
Innovation Solution
A system and method for element locator recommendations that utilize historical data and current application state to generate new locators, reducing test maintenance time and increasing accuracy by monitoring test executions, analyzing data, and producing recommended locators for failed tests.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If element locators are defined in tests to locate UI elements, then tests can interact with the application, but tests start failing when the UI changes (element location, visible properties, or invisible properties like id)
Solution Approach 1:
The system performs preliminary actions by monitoring and capturing UI element data during successful test executions before failures occur. Historical data about element properties, locations, and relationships is collected and stored in advance, creating a baseline that can be used to automatically repair tests when UI changes cause failures.
Solution Approach 2:
The system implements feedback by continuously monitoring test executions and comparing current UI state against historical data. When tests fail due to UI changes, the system analyzes the failure, identifies the changed elements, and automatically generates repair suggestions based on the feedback from historical successful executions.
2Adaptability or versatility
If tests are run in different environments with varying network speed, CPU, RAM, or other programs, then environmental factors affect wait conditions, but test results become inconsistent across environments
Solution Approach 1:
The system captures environmental context and timing data during preliminary successful test runs in each environment. By storing historical data about wait conditions and execution timing specific to each environment, the system can adapt wait parameters automatically when running tests in different environments, maintaining consistency despite environmental variations.
3Ease of repair
If engineers manually review and update failing tests using developer tools, browser extensions, and trial and error, then tests can be fixed, but engineers spend substantial time (1/3 of working time) on maintenance
Solution Approach 1:
The system enables self-service by automatically analyzing failed tests, identifying the causes of failure through monitoring data, and generating repair suggestions without requiring manual intervention. The system serves itself by using its own historical monitoring data to diagnose and repair test failures, dramatically reducing the time engineers spend on maintenance.
Solution Approach 2:
The system replaces the mechanical process of manual test analysis and repair with an automated computational system. Instead of engineers manually examining failures using developer tools and trial-and-error approaches, the system automatically processes failure data, compares it with historical successful executions, and generates repairs through algorithmic analysis.
4Measurement precision
If element properties used in locators are dynamic and change each time the application is accessed, then locators may not uniquely identify elements, but using static properties requires determining how to locate elements reliably
Solution Approach 1:
The system performs preliminary monitoring and analysis to identify which element properties remain stable across multiple application accesses. By capturing and analyzing element data during successful test runs before dynamic changes occur, the system pre-determines reliable locator properties specific to each element, eliminating the need for complex manual analysis.
Solution Approach 2:
The system replaces the complex manual process of analyzing dynamic properties and determining reliable locators with automated computational analysis. The system processes historical monitoring data to automatically identify stable properties and generate appropriate locators, substituting engineer expertise with algorithmic pattern recognition.
Data Source
AI summary
System and method for element locator recommendations for testing a UI application include: executing tests; monitoring tests and observing which commands are called by each test to generate monitored data, where the monitored data includes which tests were executed, element locators that were used in the tests, relevant commands that were called by each test and related to the element locators that were used in the tests, and information about the UI application during the test execution; storing the monitored data; analyzing the stored monitored data; producing a set of recommended element locators to be used in place of previously used element locators for which the elements were not found during the execution of the tests; and utilizing the set of recommended element locators to complete the testing of the UI application software.


