A system and method for automated intelligent testing of software applications
Through the dynamic calculation time benchmark value and visual AI assisted positioning processing, combined with blurring matching strategies and adaptive positioning strategies, the stability and efficiency of traditional automation testing in complex user interface and network fluctuations have been solved. Test execution.
Patent Information
- Application Number
- CN202411588030.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-11-08
AI Technical Summary
Traditional automated testing tools are difficult to operate stably when facing complex user interfaces, dynamic elements and network fluctuations, resulting in test failure or reduced efficiency.
Through the test environment parameters of the test software, dynamically calculate the waiting time benchmark value, and generate the configuration data of the waiting mechanism. Combine the visual AI auxiliary positioning processing and fuzzy matching strategies, generate adaptive positioning strategy data, and analyze the test execution order based on the test case priority and coverage analysis.
It improves the stability and efficiency of testing, enhances adaptability to complex and dynamic user interfaces, and reduces test failures caused by element loading delays or network fluctuations.
Smart Images

Figure CN119127719B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software application testing, and in particular to a system and method for automated intelligent testing of software applications. Background Art
[0002] Automated intelligent testing of software applications refers to the use of artificial intelligence technology to improve and accelerate the software testing process. This testing method combines automated testing and artificial intelligence technology to improve testing efficiency, reduce human errors, and help development teams find and solve problems in software more quickly. Automated intelligent testing can use various artificial intelligence technologies, such as machine learning, natural language processing, and computer vision, to improve various aspects of software testing; these include the following: Intelligent test case generation: Using machine learning technology, test cases can be automatically generated, reducing the workload of manually writing test cases and increasing test coverage; Intelligent defect detection: Through machine learning algorithms, potential software defects or abnormal behaviors can be automatically detected, helping the testing team to identify problems faster; Intelligent test execution: Using automated testing tools and artificial intelligence technology, faster and more reliable test execution can be achieved, including automated regression testing and performance testing; Intelligent test data generation: Using machine learning technology to generate test data that conforms to real scenarios, helping testers to more comprehensively evaluate the performance and stability of the software; Intelligent defect analysis: Using natural language processing and data analysis technology, test results can be analyzed more quickly to discover potential problem patterns and trends.
[0003] The user interfaces of modern software applications are often very complex and contain a large number of dynamically generated elements. Traditional automated testing tools usually identify interface elements through fixed element location mechanisms (such as ID or XPath). However, with the dynamic changes of UI elements, loading delays, and network fluctuations, traditional location methods are often prone to failure, resulting in unstable test runs. The differences in loading time of software interface elements make the traditional static waiting mechanism no longer applicable. Too short a waiting time may cause the test to fail, and too long a waiting time will greatly reduce the test efficiency. Therefore, how to dynamically adjust the waiting time according to the actual environment has become a major challenge. Summary of the invention
[0004] Based on this, it is necessary for the present invention to provide a system and method for automated intelligent testing of software applications to solve at least one of the above technical problems.
[0005] To achieve the above object, a method for automated intelligent testing of software applications comprises the following steps:
[0006] Step S1: acquiring test environment parameters for the software to be tested, and calculating the dynamic waiting time reference value to generate waiting mechanism configuration data; collecting element location information and generating element location strategy for the user interface of the software application based on the waiting mechanism configuration data to obtain element location configuration data; performing conditional waiting strategy processing according to the element location configuration data and the waiting mechanism configuration data to generate conditional waiting mapping data;
[0007] Step S2: Perform visual AI-assisted positioning processing according to the conditional waiting mapping data to generate visual positioning feature data; perform fuzzy matching strategy combination on the visual positioning feature data according to the preset performance-aware waiting strategy data to generate dynamic element recognition data;
[0008] Step S3: Analyze the positioning success rate of the element positioning configuration data, and adjust the adaptive positioning strategy based on the intelligent retry mechanism for the dynamic element recognition data to generate adaptive positioning strategy data;
[0009] Step S4: Prioritize the test cases according to the waiting mechanism configuration data to obtain test case priority data; map the visual positioning feature data with the test case priority data to the test scenario, perform test coverage analysis, and generate dynamic test coverage control data;
[0010] Step S5: adjust the test execution sequence of the test case priority data according to the adaptive positioning strategy data to obtain the test execution sequence data; use the test execution sequence data, dynamic test coverage control data and waiting mechanism configuration data to perform automated testing on the software application, thereby generating automated test report data.
[0011] The present invention can ensure that the environmental parameters of the test process are accurate by acquiring parameters (such as operating system, hardware configuration, network environment, etc.) of the test environment of the software to be tested, thereby improving the reliability of the test results. The dynamic waiting time reference value calculation can automatically adjust the waiting time according to the changes in the hardware and network environment, avoid unnecessary long waiting or failure caused by too short waiting time, and improve the test efficiency. The generation of waiting mechanism configuration data enables the test system to flexibly adapt to different operating environments and ensure that automated testing can be smoothly executed in a variety of scenarios. Based on conditional waiting mapping data, combined with visual AI-assisted positioning processing, interface elements can be efficiently identified, and the accuracy of positioning can be ensured even when the position, shape or other visual features of the elements change slightly. The fuzzy matching strategy can further reduce misjudgments or failures caused by minor changes in the interface by allowing a certain matching tolerance, thereby improving the robustness and success rate of the test. Dynamic element recognition data can automatically adjust the recognition strategy according to changes in system performance to ensure efficient operation under different system and network conditions. Through historical analysis of element positioning configuration data, positioning strategies with low success rates can be identified to avoid repeated use of strategies that have failed multiple times. The intelligent retry mechanism can flexibly adjust the number of retries or strategies when a failure occurs, reducing unnecessary resource consumption. The adaptive positioning strategy can be dynamically adjusted according to the real-time situation of the test, which improves the adaptability of the automated test, so that the system can still accurately complete the element positioning when encountering a complex or unstable interface environment, ensuring the stability of the test. By prioritizing the test cases, the system can first execute critical or high-risk test cases to ensure that potential problems are discovered to the maximum extent within the limited test time. The test scenario mapping based on the visual positioning feature data can realize the intelligent matching of the test scenario and the visual feature to ensure the coverage of different test scenarios. Coverage analysis can help testers understand which functions and interface elements have been fully tested, ensure the comprehensiveness of the test, avoid missing key test scenarios, and thus improve the coverage and reliability of the test. Adjust the test sequence according to the adaptive positioning strategy data and the test execution sequence data to ensure that the system can reasonably allocate resources, maximize the parallel execution of test cases, and shorten the test execution time. Dynamic test coverage control data enables the test process to adapt to different test conditions and avoid waste of resources. The generation of automated test reports can conduct a comprehensive statistical analysis of all steps, failure reasons, performance data, etc. during the test execution process, provide developers with detailed feedback, help quickly locate problems, and improve software quality and stability.
[0012] The present invention also provides a system for automated intelligent testing of software applications, which is used to execute the above-mentioned method for automated intelligent testing of software applications. The system for automated intelligent testing of software applications comprises:
[0013] The element positioning module is used to obtain the test environment parameters of the software to be tested, calculate the dynamic waiting time benchmark value, and generate the waiting mechanism configuration data; based on the waiting mechanism configuration data, the element positioning information of the user interface of the software application is collected and the element positioning strategy is generated to obtain the element positioning configuration data; according to the element positioning configuration data and the waiting mechanism configuration data, the conditional waiting strategy is processed to generate the conditional waiting mapping data;
[0014] Intelligent recognition module, used to perform visual AI-assisted positioning processing according to conditional waiting mapping data to generate visual positioning feature data; perform fuzzy matching strategy combination on visual positioning feature data according to preset performance-aware waiting strategy data to generate dynamic element recognition data;
[0015] The adaptive optimization module is used to analyze the positioning success rate of the element positioning configuration data, and to adjust the adaptive positioning strategy of the dynamic element recognition data based on the intelligent retry mechanism to generate adaptive positioning strategy data;
[0016] The scenario planning module is used to prioritize test cases according to the waiting mechanism configuration data to obtain test case priority data; map the visual positioning feature data with the test case priority data to the test scenario, and perform test coverage analysis to generate dynamic test coverage control data;
[0017] The execution control module is used to adjust the test execution sequence of the test case priority data according to the adaptive positioning strategy data to obtain the test execution sequence data; use the test execution sequence data, dynamic test coverage control data and waiting mechanism configuration data to perform automated test execution on the software application, thereby generating automated test report data.
[0018] The present invention calculates the dynamic waiting time reference value, and the system can accurately determine the loading time of each element, thereby avoiding positioning failure caused by incomplete element loading. Reasonable element positioning strategy can effectively reduce invalid waiting time and operation, thereby speeding up the test execution speed and improving the overall test efficiency. The processing of conditional waiting strategy ensures that the test can flexibly respond to the ever-changing user interface and network environment, and enhances the robustness of the test. Visual AI-assisted positioning can improve the accuracy of element recognition, especially in complex or dynamically changing user interfaces, reducing the need for manual intervention. Through the data of performance-aware waiting strategy combined with fuzzy matching, the system can flexibly identify elements in different performance environments, improving the adaptability and flexibility of the test. Positioning success rate analysis provides reliable data support for the optimization of positioning strategy, making the test process more efficient and effective. Adaptive positioning strategy adjustment ensures that even in an unstable test environment, the success rate of element positioning can be improved and the risk of test failure can be reduced through an intelligent retry mechanism. Prioritization according to the importance of test cases and execution conditions helps to focus resources on the most important test cases and improve test results. Through test coverage analysis, it is ensured that test cases can cover all functions and scenarios, improve the comprehensiveness and effectiveness of the test, and help identify potential risk areas. By adjusting the execution order, the test execution time is minimized and the test efficiency is improved. The data from the automated test report provides real-time feedback to project management, helping the team to quickly identify problems and improve the test process, thereby improving software quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments thereof made with reference to the following drawings:
[0020] Figure 1 A schematic diagram of the steps of the method for automated intelligent testing of software applications according to the present invention;
[0021] Figure 2 for Figure 1 Detailed step flow diagram of step S1;
[0022] Figure 3 for Figure 1 Detailed step flow chart of step S2 in FIG. DETAILED DESCRIPTION
[0023] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.
[0024] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.
[0025] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0026] To achieve this, please refer to Figures 1 to 3 The present invention provides a method for automated intelligent testing of software applications, the method comprising the following steps:
[0027] Step S1: acquiring test environment parameters for the software to be tested, and calculating the dynamic waiting time reference value to generate waiting mechanism configuration data; collecting element location information and generating element location strategy for the user interface of the software application based on the waiting mechanism configuration data to obtain element location configuration data; performing conditional waiting strategy processing according to the element location configuration data and the waiting mechanism configuration data to generate conditional waiting mapping data;
[0028] Step S2: Perform visual AI-assisted positioning processing according to the conditional waiting mapping data to generate visual positioning feature data; perform fuzzy matching strategy combination on the visual positioning feature data according to the preset performance-aware waiting strategy data to generate dynamic element recognition data;
[0029] Step S3: Analyze the positioning success rate of the element positioning configuration data, and adjust the adaptive positioning strategy based on the intelligent retry mechanism for the dynamic element recognition data to generate adaptive positioning strategy data;
[0030] Step S4: Prioritize the test cases according to the waiting mechanism configuration data to obtain test case priority data; map the visual positioning feature data with the test case priority data to the test scenario, perform test coverage analysis, and generate dynamic test coverage control data;
[0031] Step S5: adjust the test execution sequence of the test case priority data according to the adaptive positioning strategy data to obtain the test execution sequence data; use the test execution sequence data, dynamic test coverage control data and waiting mechanism configuration data to perform automated testing on the software application, thereby generating automated test report data.
[0032] In the embodiment of the present invention, reference Figure 1 The above is a schematic diagram of the steps of a method for automated intelligent testing of software applications according to the present invention. In this example, the method for automated intelligent testing of software applications includes the following steps:
[0033] Step S1: acquiring test environment parameters for the software to be tested, and calculating the dynamic waiting time reference value to generate waiting mechanism configuration data; collecting element location information and generating element location strategy for the user interface of the software application based on the waiting mechanism configuration data to obtain element location configuration data; performing conditional waiting strategy processing according to the element location configuration data and the waiting mechanism configuration data to generate conditional waiting mapping data;
[0034] When the test environment parameters of the software to be tested are obtained by the embodiment of the present invention, the operating system version, CPU model, memory size, network bandwidth and delay parameters are obtained by reading the configuration file of the operating system, the hardware information and the dynamic data of the network environment. Then, the dynamic waiting time reference value is calculated by these parameters. For example, when the network delay is higher than 50ms, the system sets the initial retry time to 200ms, the maximum delay to 1000ms and the backoff rate to 1.5 according to the exponential backoff algorithm. The generated waiting mechanism configuration data includes the initial waiting, maximum waiting time and retry strategy parameters. Then, based on these waiting mechanism configuration data, the interface elements of the software application are scanned by a UI automation tool (such as Selenium) to obtain the location information of each UI element, and the element location configuration data is generated by using a location strategy based on attribute priority. Finally, according to the element location configuration data and the waiting mechanism configuration data, the system judges the loading state of each element through dynamic waiting conditions, and generates corresponding conditional waiting mapping data to optimize the recognition and interaction of subsequent elements.
[0035] Step S2: Perform visual AI-assisted positioning processing according to the conditional waiting mapping data to generate visual positioning feature data; perform fuzzy matching strategy combination on the visual positioning feature data according to the preset performance-aware waiting strategy data to generate dynamic element recognition data;
[0036] According to the conditional waiting mapping data generated in step S1, the embodiment of the present invention extracts image features of elements in the software interface through a computer vision algorithm (such as a YOLO model based on a convolutional neural network) to generate visual positioning feature data. In the feature extraction process, information such as the shape, color, size, and relative position of the element is considered. Then, the system is based on a performance-aware waiting strategy. For example, when the CPU usage exceeds 70%, the system will extend the time threshold for image processing to allow more time for feature matching. Through a combination of fuzzy matching strategies, different visual elements are dynamically matched with the waiting mechanism to generate dynamic element recognition data. For example, at different resolutions, the similarity threshold for element recognition is set to 0.85, and in a high-latency network, the allowed matching time is extended to 500ms.
[0037] Step S3: Analyze the positioning success rate of the element positioning configuration data, and adjust the adaptive positioning strategy based on the intelligent retry mechanism for the dynamic element recognition data to generate adaptive positioning strategy data;
[0038] According to the visual positioning feature data generated in step S2, the system of the embodiment of the present invention will perform a historical positioning success rate analysis on the element positioning configuration data. By analyzing the positioning success rates of the past 10 times, if the success rate of an element is less than 70%, the system will identify it as a low success rate element and optimize the retry mechanism of the dynamic element recognition data of the element. For example, the system will set the number of retries for the element to 3 times, and the retry interval will be set to 200ms, 400ms, and 800ms according to the exponential backoff algorithm. In order to improve the accuracy of element positioning, the system also generates a prediction model based on historical positioning data, adjusts the positioning order and priority of the elements, and thus generates adaptive positioning strategy data.
[0039] Step S4: Prioritize the test cases according to the waiting mechanism configuration data to obtain test case priority data; map the visual positioning feature data with the test case priority data to the test scenario, perform test coverage analysis, and generate dynamic test coverage control data;
[0040] The embodiment of the present invention prioritizes the test cases of the software to be tested according to the waiting mechanism configuration data generated in step S1. First, the system estimates the execution time of each test case, for example, the execution time of the scenario under high load is 600 seconds, while the execution time of the scenario under normal load is 300 seconds. Then, based on the business importance and execution time, the system assigns an initial priority to each test case, for example, the priority of the core business scenario is 1, and the priority of the secondary business scenario is 2. Next, the visual positioning feature data is scene-mapped with these test case priorities. The system will analyze the test coverage and generate dynamic test coverage control data based on the correspondence between different UI elements and test scenarios.
[0041] Step S5: adjust the test execution sequence of the test case priority data according to the adaptive positioning strategy data to obtain the test execution sequence data; use the test execution sequence data, dynamic test coverage control data and waiting mechanism configuration data to perform automated testing on the software application, thereby generating automated test report data.
[0042] According to the adaptive positioning strategy data generated in step S3, the system of the embodiment of the present invention optimizes and adjusts the test execution order of the test case priority data. For example, the system will give priority to executing those use cases with high positioning accuracy and short execution time, and execute complex test scenarios during periods of low CPU load. Then, using the adjusted test execution sequence data, dynamic test coverage control data, and waiting mechanism configuration data, the system automatically generates a test execution queue and executes the test scripts in sequence. During the test execution process, the system records the execution status, time consumption, and pass or fail results of each test case. Finally, the automated test report data summarizes these execution data and generates a detailed report covering test results, failure reasons, coverage, and performance indicators.
[0043] Preferably, step S1 comprises the following steps:
[0044] Step S11: acquiring test environment parameters for the software to be tested and generating test environment status parameters, wherein the test environment status parameters include operating system parameters, hardware configuration data, and network environment data and software dependency data;
[0045] Step S12: Calculate the dynamic waiting time reference value for the hardware configuration data and the network environment data, thereby obtaining the dynamic waiting time reference data;
[0046] Step S13: setting an initial retry interval and determining a maximum number of retries based on network environment data, and calculating a backoff factor to generate exponential backoff strategy parameters, wherein the exponential backoff strategy parameters include an initial delay, a maximum delay, and a backoff rate;
[0047] Step S14: performing a performance benchmark test on the operating system parameters based on CPU, memory, disk I / O and network I / O, thereby generating performance benchmark data;
[0048] Step S15: generating waiting mechanism configuration data for controlling waiting behavior in automated testing according to the dynamic waiting time benchmark data, the exponential backoff strategy parameters and the performance benchmark data;
[0049] Step S16: collecting element location information of the user interface of the software application based on the waiting mechanism configuration data, and generating a data-driven element location strategy to obtain element location configuration data; performing conditional waiting strategy processing according to the element location configuration data and the waiting mechanism configuration data to generate conditional waiting mapping data.
[0050] As an embodiment of the present invention, refer to Figure 2 As shown, Figure 1 Detailed step flow diagram of step S1 in the embodiment of the present invention, step S1 includes the following steps:
[0051] Step S11: acquiring test environment parameters for the software to be tested and generating test environment status parameters, wherein the test environment status parameters include operating system parameters, hardware configuration data, and network environment data and software dependency data;
[0052] When the embodiment of the present invention obtains the test environment parameters for the software to be tested, the system first calls the operating system tool (such as uname or wmic) through the API interface to obtain the operating system version, kernel, and software dependency data. For example, the system is running Windows 10, and the dependent external libraries include .NET Framework 4.8, etc. At the same time, the hardware configuration data such as CPU model, number of cores, memory size, hard disk capacity, etc. are obtained through hardware configuration query tools (such as lscpu or dmidecode). In addition, the system monitors network environment data such as network bandwidth, delay, packet loss rate, etc. in real time through network interface test tools (such as ping or iperf), and generates comprehensive test environment status parameters in combination with software dependencies (such as runtime environment, external library version), providing necessary basic information for subsequent automated testing processes.
[0053] Step S12: Calculate the dynamic waiting time reference value for the hardware configuration data and the network environment data, thereby obtaining the dynamic waiting time reference data;
[0054] The embodiment of the present invention calculates the dynamic waiting time reference value based on the hardware configuration data and network environment data in step S11. First, the system determines the health status of the network based on the network bandwidth and delay data. Assuming that the network bandwidth is 100Mbps, the delay is 30ms, and the packet loss rate is 2%, the dynamic waiting time reference value can be set to 100ms. For hardware configuration data, for example, when the CPU utilization rate reaches more than 80%, the system will extend the waiting time and dynamically adjust the reference value to 500ms. By combining the status data of the hardware and the network, the system finally generates dynamic waiting time reference data, which will be used to control the waiting time threshold of the task in automated testing.
[0055] Step S13: setting an initial retry interval and determining a maximum number of retries based on network environment data, and calculating a backoff factor to generate exponential backoff strategy parameters, wherein the exponential backoff strategy parameters include an initial delay, a maximum delay, and a backoff rate;
[0056] In the embodiment of the present invention, based on the network environment data in step S11, the system first sets the initial retry interval to 200ms. Assuming that the network delay fluctuates between 30-50ms, the maximum number of retries is set to 3 times. Then, the system calculates the backoff factor and uses a standard exponential backoff algorithm. The backoff rate is set to 1.5, that is, each retry time is 1.5 times the previous time. The initial delay is 200ms and the maximum delay is set to 1000ms. When the network fluctuations in a certain test scenario are large, the system will automatically adjust the retry interval and the number of retries according to the exponential backoff strategy, and generate exponential backoff strategy parameters including the initial delay, maximum delay and backoff rate.
[0057] Step S14: performing a performance benchmark test on the operating system parameters based on CPU, memory, disk I / O and network I / O, thereby generating performance benchmark data;
[0058] The embodiment of the present invention performs performance benchmark tests on CPU, memory, disk I / O, network I / O, etc. by calling the built-in performance monitoring tools (such as top, perfmon) of the operating system. For example, the system runs the test under high load (CPU usage exceeds 80%, memory occupancy exceeds 75%), measures the disk read and write rate of 150MB / s, and the network I / O rate of 10MB / s, and analyzes the overall performance of the system through these data. Finally, the system will comprehensively process the performance indicator data obtained during the test and generate the performance benchmark data of the operating system as a performance reference for executing tasks in automated testing.
[0059] Step S15: generating waiting mechanism configuration data for controlling waiting behavior in automated testing according to the dynamic waiting time benchmark data, the exponential backoff strategy parameters and the performance benchmark data;
[0060] The embodiment of the present invention comprehensively generates the waiting mechanism configuration data based on the dynamic waiting time benchmark data in step S12, the exponential backoff strategy parameters in step S13, and the performance benchmark data in step S14. For example, for high-load scenarios, the system will set the initial delay to 300ms, and adjust the maximum delay to 1500ms in combination with the exponential backoff strategy, while in low-load scenarios, the initial delay is 100ms. The performance benchmark data will adjust the waiting time according to different hardware conditions to ensure that the waiting mechanism can more flexibly control the execution of the test in a resource-constrained environment. Ultimately, the waiting mechanism configuration data will be used for each test step in the automated test to ensure intelligent adjustment of the task waiting time.
[0061] Step S16: collecting element location information of the user interface of the software application based on the waiting mechanism configuration data, and generating a data-driven element location strategy to obtain element location configuration data; performing conditional waiting strategy processing according to the element location configuration data and the waiting mechanism configuration data to generate conditional waiting mapping data.
[0062] The embodiment of the present invention collects element location information of the user interface of the software application based on the waiting mechanism configuration data generated in step S15. Through UI automation tools (such as Appium or Selenium), the system scans all UI elements on the software application interface, records the ID, Class Name, XPath and other attributes of the elements, and performs data-driven analysis on these elements. For example, the ID of a button is "submitBtn" and is located in the lower right corner of the page. The system will generate element location configuration data based on this information. Subsequently, combined with the waiting mechanism configuration data, the system applies conditional waiting strategy processing. For example, if an element fails to load within 500ms under a high-load scenario, the system will extend the waiting time and retry through conditional waiting judgment. Finally, the system combines the loading time of these elements with the waiting strategy to generate conditional waiting mapping data to optimize the recognition and interaction process of interface elements.
[0063] The present invention can fully grasp the state of the test environment by acquiring data such as the operating system, hardware configuration, and network environment. This detailed environmental information helps to provide accurate context data for the automated test process, ensuring that the test can be effectively executed in different environments. In addition, the generated software dependency data can help identify the system's dependence on third-party libraries, drivers, or other software, reduce failures caused by lack of dependence in the test, and improve the stability of the test. The real-time status of the hardware and network environment is analyzed, and the benchmark value of the waiting time is dynamically calculated, so that the waiting strategy can be automatically adjusted according to the performance of the environment. This dynamic adjustment mechanism avoids the problems caused by the traditional fixed waiting time: that is, the waiting time is too long to waste resources, or the waiting time is too short to cause the test to fail. By generating dynamic waiting time benchmark data, the test process becomes more flexible and efficient, especially in the case of network delay or unstable hardware performance, the smooth progress of the test can be ensured. By setting the initial retry interval time based on the network environment, determining the maximum number of retries, and calculating the backoff factor, the generated exponential backoff strategy enables the test system to adaptively adjust the retry interval when encountering a temporary failure. The exponential backoff strategy increases the waiting time for each retry, avoids the occupation of system resources by frequent retries, reduces the system burden, and can continue to execute the test task in time when the network condition is restored. This mechanism improves the fault tolerance and efficiency of the test system in an unstable environment, ensuring fewer failures and resource waste. By benchmarking the CPU, memory, disk I / O and network I / O of the operating system, detailed performance benchmark data can be generated. These data help the test system understand the current load status of system resources, and can dynamically adjust the waiting and retry mechanisms, so that the system can be tested with reasonable waiting time and retry strategies in a high-load environment, thereby reducing the probability of test failure due to system bottlenecks and improving the stability of the test. By combining dynamic waiting time benchmark data, exponential backoff strategy parameters and performance benchmark data, a set of waiting mechanism configuration data that adapts to the current system status is generated. In this way, the test system can flexibly adjust the waiting behavior in different environments, ensuring that the test can be completed faster in an environment with better performance, and in an environment with poor performance, it can reduce unnecessary failures by appropriately extending the waiting time, thereby improving the overall test efficiency and accuracy. Based on the waiting mechanism configuration data, the user interface element location information is collected to ensure that the data of the interface elements can be accurately collected in different environments. The data-driven element location strategy is generated based on the actual environmental data, so that the system can dynamically adjust the location method according to the real-time situation to avoid location failures caused by problems such as interface element loading delays. Finally, by processing the element location configuration data and the waiting mechanism configuration data with conditional waiting strategies, the system can intelligently wait for the interface elements to appear instead of blindly waiting, further improving the success rate of location and test efficiency.
[0064] Preferably, step S12 comprises the following steps:
[0065] Step S121: performing response performance analysis on the CPU processor speed and memory capacity in the hardware configuration data to generate hardware performance evaluation data; and generating a hardware compensation coefficient based on the hardware performance evaluation data;
[0066] Step S122: Perform performance evaluation on the network delay time, network bandwidth and network stability index in the network environment data to obtain a network performance benchmark value; generate a hardware compensation coefficient according to the network performance benchmark value;
[0067] Step S123: Calculate the waiting time reference value based on weighted fusion according to the network performance reference value and the hardware performance evaluation data, and correct the waiting time reference value according to the hardware compensation coefficient and the hardware compensation coefficient, so as to obtain an initial waiting time reference value;
[0068] Step S124: performing a fluctuation range analysis on the initial waiting time reference value and extracting minimum and maximum thresholds, thereby generating dynamic waiting time reference data.
[0069] The embodiment of the present invention first performs a response performance analysis on the CPU processor speed and memory capacity in the hardware configuration data. For example, the CPU speed is 3.5GHz and the memory capacity is 16GB. The system evaluates the CPU task processing speed and the memory read and write speed through the performance monitoring tool to generate hardware performance evaluation data. The CPU computing power is 1 billion operations per second and the memory read speed is 2.5GB / s. Then, the system generates a hardware compensation coefficient based on the hardware performance evaluation data. For example, if the CPU processing speed is higher than 3.0GHz, the hardware compensation coefficient is set to 0.9, and when the memory capacity is higher than 8GB, the compensation coefficient is 0.8. The hardware compensation coefficient will be used to adjust the benchmark value of the waiting time to adapt it to the performance requirements under different hardware environments. The system uses a network performance test tool to evaluate the network environment data, including network delay time, bandwidth and network stability. Assume that the network delay is 50ms, the bandwidth is 100Mbps, and the packet loss rate is 1%. The system will perform performance evaluation on these indicators. The shorter the network delay, the larger the bandwidth, and the lower the packet loss rate, the higher the network performance benchmark value. In this scenario, the system calculates the network performance benchmark value to be 85%. According to the network performance benchmark value, the system generates a network-related hardware compensation coefficient. For example, if the network performance benchmark value is higher than 80%, the compensation coefficient is set to 0.95. These compensation coefficients will be used to adjust the waiting time benchmark value of the system in subsequent steps. According to the network performance benchmark value in step S122 and the hardware performance evaluation data in step S121, a weighted fusion algorithm is used to calculate the waiting time benchmark value. The system first sets weights for the network performance benchmark value and the hardware performance evaluation data, for example, the network accounts for 60% and the hardware accounts for 40%. Assuming that the network performance benchmark value is 85% and the hardware performance evaluation data is 75%, the initial waiting time benchmark value after weighted fusion is 0.85×0.6 + 0.75×0.4 = 0.81. Subsequently, the system corrects the waiting time benchmark value according to the hardware compensation coefficient and the network compensation coefficient in steps S121 and S122. Assuming that the hardware compensation coefficient is 0.9 and the network compensation coefficient is 0.95, the corrected waiting time benchmark value is 0.81 × 0.9 × 0.95 = 0.692. This correction value serves as the initial waiting time reference value, providing a basis for subsequent dynamic adjustments. The initial waiting time reference value in step S123 is analyzed for fluctuation range. First, the system tests under different load conditions to observe the fluctuation of the upper and lower limits of the waiting time. For example, under high load, the initial waiting time may increase to 1.2 times, while under low load it may decrease to 0.8 times. The system statistically processes these data and extracts the minimum waiting time threshold and the maximum waiting time threshold, assuming that the minimum value is 500ms and the maximum value is 1500ms.Ultimately, the system generates dynamic waiting time benchmark data based on these thresholds to ensure that under different network and hardware conditions, the system can adaptively adjust the waiting time and achieve more accurate task execution scheduling.
[0070] The present invention can evaluate the response performance of the system when processing complex calculations and data loading tasks by analyzing the CPU processor speed and memory capacity. The hardware performance evaluation data generated by this analysis reflects the processing power of the hardware resources on which the test system relies. The hardware compensation coefficient generated based on these data can provide a reference for the adjustment of the waiting time, so as to increase the waiting time in a slower hardware environment, avoid test failures caused by insufficient resources, or reduce unnecessary waiting time when the hardware conditions are better, thereby optimizing the overall test performance. The network delay, bandwidth and network stability are evaluated to obtain a network performance benchmark value. Network performance has a direct impact on the response speed of the test, especially the test in a remote server or cloud environment. The generated network performance benchmark value provides a basis for the adjustment of the waiting strategy. The hardware compensation coefficient generated based on network performance ensures that when the network condition is poor, the system can automatically extend the waiting time, thereby ensuring the stability of the test. When the network condition is good, the waiting time can be shortened, thereby improving the test efficiency. The weighted fusion of hardware and network performance data can comprehensively consider the impact of hardware and network on the system response speed, and calculate a more reasonable waiting time benchmark value. Then, the benchmark value is corrected based on the compensation coefficients of the hardware and network to make it more accurately reflect the actual response time in the current environment. This calculation process ensures that the waiting time is neither too short to cause test failure nor too long to waste resources. The corrected initial waiting time benchmark value provides an accurate basic waiting time that adapts to the current test environment. By analyzing the fluctuation range of the initial waiting time benchmark value and extracting the minimum and maximum thresholds, it is ensured that the system can cope with response time fluctuations during the test. Such fluctuations may come from hardware performance, network latency, or other external environmental factors. The generated dynamic waiting time benchmark data provides the system with a flexible waiting strategy that can maintain a stable waiting time when performance fluctuations are small, and can adaptively adjust the waiting time when performance fluctuations are large, preventing test failures due to slow response or loading delays.
[0071] Preferably, step S16 comprises the following steps:
[0072] Step S161: scanning the user interface of the software application for elements, and extracting element identification information, hierarchical structure information, and element attribute information in the interface, thereby obtaining preliminary element location data;
[0073] Step S162: performing visual element feature collection according to the preliminary element positioning data, thereby obtaining visual element feature data, wherein the element feature collection includes the shape, color, size and relative position of the interface element;
[0074] Step S163: performing similarity analysis on different interface elements according to the visual element feature data, and establishing a mapping relationship between visual features and element positions, thereby generating an element visual position mapping table;
[0075] Step S164: optimizing the element positioning strategy based on the element visual positioning mapping table and the correlation analysis result between the element visual positioning mapping table and the waiting mechanism configuration data, and generating data-driven element positioning strategy data;
[0076] Step S165: Prioritize and combine the element location strategy data to construct an element location strategy chain, thereby generating element location configuration data;
[0077] Step S166: Perform conditional waiting strategy processing according to the element positioning configuration data and the waiting mechanism configuration data to generate conditional waiting mapping data.
[0078] The embodiment of the present invention analyzes the user interface of the software application to be tested, traverses all visible elements in the interface one by one, and extracts the basic information of each element, including the name of the element, the hierarchical relationship (for example, which panel or window a button belongs to), the display attributes of the element (such as color, font, size, etc.), and the relative position (such as the vertical and horizontal distance relative to other elements). This step does not rely on specific tools, but directly reads the rendering information of the interface by writing code, or traverses through the UI tree structure in the memory. The preliminary element positioning data finally obtained can include the basic features of each button, text box, drop-down box and other controls in the interface, providing a basis for subsequent visual feature acquisition. After obtaining the preliminary positioning data of the interface elements, the system further extracts the visual features of each element by capturing the visual image data of the interface elements. Specifically, the system performs edge detection on each element to identify its shape, such as a rectangular button, a circular icon, etc. At the same time, the system also extracts the color (by obtaining the RGB value of the pixel), the size (calculated by the pixel width and height), and the relative position (based on the coordinate position of the element in the interface). In this process, the captured screen or window screenshot can be analyzed by an image processing algorithm to obtain visual feature data of the interface elements, such as the features of a blue rectangular button. Based on the visual element feature data extracted in step S162, the similarity between the elements in the interface is calculated. By comparing the visual features of each element, such as shape, color, size, etc., the system can identify which elements have high similarity in different interfaces. For example, there may be multiple buttons with the same shape and similar color on different windows or pages. In order to establish a mapping relationship between visual features and element positioning, the system generates an element visual positioning mapping table by analyzing these similarity data. The table associates the visual features of each element with its actual position, which is used to improve the accuracy of element positioning in subsequent steps. Based on the element visual positioning mapping table generated in step S163, the system optimizes the element positioning strategy in combination with the actual situation of interface loading and waiting mechanism. By analyzing the loading time of each element and the interface loading order, the system will set different waiting time strategies for different elements. For example, for elements that load slowly, the system will adjust the waiting time strategy to ensure that the element is positioned after the interface is loaded. At the same time, the system will further optimize the positioning strategy based on the visibility of elements in the interface (for example, an element will only appear after a specific operation), thereby generating data-driven element positioning strategy data to improve the success rate of interface element positioning. After generating the optimized element positioning strategy data, the system prioritizes and combines these strategies to ensure that key interface elements are positioned first. Priority can be determined based on the role and importance of the element in the interface. For example, the login button, submit button, etc. usually have a higher priority, while some minor links or non-critical buttons have a lower priority.The system will establish an element location strategy chain based on these priorities and execute the location tasks in order of priority to ensure that key elements can be located first during the automated testing process, thereby improving the efficiency and accuracy of the overall test. According to the element location configuration data and waiting mechanism configuration data generated above, the conditional waiting strategy processing is applied. Specifically, the system sets different waiting conditions for different interface elements based on their loading conditions, response speed and other factors. For example, for elements that load slowly, the system will dynamically adjust the waiting time or set conditional judgments so that the positioning operation is only performed after the element is loaded. For those elements that load faster, the system applies a shorter waiting time to improve the efficiency of test execution. Through the combined processing of these conditional waiting strategies, the system generates conditional waiting mapping data to ensure that each interface element can be accurately and timely located in actual testing.
[0079] The present invention performs a comprehensive element scanning on the user interface, extracts the identification information, hierarchical structure information and element attribute information of the elements, and forms preliminary element positioning data. This step provides basic data for subsequent visual feature acquisition and element positioning optimization, ensuring that all interface elements can be accurately identified and effectively located to avoid omission or misjudgment. At the same time, these preliminary data can be used for subsequent dynamic interface change analysis to improve the flexibility of element positioning. Based on the visual features (such as shape, color, size and relative position) of the interface elements, the visual element feature data is collected and generated, so that the system can distinguish different elements when processing different interfaces or similar interface elements. This process makes the automated test not only rely on static element attributes, but also dynamically identify interface elements through visual information, greatly improving the accuracy of element positioning, especially in complex or changing user interfaces. By performing similarity analysis on the visual element features, elements that may be similar or have the same features in the interface can be identified, and a mapping relationship between visual features and element positioning can be established to generate an element visual positioning mapping table. This step ensures that similar elements in the interface will not be mislocated, and at the same time can optimize the processing efficiency of elements with the same features, reduce repeated feature acquisition and analysis work, and improve the response speed of the system. After correlation analysis based on the element visual positioning mapping table and the waiting mechanism configuration data, the element positioning strategy is optimized to generate data-driven element positioning strategy data. This optimization process makes the positioning strategy more flexible and adaptable, and can be adjusted according to different interface structures or user operation conditions. This reduces the risk of positioning failure, ensures the smooth progress of the test process in complex or changeable interfaces, and enhances the accuracy and robustness of the test. The element positioning strategy data is prioritized and combined to build an element positioning strategy chain to ensure that interface elements of different types or priorities can be efficiently positioned in sequence. Through this strategy chain, it can be ensured that after the key elements are successfully positioned, the system can automatically process the secondary elements and reasonably arrange the positioning order according to the dependencies of different elements, reducing positioning conflicts and repeated operations. This improves the efficiency of automated testing and also enhances the adaptability to complex test scenarios. Combined with the element positioning configuration data and the waiting mechanism configuration data, conditional waiting strategy processing is performed to generate conditional waiting mapping data. This allows the system to dynamically adjust the waiting time according to the status and environmental conditions of different elements to avoid test failures caused by differences in response speed. The conditional waiting strategy can be flexibly adapted to different test scenarios, improving the stability and reliability of the test and ensuring that the test cases can run normally in complex interfaces or slow environments.
[0080] Preferably, step S166 includes the following steps:
[0081] Step S1661: setting a basic waiting time for each element positioning strategy according to the dynamic waiting time reference value in the waiting mechanism configuration data, performing element characteristic and priority analysis on the element positioning configuration data, establishing a mapping rule between element type and waiting strategy, and generating waiting strategy mapping data;
[0082] Step S1662: formulating differentiated waiting strategies for elements with different visual features according to the element visual positioning mapping table, thereby generating visual waiting strategy data;
[0083] Step S1663: Setting an additional network delay compensation time for the dynamically loaded element based on the network environment data, and generating network delay compensation strategy data;
[0084] Step S1664: setting a retry mechanism and timeout processing logic for each waiting strategy according to the exponential backoff strategy parameters, and generating retry strategy data;
[0085] Step S1665: Analyze the element loading characteristics of the software under test in different browser and device environments according to the test environment status parameters, formulate environment-related waiting strategies, and generate environment adaptation strategy data;
[0086] Step S1666: Integrate the environment adaptation strategy data, retry strategy data, network delay compensation strategy data, visual waiting strategy data and waiting strategy mapping data into complete conditional waiting mapping data.
[0087] In the embodiment of the present invention, the system first uses the dynamic waiting time reference value in the waiting mechanism configuration data to set a basic waiting time for each interface element. The specific operation is to classify the element characteristics and priorities by analyzing the type of each element (such as a button, a text box, a drop-down menu, etc.) and its relative importance in the interface. For key elements with high priority, such as a login button and a submit button, the system will set a shorter basic waiting time to ensure a quick response; while for low-priority elements, the system will give a longer basic waiting time. Next, the system generates a mapping rule between the element type and the waiting strategy based on this information, and establishes a rule table for matching the waiting strategy of each element, thereby generating waiting strategy mapping data. According to the element visual positioning mapping table generated in step S163, the system performs a differential analysis on different visual feature elements (such as shape, color, size, etc.) in the interface. Based on these visual features, the system formulates a specific waiting strategy for each element. For example, for more conspicuous elements on the interface (such as large buttons and elements with eye-catching colors), the loading speed is usually faster, and a shorter waiting time can be set; while for elements with more hidden visual features (such as text boxes with colors close to the background), the system will set a longer waiting time to ensure positioning accuracy. Finally, the system generates visual waiting strategy data based on elements with different visual features, and this data and other strategies will jointly guide the subsequent element positioning operation. When analyzing the software under test, the system combines network environment data, such as network latency, bandwidth, and stability, to set additional network delay compensation time for elements that are dynamically loaded through the network. Specifically, the system first detects the loading time of the interface elements and infers the possible delay based on the network performance benchmark value. For those elements whose loading time is obviously affected by the network, such as lists or pictures that need to dynamically obtain content from the server, the system will set additional network delay compensation time to ensure that the positioning operation is performed after the element is loaded. The generated network delay compensation strategy data is used to supplement the waiting strategy and optimize the element positioning in the network environment. The system sets the retry mechanism and timeout processing logic for each waiting strategy according to the exponential backoff strategy parameters in the waiting mechanism configuration. During operation, the system will set the initial delay time and the maximum number of retries for the failure of element positioning. For example, after each positioning failure, the system increases the waiting time according to the backoff factor until the maximum number of retries is reached. If the location still cannot be found within the set number of retries, the system will trigger the timeout processing logic, record the error and skip the location operation of the element. The generated retry strategy data ensures the robustness of the test process and avoids the overall test being affected by the failure to load a single element. Based on the test environment status parameters, the system analyzes the element loading characteristics of the software under test on different browsers (such as Chrome, Firefox, Edge, etc.) and devices (such as mobile phones, tablets, PCs). The system will develop corresponding waiting strategies for each environment by comparing the loading time and performance characteristics of elements in different environments.For example, on some mobile devices or browsers, interface elements may load slowly, and the system will set a longer waiting time for these environments; for devices or browsers with better performance, the waiting time is shorter. Finally, the system generates environment adaptation strategy data to ensure the accuracy of element positioning in multi-environment testing. The system integrates various types of strategy data previously generated, including environment adaptation strategy data, retry strategy data, network delay compensation strategy data, visual waiting strategy data, and waiting strategy mapping data. During operation, the system uses a strategy merging algorithm, combined with the data priority and applicable conditions of each strategy, to integrate all strategies into complete conditional waiting mapping data. This mapping data covers all waiting strategies and positioning rules for each interface element, providing detailed guidance for the execution of automated tests, thereby ensuring the comprehensiveness and efficiency of the test.
[0088] The present invention generates waiting strategy mapping data according to the dynamic waiting time reference value and element characteristic priority in the waiting mechanism configuration data. The core of this step is to establish mapping rules between different types of interface elements, so that the system can adaptively adjust the waiting time according to the characteristics of different elements (such as buttons, input boxes, dynamically loaded elements, etc.), avoiding the efficiency problems caused by the unified waiting time configuration. Through priority analysis, it is ensured that key elements can be processed first, and the efficiency and accuracy of automated testing are improved. Differentiated waiting strategies are formulated for elements with different visual features, and visual waiting strategy data are generated. Through differentiated processing of visual elements (such as shape, color, size, etc.), the system can control the waiting time more finely, especially when processing similar elements or dynamically changing interfaces, it can avoid positioning failure or efficiency reduction caused by insufficient or too long waiting time. This step improves the accuracy and flexibility of the test, especially in complex or dynamic interfaces. Based on network environment data, additional network delay compensation time is set for dynamically loaded elements, and network delay compensation strategy data is generated. This strategy solves the problem of slow element loading due to network instability or excessive delay, ensures that automated testing can adapt to the test environment under different network conditions, and prevents test failure caused by network problems. At the same time, this delay compensation strategy can also improve the reliability of test results, especially in remote testing or cloud testing. Based on the exponential backoff strategy parameters, the retry mechanism and timeout processing logic are set to generate retry strategy data. By setting a reasonable retry mechanism, the system can deal with problems such as element loading failure or response delay, and avoid test interruptions caused by short-term failures or network fluctuations. At the same time, the timeout processing logic ensures that the waiting is terminated in time when multiple retries are invalid, preventing the test process from hanging due to infinite waiting, and improving the robustness and fault tolerance of the test process. According to the test environment status parameters, the element loading characteristics under different browser and device environments are analyzed to generate environment adaptation strategy data. This step ensures that the automated test can adapt to cross-platform, cross-browser and cross-device differences, such as the loading speed of different browsers or the performance differences of devices. The waiting time is adjusted through environment-related strategies, so that the test process can run stably in multiple environments, enhancing the wide adaptability and stability of the test. The environment adaptation strategy, retry strategy, network delay compensation strategy, visual waiting strategy and waiting strategy mapping data are integrated into complete conditional waiting mapping data. This process organically combines various strategies to ensure that the system can make comprehensive judgments and dynamic adjustments based on the current element characteristics, network status, environment configuration and retry mechanism when executing automated tests, thereby maximizing the flexibility, efficiency and success rate of the test. At the same time, through unified conditional waiting mapping data, the system can automatically adapt to different test scenarios and changing conditions to ensure the smooth progress of the test process and the reliability of the results.
[0089] Preferably, step S2 comprises the following steps:
[0090] Step S21: performing image processing and feature extraction on the software to be tested based on the conditional waiting mapping data, thereby generating element visual feature data;
[0091] Step S22: Generate a visual feature descriptor based on the element visual feature data using a computer vision algorithm;
[0092] Step S23: performing element recognition training based on a machine learning model based on visual feature descriptors to generate a visual AI-assisted positioning model;
[0093] Step S24: applying the visual AI-assisted positioning model to the conditional waiting mapping data, performing visual-assisted positioning processing, and generating visual positioning feature data;
[0094] Step S25: performing fuzzy matching strategy combination on the visual positioning feature data according to the preset performance-aware waiting strategy data, thereby obtaining fuzzy matching strategy data, wherein the performance-aware waiting strategy data includes a system resource usage threshold, a network response time threshold, and a user interaction delay threshold, wherein the fuzzy matching strategy data includes strategies such as similarity threshold adjustment, dynamic timeout setting, and progressive matching;
[0095] Step S26: Generate dynamic element recognition data that adapts to different system performances and network conditions based on the fuzzy matching strategy data and the visual positioning feature data.
[0096] As an embodiment of the present invention, refer to Figure 3 As shown, Figure 1 Detailed step flow diagram of step S2 in the embodiment of the present invention, step S2 includes the following steps:
[0097] Step S21: performing image processing and feature extraction on the software to be tested based on the conditional waiting mapping data, thereby generating element visual feature data;
[0098] The embodiment of the present invention performs image processing on the user interface of the software to be tested according to the conditional waiting mapping data. During operation, the system captures the image of the current interface and preprocesses it, including basic image processing operations such as graying, edge detection, and noise removal to ensure that the image is clear and easy for subsequent feature extraction. Then, the system extracts the visual features of the interface elements from the processed image, such as shape, texture, color, and position. Through feature extraction algorithms, such as SIFT (Scale Invariant Feature Transform) or SURF (Speeded Up Robust Features), preliminary visual feature data for each element in the interface is generated for further analysis and processing.
[0099] Step S22: Generate a visual feature descriptor based on the element visual feature data using a computer vision algorithm;
[0100] The embodiment of the present invention uses a computer vision algorithm to process the visual feature data generated in step S21 to generate corresponding visual feature descriptors. During operation, the system analyzes the visual features of the interface elements and generates high-dimensional feature vectors that describe the unique visual features of each element. Specifically, the system uses algorithms such as ORB (fast rotation-invariant binary descriptor) or HOG (histogram of oriented gradients) to convert the extracted features into visual descriptors that can be used for computer processing. The generated visual feature descriptors accurately reflect the appearance characteristics of the interface elements and provide input data for subsequent machine learning model training.
[0101] Step S23: performing element recognition training based on a machine learning model based on visual feature descriptors to generate a visual AI-assisted positioning model;
[0102] In this step, the embodiment of the present invention uses a machine learning model to train the visual feature descriptors generated in step S22, aiming to create a visual AI-assisted positioning model that can identify interface elements. The specific operation includes first constructing a training set containing a large number of interface element samples, inputting visual feature descriptors, and using machine learning algorithms such as SVM (support vector machine), KNN (K nearest neighbor algorithm) or neural network to train the model. By continuously adjusting the model parameters and training steps, the system optimizes the recognition ability of the model to ensure that it can identify elements in the interface in different environments. Ultimately, the visual AI-assisted positioning model generated by training has a high recognition accuracy and can handle various interface elements.
[0103] Step S24: applying the visual AI-assisted positioning model to the conditional waiting mapping data, performing visual-assisted positioning processing, and generating visual positioning feature data;
[0104] The embodiment of the present invention applies the visual AI-assisted positioning model generated in step S23 to the conditional waiting mapping data to perform visual-assisted positioning processing. During operation, the system first performs recognition operations on the current interface according to the element positioning strategy in the conditional waiting mapping data, and uses the visual AI-assisted positioning model to match each element in the interface. The visual AI model determines the specific position of each element by analyzing the visual feature descriptors in the interface. Finally, the system generates visual positioning feature data, which contains the visual features, position coordinates, and positioning results of all identified elements, providing input support for subsequent operations.
[0105] Step S25: performing fuzzy matching strategy combination on the visual positioning feature data according to the preset performance-aware waiting strategy data, thereby obtaining fuzzy matching strategy data, wherein the performance-aware waiting strategy data includes a system resource usage threshold, a network response time threshold, and a user interaction delay threshold, wherein the fuzzy matching strategy data includes strategies such as similarity threshold adjustment, dynamic timeout setting, and progressive matching;
[0106] The embodiment of the present invention combines the visual positioning feature data with the fuzzy matching strategy according to the preset performance-aware waiting strategy data. During operation, the system first analyzes the system resource usage threshold, network response time threshold, and user interaction delay threshold in the performance-aware waiting strategy data to evaluate the performance status of the current system. Then, the system adjusts the fuzzy matching strategy in the visual element recognition process according to these performance parameters, for example, by adjusting the element similarity threshold to ensure that the element positioning still maintains a certain accuracy under low performance conditions. At the same time, the system dynamically sets the timeout and progressive matching strategies to adapt to different system and network environments and generate fuzzy matching strategy data.
[0107] Step S26: Generate dynamic element recognition data that adapts to different system performances and network conditions based on the fuzzy matching strategy data and the visual positioning feature data.
[0108] The embodiment of the present invention generates dynamic element recognition data that adapts to different system performances and network conditions based on the fuzzy matching strategy data and visual positioning feature data generated in step S25. In specific operations, the system applies different fuzzy matching strategies to the visual positioning feature data, and dynamically adjusts the similarity threshold and timeout period in the element recognition process to adapt to changes in system resources and fluctuations in network conditions. For example, in a high-load system environment, the system may lower the similarity threshold to allow a certain degree of visual error; and in the case of high network latency, the system will increase the timeout period to ensure that the element can be correctly identified. The dynamic element recognition data finally generated can adapt to various complex environments and provide more flexible element recognition capabilities for automated testing.
[0109] The present invention performs image processing and element feature extraction on the interface of the software to be tested, and the system can obtain key information of visual elements (such as shape, color, size, etc.), providing basic data for subsequent visual recognition and positioning. This step improves the accuracy of element recognition, especially when dealing with complex and dynamically changing user interfaces, it can capture visual subtle differences and ensure the accuracy and robustness of the positioning process. Through computer vision algorithms, visual feature descriptors are generated so that each interface element has a unique and recognizable feature representation. This step converts complex visual features into standardized data forms that can be processed by machine learning models, thereby providing more structured input for subsequent element recognition and improving the efficiency and accuracy of model training. Based on visual feature descriptors, the system performs element recognition training through machine learning models to generate visual AI-assisted positioning models. Using the adaptive ability of machine learning, the model can improve the recognition accuracy of different elements through continuous training and optimization. The effect of this step is reflected in its adaptation to complex and changing user interfaces, and its ability to automatically learn and adjust, thereby improving the positioning accuracy and efficiency in automated testing. The visual AI-assisted positioning model is applied to conditional waiting mapping data to generate visual positioning feature data. By combining the AI model with the waiting mechanism, the system can intelligently perform precise visual-assisted positioning under different conditions, thereby improving the robustness of element recognition. This step enables automated testing to maintain a high recognition success rate and efficiency under different system resources and network conditions, especially in dynamic and complex environments. Based on the visual positioning feature data and performance-aware waiting strategy data, the system generates fuzzy matching strategy data. The fuzzy matching strategy enables the system to perform more flexible element matching in uncertain scenarios by introducing mechanisms such as similarity threshold adjustment, dynamic timeout setting, and progressive matching. This step greatly improves the fault tolerance and adaptability of automated testing, especially when system resources or network performance fluctuates, the system can still accurately complete the test task. Based on the fuzzy matching strategy data and visual positioning feature data, dynamic element recognition data that adapts to different system performance and network conditions is generated. This step ensures that automated testing can adapt to various system performance differences, changes in network conditions and user interaction delays, and optimizes the robustness and flexibility of the test. By dynamically adjusting the recognition data, the system can adaptively locate and operate elements in actual testing, reducing recognition errors or test interruptions caused by changes in external conditions.
[0110] Preferably, step S3 comprises the following steps:
[0111] Step S31: Analyze the historical positioning records of the element positioning configuration data, and count the element positioning success rate to generate positioning success rate data;
[0112] Step S32: identifying the element positioning strategy with a low success rate according to the positioning success rate data, thereby obtaining the positioning strategy with a low success rate;
[0113] Step S33: intelligently set the retry threshold for the dynamic element recognition data according to the low success rate positioning strategy, build a dynamic adjustment mechanism for the number of retries, and generate retry mechanism data;
[0114] Step S34: establishing an element positioning prediction model based on the pre-acquired historical positioning data, performing positioning strategy prediction, and generating prediction strategy data;
[0115] Step S45: adjusting the execution order and timeout setting of element positioning according to the retry mechanism data and the prediction strategy data, thereby generating adaptive adjustment data;
[0116] Step S36: Adaptively adjust the element positioning configuration data according to the adaptive adjustment data to generate adaptive positioning strategy data.
[0117] In the embodiment of the present invention, the system analyzes the element positioning configuration data, focusing on extracting the historical positioning records. In operation, the system will retrieve the element positioning records generated in all previous test execution processes, count the number of successful positioning and failure positioning of each element under different test environments, and thus calculate the positioning success rate of each element. By analyzing these historical data, the system generates positioning success rate data, which contains the success rate percentage, failure rate and positioning error distribution of each element under different environments. These data provide a basis for the optimization and adjustment of subsequent positioning strategies. The system identifies the elements with low positioning success rates and their corresponding positioning strategies based on the positioning success rate data generated in step S31. In operation, the system sets a success rate threshold, usually 85% or 90%, and compares the positioning success rate of each element. If the success rate of an element is lower than the threshold, the system will mark the positioning strategy of the element as a "low success rate strategy". At the same time, the system will also analyze the specific factors affecting the positioning success rate in these strategies, such as too long positioning time, fuzzy element features, etc., and finally generate low success rate positioning strategy data. The system sets intelligent retry thresholds for dynamic element identification data based on low success rate positioning strategies, and builds a mechanism that can dynamically adjust the number of retries. During operation, the system analyzes the elements corresponding to the low success rate positioning strategy and sets an initial retry threshold for these elements. At the same time, it dynamically adjusts the number of retries based on different element characteristics and network conditions. For example, if the characteristics of an element change greatly, the system may increase the upper limit of the number of retries and allow multiple attempts to reposition. The generated retry mechanism data contains information such as the number of retries, retry intervals, and retry stop conditions for each element, ensuring that the positioning strategy is more flexible and intelligent. The system establishes an element positioning prediction model based on historical element positioning records. During operation, the system uses machine learning algorithms (such as decision trees, random forests, etc.) to train the model. The model input includes historical positioning data, such as the positioning success rate of the element, environmental parameters, and the number of retries. The output of the model is the prediction result of the current element positioning success rate, so as to predict in advance which elements may fail to be positioned and generate corresponding prediction strategy data. Through such predictions, the system can adjust the positioning strategy more targeted and prevent potential problems in advance. The system dynamically adjusts the execution order and timeout settings of element positioning based on the retry mechanism data generated in step S33 and the prediction strategy data in step S34. The specific operation includes giving priority to the element positioning strategy with a high success rate, and adjusting the execution order of the elements with a low success rate according to the prediction data, to ensure that the positioning of these elements is executed as soon as possible within the scope permitted by the conditions, so as to prevent positioning failures in subsequent steps. At the same time, the system will dynamically adjust the timeout settings of element positioning according to environmental conditions and prediction results to avoid unnecessary waiting time, thereby generating adaptive adjustment data to ensure a more efficient testing process.The system adjusts the element positioning configuration data according to the adaptive adjustment data generated in step S35 to generate the final adaptive positioning strategy data. During operation, the system will apply the adjusted execution order, retry mechanism, and timeout strategy to the element positioning configuration, and optimize the positioning strategy based on real-time environmental data and prediction data. For example, in a high-load environment, the system may reduce the positioning accuracy requirements for certain elements, and in the case of large network delays, the system will increase the timeout waiting time. The generated adaptive positioning strategy data can dynamically adapt to different test environments and operating conditions to ensure efficient and accurate element positioning.
[0118] By analyzing the historical positioning records, the system can count the positioning success rate of each element and generate positioning success rate data. This process helps identify those elements with high positioning difficulty and provides data support for subsequent optimization. The positioning success rate data can provide intuitive feedback for automated testing, help detect and optimize the positioning strategy of problem elements, thereby improving the accuracy and efficiency of the test. Based on the positioning success rate data, the system can automatically identify the element positioning strategies with low positioning success rates. This step helps to locate the weak links in the test, especially on complex interface elements or dynamically loaded elements, and provides targets for subsequent adjustment strategies to ensure centralized optimization of the test process and improve the overall positioning success rate. Through the analysis of the low success rate positioning strategy, the system sets an intelligent retry threshold and establishes a dynamically adjusted retry mechanism. This mechanism intelligently adjusts the number of retries according to the actual situation, thereby avoiding resource waste and test delays caused by excessive retries. The generated retry mechanism data can dynamically adapt to different scenarios, ensure that retries are performed within a reasonable range, and improve the flexibility and robustness of the test process. Through the historical positioning data obtained in advance, the system establishes an element positioning prediction model, which can predict problems that may occur in future positioning. This prediction model improves the foresight of automated testing, allowing the system to predict potential challenges and make adjustments in advance when performing positioning. Prediction strategy data not only improves the efficiency of testing, but also enhances the system's ability to cope with complex or abnormal scenarios. Combining retry mechanism data and prediction strategy data, the system can intelligently adjust the execution order and timeout settings of element positioning. Through this adaptive adjustment mechanism, the system can prioritize those elements that are easy to locate, delay or try those elements that are more difficult multiple times, avoid time waste, and improve the overall efficiency of testing. Flexible adjustment of timeout settings further reduces the impact of waiting too long or interrupting too early during the test process, and improves the effective utilization of resources. Based on the adaptive adjustment data, the system intelligently optimizes the element positioning configuration data and generates an adaptive positioning strategy. Through this optimization, the system can dynamically adjust the strategy to adapt to changes in actual scenarios, including network environment, interface complexity, etc. This process ensures that the positioning process is more flexible and efficient, reduces the problem of incorrect positioning caused by changes in external conditions, and improves the stability and success rate of automated testing.
[0119] Preferably, step S4 comprises the following steps:
[0120] Step S41: Estimating the execution time of the test case according to the dynamic waiting time reference value in the waiting mechanism configuration data, thereby generating the test case execution time evaluation data;
[0121] Step S42: Calculate the priority based on the test case execution time evaluation data and the business importance preset by the test case, so as to obtain initial priority data;
[0122] Step S43: adjusting the priority of the initial priority data based on the dependency relationship, constructing a test case dependency graph, and generating dependency priority data;
[0123] Step S44: performing resource consumption evaluation according to the dependency priority data and the performance benchmark data in the waiting mechanism configuration data, determining the final priority of the test case, and obtaining the test case priority data;
[0124] Step S45: performing correlation analysis on the visual positioning feature data and the test case priority data, establishing a corresponding relationship between the test scene and the visual feature, and generating scene mapping data;
[0125] Step S46: Perform coverage analysis on the test cases according to the scenario mapping data, thereby generating dynamic test coverage control data, wherein the coverage analysis includes calculation of function coverage, interface element coverage and scenario coverage.
[0126] In an embodiment of the present invention, the system estimates the execution time of each test case according to the dynamic waiting time reference value in the waiting mechanism configuration data. During operation, the system first reads the dynamic waiting time reference value in the waiting mechanism configuration data, which is calculated based on factors such as network delay, hardware configuration and operating system performance. Then, the system estimates the execution time of each use case in combination with the number of operations involved in the test case, the loading of interface elements and the processing time of dependent resources. The generated use case execution time evaluation data includes the estimated execution time, resource utilization rate and potential bottleneck links of each use case. These evaluation data provide a basis for subsequent priority calculations. The system calculates initial priority data based on the use case execution time evaluation data generated in step S41 and the business importance preset by the test case. During operation, the system first reads the business importance score of each use case, which is preset by factors such as the criticality of the business logic and the scope of user influence. Then, the system performs weighted calculation on the business importance and the execution time evaluation data to determine the initial priority of each use case. For example, even if the use case of an important business function has a long execution time, it may still obtain a higher initial priority. The generated initial priority data includes the priority ranking of each use case and its corresponding business and performance indicator weights. The system adjusts the initial priority data based on the dependency relationship and generates dependency priority data. During operation, the system analyzes the dependency relationship between test cases, builds a test case dependency graph, and identifies the dependent cases that need to be executed first. For example, if a test case depends on the execution results of other test cases, the system will adjust the priority of the test case according to this dependency relationship to ensure that the order of dependency is reasonable. In addition, the system will consider the length and complexity of the dependency chain to determine the dependency priority data, and the generated dependency priority data includes the update priority of the test case and the hierarchical information of the dependency relationship. The system performs resource consumption evaluation based on the dependency priority data generated in step S43 and the performance benchmark data in the waiting mechanism configuration data, so as to determine the final priority of each test case. During operation, the system analyzes the consumption of system resources such as CPU, memory, and network by each test case, and evaluates it in combination with the performance benchmark data. If some test cases consume a lot of resources under certain conditions, the system may appropriately reduce their priority to optimize the allocation of resources. The test case priority data finally generated not only includes the priority ranking of the test cases, but also reflects the impact of each test case on system resources. The system associates and analyzes the test case priority data generated in step S44 with the visual positioning feature data, establishes a corresponding relationship between the test scene and the visual feature, and generates scene mapping data. During operation, the system will classify different test scenes according to the visual positioning feature data and analyze the correlation between these scenes and test cases. For example, the scene corresponding to a specific visual feature may involve the operation of certain interface elements, and these operations correspond to specific test cases.Through such association analysis, the system can construct a clear correspondence between the test scenarios and visual features, and the generated scenario mapping data is used to further optimize the test coverage. According to the scenario mapping data generated in step S45, the system performs coverage analysis on the test cases and generates dynamic test coverage control data. During operation, the system first calculates the functional coverage to analyze whether the test cases cover all key business functions. Next, the system calculates the interface element coverage to check whether all important interface elements are covered by the test cases. Finally, the system calculates the scenario coverage to ensure that all key user operation scenarios are tested. The generated dynamic test coverage control data includes a detailed report of each coverage and provides recommended optimization solutions to improve the comprehensiveness of test coverage.
[0127] The present invention estimates the execution time of the test case according to the dynamic waiting time benchmark value, and the system can generate the test case execution time evaluation data. This data provides an important reference for subsequent resource allocation and scheduling, and helps to determine the overall timeliness of the test. Through accurate execution time evaluation, the team can better arrange test resources, improve test efficiency, and reduce test defects caused by insufficient time. Combined with the case execution time evaluation data and the preset business importance, the system can calculate the initial priority for the test case. This process ensures that the most important and time-consuming cases can be executed first, minimizing the risk of key business processes. The initial priority data provides a basis for subsequent optimization, so that the test work can focus on the key links of the business, and improves the pertinence and effectiveness of the test. By adjusting the initial priority data based on the dependency relationship, the system constructs a dependency graph of the test case, thereby generating dependency priority data. This process helps identify the mutual dependencies between the test cases, ensuring that when executing the test cases, the cases with strong dependencies can be executed in the correct order, avoiding test failures or inaccuracies caused by incorrect order. This enhances the systematicness and logic of the test process and improves the credibility of the test results. Combined with dependency priority data and performance benchmark data, the system can evaluate the resource consumption of each test case and determine its final priority. This evaluation ensures the rational use of resources, effectively avoids resource waste or bottleneck problems, and improves test efficiency. The generation of the final priority ensures that the use cases that have a greater impact on system performance are prioritized during the test process, thereby improving the stability and performance of the system. By correlating and analyzing the visual positioning feature data with the test case priority data, the system can establish a correspondence between the test scenario and the visual features and generate scene mapping data. This process ensures that the execution of the test case not only depends on its priority, but also takes into account the visual features of the interface elements, making the test more targeted. The generated scene mapping data helps to ensure the coverage and test effect of each visual element, and improves the comprehensiveness and effectiveness of the test. Based on the scene mapping data, the system performs coverage analysis on the test case, calculates the functional coverage, interface element coverage and scene coverage, and generates dynamic test coverage control data. Coverage analysis provides a comprehensive view of the test process, ensuring that all key functions and scenarios are tested and avoiding the omission of important use cases. By dynamically controlling the generation of test coverage data, the test team can adjust the test strategy in real time and optimize the execution order of test cases, thereby improving the overall test efficiency and effectiveness.
[0128] Preferably, step S5 comprises the following steps:
[0129] Step S51: performing an executability analysis on the test case priority data based on the adaptive positioning strategy data, and evaluating the execution conditions of the test cases and the availability of dependent resources to generate execution condition evaluation data;
[0130] Step S52: performing parallel execution capability analysis on the test cases according to the execution condition evaluation data, identifying a test case group that can be executed in parallel, thereby obtaining parallel execution strategy data;
[0131] Step S53: performing matching analysis on the parallel execution strategy data and the performance benchmark data in the waiting mechanism configuration data based on optimizing the execution order of the test cases;
[0132] Step S54: constructing a test execution queue according to the optimized execution sequence data, and setting execution status monitoring points, thereby generating test execution sequence data;
[0133] Step S55: executing the automated test script based on the test execution sequence data, the dynamic test coverage control data, and the waiting mechanism configuration data, and recording the state information during the test execution process to generate test execution record data;
[0134] Step S56: Perform comprehensive analysis on the test execution record data to generate automated test report data, wherein the comprehensive analysis includes test result statistics, failure cause analysis, performance data collection, and test coverage evaluation.
[0135] In an embodiment of the present invention, the system performs an executable analysis on the test case priority data based on the adaptive positioning strategy data, evaluates the execution conditions of each test case and the availability of dependent resources, so as to generate execution condition evaluation data. In operation, the system first extracts the dependency relationship of each test case recorded in the adaptive positioning strategy data and its required resources (such as hardware, network bandwidth, etc.). Then, the system checks the current status of these resources to confirm whether they are available, such as checking the load of the server and network delay. If the execution condition of a test case is not met, the system will mark the case as unexecutable and generate execution condition evaluation data, which contains the executable status of each case, the availability of dependent resources and the condition satisfaction. The system performs parallel execution capability analysis on the test case according to the execution condition evaluation data, identifies the test case group that can be executed in parallel, and obtains parallel execution strategy data. In this step, the system analyzes the dependency relationship between the test cases and their execution condition evaluation results. If the execution conditions of multiple test cases are met and there is no mutual dependence, the system marks these cases as executable in parallel. To this end, the system will establish a set of test cases that can be executed in parallel, and the generated parallel execution strategy data includes these parallel executable test case groups and their execution order recommendations to optimize the test execution efficiency. The system will match the parallel execution strategy data with the performance benchmark data in the waiting mechanism configuration data based on the optimized test case execution order. During operation, the system first extracts the parallel test case groups in the parallel execution strategy data and reads the performance benchmark data in the waiting mechanism configuration data, including the current CPU usage, memory usage, and network bandwidth of the system. The system then analyzes the resource consumption of the parallel execution case group and uses scheduling algorithms (such as strategies to minimize latency or maximize throughput) to assign the most appropriate execution order to each case to ensure the rational use of system resources. Finally, the generated optimized execution order data contains the recommended execution order and resource allocation information for each case. Based on the optimized execution order data, the system builds a test execution queue and sets execution status monitoring points to generate test execution order data. During operation, the system will arrange the test cases in the queue in the recommended order according to the optimized execution order data. For each test case, the system sets up corresponding monitoring points to monitor the execution status and resource usage in real time, such as monitoring the start, completion, and failure status of the case execution. The monitoring point data is used for subsequent troubleshooting and performance evaluation. The test execution sequence data finally generated will include the execution sequence of the test case, monitoring point information, and its execution status. The system uses the test execution sequence data, dynamic test coverage control data, and waiting mechanism configuration data to execute the automated test script, and records the status information during the test execution to generate test execution record data.During operation, the system executes test cases one by one in the test execution order, and records relevant status information in real time during the execution process, including the execution time, success or failure, error information, resource usage, etc. of the test cases. By executing automated test scripts, the system can efficiently execute a large number of test cases and accurately record all key information during the execution process, and finally form detailed test execution record data. The system conducts a comprehensive analysis of the test execution record data to generate automated test report data. The comprehensive analysis includes multiple aspects, such as test result statistics (success rate, failure rate), failure cause analysis (including error type and frequency), performance data collection (such as execution time and resource consumption), and test coverage evaluation. The system will use data analysis tools to summarize the recorded data, generate charts and data reports, and help analyze the test effect and system performance. The final generated automated test report data provides the development team with intuitive test results and detailed analysis, supporting subsequent improvement and optimization decisions.
[0136] The present invention performs executable analysis on the test case priority data, and the system can identify the execution conditions of the test case and the availability of dependent resources. This evaluation ensures that the test case has the necessary environment and resources before actual execution, avoiding test failure or invalid execution caused by environmental non-compliance. The generated execution condition evaluation data provides a basis for subsequent test planning and resource scheduling, ensuring that the test can proceed smoothly. By analyzing the execution condition evaluation data, the system can identify the test case group that can be executed in parallel. This process maximizes the use of test resources and improves test efficiency. The test cases that can be executed in parallel can be executed in the same time period, thereby accelerating the test cycle and improving the timeliness of the overall test, especially when facing a large number of test cases, the test time can be significantly reduced. By matching and analyzing the parallel execution strategy data with the performance benchmark data, the system can optimize the execution order of the test case. This process ensures that the execution of the test case not only takes into account parallelism, but also takes into account the performance impact, thereby achieving the optimal use of resources and the effectiveness of the test. The optimized execution order can reduce resource competition and improve the overall efficiency and stability of the test process. The test execution queue constructed according to the optimized execution order data provides a clear execution plan for the actual test. By setting execution status monitoring points, the system can monitor the progress of the test in real time. This process ensures the traceability and manageability of test execution, so that strategies can be adjusted and potential problems can be dealt with in a timely manner during the test process, thereby improving the reliability and effectiveness of the test. By executing automated test scripts, the system can test efficiently and consistently. Recording status information during test execution provides detailed data support for subsequent analysis. This process not only improves test efficiency, but also provides the necessary data basis for locating problems and optimizing tests, ensuring the accuracy and repeatability of test results. Comprehensive analysis of test execution record data and generation of automated test report data provide the team with clear test results and feedback. This process includes test result statistics, failure cause analysis, performance data collection, and test coverage evaluation, ensuring a comprehensive understanding of the test process. The generation of automated test reports provides decision support for project management, helps identify product quality issues, optimizes test processes, and provides data basis for the release and improvement of subsequent versions.
[0137] The present invention also provides a system for automated intelligent testing of software applications, which is used to execute the above-mentioned method for automated intelligent testing of software applications. The system for automated intelligent testing of software applications comprises:
[0138] The element positioning module is used to obtain the test environment parameters of the software to be tested, calculate the dynamic waiting time benchmark value, and generate the waiting mechanism configuration data; based on the waiting mechanism configuration data, the element positioning information of the user interface of the software application is collected and the element positioning strategy is generated to obtain the element positioning configuration data; according to the element positioning configuration data and the waiting mechanism configuration data, the conditional waiting strategy is processed to generate the conditional waiting mapping data;
[0139] Intelligent recognition module, used to perform visual AI-assisted positioning processing according to conditional waiting mapping data to generate visual positioning feature data; perform fuzzy matching strategy combination on visual positioning feature data according to preset performance-aware waiting strategy data to generate dynamic element recognition data;
[0140] The adaptive optimization module is used to analyze the positioning success rate of the element positioning configuration data, and to adjust the adaptive positioning strategy of the dynamic element recognition data based on the intelligent retry mechanism to generate adaptive positioning strategy data;
[0141] The scenario planning module is used to prioritize test cases according to the waiting mechanism configuration data to obtain test case priority data; map the visual positioning feature data with the test case priority data to the test scenario, and perform test coverage analysis to generate dynamic test coverage control data;
[0142] The execution control module is used to adjust the test execution sequence of the test case priority data according to the adaptive positioning strategy data to obtain the test execution sequence data; use the test execution sequence data, dynamic test coverage control data and waiting mechanism configuration data to perform automated test execution on the software application, thereby generating automated test report data.
[0143] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.
[0144] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A method for automated intelligent testing of software applications, characterized in that: The following steps are involved: Step S1: Acquire test environment parameters for the software to be tested, calculate dynamic waiting time benchmark values, and generate waiting mechanism configuration data; Based on the waiting mechanism configuration data, element location information is collected and element location strategy is generated for the user interface of the software application to obtain element location configuration data; Conditional waiting strategy processing is performed according to element location configuration data and waiting mechanism configuration data to generate conditional waiting mapping data. Step S1 includes: Step S11: acquiring test environment parameters for the software to be tested and generating test environment status parameters, wherein the test environment status parameters include operating system parameters, hardware configuration data, and network environment data and software dependency data; Step S12: Calculate the dynamic waiting time reference value for the hardware configuration data and the network environment data, thereby obtaining the dynamic waiting time reference data; Step S13: setting an initial retry interval and determining a maximum number of retries based on network environment data, and calculating a backoff factor to generate exponential backoff strategy parameters, wherein the exponential backoff strategy parameters include an initial delay, a maximum delay, and a backoff rate; Step S14: performing a performance benchmark test on the operating system parameters based on CPU, memory, disk I / O and network I / O, thereby generating performance benchmark data; Step S15: generating waiting mechanism configuration data for controlling waiting behavior in automated testing according to the dynamic waiting time benchmark data, the exponential backoff strategy parameters and the performance benchmark data; Step S16: collecting element location information of the user interface of the software application based on the waiting mechanism configuration data, and generating a data-driven element location strategy, thereby obtaining element location configuration data; performing conditional waiting strategy processing according to the element location configuration data and the waiting mechanism configuration data, and generating conditional waiting mapping data; Step S2: Perform visual AI-assisted positioning processing according to the conditional waiting mapping data to generate visual positioning feature data; perform fuzzy matching strategy combination on the visual positioning feature data according to the preset performance-aware waiting strategy data to generate dynamic element recognition data. Step S2 includes: Step S21: performing image processing and feature extraction on the software to be tested based on the conditional waiting mapping data, thereby generating element visual feature data; Step S22: Generate a visual feature descriptor based on the element visual feature data using a computer vision algorithm; Step S23: performing element recognition training based on a machine learning model based on visual feature descriptors to generate a visual AI-assisted positioning model; Step S24: applying the visual AI-assisted positioning model to the conditional waiting mapping data, performing visual-assisted positioning processing, and generating visual positioning feature data; Step S25: performing fuzzy matching strategy combination on the visual positioning feature data according to the preset performance-aware waiting strategy data, thereby obtaining fuzzy matching strategy data, wherein the performance-aware waiting strategy data includes a system resource usage threshold, a network response time threshold, and a user interaction delay threshold, wherein the fuzzy matching strategy data includes similarity threshold adjustment, dynamic timeout setting, and progressive matching strategy; Step S26: generating dynamic element recognition data adapted to different system performances and network conditions according to the fuzzy matching strategy data and the visual positioning feature data; Step S3: Analyze the positioning success rate of the element positioning configuration data, and adjust the adaptive positioning strategy based on the intelligent retry mechanism for the dynamic element recognition data to generate adaptive positioning strategy data. Step S3 includes: Step S31: Analyze the historical positioning records of the element positioning configuration data, and count the element positioning success rate to generate positioning success rate data; Step S32: identifying the element positioning strategy with a low success rate according to the positioning success rate data, thereby obtaining the positioning strategy with a low success rate; Step S33: intelligently set a retry threshold for the dynamic element recognition data according to the low success rate positioning strategy, build a dynamic adjustment mechanism for the number of retries, and generate retry mechanism data; Step S34: establishing an element positioning prediction model based on the pre-acquired historical positioning data, performing positioning strategy prediction, and generating prediction strategy data; Step S35: adjusting the execution order and timeout setting of element positioning according to the retry mechanism data and the prediction strategy data, thereby generating adaptive adjustment data; Step S36: Adaptively adjust the element positioning configuration data according to the adaptive adjustment data to generate adaptive positioning strategy data; Step S4: Prioritize the test cases according to the waiting mechanism configuration data to obtain test case priority data; map the visual positioning feature data with the test case priority data to the test scenario, perform test coverage analysis, and generate dynamic test coverage control data; Step S5: adjust the test execution sequence of the test case priority data according to the adaptive positioning strategy data to obtain the test execution sequence data; use the test execution sequence data, dynamic test coverage control data and waiting mechanism configuration data to perform automated testing on the software application, thereby generating automated test report data.
2. The method for automated intelligent testing of software applications according to claim 1, characterized in that: Step S12 includes the following steps: Step S121: performing response performance analysis on the CPU processor speed and memory capacity in the hardware configuration data to generate hardware performance evaluation data; and generating a hardware compensation coefficient according to the hardware performance evaluation data; Step S122: Perform performance evaluation on the network delay time, network bandwidth and network stability index in the network environment data to obtain a network performance benchmark value; generate a hardware compensation coefficient according to the network performance benchmark value; Step S123: Calculate the waiting time reference value based on weighted fusion according to the network performance reference value and the hardware performance evaluation data, and correct the waiting time reference value according to the hardware compensation coefficient and the hardware compensation coefficient, so as to obtain an initial waiting time reference value; Step S124: performing a fluctuation range analysis on the initial waiting time reference value and extracting minimum and maximum thresholds, thereby generating dynamic waiting time reference data.
3. The method for automated intelligent testing of software applications according to claim 1, characterized in that: Step S16 includes the following steps: Step S161: scanning the user interface of the software application for elements, and extracting element identification information, hierarchical structure information, and element attribute information in the interface, thereby obtaining preliminary element location data; Step S162: performing visual element feature collection according to the preliminary element positioning data, thereby obtaining visual element feature data, wherein the element feature collection includes the shape, color, size and relative position of the interface element; Step S163: performing similarity analysis on different interface elements according to the visual element feature data, and establishing a mapping relationship between visual features and element positions, thereby generating an element visual position mapping table; Step S164: optimizing the element positioning strategy based on the element visual positioning mapping table and the correlation analysis result between the element visual positioning mapping table and the waiting mechanism configuration data, and generating data-driven element positioning strategy data; Step S165: Prioritize and combine the element location strategy data to construct an element location strategy chain, thereby generating element location configuration data; Step S166: Perform conditional waiting strategy processing according to the element positioning configuration data and the waiting mechanism configuration data to generate conditional waiting mapping data.
4. The method for automated intelligent testing of software applications according to claim 3, characterized in that: Step S166 includes the following steps: Step S1661: setting a basic waiting time for each element positioning strategy according to the dynamic waiting time reference value in the waiting mechanism configuration data, performing element characteristic and priority analysis on the element positioning configuration data, establishing a mapping rule between element type and waiting strategy, and generating waiting strategy mapping data; Step S1662: formulating differentiated waiting strategies for elements with different visual features according to the element visual positioning mapping table, thereby generating visual waiting strategy data; Step S1663: Setting an additional network delay compensation time for the dynamically loaded element based on the network environment data, and generating network delay compensation strategy data; Step S1664: setting a retry mechanism and timeout processing logic for each waiting strategy according to the exponential backoff strategy parameters, and generating retry strategy data; Step S1665: Analyze the element loading characteristics of the software under test in different browser and device environments according to the test environment status parameters, formulate environment-related waiting strategies, and generate environment adaptation strategy data; Step S1666: Integrate the environment adaptation strategy data, retry strategy data, network delay compensation strategy data, visual waiting strategy data and waiting strategy mapping data into complete conditional waiting mapping data.
5. The method for automated intelligent testing of software applications according to claim 1, characterized in that: Step S4 includes the following steps: Step S41: Estimating the execution time of the test case according to the dynamic waiting time reference value in the waiting mechanism configuration data, thereby generating the test case execution time evaluation data; Step S42: Calculate the priority based on the test case execution time evaluation data and the business importance preset by the test case, so as to obtain initial priority data; Step S43: adjusting the priority of the initial priority data based on the dependency relationship, constructing a test case dependency graph, and generating dependency priority data; Step S44: performing resource consumption evaluation according to the dependency priority data and the performance benchmark data in the waiting mechanism configuration data, determining the final priority of the test case, and obtaining the test case priority data; Step S45: performing correlation analysis on the visual positioning feature data and the test case priority data, establishing a corresponding relationship between the test scene and the visual feature, and generating scene mapping data; Step S46: Perform coverage analysis on the test cases according to the scenario mapping data, thereby generating dynamic test coverage control data, wherein the coverage analysis includes calculation of function coverage, interface element coverage and scenario coverage.
6. The method for automated intelligent testing of software applications according to claim 1, characterized in that: Step S5 includes the following steps: Step S51: performing an executability analysis on the test case priority data based on the adaptive positioning strategy data, and evaluating the execution conditions of the test cases and the availability of dependent resources to generate execution condition evaluation data; Step S52: performing parallel execution capability analysis on the test cases according to the execution condition evaluation data, identifying a test case group that can be executed in parallel, thereby obtaining parallel execution strategy data; Step S53: performing matching analysis on the parallel execution strategy data and the performance benchmark data in the waiting mechanism configuration data based on optimizing the execution order of the test cases; Step S54: constructing a test execution queue according to the optimized execution sequence data, and setting execution status monitoring points, thereby generating test execution sequence data; Step S55: executing the automated test script based on the test execution sequence data, the dynamic test coverage control data, and the waiting mechanism configuration data, and recording the state information during the test execution process to generate test execution record data; Step S56: Perform comprehensive analysis on the test execution record data to generate automated test report data, wherein the comprehensive analysis includes test result statistics, failure cause analysis, performance data collection, and test coverage evaluation.
7. An automated intelligent testing system for software applications, characterized in that: Used to execute the method for automated intelligent testing of software applications as claimed in claim 1, the system for automated intelligent testing of software applications comprises: The element positioning module is used to obtain the test environment parameters of the software to be tested, calculate the dynamic waiting time benchmark value, and generate the waiting mechanism configuration data; based on the waiting mechanism configuration data, the element positioning information of the user interface of the software application is collected and the element positioning strategy is generated to obtain the element positioning configuration data; according to the element positioning configuration data and the waiting mechanism configuration data, the conditional waiting strategy is processed to generate the conditional waiting mapping data; Intelligent recognition module, used to perform visual AI-assisted positioning processing according to conditional waiting mapping data to generate visual positioning feature data; perform fuzzy matching strategy combination on visual positioning feature data according to preset performance-aware waiting strategy data to generate dynamic element recognition data; The adaptive optimization module is used to analyze the positioning success rate of the element positioning configuration data, and to adjust the adaptive positioning strategy of the dynamic element recognition data based on the intelligent retry mechanism to generate adaptive positioning strategy data; The scenario planning module is used to prioritize test cases according to the waiting mechanism configuration data to obtain test case priority data; map the visual positioning feature data with the test case priority data to the test scenario, and perform test coverage analysis to generate dynamic test coverage control data; The execution control module is used to adjust the test execution sequence of the test case priority data according to the adaptive positioning strategy data to obtain the test execution sequence data; use the test execution sequence data, dynamic test coverage control data and waiting mechanism configuration data to perform automated test execution on the software application, thereby generating automated test report data.
Citation Information
Patent Citations
UI automatic test method and system
CN113448845A
Method and system for managing performance for use cases in software applications
US11874760B2