Search

CN-121210327-B - Communication service interface blood-margin map construction method, influence evaluation method and device

CN121210327BCN 121210327 BCN121210327 BCN 121210327BCN-121210327-B

Abstract

The invention relates to the technical field of communication software testing and provides a communication service interface blood-edge map construction method, an influence evaluation method and a device, wherein the interface blood-edge map construction method comprises the steps of extracting the inclusion relation of an interface and parameters thereof, the direct reference relation between the parameters included by the interface and parameters of other interfaces and the direct call relation between the interface and other interfaces from static codes for each interface in an interface set; and taking the interface and the parameter as nodes in the interface blood edge map, and constructing edges in the interface blood edge map by utilizing the relation. Because the parameter level tracking and dynamic and static fusion analysis are adopted, the influence of interface change is visible, and the accuracy of interface dependency analysis is improved. The software test is carried out based on the communication service interface blood-margin map construction method, so that the timeliness of the regression test can be improved.

Inventors

  • XIAO JING
  • WU LIANGHUA
  • DONG QIANG
  • DING XIANGFENG
  • HU JIANFENG
  • CHEN SHUHUA
  • WANG YI
  • YU LAIBAO
  • XIONG SHUWEN
  • XUE MING
  • Tao Guocao
  • DU QIXIN

Assignees

  • 武汉烽火技术服务有限公司
  • 武汉城市职业学院

Dates

Publication Date
20260512
Application Date
20251126

Claims (12)

  1. 1. The method for constructing the blood-source map of the communication service interface is characterized by being applied to a micro-service architecture and comprising the following steps: determining an interface set; For each interface, extracting the inclusion relation of the interface and parameters thereof, the direct reference relation between the parameters included in the interface and the parameters of other interfaces, and the direct calling relation between the interface and other interfaces from the static code; tracking a parameter propagation path chain from dynamic flow, and inputting the parameter propagation path chain into an LSTM to predict an indirect association relation between parameters; for each parameter, determining a parameter change influence chain generated by the change of the parameter; The interfaces and the parameters are used as nodes in the interface blood-edge map, an explicit inclusion side is built by using the inclusion relation, an explicit parameter side is built by using a direct reference relation, an explicit call side is built by using a direct call relation, an implicit parameter side is built by using an indirect association relation, and a change influence side is built by using a parameter change influence chain; And for each edge, determining the weight of the edge based on the occurrence frequency of the edge in the history call and/or the priority of the service carried by the interface connected with the edge, and completing the construction of the interface blood-edge map.
  2. 2. The method according to claim 1, wherein extracting, for each interface, a relationship between the interface and parameters, a direct reference relationship between the parameters included in the interface and parameters of other interfaces, and a direct call relationship between the interface and other interfaces from the static code, comprises: For each interface, the following syntax analysis is performed using a syntax tree parser: recursively analyzing the nested dependency relationship of the input parameters to obtain the direct reference relationship between the parameters contained in the interface and the parameters of other interfaces; based on JSON Schema or OpenAPI specifications, constructing an inclusion relation between an interface and an output parameter; and extracting the direct calling relation between the interface and other interfaces from the interface document through the custom annotation.
  3. 3. The method for constructing a blood-edge map of a communication service interface according to claim 1, wherein tracking a parameter propagation path chain from dynamic traffic and inputting the parameter propagation path chain to LSTM predicts an indirect association relationship between parameters, comprising: Extracting a request-response link from the history test log, and constructing a parameter propagation path chain through regular matching and parameter path analysis on the extracted response link; and inputting the constructed parameter propagation path chain into a trained LSTM neural network, predicting the indirect association relationship in the parameter propagation path chain to obtain prediction confidence, and extracting the indirect association relationship between parameters with the prediction confidence being greater than a set value.
  4. 4. The communication service interface blood-edge map construction method according to claim 1, characterized in that when a test log is newly added, the communication service interface blood-edge map construction method further comprises: Extracting interface nodes from the newly added test logs; Constructing a Node embedded vector by using the extracted interface nodes, and inputting the latest calling frequency between Node2Vec capturing interfaces; and adjusting the weight of the corresponding edge by using the captured latest calling frequency.
  5. 5. A communication service interface change impact assessment method, comprising: constructing an interface blood-related map by using the communication service interface blood-related map construction method of claim 1; For each change interface, identifying all change parameters by analyzing the direct reference relation between the parameters contained in the interface and the parameters of other interfaces; For each changed parameter, traversing all interface nodes which can reach the changed parameter reversely through a parameter propagation path chain by using an interface blood-margin map; taking a path from the changed parameter to a finally reachable interface node as a propagation path, and recording the interface node and the parameter node on the propagation path; generating an influence path set by using the recorded interface nodes and parameter nodes; And performing interface change risk assessment by using the influence path set.
  6. 6. The communication service interface change impact assessment method according to claim 5, wherein the interface change risk assessment using the impact path set comprises: evaluating the risk value of the parameter change on the test case corresponding to the traversed interface node by using the generated weight value on the upper edge of the influence path set; And scheduling the regression testing execution sequence according to the risk grade to which the risk value belongs.
  7. 7. The communication service interface change influence assessment method according to claim 6, wherein the interface change is a type change containing a parameter; And evaluating the risk value of the parameter change to the test case corresponding to the traversed interface node by using the generated weight value of the upper edge of the influence path set, wherein the method comprises the following steps: Defining parameter type compatibility matrices The extent of impact of different types of changes is characterized, wherein, Wherein, the method comprises the steps of, Representation of Parameters are at Compatibility after changing from old type to new type; calculating each test case affected by the change parameter P using the following formula Risk value calculation of (2) : 1- similarity(p) , Wherein, the Representing the first in the interface blood-margin map The number of nodes in the network is, Representing the first in the interface blood-margin map The number of nodes in the network is, Represent the first From the node to the th The path of each node belongs to the test scope of the calculated test case.
  8. 8. The communication service interface change influence assessment method according to claim 6, wherein scheduling the regression testing execution sequence according to the risk level to which the risk value belongs includes: When the risk value of the test case is larger than a first set value, determining that the test case belongs to high risk, immediately triggering emergency regression, and incorporating the test case into a smoke emission test set; When the risk value of the test case is larger than the second set value and smaller than or equal to the first set value, determining that the test case belongs to the middle risk, and executing the test case in a conventional regression stage; And when the risk value of the test case is smaller than or equal to the second set value, determining that the test case belongs to low risk, and bringing the test case into a regular inspection range.
  9. 9. The device for constructing the blood-source map of the communication service interface is characterized by being applied to a micro-service architecture and comprising the following components: an interface set determining unit for determining an interface set; the first relation determining unit is used for extracting the inclusion relation of the interface and the parameters thereof, the direct reference relation between the parameters included in the interface and the parameters of other interfaces and the direct calling relation between the interface and the other interfaces from the static code for each interface; the second relation determining unit is used for tracking a parameter propagation path chain from the dynamic flow and inputting the parameter propagation path chain into the LSTM to predict an indirect association relation between parameters; A third relation determining unit configured to determine, for each parameter, a change influence chain generated by a change of the parameter; The generation unit is used for constructing an explicit inclusion edge by using the inclusion relation, constructing an explicit parameter edge by using a direct reference relation, constructing an explicit call edge by using a direct call relation, constructing an implicit parameter edge by using an indirect association relation and constructing a change influence edge by using a parameter change influence chain, and determining the weight of each edge based on the occurrence frequency of the edge in historical call and/or the priority of the service carried by the interface connected with the edge for each edge, so as to finish the construction of the interface blood edge map.
  10. 10. A communication service interface change influence evaluation apparatus, comprising: a map generating unit for constructing an interface blood-related map using the communication service interface blood-related map constructing apparatus according to claim 9; The identification unit is used for identifying all the changed parameters by analyzing the direct reference relation between the parameters contained in the interface and the parameters of other interfaces for each changed interface; The traversing unit is used for traversing all interface nodes which can reach the change parameters reversely through the parameter propagation path chain by utilizing the interface blood-margin map for each change parameter; A recording unit, configured to record an interface node and a parameter node on a propagation path by using a path from the changed parameter to a final reachable interface node as the propagation path; The set generating unit is used for generating an influence path set by using the recorded interface nodes and parameter nodes of the path; and the evaluation unit is used for performing interface change risk evaluation by using the influence path set.
  11. 11. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; a memory for storing a computer program; A processor for implementing the method of any of claims 1-8 when executing a program stored on a memory.
  12. 12. A computer storage medium, characterized in that the computer storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-8.

Description

Communication service interface blood-margin map construction method, influence evaluation method and device Technical Field The disclosure belongs to the technical field of communication software testing, and particularly relates to a communication service interface blood-margin map construction method, an influence evaluation method and an influence evaluation device. Background In recent years, the popularity and maturity of cloud computing technology has driven the core of software service architecture to turn to a model of architecture with a cloud computing platform as a core, which is becoming the mainstream. Cloud computing provides a solid foundation for management and utilization of computing resources by means of efficient and reliable platform support and perfect infrastructure, and also creates conditions for flexible expansion and Gao Xiaoyun dimensions of a software system. In this context, micro-service architecture is also becoming more and more widely used as an important architecture model for adapting to cloud computing environments. The core of the architecture is to disassemble a single application into a plurality of independently running small modules (i.e. micro services), and each service cooperatively meets the user demands through network interaction. Each micro-service is focused on the realization of specific service functions, keeps independence in coding, deployment and environment configuration, does not interfere with each other, and essentially belongs to a distributed system. However, with the deep convergence of cloud computing and microservice architecture, software testing of microservices is facing a series of core challenges, with particular emphasis being given to the invisibility of interface changes. The traditional test platform can only realize the dependency mapping of interface level, namely, identify 'which interfaces have call relations', but cannot capture the potential effect of deep influences brought by parameter cascade change, such as detail adjustment of field type change, parameter transmission path variation and the like, on test cases. Therefore, the problem of coarser granularity of interface dependency analysis exists. This limitation directly results in a high false positive rate in the test range, which is shown by the Gartner2024 test automation report to be over 40%, and becomes a key bottleneck for limiting the test efficiency and quality. Disclosure of Invention In order to solve the problems, the disclosure provides a method for constructing a blood-margin map of a communication service interface, and an influence evaluation method and device. The invention provides a method for constructing a blood-margin map of a communication service interface, which comprises the following steps: determining an interface set; For each interface, extracting the inclusion relation of the interface and parameters thereof, the direct reference relation between the parameters included in the interface and the parameters of other interfaces, and the direct calling relation between the interface and other interfaces from the static code; tracking a parameter propagation path chain from dynamic flow, and inputting the parameter propagation path chain into an LSTM to predict an indirect association relation between parameters; for each parameter, determining a parameter change influence chain generated by the change of the parameter; the interfaces and the parameters are used as nodes in the interface blood-edge map, and edges in the interface blood-edge map are constructed by utilizing the inclusion relationship, the parameter propagation path chain, the direct reference relationship, the direct calling relationship, the indirect association relationship and the parameter change influence chain; And for each edge, determining the weight of the edge based on the occurrence frequency of the edge in the history call and/or the priority of the service carried by the interface connected with the edge, and completing the construction of the interface blood-edge map. Further, for each interface, extracting, from the static code, a relationship between the interface and parameters, a direct reference relationship between the parameters included in the interface and parameters of other interfaces, and a direct call relationship between the interface and other interfaces, including: For each interface, the following syntax analysis is performed using a syntax tree parser: recursively analyzing the nested dependency relationship of the input parameters to obtain the direct reference relationship between the parameters contained in the interface and the parameters of other interfaces; based on JSON Schema or OpenAPI specifications, constructing an inclusion relation between an interface and an output parameter; and extracting the direct calling relation between the interface and other interfaces from the interface document through the custom annotation. Further, tracking