An interface simulation method, device and related equipment for integrated testing

CN115658494BActive Publication Date: 2026-10-16HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211285246.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-20
Publication Date
2026-10-16
Estimated Expiration
2042-10-20

AI Technical Summary

Technical Problem

[0004]有鉴于此,本发明实施例提供一种集成测试的接口模拟方法、装置及相关设备,以解决在业务系统的测试过程中,下游业务系统无法顺利配合测试的问题

Benefits of technology

[0048] Based on the above embodiments of the present invention, an interface simulation method, apparatus, and related equipment for integration testing are provided. The method involves: obtaining a requirements document; determining the operation to be executed; executing the operation according to the requirements document to obtain a first notification message corresponding to the operation; when it is determined according to preset configuration information that the first notification message will be sent to a downstream business system, calling a notification interface to send the first notification message to the downstream business system; obtaining a second notification message received by the downstream business system; displaying the second notification message through a preset interface; determining whether there are any unexecuted operations in the requirements document; if there are unexecuted operations, determining a new operation to be executed and returning to the step of executing the operation according to the requirements document to obtain the first notification message corresponding to the operation; if there are no unexecuted operations, terminating all processes. This method simulates the notification interface of the downstream business system. After the upstream business system executes relevant operations, it obtains notification information through the notification interface, thereby prompting business personnel to verify whether the notification information meets expectations, thus accelerating the integration testing speed and improving the efficiency of integration testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115658494B_ABST
    Figure CN115658494B_ABST
Patent Text Reader

Abstract

The application provides an interface simulation method and device for integrated testing and related equipment, and the method is as follows: obtaining a requirement document; determining an operation to be executed; executing the operation to be executed according to the requirement document to obtain first notification information; if it is determined according to preset configuration information that the first notification information is to be sent to a downstream business system, calling a notification interface to send the first notification information; obtaining second notification information received by the downstream business system; displaying the second notification information through a preset interface; determining whether there is an unexecuted operation in the requirement document; if there is an unexecuted operation, determining a new operation to be executed and returning to the step of executing the operation to be executed according to the requirement document to obtain the first notification information; and if there is no unexecuted operation, ending all processes. The notification interface of the downstream business system is simulated, the notification information is obtained through the notification interface, and whether the notification information meets the expectation is verified, so that the speed of integrated testing is accelerated and the work efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet technology, and in particular to an interface simulation method, apparatus and related equipment for integration testing. Background Technology

[0002] During the testing of a business system, in addition to focusing on the relevant business operations, it is also necessary to ensure that the relevant operations of the business system can correctly notify the downstream business systems to make corresponding updates. Therefore, the testing process often requires cooperation between the business system and the downstream business systems.

[0003] However, in actual testing, downstream business systems often fail to cooperate smoothly, resulting in long testing times and low testing efficiency. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide an interface simulation method, apparatus and related equipment for integration testing, in order to solve the problem that downstream business systems cannot cooperate smoothly with testing during the testing process of business systems.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] The first aspect of this invention discloses an interface simulation method for integration testing, the method comprising:

[0007] Obtain the requirements document, which at least contains detailed information for each operation;

[0008] Determine the operation to be executed, wherein the operation to be executed is any of the operations described above;

[0009] The operation to be performed is executed according to the requirements document to obtain the first notification information corresponding to the operation to be performed;

[0010] When it is determined according to the preset configuration information that the first notification information should be sent to the downstream business system, the notification interface is called to send the first notification information to the downstream business system. The preset configuration information includes at least the information types subscribed by the downstream business system. The notification interface is set in advance based on the interface document.

[0011] Obtain the second notification information received by the downstream business system;

[0012] The second notification information is displayed through a preset interface;

[0013] Determine whether there are any unexecuted operations in the requirements document;

[0014] If there are unexecuted operations in the requirements document, determine new operations to be executed, and return to the step of executing the operations to be executed according to the requirements document to obtain the first notification information corresponding to the operations to be executed;

[0015] If the required document does not contain any unexecuted operations, terminate all processes.

[0016] Preferably, the process of pre-setting the notification interface based on the interface documentation includes:

[0017] Obtain the interface documentation, which includes at least the input parameters of the interface;

[0018] Set the notification interface according to the input parameters.

[0019] Preferably, when it is determined according to preset configuration information that the first notification information will be sent to the downstream business system, before calling the notification interface to send the first notification information to the downstream business system, the method further includes:

[0020] Based on the preset configuration information, determine whether the information type of the first notification information is the information type subscribed to by the downstream business system;

[0021] When the information type of the first notification information is the information type subscribed to by the downstream business system, it is determined that the first notification information will be sent to the downstream business system.

[0022] When the information type of the first notification information is not the information type subscribed to by the downstream business system, a new operation to be executed is determined, and the process is returned to execute the operation to be executed according to the requirement document to obtain the first notification information corresponding to the operation to be executed.

[0023] Preferably, when it is determined according to preset configuration information that the first notification information will be sent to the downstream business system, before calling the notification interface to send the first notification information to the downstream business system, the method further includes:

[0024] Obtain preset configuration information from the database table, wherein the preset configuration information includes at least the message types subscribed by the downstream business system;

[0025] The service interface of the downstream business system is set as the notification interface according to the preset configuration information.

[0026] A second aspect of this invention discloses an interface simulation device for integration testing, the device comprising:

[0027] The first acquisition unit is used to acquire a requirement document, which contains at least detailed information corresponding to each operation.

[0028] The first determining unit is used to determine the operation to be executed, wherein the operation to be executed is any of the operations;

[0029] An execution unit is configured to execute the operation to be executed according to the requirement document, so as to obtain the first notification information corresponding to the operation to be executed;

[0030] The sending unit is used to call the notification interface to send the first notification information to the downstream business system when it is determined according to the preset configuration information that the first notification information should be sent to the downstream business system. The preset configuration information includes at least the information types subscribed by the downstream business system, and the notification interface is set in advance based on the interface document.

[0031] The second acquisition unit is used to acquire the second notification information received by the downstream business system;

[0032] The display unit is used to display the second notification information through a preset interface;

[0033] The judgment unit is used to determine whether there is any unexecuted operation in the requirement document;

[0034] The second determining unit is used to determine a new operation to be executed if there are unexecuted operations in the requirements document, and return it to the execution unit.

[0035] The termination unit is used to terminate all processes if there are no unexecuted operations in the requirements document.

[0036] Preferably, the device further includes:

[0037] The third acquisition unit is used to acquire the interface document, which includes at least the input parameters of the interface.

[0038] The first setting unit is used to set the notification interface according to the input parameters.

[0039] Preferably, the device further includes:

[0040] The second judgment unit is used to determine, based on preset configuration information, whether the information type of the first notification information is the information type subscribed to by the downstream business system;

[0041] The third determining unit is configured to determine to send the first notification information to the downstream business system when the information type of the first notification information is the information type subscribed to by the downstream business system.

[0042] The fourth determining unit is used to determine a new operation to be executed and return it to the execution unit when the information type of the first notification information is not the information type subscribed to by the downstream business system.

[0043] Preferably, the device further includes:

[0044] The fourth acquisition unit is used to acquire preset configuration information from a database table, wherein the preset configuration information includes at least the message types subscribed by the downstream business system;

[0045] The second setting unit is used to set the service interface of the downstream business system as the notification interface according to the preset configuration information.

[0046] A third aspect of this invention discloses an electronic device, comprising: a processor and a memory, the processor and the memory being connected via a communication bus; wherein, the processor is used to call and execute a program stored in the memory; the memory is used to store the program, the program being used to implement the interface simulation method for integration testing as described in any one of the above embodiments.

[0047] A fourth aspect of the present invention discloses a computer-readable storage medium storing computer-executable instructions for implementing the interface simulation method for integration testing as described in any one of the preceding embodiments.

[0048] Based on the above embodiments of the present invention, an interface simulation method, apparatus, and related equipment for integration testing are provided. The method involves: obtaining a requirements document; determining the operation to be executed; executing the operation according to the requirements document to obtain a first notification message corresponding to the operation; when it is determined according to preset configuration information that the first notification message will be sent to a downstream business system, calling a notification interface to send the first notification message to the downstream business system; obtaining a second notification message received by the downstream business system; displaying the second notification message through a preset interface; determining whether there are any unexecuted operations in the requirements document; if there are unexecuted operations, determining a new operation to be executed and returning to the step of executing the operation according to the requirements document to obtain the first notification message corresponding to the operation; if there are no unexecuted operations, terminating all processes. This method simulates the notification interface of the downstream business system. After the upstream business system executes relevant operations, it obtains notification information through the notification interface, thereby prompting business personnel to verify whether the notification information meets expectations, thus accelerating the integration testing speed and improving the efficiency of integration testing. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0050] Figure 1A flowchart illustrating an interface simulation method for integration testing provided in an embodiment of the present invention;

[0051] Figure 2 A schematic diagram illustrating the method for defining a notification interface provided in an embodiment of the present invention;

[0052] Figure 3 A schematic diagram illustrating the configuration of the notification interface for downstream business systems provided in an embodiment of the present invention;

[0053] Figure 4 This is a schematic diagram illustrating the execution of an operation to be performed by an upstream business system, as provided in an embodiment of the present invention.

[0054] Figure 5 This is a schematic diagram of the second notification information content provided in an embodiment of the present invention;

[0055] Figure 6 This is a structural block diagram of an interface simulation device for integration testing provided in an embodiment of the present invention. Detailed Implementation

[0056] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0057] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0058] As the background technology shows, during the testing of a business system, downstream and upstream business systems need to work together to verify whether the functions of the business system meet expectations. However, when testers are not familiar with the downstream business system or when testers of the downstream business system cannot cooperate with the testing, it can easily lead to increased testing time costs and affect work efficiency.

[0059] Therefore, embodiments of the present invention provide an interface simulation method, apparatus, and related equipment for integration testing. The upstream business system sets up a notification interface to simulate the downstream business system based on the interface document; and sets the service interface of the downstream business system as the notification interface according to the preset configuration information in the database table; and executes the operation based on the detailed information of each operation in the requirements document to generate the first notification information. The second notification information received by the downstream business system is obtained by using the notification interface, thereby achieving the purpose of not requiring the cooperation of the downstream business system for testing, accelerating the testing speed of the business system, and improving work efficiency.

[0060] join Figure 1 The diagram illustrates a flowchart of an interface simulation method for integration testing provided by an embodiment of the present invention. The interface simulation method includes:

[0061] Step S101: Obtain the requirements document.

[0062] In the specific implementation step S101, the requirement document corresponding to the upstream business system is obtained. The requirement document contains at least multiple operations and detailed information corresponding to each operation.

[0063] Understandably, the requirements document is generated in advance based on the business needs of upstream and downstream business systems.

[0064] It should be noted that, see Figure 2 This diagram illustrates a method for defining a notification interface according to an embodiment of the present invention. The upstream business system obtains the interface document and sets up the notification interface based on the input parameters contained in the interface document. The interface document is jointly defined by the upstream and downstream business systems and includes definitions of the interface's input parameters and return results. The input parameters include entity (data type), opttype (operation type), sptype (platform type), id (data ID), remark (remark), taskid (unique identifier for each notification), and attach (attached value).

[0065] Understandably, see Figure 3 This diagram illustrates a configuration of a notification interface for a downstream business system according to an embodiment of the present invention. The upstream business system obtains preset configuration information from a database table. This preset configuration information includes the interface service name, interface service address, message type (i.e., the message type subscribed to by the downstream business system), service ID, platform ID, whether it is used, whether it is subject to callback, and additional values. The upstream business system then sets the service interface of the downstream business system as a notification interface based on the preset configuration information.

[0066] In practice, the upstream business system can set the service interfaces of multiple downstream business systems as notification interfaces according to the preset configuration information. In other words, the upstream business system and the downstream business system can have a one-to-one or one-to-many relationship.

[0067] Step S102: Determine the operation to be performed.

[0068] In the specific implementation of step S102, the operation to be executed is determined from the various operations. That is to say, the operation to be executed is any operation in the requirements document.

[0069] Step S103: Execute the operation to be executed according to the requirements document to obtain the first notification information corresponding to the operation to be executed.

[0070] In the specific implementation step S103, the upstream business system executes the operation to be executed based on the detailed information in the requirements document and receives the first notification information corresponding to the operation to be executed. See details in [link to relevant documentation]. Figure 4 The diagram shown illustrates the upstream business system performing an operation to be performed, as provided in an embodiment of the present invention.

[0071] It should be noted that the first notification message must contain at least the parameters corresponding to the operation to be performed, such as entity: 1, opttype: 1, sptype: 9, id: 3087**, remark: null, taskid: 7b103166*****, attach: test2.

[0072] Step S104: Based on the preset configuration information, determine whether the information type of the first notification information is the information type subscribed to by the downstream business system (i.e., Figure 3 (The messageItems field is used for information type). When the information type of the first notification message is the information type subscribed to by the downstream business system, step S105 is executed; when the information type of the first notification message is not the information type subscribed to by the downstream business system, step S106 is executed.

[0073] In the specific implementation step S104, based on preset configuration information, such as combining... Figure 3The preset configuration information shown includes the following: Interface service name: Test Team Dedicated; Interface service address: http: / / 172.31.**.**:8091 / apiMgt / vrs / test; Message type: [{"infotype":["12","1","2"],"opttype":["*"],"spid... etc. It determines whether the information type of the first notification message is the information type subscribed to by the downstream business system. That is, if the message type of the first notification message is [{"infotype":["12","1","2"],"opttype":["*"],"spid..., then the information type of the first notification message is determined to be the information type subscribed to by the downstream business system. If the information type of the first notification message is the information type subscribed to by the downstream business system, step S105 is executed; if the information type of the first notification message is not the information type subscribed to by the downstream business system, step S106 is executed.

[0074] Step S105: When it is determined according to the preset configuration information that the first notification information will be sent to the downstream business system, the notification interface is called to send the first notification information to the downstream business system.

[0075] In the specific implementation step S105, when the information type of the first notification information is the information type subscribed to by the downstream business system, it is determined that the first notification information will be sent to the downstream business system, and the notification interface is called to send the first notification information to the downstream business system.

[0076] Step S106: When the information type of the first notification information is not the information type subscribed to by the downstream business system, determine the new operation to be executed and return to step S103.

[0077] In the specific implementation of step S106, when the information type of the first notification information is not the information type subscribed to by the downstream business system, it is indicated that the first notification information does not need to be sent to the downstream business system. Thus, a new operation to be executed is determined according to the requirements document, and the process returns to step S103 to execute the new operation to be executed according to the requirements document, so as to obtain the first notification information corresponding to the new operation to be executed.

[0078] Step S107: Obtain the second notification information received by the downstream business system.

[0079] In the specific implementation step S107, after the upstream business system sends the first notification information to the downstream business system, it retrieves the second notification information received by the downstream business system and prints it. For details, please refer to [link to relevant documentation]. Figure 5 The illustration shows a schematic diagram of the second notification information content provided in an embodiment of the present invention.

[0080] Step S108: Display the second notification information through a preset interface.

[0081] In the specific implementation step S108, the obtained second notification information is displayed through a preset interface so that business personnel can review the second notification information received by the downstream business system.

[0082] Understandably, business personnel review the second notification information in the preset interface based on the detailed information corresponding to the operation to be executed in the requirements document. For example, if the detailed information corresponding to the operation to be executed in the requirements document is: data type: video; operation type: offline; operation platform: MPP, then it is determined whether the second notification information contains the following information: entity: 2 (the entity of the notification information is 2 when the data type is defined as video in the interface document), opttype: 5 (the opttype of the notification information is 5 when the operation type is defined as offline in the interface document), sptype: 9 (the sptype of the notification information is 9 when the platform type is defined as MPP in the interface document), id: A (data operated by the upstream business system), attach: test12 (attach is defined by the configuration information in the database). If the second notification information contains the above information, it is determined that the second notification information conforms to the detailed information corresponding to the operation to be executed in the requirements document; if the second notification information does not contain the above information, it is determined that the second notification information does not conform to the detailed information corresponding to the operation to be executed in the requirements document.

[0083] In practical applications, when the second notification information matches the detailed information corresponding to the operation to be performed in the requirements document, the business personnel confirm that the second notification information is correct; when the second notification information does not match the detailed information corresponding to the operation to be performed in the requirements document, the business personnel use the defect management system to generate the corresponding defect information and send the defect information to the business system development personnel.

[0084] Step S109: Determine if there are any unexecuted operations in the requirements document. If there are unexecuted operations in the requirements document, proceed to step S110; if there are no unexecuted operations in the requirements document, terminate all processes.

[0085] In the specific implementation of step S109, it is determined whether there are any unexecuted operations in the requirements document. If there are unexecuted operations, it is indicated that the remaining unexecuted operations need to be executed, and then step S110 is executed; if there are no unexecuted operations, it is indicated that all operations in the requirements document have been executed, and then all processes are terminated.

[0086] Step S110: If there are unexecuted operations in the requirements document, determine the new operations to be executed and return to step S103.

[0087] In the specific implementation of step S110, if there are unexecuted operations in the requirements document, it indicates that all operations in the requirements document have not yet been completed. At this time, new operations to be executed are determined according to the requirements document, and the process returns to step S103 until there are no unexecuted operations in the requirements document, that is, all operations have been completed.

[0088] In this embodiment of the invention, the upstream business system sets up a simulated notification interface according to the interface document, and obtains the second notification information sent by the upstream business system to the downstream business system through the notification interface. This promptly prompts business personnel to judge whether the relevant operations of the upstream business system have been correctly notified to the downstream business system, thereby conducting business system testing and improving the speed and efficiency of integration testing.

[0089] Corresponding to the interface simulation method for integration testing provided in the above embodiments of the present invention, see also... Figure 6 The diagram illustrates a structural block diagram of an interface simulation device for integration testing provided by an embodiment of the present invention. The interface simulation device includes: a first acquisition unit 601, a first determination unit 602, an execution unit 603, a sending unit 604, a second acquisition unit 605, a display unit 606, a judgment unit 607, a second determination unit 608, and a termination unit 609. The implementation principles of each unit are as follows:

[0090] The first acquisition unit 601 is used to acquire the requirements document, which contains at least the detailed information corresponding to each operation.

[0091] The first determining unit 602 is used to determine the operation to be executed, which is any downstream business system operation.

[0092] The execution unit 603 is used to execute the operation to be executed according to the requirements document in order to obtain the first notification information corresponding to the next operation to be executed.

[0093] The sending unit 604 is used to call the notification interface to send the first notification information to the downstream business system when it is determined according to the preset configuration information that the first notification information will be sent to the downstream business system. The preset configuration information includes at least the information types subscribed by the downstream business system, and the notification interface is set in advance based on the interface document.

[0094] The second acquisition unit 605 is used to acquire the second notification information received by the downstream business system.

[0095] The display unit 606 is used to display the second notification information through a preset interface.

[0096] The judgment unit 607 is used to determine whether there is any unexecuted operation in the requirement document.

[0097] The second determining unit 608 is used to determine a new operation to be executed if there are unexecuted operations in the requirements document, and return to the execution unit 603.

[0098] Termination unit 609 is used to terminate all processes if there are no unexecuted operations in the requirements document.

[0099] In this embodiment of the invention, the upstream business system sets up a simulated notification interface to simulate the notification interface of the downstream business system. After the upstream business system performs relevant operations, it obtains notification information through the notification interface, thereby verifying whether the notification information meets expectations, which speeds up the integration test and improves the efficiency of the integration test.

[0100] Preferred, combined Figure 6 As shown, the interface simulation device also includes a third acquisition unit and a first setting unit.

[0101] The third acquisition unit is used to acquire the interface document, which contains at least the input parameters of the interface.

[0102] The first setting unit is used to set the notification interface based on the input parameters.

[0103] Preferred, combined Figure 6 As shown, the interface simulation device also includes: a second judgment unit, a third determination unit, and a fourth determination unit.

[0104] The second judgment unit is used to determine, based on preset configuration information, whether the information type of the first notification information is the information type subscribed to by the downstream business system.

[0105] The third determining unit is used to determine to send the first notification information to the downstream business system when the information type of the first notification information is the information type subscribed to by the downstream business system.

[0106] The fourth determining unit is used to determine a new operation to be executed and return it to the execution unit 603 when the information type of the first notification information is not the information type subscribed to by the downstream business system.

[0107] Preferred, combined Figure 6 As shown, the interface simulation device also includes: a fourth acquisition unit and a second setting unit.

[0108] The fourth acquisition unit is used to acquire preset configuration information from the database table. The preset configuration information includes at least the message types subscribed to by the downstream business system.

[0109] The second setting unit is used to set the service interface of the downstream business system as a notification interface according to the preset configuration information.

[0110] This invention provides an electronic device, including a processor and a memory, which are connected via a communication bus; wherein the processor is used to call and execute a program stored in the memory; the memory is used to store the program, which is used to implement the interface simulation method for integration testing provided in the above method embodiments.

[0111] This invention provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the interface simulation method for integration testing provided in the above method embodiments.

[0112] In summary, the embodiments of the present invention provide an interface simulation method, apparatus, and related equipment for integration testing. The upstream business system sets up a simulated notification interface according to the interface document, and obtains the second notification information sent by the upstream business system to the downstream business system through the notification interface. This prompts business personnel to judge whether the relevant operations of the upstream business system have been correctly notified to the downstream business system. This achieves the goal of completing integration testing without the cooperation of the downstream system, making integration testing more convenient and easier, and improving work efficiency.

[0113] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0114] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0115] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An interface simulation method for integration testing, characterized in that, The method includes: Obtain the requirements document, which at least contains detailed information for each operation; Determine the operation to be executed, wherein the operation to be executed is any of the operations described above; The operation to be performed is executed according to the requirements document to obtain the first notification information corresponding to the operation to be performed; Based on the preset configuration information, determine whether the information type of the first notification information is the information type subscribed to by the downstream business system; When the information type of the first notification information is the information type subscribed to by the downstream business system, it is determined that the first notification information will be sent to the downstream business system, and the notification interface is called to send the first notification information to the downstream business system. The notification interface is pre-configured based on the interface document. When the information type of the first notification information is not the information type subscribed to by the downstream business system, determine a new operation to be executed, and return to the step of executing the operation to be executed according to the requirement document to obtain the first notification information corresponding to the operation to be executed. Obtain the second notification information received by the downstream business system; The second notification information is displayed through a preset interface; Determine whether there are any unexecuted operations in the requirements document; If there are unexecuted operations in the requirements document, determine new operations to be executed, and return to the step of executing the operations to be executed according to the requirements document to obtain the first notification information corresponding to the operations to be executed; If the required document does not contain any unexecuted operations, terminate all processes.

2. The method according to claim 1, characterized in that, The process of pre-setting up the notification interface based on the interface documentation includes: Obtain the interface documentation, which includes at least the input parameters of the interface; Set the notification interface according to the input parameters.

3. The method according to claim 2, characterized in that, When it is determined, based on preset configuration information, that the first notification information should be sent to a downstream business system, before calling the notification interface to send the first notification information to the downstream business system, the method further includes: Obtain preset configuration information from the database table, wherein the preset configuration information includes at least the message types subscribed by the downstream business system; The service interface of the downstream business system is set as the notification interface according to the preset configuration information.

4. An interface simulation device for integration testing, characterized in that, The device includes: The first acquisition unit is used to acquire a requirement document, which contains at least detailed information corresponding to each operation. The first determining unit is used to determine the operation to be executed, wherein the operation to be executed is any of the operations; An execution unit is configured to execute the operation to be executed according to the requirement document, so as to obtain the first notification information corresponding to the operation to be executed; The second judgment unit is used to determine, based on preset configuration information, whether the information type of the first notification information is the information type subscribed to by the downstream business system; The sending unit is configured to determine to send the first notification information to the downstream business system when the information type of the first notification information is the information type subscribed to by the downstream business system, and to call the notification interface to send the first notification information to the downstream business system. The notification interface is pre-configured based on the interface document. The fourth determining unit is used to determine a new operation to be executed and return it to the execution unit when the information type of the first notification information is not the information type subscribed to by the downstream business system. The second acquisition unit is used to acquire the second notification information received by the downstream business system; The display unit is used to display the second notification information through a preset interface; The judgment unit is used to determine whether there is any unexecuted operation in the requirement document; The second determining unit is used to determine a new operation to be executed if there are unexecuted operations in the requirements document, and return it to the execution unit. The termination unit is used to terminate all processes if there are no unexecuted operations in the requirements document.

5. The apparatus according to claim 4, characterized in that, The device further includes: The third acquisition unit is used to acquire the interface document, which includes at least the input parameters of the interface. The first setting unit is used to set the notification interface according to the input parameters.

6. The apparatus according to claim 5, characterized in that, The device further includes: The fourth acquisition unit is used to acquire preset configuration information from a database table, wherein the preset configuration information includes at least the message types subscribed by the downstream business system; The second setting unit is used to set the service interface of the downstream business system as the notification interface according to the preset configuration information.

7. An electronic device, characterized in that, include: A processor and a memory are connected via a communication bus; wherein the processor is used to call and execute a program stored in the memory; The memory is used to store a program for implementing the interface simulation method for integration testing as described in any one of claims 1-3.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for performing the interface simulation method for integration testing as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Service dynamic test method and device, computer equipment and storage medium

    CN111666211A

  • A simulation association system real-time callback method and device supporting free configuration

    CN112597042A