Automatic test method and test platform based on cloud computing
By constructing a dynamic and elastic test resource pool and a digital twin model, and combining reinforcement learning and genetic algorithms, the problems of low resource utilization and insufficient efficiency in traditional software testing methods are solved, realizing efficient automated testing based on cloud computing, and improving test coverage and stability.
Patent Information
- Application Number
- CN202511466312.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2026-01-09
AI Technical Summary
Traditional software testing methods suffer from limited testing resources, low efficiency, high cost, and limited coverage. Furthermore, they lack cloud-based automated testing methods, making it difficult to meet the high-performance testing needs in complex scenarios.
A dynamic and elastic test resource pool is constructed, test case sets are generated by combining reinforcement learning, tasks are decomposed and distributed using an improved genetic algorithm and load prediction model, and anomalies are monitored and handled through a digital twin model, thereby realizing intelligent management of test resources and anomaly handling.
It improves the intelligence and execution efficiency of automated testing, enhances resource utilization, shortens the testing cycle, strengthens the controllability and transparency of the testing process, and reduces the cost of manual intervention.
Smart Images

Figure CN121301200A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software testing technology, and more specifically to an automated testing method and testing platform based on cloud computing. Background Technology
[0002] With the rapid development of software technology, the scale and complexity of software are constantly increasing, and the requirements for software testing are also becoming more stringent. Traditional software testing methods mainly rely on local testing environments, which suffer from problems such as limited testing resources, low testing efficiency, high testing costs, and limited testing coverage.
[0003] Regarding testing resources, local testing environments require a large amount of hardware and software tools, and different testing tasks may require different testing environments, resulting in low utilization of testing resources and difficulty in flexibly expanding them according to testing needs. In terms of testing efficiency, traditional testing methods are mostly sequential tests, requiring manual intervention in the testing process, such as writing test cases, setting up test environments, and analyzing test results, leading to long testing cycles and difficulty meeting the needs of rapid iterative software development. Regarding testing costs, maintaining and upgrading local testing environments requires significant investment of human, material, and financial resources, increasing the cost of software testing. Regarding test coverage, due to limitations in testing resources and time, traditional testing methods struggle to conduct comprehensive testing of software, potentially leading to undiscovered defects and impacting software quality and reliability.
[0004] Cloud computing, with its powerful computing capabilities, storage resources, and network bandwidth, offers a nearly unlimited pool of elastically scalable resources, enabling dynamic allocation of test resources on demand. Theoretically, it can perfectly adapt to testing tasks of various scales and complexities. Furthermore, standardized test environment templates and automated deployment tools on cloud platforms greatly simplify the test environment setup process, ensuring consistency and stability. However, the industry currently lacks a mature, systematic, and widely accepted cloud-based automated testing methodology. Most existing practices are still in the exploratory and initial application stages, lacking in-depth optimization and integration of key aspects such as dynamic allocation of test resources, distributed test execution, intelligent monitoring and adjustment of the test process, and efficient aggregation and analysis of test results.
[0005] Therefore, how to provide cloud-based automated testing methods and testing platforms is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] In view of this, the present invention provides an automated testing method and testing platform based on cloud computing. By constructing a dynamic elastic test resource pool, generating test case sets by combining reinforcement learning, decomposing and distributing tasks using an improved genetic algorithm and load prediction model, monitoring with the help of a digital twin model and handling anomalies through a multi-level mechanism, and generating reports through data aggregation and machine learning analysis, the method improves the intelligence level, execution efficiency, resource elasticity and anomaly handling capabilities of automated testing, thereby meeting the high-performance testing needs in complex scenarios.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: On the one hand, this invention provides an automated testing method based on cloud computing, including: Construct a dynamic elastic test resource pool, which includes a virtualized test node cluster based on a cloud computing platform, a test toolchain, and a distributed test data warehouse; Obtain a performance test request, which contains performance test data; The performance test data is analyzed, and the optimal combination of test nodes and toolchain configuration is selected from the resource pool based on the analysis results. Test case sets covering boundary scenarios and abnormal paths are generated by combining historical test datasets and reinforcement learning algorithms. An improved genetic algorithm and load prediction model are used to decompose the test case set into parallel executable subtasks, and intelligent distribution is performed according to the test node and subtask. Construct a digital twin model of the testing process, collect test information of test nodes in real time during test execution, and use the digital twin model of the testing process to visualize and track test progress and identify anomalies; When a test anomaly is detected, a multi-level anomaly handling mechanism is automatically activated. After the test task is terminated, the distributed data aggregation engine is invoked to normalize the scattered test data. A test result analysis model is built using time-series databases and machine learning algorithms to analyze the test data and obtain a comprehensive test report.
[0008] Preferably, the performance test data is analyzed, and the optimal combination of test nodes and toolchain configuration is selected from the resource pool based on the analysis results, including: The performance test data is analyzed from multiple dimensions to extract the target number of concurrent users and data throughput requirements under the test scenario; Based on the concurrent user count and data throughput requirements obtained from the analysis, the basic computing power value required for the test node is calculated; Candidate test nodes whose hardware configurations meet the basic computing power requirements are selected from the resource pool, and the performance matching degree is calculated based on the historical performance data of the nodes. Based on the network dependency characteristics of the test scenario, network compatibility verification is performed on candidate test nodes: For distributed performance testing scenarios, calculate the standard deviation of network latency between nodes and filter out node groups with a latency standard deviation less than a preset value; Based on the protocol type and data format in the performance test data, candidate toolchains supporting the corresponding protocol parsing and data processing are selected from the toolchain library, and the toolchain compatibility is calculated: The selected node groups and toolchain configurations were jointly simulated and verified to simulate peak load scenarios in the test requirements, and performance data of the combined scheme were collected. Determine effective combination schemes based on performance data; Calculate the overall performance value for all effective solutions, and select the effective combination solution with the highest overall performance value as the optimal test node combination and toolchain configuration.
[0009] Preferably, an improved genetic algorithm and load prediction model are used to decompose the test case set into subtasks that can be executed in parallel, including: Chromosomes are generated by binary encoding each test case. A value of 1 for a gene bit indicates that the corresponding test case is included in the current subtask, and 0 indicates that it is not included. An initial population is constructed by combining test case priority and dependency. Test cases with a priority greater than a preset threshold are assigned to different chromosomes, and test cases with dependencies are bound to the same chromosome. The tournament selection method is used to select the parent generation and retain the top N best chromosomes. Two-point crossover is used for chromosome segments with no dependencies, and single-point crossover is used for segments with dependent test cases. The mutation probability is set according to the fitness. After the iteration termination condition is met, the subtask decomposition scheme is obtained.
[0010] Preferably, intelligent distribution is performed based on test nodes and subtasks, including: Collect historical load data for test nodes; The LSTM model is used as input for historical load data of test nodes, outputs load prediction values, and combines real-time load data to correct the error of the load prediction values. Calculate the available resources and load capacity for each test node; Based on the resource requirements of the subtasks and the predicted load of the test nodes, the subtasks are intelligently distributed to the test nodes.
[0011] Preferably, based on the resource requirements of the subtasks and the predicted load of the test nodes, the subtasks are intelligently distributed to the test nodes, including: The resource requirements of subtasks are matched with the load prediction values of test nodes in multiple dimensions to calculate the resource satisfaction level. Test nodes with resource satisfaction levels greater than the satisfaction threshold are selected to enter the candidate pool. Values are assigned according to the priority of subtasks, and a comprehensive score is calculated based on the resource satisfaction of the nodes. For the candidate nodes with the top J comprehensive scores, calculate the predicted future load growth rate and select the node with the lowest load growth rate; if the load growth rate of the candidate test node exceeds the preset range, then start the subtask splitting.
[0012] Preferably, when a test anomaly is detected, a multi-level anomaly handling mechanism is automatically activated, including: In response to resource-related anomalies, seamless failover to backup nodes and task redistribution are triggered. For test case exceptions, initiate test case refactoring and retry strategies; For systemic anomalies, the root cause analysis engine is invoked to locate the source of the problem and generate repair suggestions. If automatic repair is not possible, multi-channel alarms are triggered.
[0013] On the other hand, the present invention provides a cloud computing-based automated testing platform, comprising: The dynamic elastic resource pool module is used to build a dynamic elastic test resource pool that includes a virtualized test node cluster based on a cloud computing platform, a test toolchain, and a distributed test data warehouse. The virtualized test node cluster supports dynamic scaling up or down according to the test load. The request acquisition and parsing module is used to acquire performance test requests, which contain performance test data, and to parse the performance test data. The test case generation and resource matching module is used to analyze the parsed performance test data, select the optimal test node combination and toolchain configuration from the dynamic elastic resource pool module based on the analysis results, and generate a test case set covering boundary scenarios and abnormal paths by combining historical test datasets and reinforcement learning algorithms. The task decomposition and distribution module is used to decompose the test case set into parallel executable subtasks using an improved genetic algorithm and load prediction model, and to intelligently distribute them according to the resource requirements of the test nodes and subtasks. The digital twin monitoring module is used to build a digital twin model of the testing process, collect test information of test nodes in real time during test execution, and perform visual tracking of test progress and anomaly identification through the digital twin model of the testing process; An exception handling module is used to automatically activate a multi-level exception handling mechanism when the digital twin monitoring module identifies a test exception. The multi-level exception handling mechanism includes handling strategies for different exception types. The data aggregation and analysis module is used to call the distributed data aggregation engine to normalize the scattered test data after the test task is terminated. It uses time-series databases and machine learning algorithms to build a test result analysis model and analyze the test data to obtain a comprehensive test report.
[0014] As can be seen from the above technical solutions, compared with existing technologies, this invention discloses a cloud-based automated testing method and testing platform. It achieves on-demand resource allocation and dynamic scaling through a dynamic elastic test resource pool, avoiding resource idleness and waste, and significantly improving resource utilization. Simultaneously, it combines reinforcement learning algorithms to generate test case sets covering boundary scenarios and abnormal paths, breaking through the limitations of traditional test scenario coverage, improving test depth and comprehensiveness, and reducing potential risks. Furthermore, this invention also employs a combination of an improved genetic algorithm and a load prediction model to achieve intelligent decomposition and precise distribution of test tasks, maximizing parallel execution efficiency and significantly shortening the test cycle. In addition, this invention uses a digital twin model of the test process to achieve real-time tracking of test progress and accurate anomaly identification, improving the controllability and transparency of the testing process. Furthermore, a multi-level anomaly handling mechanism is adopted to implement differentiated strategies for different types of anomalies, ensuring test stability and reducing manual intervention costs. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of the process provided by the present invention.
[0017] Figure 2 This is a schematic diagram of the structure provided by the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] This invention discloses an automated testing method based on cloud computing, such as... Figure 1 As shown, it includes: A dynamic and elastic test resource pool is constructed, which includes a virtualized test node cluster based on a cloud computing platform, a test toolchain, and a distributed test data warehouse; the virtualized test node cluster supports second-level scaling up or down based on real-time test load, and each node has cross-regional deployment and collaboration capabilities; Obtain a performance test request, which contains performance test data. The performance test data is generated by an executable test task description file by using a parsing engine that integrates natural language processing and test domain knowledge graph to extract test objectives, scenario parameters, performance thresholds and compliance requirements. The performance test data is analyzed, and the optimal combination of test nodes and toolchain configuration is selected from the resource pool based on the analysis results. Test case sets covering boundary scenarios and abnormal paths are generated by combining historical test datasets and reinforcement learning algorithms. An improved genetic algorithm and load prediction model are used to decompose the test case set into parallel executable subtasks, and intelligent distribution is performed according to the test node and subtask. Construct a digital twin model of the testing process, collect test information of test nodes in real time during test execution, and use the digital twin model of the testing process to visualize and track test progress and identify anomalies; When a test anomaly is detected, a multi-level anomaly handling mechanism is automatically activated. After the test task is terminated, the distributed data aggregation engine is invoked to normalize the scattered test data. A test result analysis model is built using time-series databases and machine learning algorithms to analyze the test data and obtain a comprehensive test report.
[0020] Furthermore, the performance test data is analyzed, and based on the analysis results, the optimal combination of test nodes and toolchain configuration is selected from the resource pool, including: The performance test data is analyzed from multiple dimensions to extract the target number of concurrent users and data throughput requirements under the test scenario; Based on the concurrent user count and data throughput requirements obtained from the analysis, the basic computing power value required for the test node is calculated; Candidate test nodes whose hardware configurations meet the basic computing power requirements are selected from the resource pool, and the performance matching degree is calculated based on the historical performance data of the nodes. Based on the network dependency characteristics of the test scenario, network compatibility verification is performed on candidate test nodes: For distributed performance testing scenarios, calculate the standard deviation of network latency between nodes and filter out node groups with a latency standard deviation less than a preset value; Based on the protocol type and data format in the performance test data, candidate toolchains supporting the corresponding protocol parsing and data processing are selected from the toolchain library, and the toolchain compatibility is calculated: The selected node groups and toolchain configurations were jointly simulated and verified to simulate peak load scenarios in the test requirements, and performance data of the combined scheme were collected. Determine effective combination schemes based on performance data; Calculate the overall performance value for all effective solutions, and select the effective combination solution with the highest overall performance value as the optimal test node combination and toolchain configuration.
[0021] Preferably, an improved genetic algorithm and load prediction model are used to decompose the test case set into subtasks that can be executed in parallel, including: Chromosomes are generated by binary encoding each test case. A value of 1 for a gene bit indicates that the corresponding test case is included in the current subtask, and 0 indicates that it is not included. An initial population is constructed by combining test case priority and dependency. Test cases with priority greater than a preset threshold are assigned to different chromosomes, and test cases with dependencies are bound to the same chromosome. The population size is set to 1.5-2 times the total number of test cases.
[0022] A tournament selection method is used to select the parent generation and retain the top N best chromosomes. Two-point crossover is used for chromosome segments with no dependencies, and single-point crossover is used for segments containing dependent test cases. The mutation probability is set based on fitness. After the iteration termination condition is met, the subtask decomposition scheme is obtained. Specifically, a tournament selection method is used to select the parent generation and retain the top 10% of the best chromosomes. Two-point crossover is used for chromosome segments with no dependencies, and single-point crossover is used for segments containing dependent test cases. The initial crossover probability is 0.7, decreasing by 0.05 every 10 iterations. Chromosomes with fitness below the population average have a mutation probability of 0.15, and chromosomes with high fitness have a mutation probability of 0.05. During mutation, the gene positions of low-priority test cases are adjusted first. The iteration is terminated when the fluctuation range of the optimal fitness value of the population is ≤5% for 15 consecutive generations or when the number of iterations reaches the number of test cases / 20. The grouping result corresponding to the optimal chromosome is used as the subtask decomposition scheme, and the ratio of the number of subtasks to the number of available test nodes is controlled between 1.2 and 1.5.
[0023] Furthermore, intelligent distribution is performed based on test nodes and subtasks, including: Collect historical load data for test nodes; The LSTM model is used as input for historical load data of test nodes, outputs load prediction values, and combines real-time load data to correct the error of the load prediction values. Calculate the available resources and load capacity for each test node; Based on the resource requirements of the subtasks and the predicted load of the test nodes, the subtasks are intelligently distributed to the test nodes.
[0024] Preferably, based on the resource requirements of the subtasks and the predicted load of the test nodes, the subtasks are intelligently distributed to the test nodes, including: The resource requirements of subtasks are matched with the load prediction values of test nodes in multiple dimensions to calculate the resource satisfaction level. Test nodes with resource satisfaction levels greater than the satisfaction threshold are selected to enter the candidate pool. Values are assigned according to the priority of subtasks, and a comprehensive score is calculated based on the resource satisfaction of the nodes. For the candidate nodes with the highest comprehensive scores (J), calculate the predicted future load growth rate and select the node with the lowest load growth rate. If the load growth rate of the candidate test node exceeds the preset range, start subtask splitting (only applicable to subtasks without dependencies), split the super-large subtask into 2-3 small subtasks and assign them to different nodes.
[0025] Furthermore, after the distribution is completed, a 3-minute test process is simulated to collect the actual resource usage data of the nodes. If the peak CPU usage of the node is greater than 80% or the memory usage is greater than 85% when the subtask is executed, a second distribution is triggered, and the subtask is migrated to the candidate node with the second highest comprehensive score, until all subtasks meet the resource constraints.
[0026] In another embodiment, the specific process of constructing a digital twin model of the testing process and visually tracking and identifying test progress is as follows: Constructing a digital twin model of the testing process: Based on the physical testing environment, a digital twin is built on a cloud computing platform, comprising a three-layer core architecture. The data layer integrates test node hardware parameters, network topology, and test task metadata to form a dynamically updated basic database; the model layer introduces a multiphysics simulation engine to construct node computing power attenuation models, network latency prediction models, and task execution timing models; the interaction layer develops a 3D visualization interface that supports 1:1 scale restoration of test node deployment locations, resource occupancy status, and task flow paths, and allows adjustment of virtual node parameters to simulate scene changes through drag-and-drop operations.
[0027] The specific process of visual tracking of test progress and anomaly identification: Deploy a lightweight data acquisition agent (resource usage ≤ 5%) on each test node and collect the following information at 500ms intervals: Hardware status: CPU core utilization, real-time memory usage, disk read / write IOPS, network transmit / receive bytes and latency jitter; Task execution data: currently running subtask ID, number of completed test cases, remaining execution time, and return codes of key operations (such as API call success rate); Environment parameters: Node operating system process list, network connection status, firewall rule change records.
[0028] The collected data is uploaded to the twin model data layer through an encrypted channel. After cleaning and deduplication, it is updated to the corresponding virtual node attribute fields.
[0029] Visual tracking of test progress includes: using different colors to indicate node load status in a 3D interface (green ≤50%, yellow 50%-80%, red >80%), using dynamic arrows to show the flow trajectory of subtasks between nodes, with arrow length corresponding to data transmission volume and flashing frequency reflecting task priority; clicking on any node expands the task execution dashboard, comparing planned progress with actual progress using Gantt charts, displaying resource consumption peaks at each stage of subtasks using heatmaps, and supporting three-level drill-down query of detailed execution logs by node-subtask-test case.
[0030] The progress warning includes an automatic calculation of the impact range when the actual progress of a subtask is ≥20% behind the planned progress by the twin model, which generates a red warning box on the interface and marks the delay risk coefficient.
[0031] The anomaly detection mechanism includes static threshold verification, dynamic baseline comparison, and association rule mining. Static threshold verification sets basic anomaly criteria, such as CPU usage exceeding 90% for 5 consecutive minutes, memory leak rate exceeding 100MB / minute, and API call failure rate exceeding 5%, which triggers a Level 1 anomaly. Dynamic baseline comparison constructs a normal fluctuation range based on historical data from the previous three similar tests; if the current value exceeds this range and persists for three consecutive collection cycles, it is classified as a Level 2 anomaly. Association rule mining analyzes multi-dimensional data correlations using the Apriori algorithm.
[0032] Furthermore, after an anomaly occurs, the twin model invokes the reverse tracing function to trace the source along the task execution chain. It combines the system snapshot (process stack, network packet capture) at the time of the anomaly to generate a root cause probability list and highlights suspected fault points on the visualization interface.
[0033] In another embodiment, the digital twin model includes a data layer, a model layer, and an interaction layer. The data layer collects hardware status data, test task execution data, and environmental parameters of the physical test nodes at preset intervals through a lightweight acquisition agent. The model layer constructs a node computing power attenuation model, a network latency prediction model, and a task execution timing model. The interaction layer provides a 3D visualization interface. When a test anomaly is detected, a multi-level anomaly handling mechanism is automatically activated, including: For resource-related anomalies, seamless failover and task redistribution are triggered from backup nodes. Specifically, the data layer of the digital twin model collects hardware status and task execution data at 500ms intervals through lightweight acquisition agents deployed on each test node, and synchronizes this data to the virtual node attribute fields. In the visualization interface, the digital twin dynamically identifies node status with colors. When a node triggers a preset threshold, the virtual node automatically flashes and generates a resource anomaly alarm. Simultaneously, the reverse tracing function locates the physical location, associated subtasks, and dependencies of the abnormal node. The model layer of the digital twin calls the resource pool mapping module to synchronize the list of backup nodes in the dynamic elastic resource pool in real time. Based on the original task requirements of the abnormal node, pre-simulation verification of the backup node is performed in the virtual environment. This simulates migrating the subtasks of the abnormal node to the backup node, calculating the load prediction value and network adaptability of the backup node, and selecting the optimal switch node. Finally, the interaction layer of the digital twin sends a switch command to the task scheduling module of the physical environment. The command includes the abnormal node ID, backup node D, the list of subtasks to be migrated, and the task context. The switching process is simulated synchronously in a virtual environment. The progress of subtasks from "going offline" on an abnormal node to "coming online" on a backup node is displayed in real time through a Gantt chart, ensuring the consistency between physical switching and virtual simulation. If network fluctuations occur during the switching process, the digital twin immediately triggers a "retry mechanism" to adjust the data transmission path and synchronize it to the physical environment, achieving "zero-perception switching".
[0034] For test case anomalies, a test case refactoring and retry strategy is initiated. The digital twin model collects the execution logs of each test case in real time and reproduces the test case execution chain in a virtual environment. For example, when the user login interface test case fails to execute, the digital twin reruns the test case in the virtual environment, synchronously simulating the interface call process, comparing the execution results between the physical and virtual environments, and locating the cause of the anomaly. Simultaneously, the digital twin calls the test case dependency graph stored in the distributed data warehouse to check whether the preceding test cases of the current test case have executed normally and whether the dependency data is complete, clarifying whether the anomaly is caused by dependency breakage. If the cause of the anomaly is determined to be a configuration problem of the test case itself, the model layer of the digital twin generates candidate test case refactoring solutions in the virtual environment and performs virtual execution tests on each candidate solution to determine the optimal refactoring solution. If the cause of the anomaly is determined to be dependency breakage, the digital twin simulates the supplementary execution of the preceding test cases in the virtual environment, verifies whether the current test case can run normally after supplementary execution, and synchronously generates dependency repair instructions. Furthermore, the digital twin sends the refactored test case and retry strategy to the test case execution module in the physical environment, and simultaneously executes the retry process in the virtual environment, displaying the execution results of each retry through a visual interface.
[0035] For systemic anomalies, the root cause analysis engine is invoked to locate the source of the problem and generate remediation suggestions. If automatic remediation fails, multi-channel alerts are triggered. Specifically, the digital twin model collects global test link data in real time, including resource pool expansion status, data warehouse read / write IOPS, and toolchain service status, and constructs a global test system topology map in the virtual environment. Simultaneously, the digital twin sets a systemic anomaly threshold. When the threshold is triggered, a global anomaly response mode is immediately activated, suspending non-core test tasks and prioritizing fault handling. The root cause analysis engine is invoked, inputting global monitoring data. The engine uses fault tree analysis and association rule mining to locate the source of the problem. Once the root cause is identified, the digital twin simulates remediation plans in the virtual environment: such as adjusting firewall rules, changing the image repository address, and then simulating the resource pool expansion process to verify the effectiveness of the remediation plan. If the remediation plan is ineffective, the digital twin feeds back to the root cause analysis engine to re-locate the problem until an effective remediation plan is found. If the remediation plan cannot be verified through virtual simulation, the digital twin's interaction layer triggers multi-channel alerts to ensure relevant personnel are aware in real time. Once an alarm is triggered, the digital twin tracks the progress of manual repair in a virtual environment. For example, when the administrator reports that the mirror repository has been repaired, the digital twin immediately re-simulates the expansion process in the virtual environment to verify the repair effect and feeds the results back to the alarm channel, forming a closed loop of alarm-repair-verification.
[0036] On the other hand, the present invention provides an automated testing platform based on cloud computing, such as... Figure 2 As shown, it includes: The dynamic elastic resource pool module is used to build a dynamic elastic test resource pool that includes a virtualized test node cluster based on a cloud computing platform, a test toolchain, and a distributed test data warehouse. The virtualized test node cluster supports dynamic scaling up or down according to the test load. The request acquisition and parsing module is used to acquire performance test requests, which contain performance test data, and to parse the performance test data. The test case generation and resource matching module is used to analyze the parsed performance test data, select the optimal test node combination and toolchain configuration from the dynamic elastic resource pool module based on the analysis results, and generate a test case set covering boundary scenarios and abnormal paths by combining historical test datasets and reinforcement learning algorithms. The task decomposition and distribution module is used to decompose the test case set into parallel executable subtasks using an improved genetic algorithm and load prediction model, and to intelligently distribute them according to the resource requirements of the test nodes and subtasks. The digital twin monitoring module is used to build a digital twin model of the testing process, collect test information of test nodes in real time during test execution, and perform visual tracking of test progress and anomaly identification through the digital twin model of the testing process; An exception handling module is used to automatically activate a multi-level exception handling mechanism when the digital twin monitoring module identifies a test exception. The multi-level exception handling mechanism includes handling strategies for different exception types. The data aggregation and analysis module is used to call the distributed data aggregation engine to normalize the scattered test data after the test task is terminated. It uses time-series databases and machine learning algorithms to build a test result analysis model and analyze the test data to obtain a comprehensive test report.
[0037] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0038] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily 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 invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A cloud computing-based automated testing method, characterized in that, include: Construct a dynamic elastic test resource pool, which includes a virtualized test node cluster based on a cloud computing platform, a test toolchain, and a distributed test data warehouse; Obtain a performance test request, which contains performance test data; The performance test data is analyzed, and the optimal combination of test nodes and toolchain configuration is selected from the resource pool based on the analysis results. Test case sets covering boundary scenarios and abnormal paths are generated by combining historical test datasets and reinforcement learning algorithms. An improved genetic algorithm and load prediction model are used to decompose the test case set into parallel executable subtasks, and intelligent distribution is performed according to the test node and subtask. Construct a digital twin model of the testing process, collect test information of test nodes in real time during test execution, and use the digital twin model of the testing process to visualize and track test progress and identify anomalies; When a test anomaly is detected, a multi-level anomaly handling mechanism is automatically activated. After the test task is terminated, the distributed data aggregation engine is invoked to normalize the scattered test data. A test result analysis model is built using time-series databases and machine learning algorithms to analyze the test data and obtain a comprehensive test report.
2. The automated testing method based on cloud computing according to claim 1, characterized in that, The performance test data is analyzed, and the optimal combination of test nodes and toolchain configuration is selected from the resource pool based on the analysis results, including: The performance test data is analyzed from multiple dimensions to extract the target number of concurrent users and data throughput requirements under the test scenario; Based on the concurrent user count and data throughput requirements obtained from the analysis, the basic computing power value required for the test node is calculated; Candidate test nodes whose hardware configurations meet the basic computing power requirements are selected from the resource pool, and the performance matching degree is calculated based on the historical performance data of the nodes. Based on the network dependency characteristics of the test scenario, network compatibility verification is performed on candidate test nodes: For distributed performance testing scenarios, calculate the standard deviation of network latency between nodes and filter out node groups with a latency standard deviation less than a preset value; Based on the protocol type and data format in the performance test data, candidate toolchains supporting the corresponding protocol parsing and data processing are selected from the toolchain library, and the toolchain compatibility is calculated: The selected node groups and toolchain configurations were jointly simulated and verified to simulate peak load scenarios in the test requirements, and performance data of the combined scheme were collected. Determine effective combination schemes based on performance data; Calculate the overall performance value for all effective solutions, and select the effective combination solution with the highest overall performance value as the optimal test node combination and toolchain configuration.
3. The automated testing method based on cloud computing according to claim 1, characterized in that, An improved genetic algorithm and load prediction model are used to decompose the test case set into parallel executable subtasks, including: Chromosomes are generated by binary encoding each test case. A value of 1 for a gene bit indicates that the corresponding test case is included in the current subtask, and 0 indicates that it is not included. An initial population is constructed by combining test case priority and dependency. Test cases with a priority greater than a preset threshold are assigned to different chromosomes, and test cases with dependencies are bound to the same chromosome. The tournament selection method is used to select the parent generation and retain the top N best chromosomes. Two-point crossover is used for chromosome segments with no dependencies, and single-point crossover is used for segments with dependent test cases. The mutation probability is set according to the fitness. After the iteration termination condition is met, the subtask decomposition scheme is obtained.
4. The automated testing method based on cloud computing according to claim 3, characterized in that, Intelligent distribution based on test nodes and subtasks includes: Collect historical load data for test nodes; The LSTM model is used as input for historical load data of test nodes, outputs load prediction values, and combines real-time load data to correct the error of the load prediction values. Calculate the available resources and load capacity for each test node; Based on the resource requirements of the subtasks and the predicted load of the test nodes, the subtasks are intelligently distributed to the test nodes.
5. The automated testing method based on cloud computing according to claim 4, characterized in that, Based on the resource requirements of the subtasks and the predicted load of the test nodes, subtasks are intelligently distributed to the test nodes, including: The resource requirements of subtasks are matched with the load prediction values of test nodes in multiple dimensions to calculate the resource satisfaction level. Test nodes with resource satisfaction levels greater than the satisfaction threshold are selected to enter the candidate pool. Values are assigned according to the priority of subtasks, and a comprehensive score is calculated based on the resource satisfaction of the nodes. For the candidate nodes with the top J comprehensive scores, calculate the predicted future load growth rate and select the node with the lowest load growth rate; if the load growth rate of the candidate test node exceeds the preset range, then start the subtask splitting.
6. The automated testing method based on cloud computing according to claim 1, characterized in that, When a test anomaly is detected, a multi-level anomaly handling mechanism is automatically activated, including: In response to resource-related anomalies, seamless failover to backup nodes and task redistribution are triggered. For test case exceptions, initiate test case refactoring and retry strategies; For systemic anomalies, the root cause analysis engine is invoked to locate the source of the problem and generate repair suggestions. If automatic repair is not possible, multi-channel alarms are triggered.
7. A cloud-based automated testing platform, characterized in that, include: The dynamic elastic resource pool module is used to build a dynamic elastic test resource pool that includes a virtualized test node cluster based on a cloud computing platform, a test toolchain, and a distributed test data warehouse. The virtualized test node cluster supports dynamic scaling up or down according to the test load. The request acquisition and parsing module is used to acquire performance test requests, which contain performance test data, and to parse the performance test data. The test case generation and resource matching module is used to analyze the parsed performance test data, select the optimal test node combination and toolchain configuration from the dynamic elastic resource pool module based on the analysis results, and generate a test case set covering boundary scenarios and abnormal paths by combining historical test datasets and reinforcement learning algorithms. The task decomposition and distribution module is used to decompose the test case set into subtasks that can be executed in parallel using an improved genetic algorithm and load prediction model, and to intelligently distribute them according to the resource requirements of the test nodes and subtasks. The digital twin monitoring module is used to build a digital twin model of the testing process, collect test information of test nodes in real time during test execution, and perform visual tracking and anomaly identification of test progress through the digital twin model of the testing process. An exception handling module is used to automatically activate a multi-level exception handling mechanism when the digital twin monitoring module identifies a test exception. The multi-level exception handling mechanism includes handling strategies for different exception types. The data aggregation and analysis module is used to call the distributed data aggregation engine to normalize the scattered test data after the test task is terminated, and to build a test result analysis model using time series databases and machine learning algorithms to analyze the test data and obtain a comprehensive test report.
Citation Information
Cited By
Cross-end and cross-region interface test node deployment method and system
CN121935169A
