Self-Repairing Automation Scripts for Software Testing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The maintenance of automation scripts for software testing is complex and burdensome, especially when small changes occur in the application interface, leading to abnormal operations and the need for frequent updates to ensure usability.
Innovation Solution
A method and system that enable automation scripts to self-repair and self-maintain by searching for elements on a page using locating information, collecting element-related information, and associating it with the script instructions, allowing the scripts to adjust automatically to most small changes without manual intervention.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If automation scripts are used to test application interfaces, then testing efficiency is improved, but maintenance complexity increases when interface changes occur
Solution Approach 1:
The system enables automation scripts to automatically detect and adapt to interface changes by monitoring element properties and self-updating locating information, eliminating the need for manual script maintenance when interfaces change
Solution Approach 2:
The system implements a feedback mechanism where element-related information is collected during test execution, compared against expected values, and used to automatically update automation scripts when changes are detected, creating a closed-loop maintenance system
2Ease of operation
If automation scripts rely on element texts for identification, then script simplicity is improved, but reliability decreases when texts change
Solution Approach 1:
The system collects and monitors multiple element parameters including texts, IDs, classes, and other attributes, dynamically switching between different locating strategies based on which parameters remain stable across interface changes
Solution Approach 2:
The system pre-collects and stores element-related information including multiple locating attributes before test execution, preparing alternative identification methods in advance to handle potential text changes
3Manufacturing precision
If manual updates to automation scripts are performed frequently, then script accuracy is improved, but time consumption increases
Solution Approach 1:
The system automatically detects interface changes, compares them against stored element information, and updates automation scripts without human intervention, maintaining script accuracy while eliminating manual maintenance time
Solution Approach 2:
The system pre-collects comprehensive element-related information including multiple locating attributes and relationships, preparing data structures that enable rapid automatic updates when changes occur
Data Source
AI summary
Processing automation scripts used for testing pages includes running the automation scripts using a processor, searching for an element on the page according to locating information in an instruction of the automation scripts, collecting element-related information of the element in response to finding of the element on the page according to the locating information, and associating the collected element-related information of the element with the instruction of the automation scripts. The element-related information associated with the instruction is saved.


