API sandbox joint debugging method and device
By building an API joint debugging platform and a sandbox engine to simulate the API call chain, the problem of unstable API joint debugging test environment was solved, an efficient and stable joint debugging experience was achieved, and the maintenance difficulty was reduced.
Patent Information
- Application Number
- CN202210751551.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-06-28
AI Technical Summary
In existing technologies, the API joint debugging and testing environment of emerging banks' external cooperation mechanisms such as open banking has low stability, poor test data availability, and high maintenance difficulty, which affects the external customer joint debugging experience.
Build an API joint debugging platform, use the sandbox engine to simulate the API call chain and control the response logic, provide interactive case selection and real-time message display, and ensure that the API call message is consistent with the real environment.
It improves the stability and availability of API sandbox joint debugging, reduces maintenance difficulty, enhances the joint debugging experience of external customers, and avoids technical differences and environment unavailability.
Smart Images

Figure CN115017052B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to an API sandbox joint debugging method and device. Background Art
[0002] Establishing efficient API joint debugging capabilities is a persistent challenge for emerging banking external collaboration mechanisms, such as open banking. API joint debugging refers to the debugging measures taken by the interface caller to confirm program validity after completing program development based on interface documentation. This process involves actually executing the program, calling the API, and observing the program's performance and the resulting API call results to determine whether they meet expectations. Existing methods typically utilize real-world application system deployments and specialized test data for API joint debugging. However, in practice, existing solutions have found that the test environment stability is low, test data availability is poor, and maintenance is difficult, impacting the external client joint debugging experience. Summary of the Invention
[0003] The purpose of the embodiments of the present application is to provide an API sandbox joint debugging method and device, which can conveniently and quickly implement API sandbox joint debugging, with good stability of the test environment and low maintenance difficulty, thereby helping to improve the external customer joint debugging experience.
[0004] A first aspect of an embodiment of the present application provides an API sandbox joint debugging method, including:
[0005] Build an API joint debugging platform;
[0006] Receiving a case selection instruction input by a user in a case navigation directory area of the API joint debugging platform;
[0007] Determine, according to the case selection instruction, a target case, a target API call chain corresponding to the target case, and a joint debugging status of each step in the target API call chain;
[0008] Control the sandbox engine to enter the joint debugging response state of the target case;
[0009] When an external system initiates an API call, the sandbox engine is controlled to execute the verification logic and response logic of the target case according to the target API call chain, so that the sandbox engine feeds back response data to the external system.
[0010] In the above implementation process, the method can give priority to building an API joint debugging platform; then receive the case selection instruction entered by the user in the case navigation directory area of the API joint debugging platform; then, according to the case selection instruction, determine the target case, the target API call chain corresponding to the target case, and the joint debugging status of each step in the target API call chain; and control the sandbox engine to enter the joint debugging response state of the target case; then, when the external system initiates an API call, control the sandbox engine to execute the verification logic and response logic of the target case according to the target API call chain, so that the sandbox engine can feedback the response data to the external system. It can be seen that the implementation of this implementation method can realize API sandbox joint debugging conveniently and quickly, with good stability of the test environment and low maintenance difficulty, which is conducive to improving the joint debugging experience of external customers.
[0011] Furthermore, the method further comprises:
[0012] The target case, the target API call chain, and the joint debugging status are output in the display area of the API joint debugging platform.
[0013] Furthermore, the construction of the API joint debugging platform includes:
[0014] Get API list and business product data;
[0015] Establishing an API simulation response algorithm based on the API list;
[0016] Establishing an API call chain according to the preset business process and the API simulation response algorithm;
[0017] Determine acceptance cases based on the API call chain;
[0018] Building a target business process based on the business product data;
[0019] Construct a complete case grouping based on the target business process and the acceptance case;
[0020] Build an API joint debugging platform based on the case groups.
[0021] Furthermore, establishing an API simulation response algorithm according to the API list includes:
[0022] Get the preset case scenario type;
[0023] Determine the functionality of the API based on the API list;
[0024] Simulating a response algorithm for each case scenario type based on the API list and the API functions; wherein the response algorithm includes a successful call response message and a failed call response message corresponding to the case scenario type;
[0025] The response algorithms of all the case scenario types are summarized to obtain the API simulation response algorithm.
[0026] Furthermore, establishing an API call chain according to a preset business process and the API simulation response algorithm includes:
[0027] Identify different branches of the business process;
[0028] Dividing the business process according to the different branch situations to obtain divided business processes;
[0029] An API call chain is established according to the divided business process and the API simulation response algorithm.
[0030] A second aspect of an embodiment of the present application provides an API sandbox joint debugging device, the API sandbox joint debugging device comprising:
[0031] Construction unit, used to build API joint debugging platform;
[0032] A receiving unit, configured to receive a case selection instruction input by a user in a case navigation directory area of the API joint debugging platform;
[0033] a determination unit, configured to determine a target case, a target API call chain corresponding to the target case, and a joint debugging status of each step in the target API call chain according to the case selection instruction;
[0034] A control unit is used to control the sandbox engine to enter the joint debugging response state of the target case; when the external system initiates an API call, the sandbox engine is controlled to execute the verification logic and response logic of the target case according to the target API call chain, so that the sandbox engine can feedback the response data to the external system.
[0035] In the above implementation process, the API sandbox joint debugging device can build an API joint debugging platform through a construction unit; receive the case selection instruction input by the user in the case navigation directory area of the API joint debugging platform through a receiving unit; determine the target case, the target API call chain corresponding to the target case, and the joint debugging status of each step in the target API call chain according to the case selection instruction through a determination unit; control the sandbox engine to enter the joint debugging response state of the target case through a control unit; when an external system initiates an API call, the sandbox engine is controlled to execute the verification logic and response logic of the target case according to the target API call chain, so that the sandbox engine feeds back the response data to the external system. It can be seen that the implementation of this embodiment can realize API sandbox joint debugging conveniently and quickly, the stability of the test environment is good, and the maintenance difficulty is low, which is conducive to improving the joint debugging experience of external customers.
[0036] Furthermore, the API sandbox joint debugging device further includes:
[0037] An output unit is used to output the target case, the target API call chain and the joint debugging status in the display area of the API joint debugging platform.
[0038] Furthermore, the construction unit includes:
[0039] The acquisition subunit is used to obtain the API list and business product data;
[0040] A first establishing subunit is configured to establish an API simulation response algorithm according to the API list;
[0041] The second establishing subunit is used to establish an API call chain according to a preset business process and the API simulation response algorithm;
[0042] A determination subunit, configured to determine an acceptance case based on the API call chain;
[0043] A construction subunit is used to construct a target business process based on the business product data; and to construct a complete case grouping based on the target business process and the acceptance case; and to construct an API joint debugging platform based on the case grouping.
[0044] Furthermore, the first establishing subunit includes:
[0045] The acquisition module is used to obtain the preset case scenario type;
[0046] A determination module, configured to determine a function of the API according to the API list;
[0047] A simulation module, configured to simulate a response algorithm for each case scenario type based on the API list and the API functions; wherein the response algorithm includes a successful call response message and a failed call response message corresponding to the case scenario type;
[0048] The summarizing module is used to summarize the response algorithms of all the case scenario types to obtain the API simulation response algorithm.
[0049] Furthermore, the second establishing subunit includes:
[0050] Determination module, used to determine different branches of the business process;
[0051] A division module, configured to divide the business process according to the different branch situations to obtain divided business processes;
[0052] A module is established to establish an API call chain according to the divided business process and the API simulation response algorithm.
[0053] A third aspect of an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the API sandbox debugging method described in any one of the first aspects of the embodiment of the present application.
[0054] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, the API sandbox joint debugging method described in any one of the first aspects of the embodiment of the present application is executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0056] Figure 1 A flowchart of an API sandbox joint debugging method provided in an embodiment of the present application;
[0057] Figure 2 A flowchart of another API sandbox joint debugging method provided in an embodiment of the present application;
[0058] Figure 3 A schematic diagram of the structure of an API sandbox joint debugging device provided in an embodiment of the present application;
[0059] Figure 4 A schematic diagram of the structure of another API sandbox joint debugging device provided in an embodiment of the present application;
[0060] Figure 5 This is an application example diagram of an API sandbox joint debugging method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0062] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0063] Example 1
[0064] Please see Figure 1 , Figure 1 A flowchart of an API sandbox joint debugging method is provided for an embodiment of the present application. The API sandbox joint debugging method includes:
[0065] S101. Build an API joint debugging platform.
[0066] S102: Receive a case selection instruction input by the user in the case navigation directory area of the API joint debugging platform.
[0067] S103: Determine the target case, the target API call chain corresponding to the target case, and the joint debugging status of each step in the target API call chain according to the case selection instruction.
[0068] S104: Control the sandbox engine to enter the joint debugging response state of the target case.
[0069] S105. When the external system initiates an API call, the sandbox engine is controlled to execute the verification logic and response logic of the target case according to the target API call chain, so that the sandbox engine feeds back response data to the external system.
[0070] For example, this method can prioritize establishing basic API simulation response capabilities based on the API list, and distinguish responses for different scenarios based on the API's functions. An API has at least two response messages for successful calls and failed calls (for some complex APIs, there will be more scenarios). Then, the method resumes the API call chain based on the business process as an acceptance case (different branches of the same business process will be regarded as different acceptance cases to construct the API call chain). After that, the method can build multiple business processes based on business products to form a complete case grouping. Finally, an API joint debugging workbench is built.
[0071] In this embodiment, the method can construct multi-level concepts based on a single API response to form a case that is closer to the real business process; at the same time, the method can also select the case to be debugged through interactive clicking in the API debugging workbench, avoiding the additional adaptation of the external business system due to the use of the sandbox.
[0072] In this embodiment, the execution subject of the method may be a computing device such as a computer or a server, and this is not limited in this embodiment.
[0073] In this embodiment, the execution subject of the method may also be a smart device such as a smart phone, a tablet computer, etc., which is not limited in this embodiment.
[0074] It can be seen that the implementation of the API sandbox joint debugging method described in this embodiment can enable external system API joint debugging personnel to very intuitively know the number of cases and detailed business processes that need to be debugged during the system docking process; at the same time, through interactive selection, the case to be debugged can be intuitively specified, which is convenient, fast and easy to understand; in addition, the real-time scrolling display of background messages provided by the workbench can obtain real-time error information when technical errors occur. In addition, this method can also ensure that there is no technical difference between the API call message sent by the external system to the sandbox system and the API call message in the real environment, thereby avoiding the technical differences caused by the need to adapt to the additional technical elements added by the sandbox. Finally, compared with using a real test environment, this method does not require complex application system deployment and long-term environment maintenance work, thereby avoiding the environment unavailability caused by factors such as environment maintenance, version release, and data cleanup. Keenre has greatly improved the availability of the joint debugging environment.
[0075] Example 2
[0076] Please see Figure 2 , Figure 2 A flowchart of an API sandbox joint debugging method is provided for an embodiment of the present application. The API sandbox joint debugging method includes:
[0077] S201. Obtain API list and business product data.
[0078] S202. Establish an API simulation response algorithm according to the API list.
[0079] As an optional implementation, an API simulation response algorithm is established based on the API list, including:
[0080] Get the preset case scenario type;
[0081] Determine the API functionality based on the API list;
[0082] Simulate the response algorithm for each case scenario type based on the API list and API functions; the response algorithm includes a successful call response message and a failed call response message corresponding to the case scenario type;
[0083] The response algorithms of all case scenario types are summarized to obtain the API simulation response algorithm.
[0084] S203: Establish an API call chain according to the preset business process and API simulation response algorithm.
[0085] As a new implementation method, an API call chain is established based on the preset business process and API simulation response algorithm, including:
[0086] Identify different branches of the business process;
[0087] Divide the business process according to different branch situations to obtain the divided business process;
[0088] Establish an API call chain based on the division of business processes and API simulation response algorithm.
[0089] S204. Determine the acceptance case based on the API call chain.
[0090] S205: Build a target business process based on the business product data.
[0091] S206. Construct complete case grouping based on target business processes and acceptance cases.
[0092] S207. Build an API joint debugging platform based on case groups.
[0093] S208: Receive a case selection instruction input by the user in the case navigation directory area of the API joint debugging platform.
[0094] S209: Determine the target case, the target API call chain corresponding to the target case, and the joint debugging status of each step in the target API call chain according to the case selection instruction.
[0095] S210: Control the sandbox engine to enter the joint debugging response state of the target case.
[0096] S211. When an external system initiates an API call, the sandbox engine is controlled to execute the verification logic and response logic of the target case according to the target API call chain, so that the sandbox engine feeds back response data to the external system.
[0097] S212. Output the target case, target API call chain, and debugging status in the display area of the API joint debugging platform.
[0098] See also Figure 5 ,based on Figure 5 As shown in the example application diagram, when a user clicks on a specific case in the case navigation directory, the specific case is displayed in the center of the screen, along with the corresponding API call chain and the debugging status of each step. This process also controls the sandbox engine to enter the selected case's debugging response state. At this point, when an external system initiates an API call, the sandbox engine executes the validation logic and response logic for the current candidate case, providing the external system with a true response.
[0099] In this embodiment, the execution subject of the method may be a computing device such as a computer or a server, and this is not limited in this embodiment.
[0100] In this embodiment, the execution subject of the method may also be a smart device such as a smart phone, a tablet computer, etc., which is not limited in this embodiment.
[0101] It can be seen that the implementation of the API sandbox joint debugging method described in this embodiment can enable external system API joint debugging personnel to very intuitively know the number of cases and detailed business processes that need to be debugged during the system docking process; at the same time, through interactive selection, the case to be debugged can be intuitively specified, which is convenient, fast and easy to understand; in addition, the real-time scrolling display of background messages provided by the workbench can obtain real-time error information when technical errors occur. In addition, this method can also ensure that there is no technical difference between the API call message sent by the external system to the sandbox system and the API call message in the real environment, thereby avoiding the technical differences caused by the need to adapt to the additional technical elements added by the sandbox. Finally, compared with using a real test environment, this method does not require complex application system deployment and long-term environment maintenance work, thereby avoiding the environment unavailability caused by factors such as environment maintenance, version release, and data cleanup. Keenre has greatly improved the availability of the joint debugging environment.
[0102] Example 3
[0103] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of an API sandbox joint debugging device provided in an embodiment of the present application. Figure 3 As shown, the API sandbox joint debugging device includes:
[0104] A construction unit 310 is used to build an API joint debugging platform;
[0105] The receiving unit 320 is configured to receive a case selection instruction input by a user in the case navigation directory area of the API joint debugging platform;
[0106] A determination unit 330 is configured to determine a target case, a target API call chain corresponding to the target case, and a joint debugging status of each step in the target API call chain according to the case selection instruction;
[0107] The control unit 340 is used to control the sandbox engine to enter the joint debugging response state of the target case; when the external system initiates an API call, the sandbox engine is controlled to execute the verification logic and response logic of the target case according to the target API call chain, so that the sandbox engine can feedback the response data to the external system.
[0108] In this embodiment, the explanation of the API sandbox joint debugging device can refer to the description in Example 1 or Example 2, and will not be repeated in this embodiment.
[0109] It can be seen that the implementation of the API sandbox debugging device described in this embodiment can enable external system API debugging personnel to very intuitively know the number of cases and detailed business processes that need to be debugged during the system docking process; at the same time, through interactive selection, the case to be debugged can be intuitively specified, which is convenient, fast and easy to understand; in addition, the real-time scrolling display of background messages provided by the workbench can obtain real-time error information when technical errors occur. In addition, the device can also ensure that the API call messages sent by the external system to the sandbox system have no technical differences with the API call messages in the real environment, thereby avoiding the technical differences caused by the need to adapt to the additional technical elements added by the sandbox. Finally, compared with using a real test environment, the device does not require complex application system deployment and long-term environment maintenance work, thereby avoiding the environment unavailability caused by factors such as environment maintenance, version release, and data cleanup. Keenre has greatly improved the availability of the debugging environment.
[0110] Example 4
[0111] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an API sandbox joint debugging device provided in an embodiment of the present application. Figure 4 As shown, the API sandbox joint debugging device includes:
[0112] A construction unit 310 is used to build an API joint debugging platform;
[0113] The receiving unit 320 is configured to receive a case selection instruction input by a user in the case navigation directory area of the API joint debugging platform;
[0114] A determination unit 330 is configured to determine a target case, a target API call chain corresponding to the target case, and a joint debugging status of each step in the target API call chain according to the case selection instruction;
[0115] The control unit 340 is used to control the sandbox engine to enter the joint debugging response state of the target case; when the external system initiates an API call, the sandbox engine is controlled to execute the verification logic and response logic of the target case according to the target API call chain, so that the sandbox engine can feedback the response data to the external system.
[0116] As an optional implementation, the API sandbox joint debugging device further includes:
[0117] The output unit 350 is used to output the target case, target API call chain and debugging status in the display area of the API joint debugging platform.
[0118] As an optional implementation, the construction unit 310 includes:
[0119] The acquisition subunit 311 is used to obtain the API list and business product data;
[0120] A first establishing subunit 312 is configured to establish an API simulation response algorithm according to the API list;
[0121] The second establishing subunit 313 is used to establish an API call chain according to a preset business process and an API simulation response algorithm;
[0122] A determination subunit 314 is used to determine an acceptance case based on the API call chain;
[0123] The construction subunit 315 is used to construct the target business process according to the business product data; and to construct a complete case grouping according to the target business process and the acceptance case; and to construct an API joint debugging platform according to the case grouping.
[0124] As an optional implementation, the first establishing subunit 312 includes:
[0125] The acquisition module is used to obtain the preset case scenario type;
[0126] A determination module is used to determine the function of the API according to the API list;
[0127] A simulation module is used to simulate the response algorithm for each case scenario type based on the API list and API functions; wherein the response algorithm includes a successful call response message and a failed call response message corresponding to the case scenario type;
[0128] The summary module is used to summarize the response algorithms of all case scenario types to obtain the API simulation response algorithm.
[0129] As an optional implementation, the second establishing subunit 313 includes:
[0130] Determination module, used to determine different branches of the business process;
[0131] A division module is used to divide the business process according to different branch situations to obtain divided business processes;
[0132] Establish a module for establishing an API call chain based on the division of business processes and API simulation response algorithm.
[0133] In this embodiment, the explanation of the API sandbox joint debugging device can refer to the description in Example 1 or Example 2, and will not be repeated in this embodiment.
[0134] It can be seen that the implementation of the API sandbox debugging device described in this embodiment can enable external system API debugging personnel to very intuitively know the number of cases and detailed business processes that need to be debugged during the system docking process; at the same time, through interactive selection, the case to be debugged can be intuitively specified, which is convenient, fast and easy to understand; in addition, the real-time scrolling display of background messages provided by the workbench can obtain real-time error information when technical errors occur. In addition, the device can also ensure that the API call messages sent by the external system to the sandbox system have no technical differences with the API call messages in the real environment, thereby avoiding the technical differences caused by the need to adapt to the additional technical elements added by the sandbox. Finally, compared with using a real test environment, the device does not require complex application system deployment and long-term environment maintenance work, thereby avoiding the environment unavailability caused by factors such as environment maintenance, version release, and data cleanup. Keenre has greatly improved the availability of the debugging environment.
[0135] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the API sandbox debugging method in embodiment 1 or embodiment 2 of the present application.
[0136] An embodiment of the present application provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, the API sandbox joint debugging method in embodiment 1 or embodiment 2 of the present application is executed.
[0137] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.
[0138] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0139] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0140] The foregoing is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included within the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined or explained in subsequent figures.
[0141] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
[0142] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
Claims
1. An API sandbox joint debugging method, characterized in that: include: Get API list and business product data; Get the preset case scenario type; Determine the functionality of the API based on the API list; Simulating a response algorithm for each case scenario type based on the API list and the API functions; wherein the response algorithm includes a successful call response message and a failed call response message corresponding to the case scenario type; Summarize the response algorithms of all the case scenario types to obtain the API simulation response algorithm; Establishing an API call chain according to the preset business process and the API simulation response algorithm; Determine acceptance cases based on the API call chain; Building a target business process based on the business product data; Construct a complete case grouping based on the target business process and the acceptance case; Build an API joint debugging platform based on the case groups described; Receiving a case selection instruction input by a user in a case navigation directory area of the API joint debugging platform; Determine, according to the case selection instruction, a target case, a target API call chain corresponding to the target case, and a joint debugging status of each step in the target API call chain; Control the sandbox engine to enter the joint debugging response state of the target case; When an external system initiates an API call, the sandbox engine is controlled to execute the verification logic and response logic of the target case according to the target API call chain, so that the sandbox engine feeds back response data to the external system; The method further comprises: The case selection instruction and the target case are displayed in the case navigation directory area of the display area of the API joint debugging platform; the target API call chain and the joint debugging status are displayed in the API call chain and API joint debugging status display area of the display area; and the response data is displayed in the real-time message scrolling area of the display area; The step of establishing an API call chain according to a preset business process and the API simulation response algorithm includes: Identify different branches of the business process; Dividing the business process according to the different branch situations to obtain divided business processes; An API call chain is established according to the divided business process and the API simulation response algorithm.
2. An API sandbox joint debugging device, characterized in that: The API sandbox joint debugging device includes: Construction unit, used to build API joint debugging platform; A receiving unit, configured to receive a case selection instruction input by a user in a case navigation directory area of the API joint debugging platform; a determination unit, configured to determine a target case, a target API call chain corresponding to the target case, and a joint debugging status of each step in the target API call chain according to the case selection instruction; A control unit, configured to control the sandbox engine to enter a joint debugging response state for the target case; when an external system initiates an API call, control the sandbox engine to execute the verification logic and response logic of the target case according to the target API call chain, so that the sandbox engine feeds back response data to the external system; Wherein, the construction unit includes: The acquisition subunit is used to obtain the API list and business product data; A first establishing subunit is configured to establish an API simulation response algorithm according to the API list; The second establishing subunit is used to establish an API call chain according to a preset business process and the API simulation response algorithm; A determination subunit, configured to determine an acceptance case based on the API call chain; A construction subunit is configured to construct a target business process based on the business product data; construct a complete case group based on the target business process and the acceptance case; and construct an API joint debugging platform based on the case group; Wherein, the first establishing subunit includes: The acquisition module is used to obtain the preset case scenario type; A determination module is used to determine the function of the API according to the API list; A simulation module is used to simulate the response algorithm for each case scenario type based on the API list and API functions; wherein the response algorithm includes a successful call response message and a failed call response message corresponding to the case scenario type; The aggregation module is used to aggregate the response algorithms of all case scenario types to obtain the API simulation response algorithm; The API sandbox joint debugging device further includes: An output unit, configured to output the target case, the target API call chain, and the joint debugging status in a display area of the API joint debugging platform; Wherein, the second establishing subunit includes: Determination module, used to determine different branches of the business process; A division module is used to divide the business process according to different branch situations to obtain divided business processes; Establish a module for establishing an API call chain based on the division of business processes and API simulation response algorithm.
3. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the API sandbox joint debugging method according to claim 1.
4. A readable storage medium, characterized in that: The readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the API sandbox joint debugging method according to claim 1 is executed.
Citation Information
Patent Citations
Joint debugging task establishment method, system joint debugging method and device
CN106406826A
Method for realizing interface joint debugging sandbox capable of being dynamically configured
CN114595446A