Layered Automated Testing Framework for UI Code Maintenance
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing automated testing methods for software user interfaces require rewriting codes or instructions whenever new requirements appear or the software is updated, making continuous and efficient testing inconvenient and inefficient.
Innovation Solution
The method divides the testing software application into a business requirement layer, a method definition layer, and a method implementation layer, defining synonymous name sets for function controls and business processes, allowing for name and scene modifications without rewriting codes by determining process definitions and replacing instructions accordingly.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If automated testing codes are rewritten whenever software is updated, then testing accuracy is maintained, but productivity decreases and time consumption increases
Solution Approach 1:
The patent segments the automated testing system into multiple independent layers: UI element definition layer, business logic layer, and test execution layer. Each layer can be modified independently without affecting others, allowing software updates without complete code rewriting while maintaining testing accuracy through the structured separation of concerns.
Solution Approach 2:
The patent establishes a layer mapping relationship and builds a test case library in advance before software updates occur. This preliminary structuring allows the system to automatically adapt to software changes without requiring immediate code rewriting, thus maintaining productivity while ensuring testing reliability through pre-defined test frameworks.
2Reliability
If automated testing codes are rewritten to accommodate new requirements, then testing coverage is improved, but loss of time increases
Solution Approach 1:
The patent creates a universal layer mapping framework that can accommodate multiple business scenarios and software updates through a single standardized structure. This multi-functional framework allows diverse testing requirements to be handled without time-consuming code rewrites, improving both coverage and efficiency.
Solution Approach 2:
The patent uses templates and reusable test case patterns that can be copied and adapted for new requirements. Instead of rewriting entire test codes, the system copies existing layer mappings and test frameworks, modifying only necessary parameters, thus maintaining comprehensive coverage while minimizing time investment.
3Adaptability or versatility
If a layered architecture is introduced for automated testing, then adaptability to software updates improves, but device complexity increases
Solution Approach 1:
The patent divides the testing system into distinct layers (UI element definition, business logic, test execution) that can be independently developed and maintained. This segmentation improves adaptability to software updates while managing complexity through clear separation of responsibilities and standardized interfaces between layers.
Solution Approach 2:
The patent introduces a layer mapping relationship as an intermediary layer that connects the UI element definitions with test execution. This mediator abstracts the complexity, allowing the system to adapt to software updates through the mapping layer without exposing complexity to other layers, thus maintaining adaptability while hiding structural complexity.
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
The present disclosure provides a method for automated testing of an application user interface, being implemented in an electronic apparatus, including: dividing a frame of a testing software application of an application user interface into a business requirement layer, a method definition layer, and a method implementation layer; when receiving a name modification request of modifying a name of one of the function controls, determining the process definition corresponding to the modified name according to the business requirement layer and the method definition layer; searching for a block of instructions corresponding to the determined process definition according to the method implantation layer; and searching for another name belonging to the same synonymous name set as the modified name in the found block of instructions, and replacing the found another name with the modified name. The method further provides an electronic apparatus, a system, and non-volatile storage medium for automated testing of application user interface. With the present disclosure, rewriting of codes for automated testing can be prevented when new requirements appear or the software is updated.