Automated test intelligent self-healing method and related devices
Patent Information
- Application Number
- CN202611176943.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-10-30
AI Technical Summary
但是,在实际应用中发现,传统的自动化测试方法中失败原因分类粗糙(通常仅区分“网络异常”与“其他”),存在无法精确定位失败的根本维度、失败用例重新执行修复效果较差等问题
[0016]本申请实施例通过多维异构感知通道采集测试执行环境的多维数据,支撑后续进行五维根因定位,精准识别用例执行失败根因,从而指导靶向修复精准性,实现自动化测试智能自愈,减少无效重试执行次数,提高自动化测试执行效果。
Smart Images

Figure CN123011710A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automated testing technology, and in particular to an automated testing intelligent self-healing method and related equipment. Background Technology
[0002] Currently, with the large-scale deployment of 5G networks and the exponential growth in the complexity of software systems, automated testing has become a core means of ensuring software quality.
[0003] In related technologies, when a test case fails, the test data is usually kept unchanged, and the failed test case is re-executed based on the type of exception captured. However, in practical applications, it has been found that traditional automated testing methods have a coarse classification of failure causes (usually only distinguishing between "network anomalies" and "others"), which has problems such as failing to accurately locate the root cause of the failure and poor repair effect of re-executing failed test cases.
[0004] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention
[0005] This application provides an automated testing intelligent self-healing method and related equipment, which can realize automated testing intelligent self-healing, reduce the number of invalid retries, and improve the execution effect of automated testing.
[0006] On one hand, embodiments of this application provide an automated testing intelligent self-healing method, the method comprising the following steps: By activating the heterogeneous perception channel, multi-dimensional data information on test case execution failures during automated test case execution is obtained; wherein, the heterogeneous perception channel includes network topology detection, log semantic detection, protocol interaction parsing, configuration fingerprint monitoring, and execution sequence tracing; Based on the aforementioned multidimensional data information, a digital twin structure is constructed. Based on the digital twin structure, the five-dimensional root cause of the use case execution failure is located through a pre-constructed five-dimensional root cause space, and the five-dimensional root cause explanation is output. Based on the five-dimensional root cause interpretation, intelligent targeted repair decisions are generated and executed to produce targeted repair results. Based on the combined five-dimensional root cause explanation and the targeted repair results, alarm push information is dynamically generated and routed to the responsible party.
[0007] Optionally, based on the digital twin structure, the step of performing five-dimensional root cause localization on use case execution failures through a pre-constructed five-dimensional root cause space, and outputting a five-dimensional root cause explanation, includes: Based on the standardized state representation information in the digital twin structure, it is input into a pre-constructed five-dimensional root cause space; wherein, the five-dimensional root cause space defines a data semantic dimension, a configuration state dimension, a system health dimension, a resource environment dimension, and a script logic dimension; By combining the root cause reasoning library in the five-dimensional root cause space, a progressive five-dimensional root cause localization is performed on the standardized state representation information in the digital twin structure. Based on the five-dimensional coordinates obtained from the progressive five-dimensional root cause localization, the five-dimensional root cause explanation is output.
[0008] Optionally, the step of acquiring multi-dimensional data information on test case execution failures during the execution of automated test cases by activating the heterogeneous perception channel includes: Network topology detection is initiated by sending probe requests to the target server endpoint at preset intervals. Log semantic detection is initiated by performing online semantic parsing on the log data output by the system. By fully capturing the request-response interactions during the execution of automated test cases, protocol interaction parsing is initiated; By establishing a digital fingerprint index for system environment configuration items, configuration fingerprint monitoring is initiated. By establishing a mechanism for recording the timing trajectory during the execution of automated test cases, execution sequence tracing is initiated; By combining the network topology detection, log semantic detection, protocol interaction parsing, configuration fingerprint monitoring, and execution sequence tracing, multi-dimensional data information on test case execution failures during the execution of automated test cases is continuously obtained.
[0009] Optionally, the step of converting and constructing a digital twin structure based on the multidimensional data information includes: Based on the multidimensional data information, each dimension of data information is transformed and mapped to a corresponding sub-twin, and the incremental refresh of each sub-twin is controlled by adopting an event-driven incremental update mode; wherein, the sub-twin includes a network topology active sub-twin, a log semantic feature sub-twin, a protocol interaction state sub-twin, a configuration fingerprint snapshot sub-twin, and an execution sequence trajectory sub-twin. By combining each of the sub-twins and establishing a time-related index using a timestamp aligner, a digital twin structure is constructed.
[0010] Optionally, the step of intelligently generating and executing targeted repair decisions based on the five-dimensional root cause interpretation to generate targeted repair results includes: Based on the five-dimensional root cause explanation, by constructing a state space, action space, and reward function, the targeted repair decision is modeled as a Markov decision process, and the expected repair value is calculated. If the expected repair value is lower than or equal to a preset threshold, the targeted repair decision is stopped and an alarm is triggered, which is taken as the result of the targeted repair. If the expected repair value is greater than the preset threshold, the repair action is selected and executed by querying the Q table, based on the dynamically generated retry upper limit threshold, to generate a targeted repair result.
[0011] Optionally, the step of dynamically generating alarm push information and routing it to the target responsible person by integrating the five-dimensional root cause explanation and the targeted repair results includes: Based on the five-dimensional root cause explanation and the targeted repair results, the responsible party is determined through intelligent routing decision-making. The five-dimensional root cause explanation and the targeted repair results are input into a pre-trained large language model to dynamically generate alarm push information. The alarm push information is routed and output to the target responsible person.
[0012] On the other hand, embodiments of this application provide an automated testing intelligent self-healing device, the device comprising: The data acquisition module is used to acquire multi-dimensional data information on test case execution failures during the execution of automated test cases by activating the heterogeneous perception channel; wherein, the heterogeneous perception channel includes network topology detection, log semantic detection, protocol interaction parsing, configuration fingerprint monitoring, and execution sequence tracing; A digital twin construction module is used to convert and construct a digital twin structure based on the multidimensional data information; The five-dimensional root cause localization module is used to locate the root cause of test case execution failure based on the digital twin structure and through a pre-constructed five-dimensional root cause space, and output a five-dimensional root cause explanation. The targeted repair module is used to intelligently generate and execute targeted repair decisions based on the five-dimensional root cause explanation, thereby generating targeted repair results. The alarm push module is used to integrate the five-dimensional root cause explanation and the targeted repair results, dynamically generate alarm push information, and route it to the target responsible person.
[0013] On the other hand, embodiments of this application provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0014] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0015] On the other hand, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0016] This application embodiment collects multidimensional data of the test execution environment through a multidimensional heterogeneous sensing channel, supporting subsequent five-dimensional root cause localization, accurately identifying the root cause of test case execution failure, thereby guiding targeted repair accuracy, realizing intelligent self-healing of automated testing, reducing the number of invalid retries, and improving the execution effect of automated testing. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the implementation environment of an automated testing intelligent self-healing method provided in an embodiment of this application; Figure 2 This is a flowchart illustrating an automated testing intelligent self-healing method provided in an embodiment of this application; Figure 3 This is a schematic diagram of a process for obtaining multidimensional data information provided in an embodiment of this application; Figure 4 This is a schematic diagram of a process for constructing a digital twin provided in an embodiment of this application; Figure 5 This is a schematic diagram of a five-dimensional root cause localization process provided in an embodiment of this application; Figure 6 This is a schematic diagram of a targeted repair decision-making process provided in an embodiment of this application; Figure 7 This is a schematic diagram of an alarm information generation and output process provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an automated testing intelligent self-healing device provided in an embodiment of this application; Figure 9 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0019] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0020] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0022] Currently, with the large-scale deployment of 5G networks and the exponential growth in the complexity of software systems, automated testing has become a core means of ensuring software quality.
[0023] In related technologies, when a test case fails, the test data is usually kept unchanged, and the failed test case is re-executed based on the type of exception captured. However, in practical applications, it has been found that traditional automated testing methods have a coarse classification of failure causes (usually only distinguishing between "network anomalies" and "others"), which has problems such as failing to accurately locate the root cause of the failure and poor repair effect of re-executing failed test cases.
[0024] In view of this, this application provides an automated testing intelligent self-healing method and related equipment, which collects multi-dimensional data of the test execution environment through a multi-dimensional heterogeneous sensing channel to support subsequent five-dimensional root cause localization, accurately identify the root cause of test case execution failure, thereby guiding the accuracy of targeted repair, realizing automated testing intelligent self-healing, reducing the number of invalid retries, and improving the execution effect of automated testing.
[0025] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.
[0026] The specific implementation methods of the embodiments of this application will be described in detail below with reference to the accompanying drawings. First, an automated testing intelligent self-healing method provided in the embodiments of this application will be described with reference to the accompanying drawings.
[0027] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the implementation environment for an automated testing intelligent self-healing method provided in this application embodiment. In this implementation environment, the main hardware and software components involved include a terminal processor 110 and a server 120.
[0028] Specifically, the terminal processor 110 may be equipped with a control program for an automated testing intelligent self-healing method, and the server 120 serves as the backend server for this control program. The terminal processor 110 and the backend server 120 are connected via a communication link. The automated testing intelligent self-healing method provided in this embodiment can be executed on the terminal processor 110 side.
[0029] Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0030] In addition, server 120 can also be a node server in a blockchain network.
[0031] The terminal processor 110 and the server 120 can establish a communication connection via a wireless network. This wireless network uses standard communication technologies and / or protocols. The network can be the Internet or any other network, including but not limited to a Local Area Network (LAN), Metropolitan Area Network (MAN), Wide Area Network (WAN), mobile, or any combination of wireless networks, private networks, or virtual private networks. Furthermore, these hardware and software components can use the same or different communication connection methods; this application does not impose specific limitations in this regard.
[0032] Of course, this is understandable. Figure 1 The implementation environment described in this application is only one of the optional application scenarios for the automated testing intelligent self-healing method provided in this embodiment. The actual application is not fixed. Figure 1 The software and hardware environment shown is not specifically limited in this application.
[0033] like Figure 2 As shown, Figure 2 This is a flowchart illustrating an automated testing intelligent self-healing method provided in an embodiment of this application, specifically including but not limited to steps 100 to 500.
[0034] Step 100: By activating the heterogeneous perception channel, obtain multi-dimensional data information on test case execution failures during the execution of automated test cases; wherein, the heterogeneous perception channel includes network topology detection, log semantic detection, protocol interaction parsing, configuration fingerprint monitoring, and execution sequence tracing.
[0035] In this embodiment of the application, during the execution of automated test cases, five types of heterogeneous perception channels can be activated to collect multi-dimensional data from the test execution environment, thereby continuously acquiring data information related to the test execution environment.
[0036] The five heterogeneous perception channels specifically include network topology detection, log semantic detection, protocol interaction parsing, configuration fingerprint monitoring, and execution sequence tracing. Specifically, network topology detection is mainly used to determine whether execution failures during test cases are related to the network environment; log semantic detection is mainly used to detect whether there are abnormal messages in the system logs; protocol interaction parsing is mainly used to parse whether there are abnormalities from request-response interactions; configuration fingerprint monitoring is mainly used to capture changes in environmental configuration; and execution sequence tracing is mainly used to determine whether the test script is functioning correctly.
[0037] Optionally, the step of acquiring multi-dimensional data information on test case execution failures during the execution of automated test cases by activating the heterogeneous perception channel includes: Network topology detection is initiated by sending probe requests to the target server endpoint at preset intervals. Log semantic detection is initiated by performing online semantic parsing on the log data output by the system. By fully capturing the request-response interactions during the execution of automated test cases, protocol interaction parsing is initiated; By establishing a digital fingerprint index for system environment configuration items, configuration fingerprint monitoring is initiated. By establishing a mechanism for recording the timing trajectory during the execution of automated test cases, execution sequence tracing is initiated; By combining the network topology detection, log semantic detection, protocol interaction parsing, configuration fingerprint monitoring, and execution sequence tracing, multi-dimensional data information on test case execution failures during the execution of automated test cases is continuously obtained.
[0038] In the embodiments of this application, please refer to Figure 3 , Figure 3 This is a flowchart illustrating a process for obtaining multi-dimensional data information provided in an embodiment of this application. During the execution of automated test cases, a lightweight active probing mechanism can be constructed to periodically send probe requests to the target service endpoint according to a preset cycle (e.g., 5 seconds). Simultaneously, network quality indicators such as link connectivity, round-trip latency, and packet loss rate are collected. Then, combined with sliding window statistics, continuous abnormal situations are statistically analyzed. When multiple consecutive probes fail within the sliding window, a network-level abnormal event is triggered, indicating that the network layer is unstable, thereby initiating network topology probing. The probing results include whether the network is connected, whether there are abnormal times such as jitter, packet loss, and timeout, and the time point when the test case execution failed.
[0039] Furthermore, by establishing a real-time log stream acquisition pipeline, online semantic parsing can be performed on the log data output by the system to extract anomaly identification points (such as ERROR level markers, exception type codes, and call stack feature fingerprints), thereby enabling automated extraction of log-level fault features by starting log semantic detection.
[0040] Furthermore, by fully capturing the request-response interactions during the test execution process, application layer protocol metadata (such as HTTP status codes, response payload structures, and end-to-end response latency) can be extracted. By parsing the business status codes, the underlying protocol status can be associated and aligned with the upper-layer business status, thereby enabling the initiation of protocol interaction parsing and the identification of anomalies from the request-response interactions.
[0041] Furthermore, by establishing a digital fingerprint index of configuration items in the automated testing environment (including information such as database connection strings, environment variables, service endpoints, and credential versions), configuration snapshots are collected through a dual-mode approach of timed polling and event triggering, thereby initiating configuration fingerprint monitoring. Configuration change events are detected through hash digest comparison, a configuration drift report is generated, and the differences before and after the change and the change timestamp are output.
[0042] Furthermore, by establishing a timing trajectory recording mechanism for the test case execution process, the atomic operation information of each test step (such as operation type, timestamp, input parameters, execution result, and sub-step time) is captured in the execution order. Thus, through trajectory sequence analysis, abnormal patterns in the execution layer are identified, and the location identification point of the abnormality is output, and execution sequence tracing is initiated.
[0043] Ultimately, by integrating multi-dimensional data information on test case execution failures continuously collected from five heterogeneous perception channels during the execution of automated test cases, the data integrity of the test execution environment is improved, which facilitates subsequent five-dimensional root cause localization, accurately identifies the root cause of test case execution failure, and achieves holographic perception.
[0044] Step 200: Based on the multidimensional data information, convert and construct a digital twin structure.
[0045] In this embodiment, the five types of heterogeneous and time-asynchronous raw sensing multidimensional data information collected by the heterogeneous sensing channel are converted into a unified, time-aligned, and standardized state representation that facilitates subsequent five-dimensional root cause localization and reading, and represented as a digital twin structure.
[0046] The digital twin structure refers to the virtual mapping of the test execution environment of the system under test in the digital space. It includes five independent sub-twins: network topology active sub-twin, log semantic feature sub-twin, protocol interaction state sub-twin, configuration fingerprint snapshot sub-twin, and execution sequence trajectory sub-twin, which correspond one-to-one with five types of heterogeneous sensing channels.
[0047] In practical applications, the process of converting and constructing a digital twin structure based on the multidimensional data information includes: Based on the multidimensional data information, each dimension of data information is transformed and mapped to a corresponding sub-twin, and the incremental refresh of each sub-twin is controlled by adopting an event-driven incremental update mode; wherein, the sub-twin includes a network topology active sub-twin, a log semantic feature sub-twin, a protocol interaction state sub-twin, a configuration fingerprint snapshot sub-twin, and an execution sequence trajectory sub-twin. By combining each of the sub-twins and establishing a time-related index using a timestamp aligner, a digital twin structure is constructed.
[0048] In the embodiments of this application, please refer to Figure 4 , Figure 4 This is a schematic diagram of a process for constructing a digital twin provided in an embodiment of this application. By mapping data information collected from network topology detection to a network topology activity sub-twin, data information collected from log semantic detection to a log semantic feature sub-twin, data information collected from protocol interaction parsing to a protocol interaction state sub-twin, data information collected from configuration fingerprint monitoring to a configuration fingerprint snapshot sub-twin, and data information collected from execution sequence tracing to an execution sequence trajectory sub-twin, each dimension of data information corresponds one-to-one with a sub-twin. This allows each dimension of data information to be configured with an independent update mechanism, avoiding mutual interference between multiple dimensions and satisfying subsequent cross-validation.
[0049] Furthermore, a time-related index of multi-source data is established through a timestamp aligner to ensure the temporal consistency of cross-channel data, and the construction of each sub-twin is completed through data cleaning and standardized representation.
[0050] Furthermore, by adopting an event-driven incremental update mode to control the incremental refresh of each sub-twin, that is, the incremental refresh of the corresponding sub-twin is triggered only when the perception detects a state change, rather than full synchronization, the consistency between the digital twin and the physical environment is ensured while reducing synchronization overhead.
[0051] Finally, by integrating each sub-twin, a digital twin structure is constructed, and cross-verification can be configured for the digital twin structure, that is, cross-validation is supported between each sub-twin. For example, when the protocol interaction status sub-twin shows an anomaly, the network topology active sub-twin can be associated to determine whether it is caused by an underlying network problem.
[0052] Therefore, by constructing a digital twin structure consistent with the physical testing environment and maintaining dynamic synchronization with the physical testing environment throughout the entire test execution process, a complete digital mirror of the execution context can be provided for subsequent five-dimensional root cause localization, thereby improving the accuracy of anomaly identification.
[0053] Step 300: Based on the digital twin structure, perform five-dimensional root cause localization on the failure of use case execution through the pre-constructed five-dimensional root cause space, and output the five-dimensional root cause explanation.
[0054] In this embodiment of the application, based on the structured standard data information related to test case execution failure carried in the constructed digital twin structure, the root cause of test failure is intelligently located and explained through the five-dimensional root cause space.
[0055] The five-dimensional root cause space is a high-dimensional space formed by five cluster centers (data semantics, configuration status, system health, resource environment, and script logic) naturally generated in the high-dimensional space based on the feature vectors of historical failure cases. Each failure case corresponds to a continuous coordinate point in the space (e.g., P=(d1,d2,d3,d4,d5), where d1 to d5 represent different dimensions), and the coordinate value represents the confidence that the dimension is the root cause of failure.
[0056] Therefore, compared to the crude classification of failure causes in existing technologies, which only distinguishes between "network anomalies" and "others", this application divides the root causes of use case execution failure into multiple different dimensions and reflects the tendency of different dimensions through confidence levels. For example, if the five-dimensional root cause of a use case execution failure is explained as data semantics class 0.1, configuration status class 0.2, system health class 0.8, resource environment class 0.1, and script logic class 0, it can be said that the main root cause of the use case execution failure is biased towards internal system defects, but there are also other secondary root causes, thus forming a five-dimensional root cause explanation that includes primary and secondary structures.
[0057] Specifically, as an optional implementation, the step of performing five-dimensional root cause localization on use case execution failures based on the digital twin structure and outputting a five-dimensional root cause explanation includes: Based on the standardized state representation information in the digital twin structure, it is input into a pre-constructed five-dimensional root cause space; wherein, the five-dimensional root cause space defines a data semantic dimension, a configuration state dimension, a system health dimension, a resource environment dimension, and a script logic dimension; By combining the root cause reasoning library in the five-dimensional root cause space, a progressive five-dimensional root cause localization is performed on the standardized state representation information in the digital twin structure. Based on the five-dimensional coordinates obtained from the progressive five-dimensional root cause localization, the five-dimensional root cause explanation is output.
[0058] In the embodiments of this application, please refer to Figure 5 , Figure 5 This is a flowchart illustrating a five-dimensional root cause localization process provided in an embodiment of this application. Based on standardized state representation information in the digital twin structure, the information is input into a pre-constructed five-dimensional root cause space, which defines a data semantic dimension, a configuration state dimension, a system health dimension, a resource environment dimension, and a script logic dimension.
[0059] Specifically, the data semantic dimension is used to test whether the data matches the current business state, and the main feature source is the data information in the protocol interaction state sub-twin; the configuration state dimension is used to define whether the configuration of the tested environment is consistent with expectations, and the main feature source is the data information in the configuration fingerprint snapshot sub-twin; the system health dimension is mainly used to define whether there are code defects or service anomalies within the tested system, and the main feature source is the data information in the log semantic feature sub-twin and the protocol interaction state sub-twin; the resource environment dimension is mainly used to define whether the basic system environment infrastructure resources are stable, and the main feature source is the data information in the log semantic feature sub-twin and the network topology activity sub-twin; the script logic dimension is mainly used to define whether the test script has defects such as locator failure and assertion errors, and the main feature source is the data information in the execution sequence trajectory sub-twin.
[0060] In practical applications, the five different dimensions mentioned above can be obtained by using the feature vectors of historical failure cases and five cluster centers naturally formed in high-dimensional space through unsupervised clustering algorithms (such as K-Means or DBSCAN).
[0061] Furthermore, a pre-trained large language model can be used to perform batch analysis of historical failure cases, constructing an iteratively evolving root cause reasoning library. Specifically, firstly, the multimodal perception data of each historical failure case is converted into a structured feature vector of a unified dimension through a built-in feature encoder. Then, five-dimensional root cause localization is performed on the feature vector. By calculating the similarity between the feature vector and the existing failure prototypes in the vector database, the five-dimensional coordinates, the main root cause, and the reasoning basis are output. The feature vector of the failure case is associated with the output five-dimensional coordinates and reasoning basis and stored in the vector database. Finally, the results can be manually confirmed or corrected and written back to the vector database to achieve continuous evolution of the root cause reasoning library.
[0062] Furthermore, by combining the five-dimensional root cause space with the root cause reasoning library, a progressive five-dimensional root cause localization is performed on the standardized state representation information in the digital twin structure, such as... Figure 5As shown, the progressive five-dimensional root cause localization can be set up in three layers, including vector retrieval, large language model inference, and rule engine matching. Specifically, the first layer of five-dimensional root cause localization can be performed first, which involves comparing the vector similarity between the standardized state representation information in the digital twin structure and historical cases in the root cause inference library. When the vector similarity is greater than a preset value (e.g., 0.92), the five-dimensional root cause coordinates of the historical cases are directly reused. When the vector similarity is less than or equal to the preset value, the process progresses to the second layer of five-dimensional root cause localization. This involves using a pre-trained large language model to perform inference analysis based on the context and the root cause inference library. By combining log data, protocol response information, configuration changes, script execution trajectories, and historical similar cases, the system outputs five-dimensional coordinates, the main root cause, confidence level, and natural language explanation, thereby locating and identifying newly emerging failure types. When the large language model is unavailable, the system can ultimately degrade back to rule engine matching to ensure basic availability.
[0063] Finally, by integrating the five-dimensional coordinates, principal root cause, confidence level, natural language reasoning basis, source channel, and reasoning time, a unified format of five-dimensional root cause explanation is output.
[0064] Therefore, compared to existing technologies that lack sufficient cognitive dimensions of the test execution environment and typically simplify complex test environments into a few discrete anomaly labels, resulting in coarse classification of failure causes, this application can define and construct a five-dimensional root cause space and adopt progressive positioning and accurate identification through vector retrieval, large language model reasoning, and rule engine matching. Furthermore, it can continuously accumulate, update, and optimize by building a root cause reasoning library, without the need for manual pre-building of a feature library, and can effectively identify unknown types of failed test cases.
[0065] Step 400: Based on the five-dimensional root cause interpretation, intelligently generate and execute targeted repair decisions to generate targeted repair results.
[0066] In this embodiment, the five-dimensional root cause interpretation output by the five-dimensional root cause localization is used as the data basis. An adaptive repair decision framework based on reinforcement learning is adopted to intelligently generate and execute targeted repair decisions, thereby generating targeted repair results.
[0067] Therefore, compared to existing technologies that typically employ a uniform retry strategy regardless of the cause of failure, repeatedly retrying for problems that cannot be resolved through retries, such as system defects or script errors, leading to a waste of computational resources, this application can intelligently generate and execute appropriate targeted repair decisions based on the coordinate values of different dimensions in the five-dimensional root cause explanation, achieving a paradigm upgrade from passive retries to proactive intelligent self-healing.
[0068] Specifically, as an optional implementation, the step of intelligently generating and executing targeted repair decisions based on the five-dimensional root cause interpretation to generate targeted repair results includes: Based on the five-dimensional root cause explanation, by constructing a state space, action space, and reward function, the targeted repair decision is modeled as a Markov decision process, and the expected repair value is calculated. If the expected repair value is lower than or equal to a preset threshold, the targeted repair decision is stopped and an alarm is triggered, which is taken as the result of the targeted repair. If the expected repair value is greater than the preset threshold, the repair action is selected and executed by querying the Q table, based on the dynamically generated retry upper limit threshold, to generate a targeted repair result.
[0069] In the embodiments of this application, please refer to Figure 6 , Figure 6 This is a flowchart illustrating a targeted repair decision-making process provided in an embodiment of this application. It can adopt an adaptive repair decision-making framework based on reinforcement learning, modeling the targeted repair decision-making as a Markov decision process, and learning the optimal repair strategy through historical repair experience.
[0070] Specifically, by using the five-dimensional root cause interpretation as the data foundation, a state space, action space, and reward function can be constructed to model targeted repair decisions as a Markov decision process. The state space can be composed of five-dimensional root cause coordinates, historical repair success rates for root cause types, and the current number of retries. The action space can be composed of atomic operation libraries, such as resetting test data, refreshing configurations, and restarting services, supporting dynamic combination to generate repair action sequences. The reward function can be defined as +10 for successful repair, -5 for failed repair, +2 for correct skip, -8 for incorrect skip, and the time consumed for each retry minus 0.01 × the time consumed (seconds). This prevents the system from blindly pursuing multiple retries and instead measures the repair value.
[0071] Furthermore, before executing a repair action, the expected repair value of the current failed use case is determined by calculating the repair value and repair cost, and compared with a preset threshold (e.g., 0). If the expected repair value is lower than or equal to the preset threshold, it indicates that the cost of continuing to repair the current failed use case is greater than the benefit, and the repair can be skipped directly, triggering an alarm. This avoids the situation where unrepairable cases continue to retries, resulting in wasted computing resources, and serves as a targeted repair result. If the expected repair value is greater than the preset threshold, a repair strategy can be learned based on Q-Learning. The repair action is selected by querying the Q table and executed in conjunction with a dynamically generated retry upper limit threshold, generating a targeted repair result. The reward can be calculated based on the repair result, and the Q table can be updated.
[0072] Specifically, the ε-greedy strategy can be used for action selection through online learning, and the Q-value is updated based on the reward to initialize the Q-table. The Q-value can be defined as the long-term profit estimate of taking a certain repair action in a certain state. The dynamically generated retry upper limit threshold can be determined based on the product of root cause confidence, historical repair success rate, and current state comprehensive adjustment. Therefore, compared with the fixed number of retries in traditional technologies, this application can dynamically generate the retry upper limit threshold according to the specific environmental conditions to adapt to the actual needs of different failure test cases. For example, the retry upper limit threshold can be increased for failure test cases with network jitter, while the retry upper limit threshold can be decreased for failure test cases with script logic errors, thereby better planning computing resources.
[0073] In practical applications, an early stop mechanism can also be introduced, that is, if two consecutive retries fail and the failure modes are exactly the same, the remaining retries are terminated in advance.
[0074] Therefore, compared with existing technologies that trigger the re-execution of failed test cases with a preset fixed number of retries and a fixed waiting time, this application can transform targeted repair decisions into learnable Markov decision problems, and achieve targeted repair based on a reinforcement learning-based adaptive repair decision framework to achieve intelligent self-healing.
[0075] Step 500: Based on the five-dimensional root cause explanation and the targeted repair results, dynamically generate alarm push information and route it to the target responsible person.
[0076] In this embodiment, by comprehensively generating the five-dimensional root cause explanation and targeted repair results, an intelligent alarm routing and dynamic content generation framework is adopted to achieve accurate alarm delivery.
[0077] Therefore, compared to existing technologies that keep test data unchanged after test case execution failure and trigger re-execution of failed test cases with a preset fixed number of retries and a fixed waiting time based on the captured exception type, this application can collect multi-dimensional data of the test execution environment through a multi-dimensional heterogeneous perception channel, supporting subsequent five-dimensional root cause localization, accurately identifying the root cause of test case execution failure, and dynamically determining the number of retries and repair actions, improving the accuracy of targeted repair, realizing intelligent self-healing of automated testing, reducing the number of invalid retries, improving the execution effect of automated testing, and reducing the cost of manual intervention.
[0078] Specifically, as an optional implementation, the step of dynamically generating alarm push information and routing it to the target responsible party by integrating the five-dimensional root cause explanation and the targeted repair results includes: Based on the five-dimensional root cause explanation and the targeted repair results, the responsible party is determined through intelligent routing decision-making. The five-dimensional root cause explanation and the targeted repair results are input into a pre-trained large language model to dynamically generate alarm push information. The alarm push information is routed and output to the target responsible person.
[0079] In the embodiments of this application, please refer to Figure 7 , Figure 7 This is a schematic diagram of an alarm information generation and output process provided in an embodiment of this application. By integrating the five-dimensional root cause explanation and targeted repair results, it can realize the dynamic calculation of the optimal recipient as the target responsible person based on the root cause dimension confidence, current time period (working hours / night / holidays), personnel online status, historical processing efficiency, and other dimensions through intelligent routing decision, without the need to adopt a fixed alarm push mapping mechanism.
[0080] Furthermore, a pre-trained large language model is invoked, and structured alarm content is dynamically generated based on the context of the failed use cases by inputting the five-dimensional root cause explanation and targeted repair results. This content may include alarm title, summary, detailed content, suggested actions, suggested recipients, and suggested response time limits.
[0081] Furthermore, by comprehensively considering data such as unique test case identifiers, environment snapshots at the time of failure, five-dimensional root cause coordinates, main root cause and confidence level, complete repair action records, dynamically generated alarm content, and priority level, alarm push information is dynamically generated and routed to the responsible party.
[0082] In practical applications, the processing results of each alarm push message (such as recipient, response time, and processing action) can also be recorded, thus serving as the data basis for closed-loop correction. This data can be fed back to the routing decision to adjust the priority weights of relevant personnel, and to the large language model to optimize alarm content generation.
[0083] Furthermore, alarm aggregation can be implemented. For example, if multiple failed test cases within a preset time window have the same root cause dimension and similar stack characteristics, they can be merged into one alarm message to avoid duplicate routing push. Priority can also be calculated based on severity, failure frequency, and business impact, and different hierarchical push strategies can be set for alarm messages of different priorities. For example, high priority is instant notification, medium priority is multi-channel push, and low priority is summarized and output at a daily or weekly frequency.
[0084] Therefore, compared to existing technologies with templated alarm content, fixed responsible parties, inability to dynamically adjust according to context, and lack of feedback loop, this application can intelligently route the responsible party, dynamically generate alarm content by calling a large language model combined with specific failure test cases, and perform feedback loop correction by comprehensively processing different alarm information. This enables intelligent alarms and improves the accuracy and practicality of alarm push information.
[0085] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of an automated testing intelligent self-healing device provided in an embodiment of this application. This application also provides an automated testing intelligent self-healing device that can implement the above-mentioned automated testing intelligent self-healing method. The device includes: The data acquisition module 810 is used to acquire multi-dimensional data information on test case execution failures during the execution of automated test cases by activating the heterogeneous perception channel; wherein, the heterogeneous perception channel includes network topology detection, log semantic detection, protocol interaction parsing, configuration fingerprint monitoring, and execution sequence tracing; The digital twin construction module 820 is used to convert and construct a digital twin structure based on the multidimensional data information; The five-dimensional root cause localization module 830 is used to locate the five-dimensional root cause of the failure of test case execution based on the digital twin structure and through the pre-constructed five-dimensional root cause space, and output the five-dimensional root cause explanation. The targeted repair module 840 is used to intelligently generate and execute targeted repair decisions based on the five-dimensional root cause explanation, thereby generating targeted repair results. The alarm push module 850 is used to integrate the five-dimensional root cause explanation and the targeted repair results, dynamically generate alarm push information, and route it to the target responsible person.
[0086] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0087] Please see Figure 9 , Figure 9 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The electronic device includes: The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 using the methods described in the embodiments of this application. The input / output interface 903 is used to implement information input and output; The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904); The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0088] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0089] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0090] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0091] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0092] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0093] This application provides an automated testing intelligent self-healing method and related equipment, which collects multi-dimensional data of the test execution environment through a multi-dimensional heterogeneous sensing channel to support subsequent five-dimensional root cause localization, accurately identify the root cause of test case execution failure, thereby guiding the accuracy of targeted repair, realizing automated testing intelligent self-healing, reducing the number of invalid retries, and improving the execution effect of automated testing.
[0094] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0095] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0096] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0097] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0098] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0099] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0100] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0101] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0102] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0103] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0104] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. An automated testing intelligent self-healing method, characterized in that, The method includes the following steps: By activating the heterogeneous perception channel, multi-dimensional data information on test case execution failures during automated test case execution is obtained; wherein, the heterogeneous perception channel includes network topology detection, log semantic detection, protocol interaction parsing, configuration fingerprint monitoring, and execution sequence tracing; Based on the aforementioned multidimensional data information, a digital twin structure is constructed. Based on the digital twin structure, the five-dimensional root cause of the use case execution failure is located through a pre-constructed five-dimensional root cause space, and the five-dimensional root cause explanation is output. Based on the five-dimensional root cause interpretation, intelligent targeted repair decisions are generated and executed to produce targeted repair results. Based on the combined five-dimensional root cause explanation and the targeted repair results, alarm push information is dynamically generated and routed to the responsible party.
2. The method according to claim 1, characterized in that, Based on the digital twin structure, the method performs five-dimensional root cause localization on test case execution failures through a pre-constructed five-dimensional root cause space, and outputs a five-dimensional root cause explanation, including: Based on the standardized state representation information in the digital twin structure, it is input into a pre-constructed five-dimensional root cause space; wherein, the five-dimensional root cause space defines a data semantic dimension, a configuration state dimension, a system health dimension, a resource environment dimension, and a script logic dimension; By combining the root cause reasoning library in the five-dimensional root cause space, a progressive five-dimensional root cause localization is performed on the standardized state representation information in the digital twin structure. Based on the five-dimensional coordinates obtained from the progressive five-dimensional root cause localization, the five-dimensional root cause explanation is output.
3. The method according to claim 1, characterized in that, The process of acquiring multi-dimensional data information on test case execution failures during automated test case execution by activating the heterogeneous perception channel includes: Network topology detection is initiated by sending probe requests to the target server endpoint at preset intervals. Log semantic detection is initiated by performing online semantic parsing on the log data output by the system. By fully capturing the request-response interactions during the execution of automated test cases, protocol interaction parsing is initiated; By establishing a digital fingerprint index for system environment configuration items, configuration fingerprint monitoring is initiated. By establishing a mechanism for recording the timing trajectory during the execution of automated test cases, execution sequence tracing is initiated; By combining the network topology detection, log semantic detection, protocol interaction parsing, configuration fingerprint monitoring, and execution sequence tracing, multi-dimensional data information on test case execution failures during the execution of automated test cases is continuously obtained.
4. The method according to claim 1, characterized in that, The process of converting and constructing a digital twin structure based on the multidimensional data information includes: Based on the multidimensional data information, each dimension of data information is transformed and mapped to a corresponding sub-twin, and the incremental refresh of each sub-twin is controlled by adopting an event-driven incremental update mode; wherein, the sub-twin includes a network topology active sub-twin, a log semantic feature sub-twin, a protocol interaction state sub-twin, a configuration fingerprint snapshot sub-twin, and an execution sequence trajectory sub-twin. By combining each of the sub-twins and establishing a time-related index using a timestamp aligner, a digital twin structure is constructed.
5. The method according to claim 1, characterized in that, The step of intelligently generating and executing targeted repair decisions based on the five-dimensional root cause interpretation to generate targeted repair results includes: Based on the five-dimensional root cause explanation, by constructing a state space, action space, and reward function, the targeted repair decision is modeled as a Markov decision process, and the expected repair value is calculated. If the expected repair value is lower than or equal to a preset threshold, the targeted repair decision is stopped and an alarm is triggered, which is taken as the result of the targeted repair. If the expected repair value is greater than the preset threshold, the repair action is selected and executed by querying the Q table, based on the dynamically generated retry upper limit threshold, to generate a targeted repair result.
6. The method according to claim 1, characterized in that, The process of combining the five-dimensional root cause explanation with the targeted repair results to dynamically generate alarm push information and route it to the target responsible person includes: Based on the five-dimensional root cause explanation and the targeted repair results, the responsible party is determined through intelligent routing decision-making. The five-dimensional root cause explanation and the targeted repair results are input into a pre-trained large language model to dynamically generate alarm push information. The alarm push information is routed and output to the target responsible person.
7. An automated testing intelligent self-healing device, characterized in that, The device includes: The data acquisition module is used to acquire multi-dimensional data information on test case execution failures during the execution of automated test cases by activating the heterogeneous perception channel; wherein, the heterogeneous perception channel includes network topology detection, log semantic detection, protocol interaction parsing, configuration fingerprint monitoring, and execution sequence tracing; A digital twin construction module is used to convert and construct a digital twin structure based on the multidimensional data information; The five-dimensional root cause localization module is used to locate the root cause of test case execution failure based on the digital twin structure and through a pre-constructed five-dimensional root cause space, and output a five-dimensional root cause explanation. The targeted repair module is used to intelligently generate and execute targeted repair decisions based on the five-dimensional root cause explanation, thereby generating targeted repair results. The alarm push module is used to integrate the five-dimensional root cause explanation and the targeted repair results, dynamically generate alarm push information, and route it to the target responsible person.
8. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.
