CN-121996549-A - Method and device for positioning root cause of software test failure, electronic equipment and storage medium
Abstract
The invention provides a software test failure root cause positioning method, a device, electronic equipment and a storage medium, wherein the method comprises the steps of obtaining multi-mode data associated with a software test failure event, wherein the multi-mode data comprises test log data, test scene data and system performance index data; the method comprises the steps of preprocessing multi-mode data and extracting features to obtain a test log feature vector, a test scene feature vector and a system performance feature vector, inputting the test log feature vector, the test scene feature vector and the system performance feature vector into a root positioning model, carrying out root positioning by combining the root positioning model with a pre-built test failure root knowledge graph, and outputting a root positioning result of a software test failure event, wherein the root positioning model is obtained by training based on a multi-mode feature vector sample and a root positioning result label. According to the root cause positioning method, the root cause positioning model is adopted, and the root cause positioning is performed by combining the multi-mode characteristics, so that the efficiency and the accuracy of root cause positioning are improved.
Inventors
- ZHU SI
Assignees
- 传神语联网网络科技股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260116
Claims (10)
- 1. A method for locating the root cause of a software test failure, comprising: acquiring multi-modal data associated with a software test failure event, wherein the multi-modal data comprises test log data of a text type, test scene data of an image or video type and system performance index data of a numerical type; preprocessing and feature extraction are carried out on the multi-mode data to obtain a test log feature vector, a test scene feature vector and a system performance feature vector; inputting the test log feature vector, the test scene feature vector and the system performance feature vector into a root cause positioning model, performing root cause positioning by combining the root cause positioning model with a pre-constructed test failure root cause knowledge graph, and outputting a root cause positioning result of the software test failure event; The root cause positioning model is obtained by training based on a test log feature vector sample, a test scene feature vector sample and a system performance feature vector sample corresponding to the multi-mode data sample and a corresponding root cause positioning result label.
- 2. The software test failure root cause positioning method of claim 1, wherein the root cause positioning model comprises: The feature fusion layer is used for determining the respective dynamic weights of the test log feature vector, the test scene feature vector and the system performance feature vector based on an attention mechanism, and carrying out weighted fusion on the test log feature vector, the test scene feature vector and the system performance feature vector to obtain a fusion feature vector; And the root cause positioning layer is used for positioning the root cause of the software test failure event based on the fusion feature vector and the test failure root cause knowledge graph to obtain the root cause positioning result.
- 3. The method for positioning the root cause of a software test failure according to claim 2, wherein the positioning the root cause of the software test failure event based on the fusion feature vector and the knowledge graph of the root cause of the test failure comprises: traversing the test failure root cause knowledge graph, and matching the fusion feature vector with each feature node of the test failure root cause knowledge graph to obtain a target feature node successfully matched; determining a plurality of candidate root cause nodes from a plurality of root cause nodes of the test failure root cause knowledge graph according to the target characteristic node; Calculating the confidence coefficient of each candidate root node based on the association weight of each candidate root node and the target characteristic node; And determining a target root node from a plurality of candidate root nodes based on the confidence of each candidate root node.
- 4. The software test failure root cause positioning method according to claim 1, wherein the test failure root cause knowledge graph is constructed based on the steps of: Acquiring historical multi-modal data associated with a historical software test failure event, wherein the historical multi-modal data comprises historical test log data of a text type, historical test scene data of an image or video type and historical system performance index data of a numerical type; Preprocessing and feature extraction are carried out on the historical multi-mode data to obtain a historical test log feature vector, a historical test scene feature vector and a historical system performance feature vector; Determining a historical root cause of a historical software test failure event; And constructing the test failure root cause knowledge graph by taking the historical root cause node, the historical test log feature vector, the historical test scene feature vector and the historical system performance feature vector as feature nodes and the association relationship between the root cause node and the feature nodes as edges.
- 5. The method for positioning a root cause of a software test failure according to claim 1, wherein the preprocessing and feature extraction are performed on the multi-modal data to obtain a test log feature vector, a test scene feature vector and a system performance feature vector, and the method comprises the following steps: Preprocessing the multi-modal data to obtain preprocessed multi-modal data; carrying out space-time alignment on the preprocessed multi-modal data to obtain aligned multi-modal data; and carrying out feature extraction on the aligned multi-mode data to obtain a test log feature vector, a test scene feature vector and a system performance feature vector.
- 6. The software test failure root cause positioning method according to claim 1, wherein the root cause positioning model is trained based on the following steps: Acquiring a multi-modal data sample associated with a software test failure event sample, wherein the multi-modal data sample comprises a text type test log data sample, an image or video type test scene data sample and a numerical type system performance index data sample; Preprocessing and feature extraction are carried out on the multi-mode data samples to obtain test log feature vector samples, test scene feature vector samples and system performance feature vector samples; Determining a root cause positioning result label of the software test failure event sample; And training an initial root positioning model by taking the test log feature vector sample, the test scene feature vector sample and the system performance feature vector sample as training samples and taking the root positioning result label as a sample label, and obtaining the root positioning model after training is completed.
- 7. A software test failure root cause positioning device, comprising: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring multi-mode data associated with a software test failure event, and the multi-mode data comprises test log data of a text type, test scene data of an image or video type and system performance index data of a numerical value type; the data processing unit is used for preprocessing and extracting the characteristics of the multi-mode data to obtain a test log characteristic vector, a test scene characteristic vector and a system performance characteristic vector; The root positioning unit is used for inputting the test log feature vector, the test scene feature vector and the system performance feature vector into a root positioning model, performing root positioning by combining the root positioning model with a pre-constructed test failure root knowledge graph, and outputting a root positioning result of the software test failure event; The root cause positioning model is obtained by training based on a test log feature vector sample, a test scene feature vector sample and a system performance feature vector sample corresponding to the multi-mode data sample and a corresponding root cause positioning result label.
- 8. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the software test failure root cause localization method of any one of claims 1 to 6 when the computer program is executed by the processor.
- 9. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the software test failure root cause localization method of any one of claims 1 to 6.
- 10. A computer program product comprising a computer program which, when executed by a processor, implements the software test failure root cause localization method of any one of claims 1 to 6.
Description
Method and device for positioning root cause of software test failure, electronic equipment and storage medium Technical Field The present invention relates to the field of software testing technologies, and in particular, to a method and apparatus for locating a root cause of a software test failure, an electronic device, and a storage medium. Background In the field of software engineering, automatic testing is a key link for guaranteeing software quality and improving delivery efficiency. However, as software system architectures become increasingly complex, the amount of data generated by automated testing processes has proliferated and the modalities have varied. At present, the existing software test failure root cause positioning method depends on experience of professionals, and has the defects of complex process, low efficiency and poor root cause positioning accuracy. Disclosure of Invention The invention provides a method, a device, electronic equipment and a storage medium for positioning a root cause of software test failure, which are used for solving the defects of low efficiency and poor accuracy of the method for positioning the root cause of software test failure in the prior art. The invention provides a software test failure root cause positioning method, which comprises the following steps: acquiring multi-modal data associated with a software test failure event, wherein the multi-modal data comprises test log data of a text type, test scene data of an image or video type and system performance index data of a numerical type; preprocessing and feature extraction are carried out on the multi-mode data to obtain a test log feature vector, a test scene feature vector and a system performance feature vector; inputting the test log feature vector, the test scene feature vector and the system performance feature vector into a root cause positioning model, performing root cause positioning by combining the root cause positioning model with a pre-constructed test failure root cause knowledge graph, and outputting a root cause positioning result of the software test failure event; The root cause positioning model is obtained by training based on a test log feature vector sample, a test scene feature vector sample and a system performance feature vector sample corresponding to the multi-mode data sample and a corresponding root cause positioning result label. In some embodiments, the root cause positioning model comprises: The feature fusion layer is used for determining the respective dynamic weights of the test log feature vector, the test scene feature vector and the system performance feature vector based on an attention mechanism, and carrying out weighted fusion on the test log feature vector, the test scene feature vector and the system performance feature vector to obtain a fusion feature vector; And the root cause positioning layer is used for positioning the root cause of the software test failure event based on the fusion feature vector and the test failure root cause knowledge graph to obtain the root cause positioning result. In some embodiments, the locating the root cause of the software test failure event based on the fused feature vector and the test failure root cause knowledge graph includes: traversing the test failure root cause knowledge graph, and matching the fusion feature vector with each feature node of the test failure root cause knowledge graph to obtain a target feature node successfully matched; determining a plurality of candidate root cause nodes from a plurality of root cause nodes of the test failure root cause knowledge graph according to the target characteristic node; Calculating the confidence coefficient of each candidate root node based on the association weight of each candidate root node and the target characteristic node; And determining a target root node from a plurality of candidate root nodes based on the confidence of each candidate root node. In some embodiments, the test failure root cause knowledge graph is constructed based on the steps of: Acquiring historical multi-modal data associated with a historical software test failure event, wherein the historical multi-modal data comprises historical test log data of a text type, historical test scene data of an image or video type and historical system performance index data of a numerical type; Preprocessing and feature extraction are carried out on the historical multi-mode data to obtain a historical test log feature vector, a historical test scene feature vector and a historical system performance feature vector; Determining a historical root cause of a historical software test failure event; And constructing the test failure root cause knowledge graph by taking the historical root cause node, the historical test log feature vector, the historical test scene feature vector and the historical system performance feature vector as feature nodes and the association relationship between the root caus