CN117009208A - Dependency information processing method, device, equipment and storage medium - Google Patents

Dependency information processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN117009208A
CN117009208A CN202211254273.XA CN202211254273A CN117009208A CN 117009208 A CN117009208 A CN 117009208A CN 202211254273 A CN202211254273 A CN 202211254273A CN 117009208 A CN117009208 A CN 117009208A
Authority
CN
China
Prior art keywords
service
information
service request
test case
dependency
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211254273.XA
Other languages
Chinese (zh)
Inventor
常思雨
林泽雄
张学林
聂昕继
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211254273.XA priority Critical patent/CN117009208A/en
Publication of CN117009208A publication Critical patent/CN117009208A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a method, a device, equipment and a storage medium for processing dependency information, and belongs to the technical field of computers. The method comprises the following steps: acquiring a simulation rule of a first business service, wherein the simulation rule is determined based on dependency relationship information, and the dependency relationship information is used for indicating an association relationship between a business request and the business service, and the first business service is the business service associated with the first business request; modifying the first service request carried by the test case based on the simulation rule; executing the modified test case to simulate the test case to be executed under the condition that the first business service is in an abnormal state; and under the condition that the execution result of the test case is failure, determining the type of the dependency information as a first dependency type. According to the method and the device for determining the type of the dependency information, the type of the dependency information is determined through the execution result of the test case, and the first business service obtained through simulation is in an abnormal state, so that the efficiency of determining the type of the dependency information is improved.

Description

Dependency information processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing dependency information.
Background
With the development of computer technology, a plurality of business services are required to process business requests in sequence in a business environment so as to respond to functions corresponding to the business requests.
In the related art, the type of the dependency relationship between the service and the service request is determined by manually combing the code program, the dependency relationship affecting the function of realizing the service request when an abnormality occurs is determined as a strong dependency type, and the dependency relationship not affecting the function of realizing the service request when the abnormality occurs is determined as a weak dependency type.
However, the manner of manually combing code programs is cumbersome and inefficient, and how to efficiently determine the type of dependency is a problem to be solved.
Disclosure of Invention
The application provides a method, a device, equipment and a storage medium for processing dependency information, wherein the technical scheme is as follows:
according to an aspect of the present application, there is provided a method of processing dependency information, the method being performed by a computer device, the method comprising:
Acquiring a simulation rule of a first business service, wherein the simulation rule is determined based on the dependency relationship information, the dependency relationship information is used for indicating an association relationship between a business request and the business service, and the first business service is the business service associated with the first business request;
modifying the first service request carried by the test case based on the simulation rule; executing the test case subjected to the modification processing to simulate the test case to be executed under the condition that the first business service is in an abnormal state;
and under the condition that the execution result of the test case is failure, determining the type of the dependency information as a first dependency type.
According to another aspect of the present application, there is provided a dependency information processing apparatus including:
the acquisition module is used for acquiring a simulation rule of a first business service, the simulation rule is determined based on the dependency relationship information, the dependency relationship information is used for indicating the association relationship between a business request and the business service, and the first business service is the business service associated with the first business request;
The processing module is used for modifying the first service request carried by the test case based on the simulation rule; executing the test case subjected to the modification processing to simulate the test case to be executed under the condition that the first business service is in an abnormal state;
and the determining module is used for determining that the type of the dependency information is a first dependency type under the condition that the execution result of the test case is failure.
In an alternative design of the application, the computer device runs with a simulation platform service;
the processing module is further configured to:
the simulation platform service intercepts the first service request from a public gateway interface, modifies the first service request based on the simulation rule, and obtains a modified first service request;
and sending the modified first business request to the first business service to execute the test case.
In an optional design of the present application, the type of anomaly of the first service in the anomaly state is a return code error;
the processing module is further configured to:
intercepting the first service request by the simulation platform service from the public gateway interface, and modifying a support field and/or a count field of the first service request into first preset information based on the simulation rule to obtain the modified first service request;
The support field is used for indicating whether the first service needs to support a first function, the count field is used for indicating a count result of the first service request, and the first preset information is used for replacing information of the support field and/or the count field.
In an optional design of the present application, the abnormal type of the first business service in the abnormal state is a connection timeout;
the processing module is further configured to:
intercepting the first service request by the simulation platform service from the public gateway interface, and modifying a result field of the first service request into second preset information based on the simulation rule to obtain the modified first service request;
after caching the modified first service request for a first time period, sending the first service request to the first service;
the result field is used for indicating an execution result of the first service request, and the second preset information is used for indicating that the delay type corresponding to the first time length is connection delay.
In an optional design of the present application, the abnormal type of the first business service in the abnormal state is read-write timeout;
The processing module is further configured to:
intercepting the first service request by the simulation platform service from the public gateway interface, and modifying a result field of the first service request into third preset information based on the simulation rule to obtain the modified first service request;
after caching the modified first service request for a second time period, sending the first service request to the first service;
the result field is used for indicating an execution result of the first service request, and the third preset information is used for indicating that the delay type corresponding to the second duration is read-write delay.
In an alternative design of the application, the computer device is operated with a dependent comb service;
the processing module is further configured to:
the dependent carding service adds a test mark for a first service request corresponding to the test case;
the simulation platform service intercepts the first service request carrying the test mark from the public gateway interface.
In an alternative design of the application, the device further comprises:
the building module is used for building the simulation rule for the first business service based on the dependency relationship information, wherein the simulation rule indicates an abnormal type simulating that the first business service is in an abnormal state.
In an alternative design of the application, the building block is further configured to:
executing the test case carrying the first service request under the condition that the first service is not in an abnormal state;
extracting history call chain information of the test case, wherein the history call chain information is used for indicating a transmission path of the first service request;
and constructing the dependency information based on the historical call chain information.
In an alternative design of the application, the device further comprises:
the verification module is used for verifying the execution result of the test case, and the execution result is determined only under the influence of the simulation rule under the condition that the execution result passes the verification;
the determining module is further configured to:
and under the condition that the execution result passes the verification and the execution result is failure, determining the type of the dependency information as a first dependency type.
In an alternative design of the application, the verification module is further configured to:
comparing the execution exception type indicated by the execution result with the exception type simulating that the first business service is in an exception state, and checking the execution result of the test case;
And under the condition that the execution exception type and the exception type are the same, the execution result passes the verification.
In an alternative design of the application, the verification module is further configured to:
acquiring execution calling chain information of the execution result and historical calling chain information of the test case;
comparing the execution call chain information with the history call chain information to verify the execution result of the test case;
the history call chain information is a history transfer path of the first service request when the first service is not in an abnormal state; the execution calling chain information is used for simulating a transmission path of the first service request of the test case under the condition that the first service is in an abnormal state; and under the condition that the execution call chain information and the historical call chain information are the same, the execution result passes the verification.
In an alternative design of the application, the determination module is further configured to:
and under the condition that the public gateway interface corresponding to the first service request is abnormal, determining the type of the dependency relationship information as a first dependency type.
In an alternative design of the application, the determination module is further configured to:
and under the condition that the execution result and the expected result of the test case are different, determining the type of the dependency information as a first dependency type.
In an alternative design of the application, the determination module is further configured to:
and under the condition that the service failure index of the test case exceeds a target threshold, determining the type of the dependency information as a first dependency type.
According to another aspect of the present application, there is provided a computer apparatus comprising a processor and a memory having stored therein at least one instruction, at least one program, a set of codes or a set of instructions, the at least one instruction, the at least one program, the set of codes or the set of instructions being loaded and executed by the processor to implement a method of processing dependency information as described in the above aspects.
According to another aspect of the present application, there is provided a computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes or a set of instructions, the at least one instruction, the at least one program, the set of codes or the set of instructions being loaded and executed by a processor to implement the method of processing dependency information as described in the above aspect.
According to another aspect of the present application, there is provided a computer program product comprising computer instructions stored in a computer readable storage medium, from which a processor reads and executes the computer instructions to implement the method of processing dependency information as described in the above aspects.
The technical scheme provided by the application has the beneficial effects that at least:
the simulation rule constructed for the first business service is used for modifying and processing the business request, so that the first business service is simulated in an abnormal state; the type of the dependency information is determined through the execution result of the test case, the first business service obtained through simulation is in an abnormal state, a manual code combing program is avoided, and the efficiency of determining the type of the dependency information is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a computer system provided in accordance with an exemplary embodiment of the present application;
FIG. 2 is a flow chart of a method of processing dependency information provided in an exemplary embodiment of the present application;
FIG. 3 is a schematic diagram of a server provided by an exemplary embodiment of the present application;
FIG. 4 is a flowchart of a method for processing dependency information provided in an exemplary embodiment of the present application;
FIG. 5 is a flowchart of a method for processing dependency information provided in an exemplary embodiment of the present application;
FIG. 6 is a flowchart of a method for processing dependency information provided in an exemplary embodiment of the present application;
FIG. 7 is a flowchart of a method for processing dependency information provided in an exemplary embodiment of the present application;
FIG. 8 is a flowchart of a method for processing dependency information provided in an exemplary embodiment of the present application;
FIG. 9 is a schematic diagram of a modified first service request provided by an exemplary embodiment of the present application;
FIG. 10 is a schematic diagram of an interfacing relationship provided by an exemplary embodiment of the present application;
FIG. 11 is a schematic diagram of configuration simulation rules provided by an exemplary embodiment of the present application;
FIG. 12 is a flowchart of a method for processing dependency information provided in an exemplary embodiment of the present application;
FIG. 13 is a schematic diagram of a simulation platform service intercepting a first business request provided by an exemplary embodiment of the present application;
FIG. 14 is a flowchart of a method for processing dependency information provided in an exemplary embodiment of the present application;
FIG. 15 is a flowchart of a method for processing dependency information provided in an exemplary embodiment of the present application;
FIG. 16 is a flowchart of a method of processing dependency information provided in an exemplary embodiment of the present application;
FIG. 17 is a flowchart of a method for processing dependency information provided in an exemplary embodiment of the present application;
FIG. 18 is a schematic diagram of an interfacing relationship provided by an exemplary embodiment of the present application;
FIG. 19 is a flowchart of a method for processing dependency information provided in an exemplary embodiment of the present application;
FIG. 20 is a schematic illustration of a test report provided by an exemplary embodiment of the present application;
FIG. 21 is a flowchart of a method for processing dependency information provided in an exemplary embodiment of the present application;
FIG. 22 is a schematic diagram of a traffic failure indicator provided by an exemplary embodiment of the present application;
FIG. 23 is a flowchart of a method for processing dependency information provided in an exemplary embodiment of the present application;
FIG. 24 is a block diagram of a processing apparatus for dependency information provided in an exemplary embodiment of the present application;
fig. 25 is a block diagram of a server according to an exemplary embodiment of the present application.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region. For example, the information such as the first service request and the dependency information related to the present application is acquired under the condition of sufficient authorization.
It should be understood that, although the terms first, second, etc. may be used in this disclosure to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first parameter may also be referred to as a second parameter, and similarly, a second parameter may also be referred to as a first parameter, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
FIG. 1 shows a schematic diagram of a computer system provided by one embodiment of the application. The computer system may implement a system architecture that becomes a method of processing dependency information. The computer system may include:
A terminal 100 and a server 200. The terminal 100 may be an electronic device such as a mobile phone, a tablet computer, a vehicle-mounted terminal (car), a wearable device, a PC (Personal Computer ), or the like. The terminal 100 may be provided with a client that runs a target application, which may be a processing application of dependency information or another application that provides a function of processing dependency information, and the present application is not limited thereto. The present application is not limited to the form of the target Application program, and may be a web page, including but not limited to an App (Application), an applet, etc. installed in the terminal 100.
The server 200 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud computing services. The server 200 is deployed with business services, which may be deployed on the same server or on different servers.
In the dependency information processing method provided by the embodiment of the application, the execution main body of each step is computer equipment, and in one example, the computer equipment is a server, but the situation that the computer equipment is a terminal is not excluded. The computer device refers to an electronic device with data computing, processing and storage capabilities. Taking the implementation environment of the solution shown in fig. 1 as an example, the processing method of the dependency information may be performed by the terminal 100 (for example, the client of the terminal 100 installing the running target application executes the processing method of the dependency information), the processing method of the dependency information may be performed by the server 200, or the terminal 100 and the server 200 may be interactively cooperated to perform the processing method of the dependency information, which is not limited in the present application.
In addition, the technical scheme of the application can be combined with a block chain technology. For example, some data (such as dependency information, test cases, etc.) involved in the disclosed dependency information processing method can be saved on the blockchain. Communication between the terminal 100 and the server 200 may be performed through a network, such as a wired or wireless network.
FIG. 2 is a flow chart illustrating a method for processing dependency information according to one embodiment of the present application. The method may be performed by a computer device. The method comprises the following steps:
step 602: the target application program triggers the execution of the dependency analysis control;
illustratively, the execution dependency analysis control is a control provided on the target application that initiates the processing of the dependency information.
The target application is a processing application of dependency information, for example, and may be another application that provides a function of processing dependency information.
Step 604: the target application program indicates to the dependent combing service to execute the test case;
in response to triggering the execution dependency analysis control, the target application instructs a dependent comb service running on the server to execute the test case.
Step 606: the dependence carding service indicates the UAT case execution service to execute the test case;
the dependent comb service forwards the indication information of the execution test case to the UAT case execution service. The test cases are executed by the UAT case execution service. Illustratively, the test case is a user acceptance test case (User Acceptance Test, UAT).
Step 608: collecting call chain information from a call chain statistics service by relying on a carding service;
illustratively, the call chain information is information generated by the test case in the execution process, and is used for indicating a transmission path in a first business service associated with the business request after the business request of the test case is transmitted from a public gateway interface (Common Gateway Interface, CGI). Optionally, the call chain information indicates a delivery path of the service request by using a directed graph.
Step 610: constructing dependency relationship information by relying on carding service;
the dependent combing service builds dependent relation information for a first business service based on the call chain information, wherein the first business service is a business service which is related to a business request in business services running on a server.
The dependency information is used to indicate whether an association exists between the business request and the business service.
Step 612: the dependence carding service sends dependence relation information to the dependence analysis service;
after the dependency relationship information is constructed by the dependency carding service, the information is sent to the dependency analysis service.
Step 614: building a simulation rule for the first business service through the Mock platform service by relying on the analysis service;
the dependency analysis service adds simulation rules for the first business service on the Mock platform service based on the dependency information. Illustratively, mock platform services are also known as simulation platform services.
Step 616: the dependence carding service indicates the UAT case execution service to execute the test case;
the dependent comb service forwards the indication information of the execution test case to the UAT case execution service. The test cases are executed by the UAT case execution service.
Step 618: simulating that the first business service is in an abnormal state through the Mock platform service;
and in the process of executing the test case by the UAT case execution service, calling the Mock platform service to simulate that the first business service is in an abnormal state.
Step 620: collecting call chain information from a call chain statistics service by relying on a carding service;
illustratively, the call chain information in this step is call chain information generated in a case where the simulated first business service is in an abnormal state.
Step 622: checking the execution result of the test case by relying on the carding service;
by way of example, the execution result is verified by comparing call chain information generated when the first service is in an abnormal state with call chain information generated when the first service is not in an abnormal state. In the case where the above two call chain information are the same, the check passes.
Step 624: collecting the availability information of the execution result of the test case from the business statistics service by relying on the carding service;
illustratively, the availability information of the execution result is used to indicate whether the execution result is successful or failed.
Step 626: under the condition that the execution result of the dependent carding service is failure, the type of the dependency relationship information is a strong dependency type;
for example, because the first service is in an abnormal state, the execution result of the test case corresponding to the service request is failure, that is, the function of implementing the service request is affected, and the type of the dependency information is determined as a strong dependency type.
For the server in this embodiment, fig. 3 shows a schematic diagram of the server provided in one embodiment of the present application. The server includes a gateway layer 200a, a domain layer 200b, and a storage layer 200c; the gateway layer 200a is used for receiving a request sent by a terminal, and the domain layer 200b runs a dependent carding service 202 and a dependent analyzing service 204; storage tier 200c includes a database 214 (Data Base, DB) and a remote dictionary service 216 (Remote Dictionary Server, redis). Further, there are a UAT case execution service 206, a Mock platform service 208, a call chain statistics service 210, and a business statistics service 212 that can run independently on the server. In one implementation, the four independently running services described above are also referred to as external dependent services.
Next, a method of processing dependency information will be further described by the following embodiments.
FIG. 4 is a flow chart illustrating a method for processing dependency information according to one embodiment of the present application. The method may be performed by a computer device. The method comprises the following steps:
step 510: acquiring a simulation rule of a first business service;
illustratively, the simulation rules are determined based on the dependency information, the simulation rules being used to modify the service request; and simulating that the first service is in an abnormal state by modifying and executing the test case carrying the service request.
Illustratively, the dependency information is used for indicating an association relationship between the business request and the business service; the business service may be part or all of a service running on a computer device. In one example, a computer device may process different types of business requests, with business services running on the computer device including business services associated with the presence of business requests and business services not associated with the presence of business requests.
Wherein the first business service is a business service associated with the first business request; the first business service with the association can be to call the first business service to process the first business request, or to count the first business request; it can be appreciated that the number of the first business services can be one or a plurality of the first business services, and the application does not limit the way in which the first business services are associated with the first business requests; in one example, the business services that transmit and/or edit the first business request are each determined to be the first business service.
Step 520: modifying the first service request carried by the test case based on the simulation rule; executing the modified test cases;
by way of example, the embodiment simulates the test case to be executed under the condition that the first business service is in an abnormal state by executing the test case subjected to the modification processing; the simulation rules are exemplary simulation rules constructed for the first business service, the simulation rules being used to modify the first business request. Illustratively, modifying the first service request is used to simulate the effect of the first service being in an abnormal state on the first service request. And executing the test case carrying the modified first service request to obtain an execution result of the test case under the condition that the first service is in an abnormal state.
In this embodiment, the modification processing is performed on the first service request carried by the test case, and the processing of the first service is not required. The first business service does not need to perform modification processing based on the simulation rules when executing the modified test case.
Step 530: under the condition that the execution result of the test case is failure, determining the type of the dependency relationship information as a first dependency type;
The test case carries the service request after modification processing, and the execution result of the test case is obtained after the test case is executed. And under the condition that the execution result is failure, indicating that the function corresponding to the service request is not responded, and the execution case does not reach the preset execution result. Under the condition that the execution result is failure, the first service obtained based on simulation rules is in an abnormal state, so that the corresponding function of the service request is not responded, and the core flow of the service request is influenced. The type of dependency information indicating that there is an association between the first business service and the business request is determined as a first dependency type, which in one example is also referred to as a strong dependency type.
In summary, according to the method provided by the embodiment, the modification processing is performed on the service request by aiming at the simulation rule constructed by the first service, so that the simulation that the first service is in the abnormal state is realized; the type of the dependency information is determined through the execution result of the test case, the first business service obtained through simulation is in an abnormal state, a manual code combing program is avoided, and the efficiency of determining the type of the dependency information is improved.
FIG. 5 is a flow chart illustrating a method for processing dependency information according to one embodiment of the present application. The method may be performed by a computer device. That is, in the embodiment shown in fig. 4, step 520 may be implemented as steps 522 and 524:
step 522: the simulation platform service intercepts the first service request from the public gateway interface, modifies the first service request based on simulation rules, and obtains a modified first service request;
illustratively, the computer device runs a simulation platform service, also known as the Mock platform service. The simulation platform service is used for intercepting the service request; in an alternative implementation, the simulation rules are built by adding a service running on the computer device to the simulation platform service; further, the dependency analysis service on the computer device uses the simulation platform service to construct a simulation rule for the first business service. Illustratively, the first service request is input from a common gateway interface (Common Gateway Interface, CGI), which in one example is also referred to as a generic gateway interface.
Step 524: the modified first business request is sent to a first business service to execute a test case;
The simulation platform service sends a service request to the first service to execute the test case. By way of example, by executing a test case carrying a modified first business request, the simulated test case is executed with the first business service in an abnormal state. The first business service processes the modified first business request, and the test case is executed. In the process of executing the test case, the service request carried by the test case is a modified first service request, and the first service does not need to be modified based on the simulation rule. According to the embodiment, according to the test case carrying the modified first service request, the influence of the abnormal state of the first service on the first service request is simulated.
In an alternative implementation, the test cases may be implemented as user acceptance test cases (User Acceptance Test, UAT).
In summary, according to the method provided by the embodiment, the service request is modified by using the simulation platform service through the simulation rule constructed for the first service, so as to intercept the first service request and simulate that the first service is in an abnormal state; the type of the dependency information is determined through the execution result of the test case, the first business service obtained through simulation is in an abnormal state, a manual code combing program is avoided, and the efficiency of determining the type of the dependency information is improved.
FIG. 6 is a flow chart illustrating a method for processing dependency information according to one embodiment of the present application. The method may be performed by a computer device. That is, in the embodiment illustrated in fig. 5, step 522 may be implemented as step 522a:
step 522a: intercepting a first service request by the simulation platform service from a public gateway interface, modifying a support field and/or a count field of the first service request into first preset information based on simulation rules, and obtaining a modified first service request;
illustratively, the exception type for which the first business service is in an exception state is a return code error. In the first service request, a support field is used to indicate whether the first service is required to support the first function. In one example, the first business service is provided with a plurality of functions, taking the first business service as a payment service for example, the functions of the first business service include a payment function of the area a and a payment function of the area B. In the case where the first service request requires a request to make a payment between A, B regions, the support field indicates that the first service is required to support the payment function of A, B regions. In the case where the first business request needs to request payment in the area a, the support field indicates that the first business service is required to support the payment function of the area a. The count field is used to indicate a count result of the first service request. In one example, the count result is the number of first service requests that have been sent.
The first preset information is exemplary to replace information of the support field and/or the count field, and the first preset information is manually set information. In one example, the first preset information is a manually preset value, or a randomly selected value. And the falsification of the support field and/or the count field is realized by replacing the information of the support field and/or the count field with the first preset information.
Illustratively, by modifying the support field and/or the count field to the first preset information, the simulated test case is executed with the first business service in the event of a return code error.
In one specific example, the support field includes: supplortaregionpay and OpenBTypePay; the count field includes PayCount. In this embodiment, the supplntaricionpay field is used to indicate whether the payment function of the a region is supported, and the OpenBTypePay field is used to indicate whether the payment function of the B flag type is opened. The PayCount field is used to indicate the count result of the first service request. Illustratively, the first service request is a payment service request.
In one example, the content in the supplantargionpay field is modified to 0 to indicate that the first business service does not support a payment function for region a; modifying the content in the OpenBTypePay field to 20 for instructing the first business service to open a payment function of the B flag type; the content in PayCount is modified to 0 to indicate that the count result of the first service request that has been sent is 0. It should be noted that the above modifications and corresponding meanings are merely exemplary descriptions.
In summary, according to the method provided by the embodiment, through the simulation rule constructed for the first service, the service request is modified by using the simulation platform service, so that the first service request is intercepted, and the first service is simulated in the abnormal state of the return code error; the type of the dependency information is determined through the execution result of the test case, the first business service obtained through simulation is in an abnormal state, a manual code combing program is avoided, and the efficiency of determining the type of the dependency information is improved.
FIG. 7 is a flow chart illustrating a method for processing dependency information according to one embodiment of the present application. The method may be performed by a computer device. That is, in the embodiment shown in fig. 5, step 522 may be implemented as step 522b, and step 524 may be implemented as step 524b:
step 522b: intercepting the first service request by the simulation platform service from the public gateway interface, modifying a result field of the first service request into second preset information based on simulation rules, and obtaining a modified first service request;
illustratively, the anomaly type for which the first traffic service is in an anomaly state is a connection timeout. The result field is used for indicating an execution result of the first service request, and the second preset information is used for indicating that the delay type corresponding to the first time length is connection delay; the connection delay is used to indicate that the first traffic service is in an abnormal state due to an abnormal connection with the common gateway interface. Specifically, the abnormal connection may be caused by that the connection cannot be established due to the abnormal connection of the public gateway interface or the interface of the first service, or may be caused by that the connection is disconnected when the first service request is transmitted. In a specific example, the result field is a result field in the first service request, the second preset information is-201, and the original information in the result field is modified to-201, so as to indicate that the delay type is connection delay. The first duration is a duration of the first service request after the simulation platform service cache modification.
Step 524b: after caching the modified first service request for a first time period, sending the first service request to a first service;
illustratively, the first time period is a time period of the first service request after the simulation platform service cache modification; and by caching the first duration, the modified first service request is sent to the first service request in a delayed manner, and the first service is simulated to be in an abnormal state of overtime.
In summary, according to the method provided by the embodiment, through the simulation rule constructed for the first service, the service request is modified by using the simulation platform service, so that the first service request is intercepted, and the first service is simulated in the abnormal state of the connection timeout; the type of the dependency information is determined through the execution result of the test case, the first business service obtained through simulation is in an abnormal state, a manual code combing program is avoided, and the efficiency of determining the type of the dependency information is improved.
FIG. 8 is a flow chart illustrating a method for processing dependency information according to one embodiment of the present application. The method may be performed by a computer device. That is, in the embodiment shown in fig. 5, step 522 may be implemented as step 522c, and step 524 may be implemented as step 524c:
Step 522c: the simulation platform service intercepts the first service request from the public gateway interface, modifies a result field of the first service request into third preset information based on simulation rules, and obtains a modified first service request;
illustratively, the anomaly type of the first business service in the anomaly state is a read-write timeout. The result field is used for indicating an execution result of the first service request, and the third preset information is used for indicating that the delay type corresponding to the second duration is read-write delay; the connection delay is used to indicate that the first service is in an abnormal state due to an abnormality of the first service when the first service is read or edited after the first service is connected to the common gateway interface. In a specific example, the result field is a result field in the first service request, the third preset information is-206, and the original information in the result field is modified to-206, so as to indicate that the delay type is read-write delay. The second duration is the duration of the first service request after the simulation platform service cache modification.
Step 524c: after caching the modified first service request for a second time period, sending the first service request to the first service;
The second duration is, for example, a duration of the first service request after the modified service cache of the simulation platform; and by caching the second time length, the modified first service request is sent to the first service request in a delayed mode, and the first service is simulated to be in an abnormal state of overtime.
In summary, according to the method provided by the embodiment, through the simulation rule constructed for the first service, the service request is modified by using the simulation platform service, so that the first service request is intercepted, and the abnormal state of the first service in the overtime of reading and writing is simulated; the type of the dependency information is determined through the execution result of the test case, the first business service obtained through simulation is in an abnormal state, a manual code combing program is avoided, and the efficiency of determining the type of the dependency information is improved.
Fig. 9 is a schematic diagram of modifying a first service request according to an embodiment of the present application. The modification configuration window 760 for the first service request includes a basic information area 762, a request rule area 764, and a response rule area 766. The basic information area is used for displaying basic information of the simulation rules, and rule names of the simulation rules corresponding to the first service request modification are as follows: decode: -201; the identification of the simulation rules is: #0019. The service name applicable to the simulation rule is page, and the interface name is QueryPayRaw; the interface identifier is 1. The request rule area 764 is used to display hit conditions of the first service request, and in the case that the first service request meets the hit conditions, the first service request is modified based on the simulation rule. The response rule area 766 is used to display the modified first service request, and in this embodiment, the response delay is used to indicate the buffer duration of the first service request by the simulation platform service. In this embodiment, the result field in the header file (header) of the first service request is modified to-201.
FIG. 10 is a schematic diagram of an interfacing relationship provided by one embodiment of the present application. The interface name of the first interface 768 is: queryA, the corresponding service name is paymentA. The remark information of the first interface 768 is payment. It will be appreciated that the description formats for the interfaces in fig. 10 are similar, the second behavior notes information, the first behavior post-section names and corresponding service names; wherein, ": : "service name before typeface": : the word is followed by an interface name, and in this embodiment, a detailed description is not listed.
It should be noted that, in the technical solution provided in the present application, simulation rules may be set for different interfaces on different services, and fig. 11 shows a schematic diagram of configuring simulation rules provided in one embodiment of the present application. The configuration simulation rules window 770 includes a first region 772 and a second region 774. The first area 772 is used to configure simulation rules for a service named paymentX. For example, interfaces named GetX and VerifyX may be configured in the first region 772, respectively. The first area 772 further includes introduction information of the simulation rules, such as: the first simulation rule 772a is rpc protocol a (simulated response) #0045; wherein the name of the simulation rule is rpc protocol A; remark description information of the simulation rules is a simulation response; the modeling rule is identified as #0045. The second area 774 is used to configure simulation rules for a service named paymentY. Interfaces named GetY are configured in the second area 774, respectively.
FIG. 12 is a flow chart illustrating a method for processing dependency information according to one embodiment of the present application. The method may be performed by a computer device. I.e. on the basis of the embodiment shown in fig. 4, further comprising a step 515, step 522 may be implemented as step 522d:
step 515: adding a test mark for a first service request corresponding to a test case according to the carding service;
illustratively, the test marks are used to distinguish between test cases for determining the type of dependency information and test cases or user use cases for other purposes. By adding the test mark, the computer equipment can execute the test cases with multiple purposes and the user use cases simultaneously, and the computer equipment does not need to be stopped to provide support for the user use cases in order to judge the type of the dependency information.
Step 522d: the simulation platform service intercepts a first service request carrying a test mark from a public gateway interface, modifies the first service request based on a simulation rule, and obtains a modified first service request;
the simulation platform service checks the test mark in the process of intercepting the service request, and intercepts the service request carrying the test mark. Fig. 13 is a schematic diagram of a simulation platform service intercepting a first service request according to an embodiment of the present application. First interface 784 receives a service request 782a, B service request 782B, C service request 782C; the second interface 788 is an interface of a business service that processes the business request. In one example, the first interface is a public gateway interface. Wherein, the a service request 782a is a service request carried in a test case for judging the type of the dependency information; the B service request 782B is a service request carried in a test case for determining service availability; c service request 782C is a service request carried in the user use case.
The simulation platform service 786 intercepts only the a-service request 782a, modifies the a-service request 782a to obtain a modified a-service request 782d, and sends the modified a-service request 782d to the second interface 788. First interface 784 directly sends B service request 782B and C service request 782C to second interface 788.
In summary, according to the method provided by the embodiment, the efficiency of intercepting the first service request is improved by adding the test mark to the first service request; the computer equipment can execute the test cases and the user use cases with multiple purposes at the same time, and the computer equipment is stopped to provide support for the user use cases in order to judge the types of the dependency information, so that the efficiency of determining the types of the dependency information is improved.
FIG. 14 is a flow chart illustrating a method for processing dependency information according to one embodiment of the present application. The method may be performed by a computer device. I.e. on the basis of the embodiment shown in fig. 4, further comprises a step 508:
step 508: based on the dependency information, constructing a simulation rule for the first business service;
illustratively, the simulation rules indicate that there is an exception type simulating that the first business service is in an exception state, the exception type of the first business service in an exception state including, but not limited to: at least one of a return code error, a connection timeout, and a read-write timeout.
The dependency information is used for indicating the association relationship between the service request and the service, and the simulation rule is constructed for the first service having the association relationship with the first service request based on the dependency information. In an alternative implementation, building simulation rules is performed on a simulation platform service.
It should be noted that, the dependency information may be directly obtained, or may be obtained through construction; the manner of obtaining the dependency information in this embodiment is not limited in any way.
In an alternative implementation, the dependency information is constructed, as shown in fig. 15, and further includes the following steps:
step 502: under the condition that the first business service is not in an abnormal state, executing a test case carrying a first business request;
for example, the first business service is not in an abnormal state for indicating that there is no abnormality in the first business service itself, and the first business service is not simulated to have an abnormality by modifying the first business request.
In an exemplary process of executing the test case, the first service request is transmitted from the public gateway interface, and the first service request is processed through one or more first service services, so that the test case is executed, and a function corresponding to the first service request is responded.
In an alternative implementation manner, the execution success rate of the test case corresponding to the first service request under the condition that the first service is not in an abnormal state is greater than a first probability threshold; preferably, the first probability threshold is 90%; setting the first probability threshold avoids failure in executing the test case caused by abnormal simulated first service or failure in executing the test case caused by failure in executing the test case.
Step 504: extracting historical call chain information of the test case;
illustratively, the history call chain information is used to indicate a delivery path of the first service request; the history call chain information is a transfer path of the first service request in the case where the first service is not in an abnormal state.
Step 506: constructing dependency relationship information based on historical call chain information;
illustratively, determining the service on the transmission path of the first service request indicated by the history call chain information as the first service; the service on the delivery path of the first service request is a service having an association relationship with the first service request.
Illustratively, the historical call information is subjected to statistical analysis to obtain dependency information, and the association relationship between the first business request and the first business service is recorded through the dependency information.
In summary, in the method provided in this embodiment, the test case is executed when the first service is not in the abnormal state, so as to obtain the dependency information, and a simulation rule is constructed for the first service, so that a foundation is laid for determining the type of the dependency information through the execution result of the test case; the first business service obtained through simulation is in an abnormal state, so that a code program is prevented from being manually combed, and the efficiency of determining the type of the dependency relationship information is improved.
FIG. 16 is a flow chart illustrating a method for processing dependency information according to one embodiment of the present application. The method may be performed by a computer device. I.e. on the basis of the embodiment shown in fig. 4, further comprising a step 525, step 530 may be implemented as step 532:
step 525: checking the execution result of the test case;
for example, in the case where the execution result passes the verification, the execution result is a result determined only by the influence of the simulation rule; in this embodiment, the execution result of the test case may be directly checked, or the call chain information of the test case may be checked, so as to indirectly check the execution result; the present embodiment does not impose any limitation on this.
For example, the execution result is a result determined only affected by the simulation rule, and is used for indicating that the first business service is not in an abnormal state, and the first business service is simulated to be abnormal only by modifying the first business request.
Step 532: under the condition that the execution result passes the verification and the execution result is failure, determining that the type of the dependency information is a first dependency type;
in the case that the execution result passes the verification and the execution result is failure, the execution result is failure only due to the first service abnormality indicated by the simulation rule, and the type of the dependency information is determined as a first dependency type, which is also referred to as a strong dependency type in one example.
In summary, by checking the execution result of the test case, the method provided by the embodiment ensures the accuracy of obtaining the simulated first service in the abnormal state based on the simulation rule, and avoids the influence of the abnormality of the first service on the type of the determined dependency relationship information; the manual code combing program is avoided, and the efficiency of determining the type of the dependency relationship information is improved.
Next, further description will be made of checking the execution result of the test case, and step 525 in the embodiment shown in fig. 16 includes, but is not limited to, implementation as at least one of the following two implementations.
The implementation mode is as follows: and comparing the execution exception type indicated by the execution result with the exception type simulating that the first business service is in an exception state, and checking the execution result of the test case.
The implementation mode II is as follows: acquiring execution call chain information of an execution result and historical call chain information of a test case; and comparing the execution call chain information with the historical call chain information, and checking the execution result of the test case.
The following describes two implementation modes in detail:
the implementation mode is as follows: and comparing the execution exception type indicated by the execution result with the exception type simulating that the first business service is in an exception state, and checking the execution result of the test case.
The execution result of the test case indicates that the test case has an execution exception type, and the execution exception type is obtained by executing the test case corresponding to the modified first service request.
For example, the anomaly type simulating that the first business service is in the anomaly state is an anomaly type indicated by the simulation rule, and the anomaly type is used for indicating the anomaly type of the first business service simulated by the simulation rule.
Under the condition that the execution exception type and the exception type are the same, the test case is only affected by the simulation rule, namely the execution exception type is caused by the fact that the first business service simulated by the simulation rule is in an exception state; in the case where the execution exception type and the exception type are the same, the execution result passes the verification.
In an alternative implementation, in the case where the execution exception type and the exception type are different, the execution exception type is caused by the first business service simulated by the simulation rule being in an exception state, and the first business service itself being in an exception state.
In summary, the method provided in this embodiment checks the execution result by comparing the difference between the execution exception type and the simulated exception type; checking whether an execution result is influenced by the simulation rule only; the method lays a foundation for determining the type of the dependency information through the execution result of the test case, utilizes the fact that the first business service obtained through simulation is in an abnormal state, avoids manually combing code programs, and improves the efficiency of determining the type of the dependency information.
The implementation mode II is as follows: acquiring execution call chain information of an execution result and historical call chain information of a test case; and comparing the execution call chain information with the historical call chain information, and checking the execution result of the test case.
The execution call chain information is, for example, execution call chain information generated in the execution process of the test case corresponding to the modified first service request, where the execution call chain information is used to indicate a transfer path of the modified first service request. The execution call chain information simulates a transmission path of the first service request of the test case when the first service is in an abnormal state.
The historical call chain information is call chain information generated in the execution process of the test case corresponding to the first service request, and the test case corresponding to the first service request is executed under the condition that the first service is not in an abnormal state. The history call chain information is used to indicate a delivery path of the first service request. The history call chain information is a history transfer path of the first service request when the test case is not in an abnormal state of the first service.
It should be noted that, the history call chain information in this embodiment may be obtained directly, or may be obtained by constructing after executing the test case corresponding to the first service request. In the case of constructing the history call chain information, the extraction of the history call chain refers to the embodiment shown in fig. 15 and is not described in detail in this embodiment.
Under the condition that the execution call chain information and the history call chain information are the same, the test case is only affected by the simulation rule; even if the first business service is simulated to be in an abnormal state, the transmission path of the modified first business request is unchanged compared with the first business request. And under the condition that the execution call chain information and the history call chain information are the same, the execution result passes the verification.
In an alternative implementation manner, when the execution call chain information and the history call chain information are different, an abnormal path appears in the modified transmission path of the first service request, the call of the service appears abnormal, and when the execution call chain information and the history call chain information are different, the execution result does not pass the verification.
In summary, according to the method provided by the embodiment, the execution result is checked by comparing the difference between the execution call chain information and the history call chain information; checking whether an abnormal path appears in the modified transmission path of the first service request; the method lays a foundation for determining the type of the dependency information through the execution result of the test case, utilizes the fact that the first business service obtained through simulation is in an abnormal state, avoids manually combing code programs, and improves the efficiency of determining the type of the dependency information.
Next, the failure of the execution result of the test case is introduced.
FIG. 17 is a flow chart illustrating a method for processing dependency information according to one embodiment of the present application. The method may be performed by a computer device. That is, in the embodiment shown in fig. 4, step 530 may be implemented as step 530a:
step 530a: under the condition that the public gateway interface corresponding to the first service request is abnormal, determining the type of the dependency relationship information as a first dependency type;
illustratively, the common gateway interface corresponding to the first service request is an entry of a transmission path of the first service request. In one example, the common gateway interface anomaly is due to an interface anomaly in the transmission path of the first service request; an interface occurrence abnormality in a transmission path is also referred to as an abnormality in the transmission path being transferred to the common gateway interface, resulting in the occurrence of an abnormality in the common gateway interface.
Fig. 18 is a schematic diagram showing an interface connection relationship provided by an embodiment of the present application, where the first interface 702 is a common gateway interface, an interface name of the first interface 702 is a test interface (test_interface), and the first interface 702 is an entry of a transmission path of the first service request; the first interface 702 is connected with at least the second service 704 to the eighth service 716. It should be noted that the number of the second service 704 to the eighth service 716 may be one or more, and the different services in this embodiment are generally distinguished from the types of services, and the number of the services is not limited; for example, there may be a plurality of service applications of the same type in different traffic scenarios, and the plurality of services of the same type are not shown one by one in the present embodiment. Illustratively, the service name of the fourth service 708 is parent 4; fourth service 708 is connected with at least ninth service 718 through fifteenth service 730. Similarly, the number of ninth service 718 through fifteenth service 730 may be one or more. The fifteenth service 730 has a service name of parent 15; the occurrence of the abnormality in the fifteenth service 730 may be caused by an information transmission error of the interface, or may be caused by the occurrence of the abnormality in the service corresponding to the fifteenth service 730. In the case that an abnormality occurs in the fifteenth service 730, the abnormality occurs in the fifteenth service 730 and is transferred to the fourth service 708 based on the interface connection relationship and then to the first interface 702; causing an anomaly to the first interface 702 of the common gateway interface type.
In summary, according to the method provided by the embodiment, based on the abnormal condition of the public gateway interface through the interface connection relationship, the execution result of the test case is judged to be failed, so that the complexity of judging the execution result of the test case is simplified; the method lays a foundation for determining the type of the dependency information through the execution result of the test case, utilizes the fact that the first business service obtained through simulation is in an abnormal state, avoids manually combing code programs, and improves the efficiency of determining the type of the dependency information.
FIG. 19 is a flow chart illustrating a method for processing dependency information according to one embodiment of the present application. The method may be performed by a computer device. That is, in the embodiment shown in fig. 4, step 530 may be implemented as step 530b:
step 530b: under the condition that the execution result and the expected result of the test case are different, determining that the type of the dependency information is a first dependency type;
the expected result is an expected execution result of the test case carrying the first service request in the case that the first service is not in an abnormal state, and the execution result is an execution result of the test case carrying the modified first service request. In one implementation, the execution results are also referred to as running results.
The expected execution result of the test case is determined manually in the process of collecting or constructing the test case, and the expected execution result is obtained by combing the test case.
In one implementation, whether the execution result and the expected result are the same is determined from a test report of the test case, and fig. 20 is a schematic diagram of the test report provided by one embodiment of the present application. Test report window 750 includes a base information area 752 and an operation result area 754; the basic information area 752 displays basic information of the test case, such as: the method comprises the steps of executing a test report identifier generated by a test case, a test function of the test case, a test case identifier, a background environment type of the test case and a starting time of the test case. The operation result area 754 displays operation result information of the test case. In this embodiment, the running result of the test case is failure. The failure cause is that the expected result declares failure because the execution result of the test case is different from the expected result. The run results field 754 also displays expected results information; the expected result information of the test case is in the steps of selecting a payment mode, carrying out stage payment and maintaining; any of the three types of information.
In summary, according to the method provided by the embodiment, the expected result of the test case is used for judging that the execution result of the test case is failure, so that the complexity of judging the execution result of the test case is simplified; the method lays a foundation for determining the type of the dependency information through the execution result of the test case, utilizes the fact that the first business service obtained through simulation is in an abnormal state, avoids manually combing code programs, and improves the efficiency of determining the type of the dependency information.
FIG. 21 is a flow chart illustrating a method for processing dependency information according to one embodiment of the present application. The method may be performed by a computer device. That is, in the embodiment shown in fig. 4, step 530 may be implemented as step 530c:
step 530c: under the condition that the service failure index of the test case exceeds the target threshold, determining the type of the dependency information as a first dependency type;
the service failure index of the test case is a service index for indicating stability of a service running on the computer device, and the service failure index is reported by a first service corresponding to the first service request.
Fig. 22 is a schematic diagram of a service failure indicator according to an embodiment of the present application. The reporting of the service failure indicator after the time point 13:45 is shown, wherein the horizontal axis in the diagram represents time and the vertical axis represents the number of times of the service failure indicator. In one implementation, the target threshold is 2 times, and the type of the indication dependency information is a first dependency type when the number of times of reporting the service failure index exceeds 2 times.
In summary, according to the method provided by the embodiment, the execution result of the test case is judged to be failed by the service failure index reported by the service, so that the complexity of judging the execution result of the test case is simplified; the method lays a foundation for determining the type of the dependency information through the execution result of the test case, utilizes the fact that the first business service obtained through simulation is in an abnormal state, avoids manually combing code programs, and improves the efficiency of determining the type of the dependency information.
FIG. 23 is a flow chart illustrating a method for processing dependency information according to one embodiment of the present application. The method may be performed by a server. The method comprises the following steps:
step 632: the dependence analysis service indicates the UAT case execution service to execute the test case;
illustratively, the dependency analysis service forwards the indication of the execution test case to the UAT case execution service. The test cases are executed by the UAT case execution service. Illustratively, the test case is a user acceptance test case.
Step 634: the UAT use case execution service sends a service request to the flow management service indication;
the flow management service is used for managing the service request input into the service environment, and the UAT service is used for sending the service request to the flow management service to execute the test case.
Step 636: the flow management service sends a service request to a service environment;
illustratively, the business environment includes one or more business services for processing business requests.
Step 638: the service environment reports the service index to the service statistics service;
exemplary, service requests in the service environment report service indexes to the service statistics service respectively; the business index is used for indicating the execution result of the test case.
Step 640: reporting calling information to a calling chain statistical service by a service environment;
illustratively, service requests in the service environment report call information to the call chain statistics service, respectively. The call information is used to indicate the situation in which the traffic service transmits the traffic request. And further carrying out call chain statistics on the service to obtain call chain information of the service request.
Step 642: the dependence analysis service queries historical call chain information from the call chain statistics service;
illustratively, the historical call chain information is presented in the form of a directed graph.
Step 644: analyzing the dependency analysis service to obtain dependency relationship information;
illustratively, the dependency analysis service analyzes the historical call chain information to obtain dependency relationship information.
Step 646: the dependence analysis service instructs the Mock platform service to construct a simulation rule for the business service;
establishing a simulation rule for business service through a Mock platform service; the dependency analysis service adds simulation rules for business services on the Mock platform service based on the dependency information.
Step 648: the dependence analysis service indicates the UAT case execution service to execute the test case;
after the simulation rules are built, the dependency analysis service forwards the indication information of the execution test cases to the UAT case execution service. The test cases are executed by the UAT case execution service.
Step 650: the UAT use case execution service sends a service request to the flow management service indication;
the business service is used for processing the business request.
Step 652: the flow management service sends a service request to a service environment;
illustratively, the Mock platform service intercepts the business request and modifies the business request based on the simulation rules.
Step 654: the service environment reports the service index to the service statistics service;
exemplary, service requests in the service environment report service indexes to the service statistics service respectively; the business index is used for indicating the execution result of the test case.
Step 656: reporting calling information to a calling chain statistical service by a service environment;
Illustratively, service requests in the service environment report call information to the call chain statistics service, respectively.
Step 658: inquiring the service availability index from the service statistics service by the relying analysis service;
illustratively, the dependent analysis service queries the execution results of the test case.
Step 660: the dependency analysis service determines the type of the dependency information;
in an exemplary embodiment, in a case where the execution result of the test case is failure, the type of the dependency information is determined to be the first dependency type.
In summary, according to the method provided by the embodiment, the business request is modified by aiming at the simulation rule constructed by the business service, so that the simulation of the abnormal state of the business service is realized; the type of the dependency information is determined according to the execution result of the test case, the business service obtained through simulation is in an abnormal state, a code program is prevented from being manually combed, and the efficiency of determining the type of the dependency information is improved.
It will be understood by those skilled in the art that the above embodiments may be implemented independently, or the above embodiments may be combined freely to form a new embodiment to implement the dependency information processing method of the present application.
Fig. 24 is a block diagram showing a dependency information processing apparatus according to an exemplary embodiment of the present application. The device comprises:
an obtaining module 810, configured to obtain a simulation rule of a first service, where the simulation rule is determined based on the dependency information, and the dependency information is used to indicate an association relationship between a service request and a service, and the first service is the service associated with the first service request;
a processing module 820, configured to modify the first service request carried by the test case based on the simulation rule; executing the test case subjected to the modification processing to simulate the test case to be executed under the condition that the first business service is in an abnormal state;
and the determining module 830 is configured to determine that the type of the dependency information is a first dependency type if the execution result of the test case is failure.
In an alternative design of the application, the computer device runs with a simulation platform service;
the processing module 820 is further configured to:
the simulation platform service intercepts the first service request from a public gateway interface, modifies the first service request based on the simulation rule, and obtains a modified first service request;
And sending the modified first business request to the first business service to execute the test case.
In an optional design of the present application, the type of anomaly of the first service in the anomaly state is a return code error;
the processing module 820 is further configured to:
intercepting the first service request by the simulation platform service from the public gateway interface, and modifying a support field and/or a count field of the first service request into first preset information based on the simulation rule to obtain the modified first service request;
the support field is used for indicating whether the first service needs to support a first function, the count field is used for indicating a count result of the first service request, and the first preset information is used for replacing information of the support field and/or the count field.
In an optional design of the present application, the abnormal type of the first business service in the abnormal state is a connection timeout;
the processing module 820 is further configured to:
intercepting the first service request by the simulation platform service from the public gateway interface, and modifying a result field of the first service request into second preset information based on the simulation rule to obtain the modified first service request;
After caching the modified first service request for a first time period, sending the first service request to the first service;
the result field is used for indicating an execution result of the first service request, and the second preset information is used for indicating that the delay type corresponding to the first time length is connection delay.
In an optional design of the present application, the abnormal type of the first business service in the abnormal state is read-write timeout;
the processing module 820 is further configured to:
intercepting the first service request by the simulation platform service from the public gateway interface, and modifying a result field of the first service request into third preset information based on the simulation rule to obtain the modified first service request;
after caching the modified first service request for a second time period, sending the first service request to the first service;
the result field is used for indicating an execution result of the first service request, and the third preset information is used for indicating that the delay type corresponding to the second duration is read-write delay.
In an alternative design of the application, the computer device is operated with a dependent comb service;
The processing module 820 is further configured to:
the dependent carding service adds a test mark for a first service request corresponding to the test case;
the simulation platform service intercepts the first service request carrying the test mark from the public gateway interface.
In an alternative design of the application, the device further comprises:
and a construction module 840, configured to construct the simulation rule for the first service based on the dependency information, where the simulation rule indicates that there is an anomaly type simulating that the first service is in an anomaly state.
In an alternative design of the present application, the building block 840 is further configured to:
executing the test case carrying the first service request under the condition that the first service is not in an abnormal state;
extracting history call chain information of the test case, wherein the history call chain information is used for indicating a transmission path of the first service request;
and constructing the dependency information based on the historical call chain information.
In an alternative design of the application, the device further comprises:
a verification module 850, configured to verify an execution result of the test case, where the execution result is determined only under the influence of the simulation rule when the execution result passes the verification;
The determining module 830 is further configured to:
and under the condition that the execution result passes the verification and the execution result is failure, determining the type of the dependency information as a first dependency type.
In an alternative design of the present application, the verification module 850 is further configured to:
comparing the execution exception type indicated by the execution result with the exception type simulating that the first business service is in an exception state, and checking the execution result of the test case;
and under the condition that the execution exception type and the exception type are the same, the execution result passes the verification.
In an alternative design of the present application, the verification module 850 is further configured to:
acquiring execution calling chain information of the execution result and historical calling chain information of the test case;
comparing the execution call chain information with the history call chain information to verify the execution result of the test case;
the history call chain information is a history transfer path of the first service request when the first service is not in an abnormal state; the execution calling chain information is used for simulating a transmission path of the first service request of the test case under the condition that the first service is in an abnormal state; and under the condition that the execution call chain information and the historical call chain information are the same, the execution result passes the verification.
In an alternative design of the present application, the determining module 830 is further configured to:
and under the condition that the public gateway interface corresponding to the first service request is abnormal, determining the type of the dependency relationship information as a first dependency type.
In an alternative design of the present application, the determining module 830 is further configured to:
and under the condition that the execution result and the expected result of the test case are different, determining the type of the dependency information as a first dependency type.
In an alternative design of the present application, the determining module 830 is further configured to:
and under the condition that the service failure index of the test case exceeds a target threshold, determining the type of the dependency information as a first dependency type.
It should be noted that, when the apparatus provided in the foregoing embodiment performs the functions thereof, only the division of the respective functional modules is used as an example, in practical application, the foregoing functional allocation may be performed by different functional modules according to actual needs, that is, the content structure of the device is divided into different functional modules, so as to perform all or part of the functions described above.
With respect to the apparatus in the above embodiments, the specific manner in which the respective modules perform the operations has been described in detail in the embodiments regarding the method; the technical effects achieved by the execution of the operations by the respective modules are the same as those in the embodiments related to the method, and will not be described in detail herein.
The embodiment of the application also provides a computer device, which comprises: a processor and a memory, the memory storing a computer program; the processor is configured to execute the computer program in the memory to implement the method for processing dependency information provided in the foregoing method embodiments.
Optionally, the computer device is a server. Illustratively, fig. 25 is a block diagram of a server provided by an exemplary embodiment of the present application.
In general, the server 2300 includes: a processor 2301 and a memory 2302.
The processor 2301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 2301 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 2301 may also include a main processor, which is a processor for processing data in an awake state, also referred to as a central processor (Central Processing Unit, CPU), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 2301 may be integrated with an image processor (Graphics Processing Unit, GPU) for use in connection with rendering and rendering of content to be displayed by the display screen. In some embodiments, the processor 2301 may also include an artificial intelligence (Artificial Intelligence, AI) processor for processing computing operations related to machine learning.
Memory 2302 may include one or more computer-readable storage media, which may be non-transitory. Memory 2302 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 2302 is used to store at least one instruction for execution by processor 2301 to implement the method of processing dependency information provided by a method embodiment of the present application.
In some embodiments, server 2300 may further optionally include: an input interface 2303 and an output interface 2304. The processor 2301 and the memory 2302 may be connected to the input interface 2303 and the output interface 2304 through buses or signal lines. The respective peripheral devices may be connected to the input interface 2303 and the output interface 2304 through buses, signal lines, or a circuit board. Input interface 2303, output interface 2304 may be used to connect at least one Input/Output (I/O) related peripheral device to processor 2301 and memory 2302. In some embodiments, the processor 2301, memory 2302, and input interface 2303, output interface 2304 are integrated on the same chip or circuit board; in some other embodiments, the processor 2301, the memory 2302, and either or both of the input interface 2303 and the output interface 2304 may be implemented on separate chips or circuit boards, as embodiments of the application are not limited in this respect.
Those skilled in the art will appreciate that the structures shown above are not limiting of server 2300 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
In an exemplary embodiment, a chip is also provided, which includes programmable logic circuits and/or program instructions for implementing the method of processing dependency information as described in the above aspects when the chip is run on a computer device.
In an exemplary embodiment, a computer program product is also provided, the computer program product comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor reads and executes the computer instructions from the computer readable storage medium to implement the method for processing dependency information provided in the above method embodiments.
In an exemplary embodiment, there is also provided a computer readable storage medium having stored therein a computer program loaded and executed by a processor to implement the method for processing dependency information provided by the above-described method embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The foregoing description of the preferred embodiments of the present application is not intended to limit the application, but rather, the application is to be construed as limited to the appended claims.

Claims (18)

1. A method of processing dependency information, the method performed by a computer device, the method comprising:
acquiring a simulation rule of a first business service, wherein the simulation rule is determined based on the dependency relationship information, the dependency relationship information is used for indicating an association relationship between a business request and the business service, and the first business service is the business service associated with the first business request;
modifying the first service request carried by the test case based on the simulation rule; executing the test case subjected to the modification processing to simulate the test case to be executed under the condition that the first business service is in an abnormal state;
and under the condition that the execution result of the test case is failure, determining the type of the dependency information as a first dependency type.
2. The method of claim 1, wherein the computer device is running a simulation platform service;
modifying the first service request carried by the test case based on the simulation rule; executing the test case subjected to the modification processing, including:
The simulation platform service intercepts the first service request from a public gateway interface, modifies the first service request based on the simulation rule, and obtains a modified first service request;
and sending the modified first business request to the first business service to execute the test case.
3. The method of claim 2, wherein the type of anomaly for which the first traffic service is in an anomaly state is a return code error;
the simulation platform service intercepts the first service request from a public gateway interface, modifies the first service request based on the simulation rule to obtain a modified first service request, and comprises the following steps:
intercepting the first service request by the simulation platform service from the public gateway interface, and modifying a support field and/or a count field of the first service request into first preset information based on the simulation rule to obtain the modified first service request;
the support field is used for indicating whether the first service needs to support a first function, the count field is used for indicating a count result of the first service request, and the first preset information is used for replacing information of the support field and/or the count field.
4. The method of claim 2, wherein the type of anomaly for which the first business service is in an anomaly state is a connection timeout;
the simulation platform service intercepts the first service request from a public gateway interface, modifies the first service request based on the simulation rule to obtain a modified first service request, and comprises the following steps:
intercepting the first service request by the simulation platform service from the public gateway interface, and modifying a result field of the first service request into second preset information based on the simulation rule to obtain the modified first service request;
the sending the modified first service request to the first service includes:
after caching the modified first service request for a first time period, sending the first service request to the first service;
the result field is used for indicating an execution result of the first service request, and the second preset information is used for indicating that the delay type corresponding to the first time length is connection delay.
5. The method of claim 2, wherein the type of anomaly for which the first business service is in an anomaly state is a read-write timeout;
The simulation platform service intercepts the first service request from a public gateway interface, modifies the first service request based on the simulation rule to obtain a modified first service request, and comprises the following steps:
intercepting the first service request by the simulation platform service from the public gateway interface, and modifying a result field of the first service request into third preset information based on the simulation rule to obtain the modified first service request;
the sending the modified first service request to the first service includes:
after caching the modified first service request for a second time period, sending the first service request to the first service;
the result field is used for indicating an execution result of the first service request, and the third preset information is used for indicating that the delay type corresponding to the second duration is read-write delay.
6. The method of claim 2, wherein the computer device is running a dependent combing service;
the method further comprises the steps of:
the dependent carding service adds a test mark for a first service request corresponding to the test case;
The simulation platform service intercepts the first service request from a public gateway interface, and comprises the following steps:
the simulation platform service intercepts the first service request carrying the test mark from the public gateway interface.
7. The method according to any one of claims 1 to 6, further comprising:
and constructing the simulation rule for the first business service based on the dependency relationship information, wherein the simulation rule indicates an abnormal type simulating that the first business service is in an abnormal state.
8. The method of claim 7, wherein the method further comprises:
executing the test case carrying the first service request under the condition that the first service is not in an abnormal state;
extracting history call chain information of the test case, wherein the history call chain information is used for indicating a transmission path of the first service request;
and constructing the dependency information based on the historical call chain information.
9. The method according to any one of claims 1 to 6, further comprising:
checking the execution result of the test case, wherein the execution result is determined only under the influence of the simulation rule when the execution result passes the check;
And determining that the type of the dependency information is a first dependency type under the condition that the execution result of the test case is failure, including:
and under the condition that the execution result passes the verification and the execution result is failure, determining the type of the dependency information as a first dependency type.
10. The method of claim 9, wherein verifying the execution result of the test case comprises:
comparing the execution exception type indicated by the execution result with the exception type simulating that the first business service is in an exception state, and checking the execution result of the test case;
and under the condition that the execution exception type and the exception type are the same, the execution result passes the verification.
11. The method of claim 9, wherein verifying the execution result of the test case comprises:
acquiring execution calling chain information of the execution result and historical calling chain information of the test case;
comparing the execution call chain information with the history call chain information to verify the execution result of the test case;
The history call chain information is a history transfer path of the first service request when the first service is not in an abnormal state; the execution calling chain information is used for simulating a transmission path of the first service request of the test case under the condition that the first service is in an abnormal state; and under the condition that the execution call chain information and the historical call chain information are the same, the execution result passes the verification.
12. The method according to any one of claims 1 to 6, wherein, in the case where the execution result of the test case is failure, determining the type of the dependency information to be a first dependency type includes:
and under the condition that the public gateway interface corresponding to the first service request is abnormal, determining the type of the dependency relationship information as a first dependency type.
13. The method according to any one of claims 1 to 6, wherein, in the case where the execution result of the test case is failure, determining the type of the dependency information to be a first dependency type includes:
and under the condition that the execution result and the expected result of the test case are different, determining the type of the dependency information as a first dependency type.
14. The method according to any one of claims 1 to 6, wherein, in the case where the execution result of the test case is failure, determining the type of the dependency information to be a first dependency type includes:
and under the condition that the service failure index of the test case exceeds a target threshold, determining the type of the dependency information as a first dependency type.
15. A processing apparatus of dependency information, the apparatus comprising:
the acquisition module is used for acquiring a simulation rule of a first business service, the simulation rule is determined based on the dependency relationship information, the dependency relationship information is used for indicating the association relationship between a business request and the business service, and the first business service is the business service associated with the first business request;
the processing module is used for modifying the first service request carried by the test case based on the simulation rule; executing the test case subjected to the modification processing to simulate the test case to be executed under the condition that the first business service is in an abnormal state;
and the determining module is used for determining that the type of the dependency information is a first dependency type under the condition that the execution result of the test case is failure.
16. A computer device, the computer device comprising: a processor and a memory, wherein at least one section of program is stored in the memory; the processor is configured to execute the at least one program in the memory to implement the method for processing dependency information according to any one of claims 1 to 14.
17. A computer readable storage medium having stored therein executable instructions that are loaded and executed by a processor to implement a method of processing dependency information according to any one of claims 1 to 14.
18. A computer program product, characterized in that it comprises computer instructions stored in a computer-readable storage medium, from which a processor reads and executes them to implement a method of processing dependency information according to any one of the preceding claims 1 to 14.
CN202211254273.XA 2022-10-13 2022-10-13 Dependency information processing method, device, equipment and storage medium Pending CN117009208A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211254273.XA CN117009208A (en) 2022-10-13 2022-10-13 Dependency information processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211254273.XA CN117009208A (en) 2022-10-13 2022-10-13 Dependency information processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117009208A true CN117009208A (en) 2023-11-07

Family

ID=88567852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211254273.XA Pending CN117009208A (en) 2022-10-13 2022-10-13 Dependency information processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117009208A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117349185A (en) * 2023-12-04 2024-01-05 杭银消费金融股份有限公司 System testing method based on interface strength dependence grading
CN117891473A (en) * 2024-03-14 2024-04-16 麒麟软件有限公司 Method for integrated development environment plug-in dependency management and plug-in dependency manager

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117349185A (en) * 2023-12-04 2024-01-05 杭银消费金融股份有限公司 System testing method based on interface strength dependence grading
CN117349185B (en) * 2023-12-04 2024-02-23 杭银消费金融股份有限公司 System testing method based on interface strength dependence grading
CN117891473A (en) * 2024-03-14 2024-04-16 麒麟软件有限公司 Method for integrated development environment plug-in dependency management and plug-in dependency manager
CN117891473B (en) * 2024-03-14 2024-05-31 麒麟软件有限公司 Method for integrated development environment plug-in dependency management and plug-in dependency manager

Similar Documents

Publication Publication Date Title
CN117009208A (en) Dependency information processing method, device, equipment and storage medium
CN108829581B (en) Application program testing method and device, computer equipment and storage medium
CN108628748B (en) Automatic test management method and automatic test management system
US7996818B1 (en) Method for testing using client specified references
CN109144665A (en) A kind of simulator recognition methods, identification equipment and computer-readable medium
CN108763051B (en) Electronic device, transaction software running risk early warning method and storage medium
CN111258832B (en) Interface parameter verification method, device, equipment and medium
CN112035344A (en) Multi-scenario test method, device, equipment and computer readable storage medium
WO2020042503A1 (en) Verification method and apparatus for risk management system, and device and storage medium
CN111611612A (en) Block chain-based integrating system, device, storage medium and operation method thereof
CN107220169B (en) Method and equipment for simulating server to return customized data
CN114022151A (en) Block chain data visualization method and system, electronic device and storage medium
CN112561690B (en) Method, system, equipment and storage medium for testing credit card staged service interface
CN108280024B (en) Flow distribution strategy testing method and device and electronic equipment
CN117076330A (en) Access verification method, system, electronic equipment and readable storage medium
CN114625407A (en) Method, system, equipment and storage medium for implementing AB experiment
CN108763052A (en) A kind of method for testing performance and system of virtual reality software memory reclaim mechanism
CN112085611A (en) Asynchronous data verification method and device, electronic equipment and storage medium
RU2532714C2 (en) Method of acquiring data when evaluating network resources and apparatus therefor
CN116627849A (en) System test method, device, equipment and storage medium
CN113852610A (en) Message processing method and device, computer equipment and storage medium
CN114817024A (en) Use case generation method and device, equipment and storage medium
CN114546857A (en) Interface test case generation method and device, electronic equipment and storage medium
CN113157583A (en) Test method, device and equipment
CN111010676A (en) Short message caching method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40100483

Country of ref document: HK