Interface debugging method and device

The interface debugging page receives and checks parameters, generates debug request information, and displays the results directly on the page, solving the complex and cumbersome problems of existing interface debugging and improving debugging efficiency.

CN114756446BActive Publication Date: 2024-12-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110029044.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-11
Publication Date
2024-12-24
Estimated Expiration
2041-01-11

AI Technical Summary

Technical Problem

The existing interface debugging methods are complex and cumbersome, which can easily lead to errors, reduce debugging efficiency, and require manual understanding of interface documents.

Method used

It provides an interface debugging method and device, which displays the interface debug page, receives and verifys parameters, generates debug request information, and generates debug results through the debug server calling the interface, and displays the results directly on the page without manually understanding the interface document.

Benefits of technology

It greatly reduces the complexity of the debugging process, improves the efficiency of interface debugging, can verify the input parameters, and directly displays the debugging results on the page.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114756446B_ABST
    Figure CN114756446B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses an interface debugging method and device. After the interface debugging page corresponding to the interface to be debugged is displayed, the interface debugging page includes a debugging control and at least one type of parameter input control corresponding to the debugging parameter. According to the type of the parameter input control, at least one type of debugging parameter input in the parameter input control is received to obtain the target debugging parameter. Then, based on the type of the debugging parameter, the target debugging parameter is verified. When the target debugging parameter is verified, debugging request information of the interface to be debugged is generated according to the target debugging parameter. In response to the debugging operation of the debugging control, the debugging result of the interface to be debugged is displayed on the interface debugging page. The debugging result is generated by calling the interface to be debugged according to the debugging request information by the debugging server. The scheme can greatly improve the debugging efficiency of interface debugging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to an interface debugging method and device. Background Art

[0002] In recent years, with the rapid development of Internet technology, more and more application programming interfaces (APIs) have been developed, which greatly promotes the efficiency of application development. When developing applications, it is necessary to debug the application programming interface. Existing debugging methods mainly rely on manual understanding of the interface document or debugging through debugging tools based on the content of the interface document.

[0003] In the process of research and practice of the prior art, the inventor of the present invention found that for the interface debugging method, since the rules defined by each interface are different, manually understanding the interface document or referring to the content of the interface document is complicated and cumbersome to use, and it is easy to make errors when entering the debugging parameters. Therefore, the debugging efficiency of the interface debugging is greatly reduced. Summary of the invention

[0004] The embodiment of the present invention provides an interface debugging method and device, which can improve the debugging efficiency of interface debugging.

[0005] An interface debugging method, comprising:

[0006] Displaying an interface debugging page corresponding to the interface to be debugged, wherein the interface debugging page includes a debugging control and at least one type of parameter input control corresponding to a debugging parameter;

[0007] According to the type of the parameter input control, receiving at least one type of debugging parameter input in the parameter input control to obtain a target debugging parameter;

[0008] Based on the type of the debugging parameter, verify the target debugging parameter;

[0009] When the target debugging parameter verification passes, generating debugging request information of the interface to be debugged according to the target debugging parameter;

[0010] In response to the debugging operation of the debugging control, the debugging result of the interface to be debugged is displayed on the interface debugging page, and the debugging result is generated by the debugging server calling the interface to be debugged according to the debugging request information.

[0011] Optionally, the embodiment of the present invention may further provide another interface debugging method, including:

[0012] Obtaining an interface document of at least one interface to be debugged, and reading interface information of the interface to be debugged in the interface document;

[0013] Sending the interface information to a debugging terminal so that the debugging terminal displays an interface debugging page corresponding to the interface to be debugged according to the interface information;

[0014] Receiving debugging request information of the interface to be debugged returned by the debugging terminal;

[0015] Sending the debugging request information to the interface to be debugged through the proxy service interface, and receiving the debugging result returned by the interface to be debugged according to the debugging request information;

[0016] The debugging result is sent to the debugging terminal, so that the debugging terminal displays the debugging result on the interface debugging page.

[0017] Accordingly, an embodiment of the present invention provides an interface debugging device, including:

[0018] A debugging page display unit, used to display an interface debugging page corresponding to the interface to be debugged, wherein the interface debugging page includes a debugging control and at least one type of parameter input control corresponding to a debugging parameter;

[0019] A first receiving unit, configured to receive at least one type of debugging parameter input in the parameter input control according to the type of the parameter input control, and obtain a target debugging parameter;

[0020] A verification unit, configured to verify the target debugging parameter based on the type of the debugging parameter;

[0021] A generating unit, configured to generate debugging request information of the interface to be debugged according to the target debugging parameters when the target debugging parameters are verified;

[0022] The debugging result display unit is used to display the debugging result of the interface to be debugged on the interface debugging page in response to the debugging operation of the debugging control, and the debugging result is generated by the debugging server calling the interface to be debugged according to the debugging request information.

[0023] Optionally, the embodiment of the present invention may further provide another interface debugging device, including:

[0024] An acquisition unit, used to acquire an interface document of at least one interface to be debugged, and read interface information of the interface to be debugged in the interface document;

[0025] A first sending unit, configured to send the interface information to a debugging terminal, so that the debugging terminal displays an interface debugging page corresponding to the interface to be debugged according to the interface information;

[0026] A second receiving unit, configured to receive debugging request information of the interface to be debugged returned by the debugging terminal;

[0027] A calling unit, used for sending the debugging request information to the interface to be debugged through the proxy service interface, and receiving the debugging result returned by the interface to be debugged according to the debugging request information;

[0028] The second sending unit is used to send the debugging result to the debugging terminal, so that the debugging terminal displays the debugging result on the interface debugging page.

[0029] Optionally, in some embodiments, the interface debugging device may further include a page generation unit, which may be specifically used to receive interface information of at least one interface to be debugged sent by the debugging server to obtain an interface information set; filter out the interface information of the interface to be debugged currently being debugged from the interface information set to obtain target interface information; parse the target interface information to obtain interface request parameters of the interface to be debugged; and generate the interface debugging page according to the interface request parameters.

[0030] Optionally, in some embodiments, the page generation unit can be specifically used to identify the data type of the interface description data of the interface to be debugged in the target interface information; determine the parsing method corresponding to the interface description data according to the data type; and parse the interface description data based on the parsing method to obtain the interface request parameters.

[0031] Optionally, in some embodiments, the page generation unit can be specifically used to determine the component data structure and basic debugging parameters of the debugging component of the interface to be debugged according to the interface request parameters; construct an initial interface debugging page based on the component data structure; and add the basic debugging parameters to the initial interface debugging page to obtain the interface debugging page.

[0032] Optionally, in some embodiments, the debugging page display unit can be specifically used to adjust the parameter input control on the interface debugging page in response to an adjustment operation of the parameter adjustment control to obtain an adjusted parameter input control; in response to a prompt operation of the prompt control, display prompt information corresponding to the debugging parameter on the interface debugging page; and according to the type of the parameter input control, receiving at least one type of debugging parameter entered in the parameter input control to obtain a target debugging parameter, including: according to the type of the parameter input control, receiving at least one type of debugging parameter entered by the user in the adjusted parameter input control according to the input identifier and the prompt information to obtain a target debugging parameter.

[0033] Optionally, in some embodiments, the first receiving unit can be specifically used to receive parameter information input by the user in the adjusted parameter input control according to the input identifier and prompt information; classify the parameter information according to the type of the input control; and convert the parameter information based on the classification result to obtain the target debugging parameters.

[0034] Optionally, in some embodiments, the debugging page display unit can be specifically used to respond to the selection operation of the scene selection control, filter out scene debugging parameters corresponding to the scene type of the scene selection control in a preset scene debugging parameter set; display the scene debugging parameters on the interface debugging page; and according to the type of the parameter input control, receive at least one type of debugging parameters entered in the parameter input control to obtain target debugging parameters, including: according to the type of the parameter input control, receive the debugging parameters after adjusting the scene debugging parameters entered in the parameter input control to obtain the target debugging parameters.

[0035] Optionally, in some embodiments, the debugging page display unit can be specifically used to determine the historical debugging parameter identifier corresponding to the historical parameter selection control in response to the selection operation of the historical parameter selection control; filter out the historical debugging parameters corresponding to the historical debugging parameter identifier in a preset historical debugging parameter set, and display the historical debugging parameters on the interface debugging page; and according to the type of the parameter input control, receive at least one type of debugging parameters input in the parameter input control to obtain the target debugging parameters, including: using the historical debugging parameters as the target debugging parameters.

[0036] Optionally, in some embodiments, the verification unit can be specifically used to filter out candidate debugging parameters that need to be verified from the target debugging parameters according to the input identifier of the debugging parameters; determine the verification rules of the candidate debugging parameters according to the parameter types of the candidate debugging parameters; verify the candidate debugging parameters based on the verification rules; and generate debugging information of the interface to be debugged according to the target debugging parameters when the target debugging parameters are verified, including: when the candidate debugging parameters are verified, generating debugging information of the interface to be debugged according to the target debugging parameters.

[0037] Optionally, in some embodiments, the generation unit can be specifically used to convert the debugging request information into debugging execution code in response to a viewing operation of the code viewing control; display the debugging execution code on the interface debugging page; copy the debugging execution code in response to a copy operation of the code copy control; and display the debugging result of the interface to be debugged on the interface debugging page in response to an execution operation of the code execution control.

[0038] Optionally, in some embodiments, the debugging result display unit can specifically send the debugging request information to the debugging server in response to the debugging operation of the debugging control; receive the debugging result of the interface to be debugged returned by the debugging server for the debugging request information; and display the debugging result on the interface debugging page.

[0039] Optionally, in some embodiments, the debugging result display unit can be specifically used to convert the debugging result into code to obtain the debugging code corresponding to the debugging result; display the debugging code on the interface debugging page; and copy the debugging code in response to the copy operation of the debugging code copy control.

[0040] Optionally, in some embodiments, the acquisition unit can be specifically used to identify the interface document to obtain the document format of the interface document; when the document format is different from the preset document format, the document format of the interface document is converted into the preset document format to obtain the target interface document; and the interface information of the interface to be debugged is read in the target interface document.

[0041] In addition, an embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to implement the interface debugging method provided by the embodiment of the present invention.

[0042] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the steps in any one of the interface debugging methods provided by the embodiment of the present invention.

[0043] According to the embodiment of the present invention, after the interface debugging page corresponding to the interface to be debugged is displayed, the interface debugging page includes a debugging control and at least one type of parameter input control corresponding to the debugging parameter. Then, according to the type of the parameter input control, at least one type of debugging parameter input in the parameter input control is received to obtain the target debugging parameter. Then, based on the type of the debugging parameter, the target debugging parameter is verified. When the target debugging parameter is verified, debugging request information of the interface to be debugged is generated according to the target debugging parameter. In response to the debugging operation of the debugging control, the debugging result of the interface to be debugged is displayed on the interface debugging page. The debugging result is generated by calling the interface to be debugged according to the debugging request information by the debugging server. Since the scheme only needs to input the debugging parameter through the parameter input control and generate the debugging request information according to the debugging parameter, the debugging result is directly displayed on the interface debugging page, and there is no need to manually understand the interface document or refer to the content of the interface document, which greatly reduces the complexity of the debugging process, and can also verify the input debugging parameter, so that the debugging efficiency of the interface debugging can be greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0045] Figure 1 is a schematic diagram of an interface debugging system provided by an embodiment of the present invention;

[0046] Figure 2 is a schematic diagram of a scenario of an interface debugging method provided by an embodiment of the present invention;

[0047] Figure 3 It is a flowchart of the interface debugging method provided by an embodiment of the present invention;

[0048] Figure 4 is a schematic diagram of display interface request parameters provided by an embodiment of the present invention;

[0049] Figure 5 is a page schematic diagram of an interface debugging page provided by an embodiment of the present invention;

[0050] Figure 6 is a schematic diagram of scene debugging parameters provided by an embodiment of the present invention;

[0051] Figure 7 is a schematic diagram of displaying debug execution code provided by an embodiment of the present invention;

[0052] Figure 8is a schematic diagram of displaying debugging code provided by an embodiment of the present invention;

[0053] Fig. 9 is a schematic diagram of a debugging process of a debugging terminal provided by an embodiment of the present invention;

[0054] Fig.10 is another flowchart of the interface debugging method provided by an embodiment of the present invention;

[0055] Fig.11 is a schematic diagram of interface information read according to an embodiment of the present invention;

[0056] Fig.12 is a schematic diagram of information of a sub-element provided by an embodiment of the present invention;

[0057] Fig.13 It is a schematic diagram of the interaction process of interface debugging provided by an embodiment of the present invention;

[0058] Fig.14 It is a schematic diagram of the debugging process of the interface debugging provided by the embodiment of the present invention;

[0059] Fig.15 is a structural diagram of a first interface debugging device provided by an embodiment of the present invention;

[0060] Fig.16 is a structural diagram of a second interface debugging device provided by an embodiment of the present invention;

[0061] Fig.17 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0063] The embodiment of the present invention provides an interface debugging method, device and computer-readable storage medium. The interface debugging device can be integrated in an electronic device, which can be a server or a terminal. Specifically, the embodiment of the present invention provides an interface debugging device applicable to a first electronic device (which can be referred to as a first interface debugging device for distinction), and an interface debugging device applicable to a second electronic device (which can be referred to as a second interface debugging device for distinction).

[0064] Among them, the first electronic device can be a terminal or other device, and the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The second electronic device can be a network-side device such as a server, and the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0065] In the embodiment of the present invention, the interface debugging method is introduced by taking the first electronic device as a terminal and the second electronic device as a server as an example.

[0066] For example, see Figure 1 The interface debugging system provided by the embodiment of the present invention includes a debugging terminal 10 and a debugging server 20, etc. The debugging terminal 10 and the debugging server 20 are connected through a network, for example, they can be connected through an effective or wireless network, etc., wherein the interface debugging device is integrated in the terminal, for example, integrated in the terminal in the form of a client.

[0067] Among them, the debugging terminal 10 can be used to display an interface debugging page corresponding to the interface to be debugged, and the interface debugging page includes at least one type of parameter input control corresponding to the debugging control and the debugging parameter. Then, according to the type of the parameter input control, at least one type of debugging parameter input in the parameter input control is received to obtain the target debugging parameter. Then, based on the type of the debugging parameter, the target debugging parameter is verified. When the target debugging parameter is verified, debugging request information of the interface to be debugged is generated according to the target debugging parameter. In response to the debugging operation of the debugging control, the debugging result of the interface to be debugged is displayed on the interface debugging page. The debugging result is generated by the debugging server 20 calling the interface to be debugged according to the debugging request information. Specifically, it can be as follows Figure 2 shown.

[0068] Among them, the response is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed can be real-time or have a set delay; unless otherwise specified, there is no restriction on the order of execution of the multiple operations executed.

[0069] Among them, interface debugging can be understood as debugging the application programming interface (Application Programming Interface, API), and the debugging process can be regarded as testing the application programming interface.

[0070] Among them, the debugging server 20 can be used to obtain an interface document of at least one interface to be debugged, and read the interface information of the interface to be debugged in the interface document, send the interface information to the debugging terminal 10, so that the debugging terminal 10 displays the interface debugging page corresponding to the interface to be debugged according to the interface information, receives the debugging request information of the interface to be debugged returned by the debugging terminal 10, sends the debugging request information to the interface to be debugged through the proxy service interface, and receives the debugging result returned by the interface to be debugged according to the debugging request information, and then sends the debugging result to the debugging terminal 10, so that the debugging terminal displays the debugging result on the interface debugging page.

[0071] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0072] This embodiment will be described from the perspective of a first interface debugging device, which can be specifically integrated in an electronic device, which can be a terminal or other device; wherein the terminal can include a tablet computer, a laptop computer, a personal computer (PC), a wearable device, a virtual reality device or other smart devices that can perform interface debugging.

[0073] An interface debugging method, comprising:

[0074] An interface debugging page corresponding to the interface to be debugged is displayed, the interface debugging page includes a debugging control and at least one type of parameter input control corresponding to the debugging parameter, at least one type of debugging parameter input in the parameter input control is received according to the type of the parameter input control, and a target debugging parameter is obtained, and the target debugging parameter is verified based on the type of the debugging parameter, and when the target debugging parameter is verified, debugging request information of the interface to be debugged is generated according to the target debugging parameter, and in response to the debugging operation of the debugging control, a debugging result of the interface to be debugged is displayed on the interface debugging page, and the debugging result is generated by the debugging server calling the interface to be debugged according to the debugging request information.

[0075] like Figure 3 As shown, the specific process of the interface debugging method is as follows:

[0076] 101. Display the interface debugging page corresponding to the interface to be debugged.

[0077] The interface debugging page includes debugging controls and at least one type of parameter input control corresponding to debugging parameters. The interface debugging page can be a page for debugging the interface to be debugged, and is generated by the interface information sent by the debugging server. The parameter input control can be of various types, for example, it can include input boxes, drop-down boxes, check boxes (or switches) or selection lists. The types of parameter input controls corresponding to different types of debugging parameters can be the same or different.

[0078] For example, a user can operate on the user operation page of the debugging terminal to trigger the display of the interface debugging page corresponding to the interface to be debugged. For example, a user can perform a selection operation on the interface selection page of the debugging client to trigger the display of the interface debugging page corresponding to the interface to be debugged. The interface selection page can provide users with various selection pages for debugging the interface to be debugged. For example, an interface selection control can be set on the interface selection page. The control can be expressed in a variety of forms, such as input boxes, icons, buttons, etc. Users can operate the interface selection control on the interface debugging page, such as clicking, sliding, and other triggering operations. In response to the selection operation of the interface selection control, the interface debugging page can be triggered to be displayed on the debugging terminal.

[0079] Optionally, before displaying the interface debugging page corresponding to the interface to be debugged, it is also necessary to receive interface information of the interface to be debugged selected by the user and sent by the debugging server, and generate the interface debugging page according to the interface information. Therefore, the interface debugging method may further include:

[0080] Receive interface information of at least one interface to be debugged sent by the debugging server, obtain an interface information set, filter out the interface information of the interface to be debugged currently being debugged from the interface information set, obtain target interface information, parse the target interface information, obtain interface request parameters of the interface to be debugged, and generate an interface debugging page according to the interface request parameters, which may be specifically as follows:

[0081] (1) Receive interface information of at least one interface to be debugged sent by a debugging server, and obtain an interface information set.

[0082] The interface information may be information about the interface defined in the interface description language (IDL) in the interface document. The so-called IDL is used to describe the interface definition, such as parameter name, type, meaning and restriction conditions, etc. IDL has multiple specific implementation formats, such as JSON, XML or YAML.

[0083] For example, the interface information of at least one interface to be debugged sent by the debugging server can be directly received. For example, the debugging server obtains the interface document, reads the interface information of at least one interface to be debugged in the interface document, and sends the interface information directly to the first interface debugging device, so that the first interface debugging device directly obtains the interface information, thereby obtaining an interface information set. When the number of interfaces to be debugged is large or the memory of the interface information is large, the interface information of at least one interface to be debugged sent by the debugging server can also be indirectly obtained. For example, after the debugging server obtains the interface document, it reads the interface information in the interface document, stores the interface information, and sends the storage address to the first interface debugging device. After receiving the storage address, the first interface debugging device obtains the interface information according to the storage address, thereby obtaining an interface information set.

[0084] (2) Filter out the interface information of the interface to be debugged that is currently being debugged from the interface information set to obtain the target interface information.

[0085] For example, based on the information of the interface to be debugged selected by the user on the interface selection page, the interface information of the interface to be debugged currently being debugged can be filtered out in the interface information set. For example, information such as the interface identifier or interface address of the interface to be debugged selected by the user on the interface selection page can be obtained, and the interface information corresponding to the interface identifier or interface address can be filtered out in the interface information set to obtain the target interface information.

[0086] (3) Parse the target interface information to obtain the interface request parameters of the interface to be debugged.

[0087] The interface request parameters may be parameters corresponding to the component data structure of the interface to be debugged and description information of the parameters.

[0088] For example, the data type of the interface description data of the interface to be debugged is identified in the target interface information. For example, the data type of the interface description data of the interface to be debugged is identified in the target interface information. The data type may include array, object, string, integer, Boolean, custom or file type, etc. According to the data type, the parsing method corresponding to the interface description data is determined. For example, when the data type is array and object, the parsing method of the interface description data can be determined to be recursive parsing. The recursive parsing can be to parse the interface description data in multiple levels in a recursive form to obtain the information of the entire object or array; when the data type is string, integer, Boolean, custom or file type, etc., the parsing method of the interface description data can be determined to be a logical parsing method. The logical parsing method is to parse the interface description data using specific targeted logic according to different data types. For example, when the data type is a string, the interface description data is parsed using a specific parsing logic for the string. Based on the parsing method, the interface description data is parsed to obtain the interface request parameters. For example, when the data type is an array or an object, the interface description data can be parsed by recursive parsing to obtain the initial interface request parameters. When the data type is a string, integer, Boolean, custom, or file type, etc., the interface description data is parsed by logical parsing to obtain the initial interface request parameters. The initial interface request parameters are merged to obtain the interface request parameters of the interface to be debugged. The interface request parameters can also be displayed on the interface debugging page. For example, taking the interface as an advertising creative interface, the detailed information of the interface request parameters of the advertising creative interface displayed on the interface debugging page can be as follows: Figure 4 shown.

[0089] (4) Generate an interface debugging page based on the interface request parameters.

[0090] For example, according to the interface request parameters, the component data structure and basic debugging parameters of the debugging component of the interface to be debugged are determined. For example, the data structure of the interface parameters of the interface to be debugged and the candidate debugging parameters corresponding to the interface parameters are identified in the interface request parameters, and the component data structure of the debugging component is determined according to the data structure of the interface parameters. For example, the data structure of the interface parameters is ABC, and B can include B1-B2-B3, then the component data structure can be the same as the data structure of the interface parameters. The candidate debugging parameters can also be used as the basic debugging parameters of the debugging component. For example, a certain data parameter can include multiple enumeration values, and the user needs to select at least one enumeration value from these enumeration values. Then these enumeration values ​​can be used as basic debugging parameters, and the user can select the parameter value of the debugging parameter from the basic debugging parameters. Based on the component data structure, the initial interface debugging page is constructed. For example, the component data structure is constructed on the page after initialization, and it is displayed to obtain the initial interface debugging page. Add the basic debugging parameters to the initial interface debugging page to get the interface debugging page. For example, taking the enumeration value as an example, the enumeration value can be added to the enumeration value selection list of the initial interface debugging page to get the interface debugging page. Taking the ad creative interface as an example, the interface debugging page corresponding to the interface to be debugged can be as follows: Figure 5 shown.

[0091] Optionally, after displaying the interface debugging page corresponding to the interface to be debugged, the user can also manually increase or decrease the optional debugging parameters by triggering the parameter adjustment space. Therefore, the interface debugging method can also include:

[0092] In response to the adjustment operation of the parameter adjustment control, the parameter input control is adjusted on the interface debugging page to obtain the adjusted parameter input control; in response to the prompt operation of the prompt control, prompt information corresponding to the debugging parameter is displayed on the interface debugging page; according to the type of the parameter input control, at least one type of debugging parameter input by the user in the adjusted parameter input control according to the input identifier and the prompt information is received to obtain the target debugging parameter.

[0093] For example, the interface debugging page may also include a parameter adjustment control, which is used to increase or decrease the parameter input control. The parameter input control to be increased or decreased is an optional parameter input control, which is used to input the optional debugging parameter. The optional debugging parameter can be understood as a non-essential debugging parameter, and the corresponding one is a required debugging parameter. For the parameter adjustment control, the parameter input control corresponding to the required parameter cannot be adjusted. Therefore, for object parameters, the user manually triggers the parameter adjustment control on the interface debugging page to increase or decrease the parameter input control of the optional parameter in the object. For array type parameters, the user can manually increase or decrease the parameter input control of the array element, thereby obtaining the adjusted parameter input control.

[0094] The interface debugging page may also include an input identifier and a prompt control for the debugging parameter. The input identifier is used to identify whether the debugging parameter is a required parameter. For example, the input identifier may be *. When the identifier exists next to the parameter input control corresponding to the debugging parameter, it can be determined that the debugging parameter is a required parameter. Otherwise, it is determined that the debugging parameter is an optional parameter. The prompt control is used to prompt the usage details of the debugging parameter so that the user can understand the relevant information of the parameter. When the user triggers the prompt control on the interface debugging page, in response to the prompt operation of the prompt control, the prompt information of the debugging parameter corresponding to the prompt control triggered by the user is displayed on the interface debugging page. According to the type of the parameter input control, at least one type of debugging parameter entered by the user in the adjusted parameter input control according to the input identifier and the prompt information is received.

[0095] Optionally, the interface debugging page may further include a scene selection control of at least one scene type, and the scene selection control is used by the user to select the debugging scene of the interface to be debugged and the debugging parameters under the debugging scene on the interface debugging page. After the interface debugging page corresponding to the interface to be debugged is displayed, multiple groups of scene parameters may be preset on the interface debugging page. By triggering the scene selection control, the debugging parameters preset under the debugging scene are displayed on the interface debugging page. Therefore, the interface debugging method may further include:

[0096] In response to the selection operation of the scene selection control, the scene debugging parameters corresponding to the scene type of the scene selection control are filtered out in the preset scene debugging parameter set, and the scene debugging parameters are displayed on the interface debugging page. According to the type of the parameter input control, the debugging parameters after adjustment of the scene debugging parameters entered in the parameter input control are received to obtain the target debugging parameters.

[0097] For example, a user triggers a scene selection control on the interface debugging page to select a debugging scene that needs to be debugged. In response to the selection operation of the scene selection control, a scene debugging parameter corresponding to the debugging scene is screened out from a preset scene debugging parameter set, and a parameter value corresponding to the scene debugging parameter is displayed on the interface debugging page, such as Figure 6 When the user needs to modify the parameter value corresponding to the scene debugging parameter, the parameter value can be modified through the parameter input control corresponding to the scene debugging parameter to obtain the target debugging parameter, making debugging more convenient.

[0098] Optionally, the interface debugging page may further include at least one type of historical parameter selection control, and the historical parameter selection control is used for the user to select the saved historical debugging parameters on the interface debugging page. After the interface debugging page is displayed, the user may also select the previously saved historical debugging parameters to debug the debugging interface. Therefore, the interface debugging method may further include:

[0099] In response to the selection operation of the historical parameter selection control, the historical debugging parameter identifier corresponding to the historical parameter selection control is determined, the historical debugging parameter corresponding to the historical debugging parameter identifier is screened out from the preset historical debugging parameter set, and the historical debugging parameter is displayed on the interface debugging page. The historical debugging parameter is used as the target debugging information of the interface to be debugged.

[0100] For example, the user triggers the historical parameter selection control on the interface debugging page to select the previously saved historical debugging parameters, and in response to the selection operation of the historical parameter selection control, the historical debugging parameter identifier corresponding to the historical parameter selection control is determined. The historical debugging parameters corresponding to the historical debugging parameter identifier can be screened out in the preset historical debugging parameter set, and the historical debugging parameters are displayed on the interface debugging page. When the user does not modify or adjust the historical debugging parameters through the parameter input control within the preset time, the historical debugging parameters can be used as the target debugging parameters of the interface to be debugged.

[0101] 102. According to the type of the parameter input control, receive at least one type of debugging parameter input by the parameter input control to obtain a target debugging parameter.

[0102] For example, when the user does not adjust the parameter input control through the parameter adjustment control, at least one type of debugging parameter of the parameter input control can be received according to the type of the parameter input control, for example, the parameter information input by the user in the parameter input control according to the input identification and prompt information is received. For example, the user can enter the parameter information in the parameter input control according to the input identification and prompt information. The first interface debugging device can receive the parameter information input by the user according to the type of the parameter input control. For example, when the adjustment parameter is a string or a number type parameter, the type of the corresponding parameter input control can be an input box. The user directly enters the content in the input box, and the input content can be used as the parameter information. The string / integer can be automatically adapted, and the user can directly enter the content in the input box. When the debugging parameter is a Boolean type parameter, the type of the corresponding parameter input control can be a check box (or switch), and the user can directly click or select the corresponding content in the check box or switch as the input parameter information. When the debugging parameter is an enumeration type parameter, the type of the corresponding parameter input control can be a drop-down box, which can include at least one candidate enumeration value, and the user can directly select at least one enumeration value in the drop-down box as the input parameter information. When the user type is an undefined custom structure, the type of the corresponding parameter input control is an input box in a specific format, which can be a json format. The user can directly enter a string in the json format in the input box, and use the string in the json format as the input parameter information. According to the type of input control, the parameter information is classified. For example, the parameter information entered by the user through the input box is classified into one category, and the parameter information entered through the drop-down box is classified into another category. The parameter information is classified by analogy. Based on the classification result, the parameter information is converted. For example, based on the classification result, the parameter information that needs to be converted is determined in the parameter information. For example, the information entered through the drop-down box, check box or switch is converted. Taking the drop-down box as an example, the selection information entered in the drop-down box is converted into the debugging parameter corresponding to the selection information, and the check information entered in the check box is converted into the debugging parameter corresponding to the check information. The debug parameters obtained after conversion and the debug parameters that do not need to be converted are merged to obtain the target debug parameters of the interface to be debugged.

[0103] When the user adjusts the parameter input control through the parameter adjustment control, the parameter input control can be used to receive at least one type of debugging parameter input by the user in the adjusted parameter input control according to the input identifier and prompt information, and obtain the target debugging parameter. For example, the parameter information input by the user in the adjusted parameter input control according to the input identifier and prompt information is received, and the parameter information is classified according to the type of the input control. Based on the classification result, the parameter information is converted to obtain the target debugging parameter. The specific process is described above and will not be repeated here.

[0104] When the user triggers the scene selection control, the debugging parameters after adjusting the scene debugging parameters entered in the parameter input control can be received according to the type of the parameter input control, and the target debugging parameters can be obtained. For example, the user can modify the scene debugging parameters through the parameter input controls corresponding to the scene parameters on the interface debugging page. When the user triggers the parameter input control to modify the scene debugging parameters, the modified parameter information entered in the parameter input control is received, and the modified parameter information is classified based on the type of the parameter input control. Based on the classification result, the modified parameter information is converted to obtain the target debugging parameters. The specific process is described above and will not be repeated here.

[0105] When the user triggers the historical parameter selection control, the historical debugging parameters corresponding to the historical parameter selection control can be used as target debugging parameters of the interface to be debugged. For example, the historical debugging parameters displayed on the interface debugging page can be directly used as target debugging parameters of the interface to be debugged.

[0106] Optionally, after receiving the target debugging parameters of the interface to be debugged, the target debugging parameters can also be displayed on the interface debugging page. The interface debugging page can also include a save control. When the user triggers the save control, the target debugging parameters are saved to a preset historical parameter debugging set in response to the save operation of the save control, and a target historical parameter selection control corresponding to the target debugging parameters is added to the interface debugging page. When used to trigger the target historical parameter selection control, the target debugging parameters can be displayed on the interface debugging page.

[0107] 103. Based on the type of the debugging parameter, the target debugging parameter is checked.

[0108] For example, according to the input identifier of the debugging parameter, the candidate debugging parameters that need to be verified are screened out from the target debugging parameters. For example, according to the input identifier of the debugging parameter, the mandatory parameters are screened out from the target debugging parameters, and the mandatory parameters are used as candidate debugging parameters. According to the parameter type of the candidate debugging parameter, the verification rule of the candidate debugging parameter is determined. For example, when the parameter type is a number, the verification rule of the candidate debugging parameter is determined to be a number verification rule. The number verification rule is used to check whether the parameter value of the candidate debugging parameter complies with the number filling rule. When the parameter type is an email format, the verification rule of the candidate debugging parameter is determined to be a format verification rule, and so on. Different verification rules are used to verify different types of parameters. For example, the verification rules for verifying parameter types and parameter contents can be different. Based on the verification rules, the candidate debugging parameters are verified. For example, the corresponding verification rules are used to verify the numbers or email formats filled in by the user, so as to obtain the verification results. For example, when the candidate debugging parameter verification passes, it can be determined that the target debugging parameter verification passes. When the candidate debugging parameter verification fails, it can be determined that the target debugging parameter verification fails. When the target debugging parameter verification fails, when the user triggers the debugging control, an error can be reported during the debugging execution, for example, an error prompt message can be displayed on the interface debugging page.

[0109] 104. When the target debugging parameter verification passes, debugging request information of the interface to be debugged is generated according to the target debugging parameter.

[0110] The debugging request information may be request information for debugging the interface to be debugged, and may carry request information such as target debugging parameters, interface name and interface address of the interface to be debugged. If calling the interface to be debugged requires login status, the debugging request information may also include login status information.

[0111] For example, when the target debugging parameter verification passes, the attribute information of the interface to be debugged is screened out from the interface information of the interface to be debugged according to the interface type of the interface to be debugged. According to the attribute information and the target debugging parameter, the debugging request information of the interface to be debugged is generated. For example, the interface name and interface address of the interface to be debugged are identified in the attribute information to obtain the target attribute information. The interface calling condition can also be identified in the attribute information. When the user's login status is required in the interface calling condition, the login status information of the current user is obtained, and the login status information, the target attribute information and the target debugging parameter are used as the debugging request information of the interface to be debugged. When the user's login status is not required in the interface calling condition, the target attribute information and the target debugging parameter can be used as the debugging request information of the interface to be debugged.

[0112] Optionally, after generating the debugging request information of the interface to be debugged, the debugging request information may be converted into a debugging execution code, and the interface to be debugged is debugged by executing the debugging execution code, thereby obtaining a debugging result of the interface to be debugged. Therefore, the interface debugging method may further include:

[0113] In response to the viewing operation of the code viewing control, the debugging request information is converted into debugging execution code, and the debugging execution code is displayed on the interface debugging page. In response to the copy operation of the code copy control, the debugging execution code is assigned a value. In response to the execution operation of the code execution control, the debugging result of the interface to be debugged is displayed on the interface debugging page.

[0114] For example, the interface debugging page also includes a code viewing control, a code execution control, and a code copy control. The code viewing control is used to view the debugging execution code corresponding to the debugging request information, the code execution control is used to execute the debugging execution code to debug the interface to be debugged, and the code copy control is used to copy the debugging execution code. The user triggers the code viewing control on the interface debugging page, and in response to the viewing operation of the code viewing control, the debugging request information is converted into the debugging execution code. For example, the debugging request information is converted into the debugging execution code through the conversion logic. The debugging execution code is displayed on the interface debugging page. For example, taking the curl command as an example, the debugging execution code can be displayed as follows: Figure 7 As shown. Users can also trigger the code copy page on the interface debugging page to copy the debugging execution code, thereby reusing the debugging execution code. Users can also trigger the execution operation of the code execution control on the interface debugging page, which is equivalent to triggering the debugging control, thereby debugging the interface to be debugged, and displaying the debugging results of the interface to be debugged on the interface debugging page.

[0115] 105. In response to the debugging operation of the debugging control, the debugging result of the interface to be debugged is displayed on the interface debugging page.

[0116] For example, in response to the debugging operation of the debugging control, the debugging request information is sent to the debugging server, for example, in response to the debugging operation of the debugging control, the debugging request information is sent to the proxy service interface of the debugging server. The debugging result of the interface to be debugged for the debugging request information returned by the debugging server is received, for example, the proxy service interface sends the debugging request information to the interface to be debugged, the interface to be debugged performs debugging processing according to the target debugging parameters in the debugging request information, and feeds back the debugging result to the proxy service interface, the proxy service interface returns the debugging result to the first interface debugging device, and the first interface debugging device can receive the debugging result. The debugging result is displayed on the interface debugging page, for example, the debugging result is converted into code to obtain the debugging code corresponding to the debugging result, and the debugging code is displayed on the interface debugging page, which can be as follows Figure 8The interface debugging page displaying the debugging result response area may also include a debugging code copy control, which is used by the user to copy the debugging code. When the user triggers the debugging code copy control, the debugging code is copied in response to the copy operation of the debugging code copy control.

[0117] Among them, after the debugging code is displayed in the response area of ​​the interface debugging page, the user can determine whether the debugging of the currently debugged interface has been completed based on the debugging code. After the debugging is completed, the debugging of the next interface to be debugged can be continued. If the debugging is not completed, the debugging of the currently debugged interface can be continued. The entire interface debugging process can be to parse the interface information, thereby displaying the interface debugging page corresponding to the interface information. The user interacts on the interface debugging page, constructs the request body content, and obtains the target debugging parameters. Based on the target debugging parameters, the debugging request information is generated, and the debugging request information is sent to the proxy service interface. The debugging results returned by the proxy service interface are received, and the data components, the currently filled-in field values ​​and the debugging result information are displayed on the interface debugging page. The specific steps can be as follows: Fig. 9 shown.

[0118] As can be seen from the above, after the interface debugging page corresponding to the interface to be debugged is displayed, the embodiment of the present invention includes at least one type of parameter input control corresponding to the debugging control and the debugging parameter, and then, according to the type of the parameter input control, at least one type of debugging parameter input in the parameter input control is received to obtain the target debugging parameter, and then, based on the type of the debugging parameter, the target debugging parameter is verified, and when the target debugging parameter is verified, the debugging request information of the interface to be debugged is generated according to the target debugging parameter, and in response to the debugging operation of the debugging control, the debugging result of the interface to be debugged is displayed on the interface debugging page, and the debugging result is generated by the debugging server calling the interface to be debugged according to the debugging request information; since the scheme only needs to input the debugging parameter through the parameter input control, and generate the debugging request information according to the debugging parameter, so that the debugging result is directly displayed on the interface debugging page, there is no need to manually understand the interface document or refer to the content of the interface document, which greatly reduces the complexity of the debugging process, and can also verify the input debugging parameters, so that the debugging efficiency of the interface debugging can be greatly improved.

[0119] According to the method described in the above embodiment, the following is further described in detail with examples.

[0120] In this embodiment, it will be described from the perspective of the second interface debugging device. The second interface debugging device can be specifically integrated in an electronic device, and the electronic device is used as an access server. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.

[0121] An interface debugging method, comprising:

[0122] Obtain an interface document of at least one interface to be debugged, and read interface information of the interface to be debugged in the interface document, send the interface information to the debugging terminal, so that the debugging terminal displays the interface debugging page corresponding to the interface to be debugged according to the interface information, receive debugging request information of the interface to be debugged returned by the debugging terminal, send the debugging request information to the interface to be debugged through the proxy service interface, receive the debugging result returned by the interface to be debugged according to the debugging request information, send the debugging result to the debugging terminal, so that the debugging terminal displays the debugging result on the interface debugging page.

[0123] like Fig.10 As shown, the interface debugging method, the specific process can be as follows:

[0124] 201. Obtain an interface document of at least one interface to be debugged, and read interface information of the interface to be debugged in the interface document.

[0125] For example, the interface document of the interface to be debugged can be directly obtained, for example, the interface document uploaded by the user or developer can be directly received, or the development document uploaded by the user can be received, and the interface document of the interface to be debugged can be extracted from the development document. The interface document of the interface to be debugged can also be obtained indirectly, for example, when the number of interface documents is large or the memory is large, the storage address of the interface document or development document uploaded or sent by the user or developer can be received, and the interface document of the interface to be debugged can be obtained according to the storage address.

[0126] Read the interface information of the interface to be debugged in the interface document. For example, identify the interface document to obtain the document format of the interface document. When the document format is different from the preset document format, convert the document format of the interface document into the preset document format to obtain the target interface document. The preset document format may be a json format, which is easy to be processed by the background program. Read the interface information of the interface to be debugged in the target interface document. For example, the interface information that can be read in the target interface document may include the following levels: interface name (operation name), first-level field names (including description, required and optional fields, restrictions, types and verification information (verification conditions), etc.). Taking the interface to be debugged as an advertising creative interface as an example, the read interface information can be converted into a json format as follows: Fig.11 For multi-level structures (objects and arrays), the interface information can also include child element elements, such as Fig.12 shown.

[0127] 202. Send the interface information to the debugging terminal, so that the debugging terminal displays an interface debugging page corresponding to the interface to be debugged according to the interface information.

[0128] For example, the interface information can be directly sent to the debugging terminal, so that the debugging terminal parses the interface information, obtains the interface request parameters, generates an interface debugging page according to the interface request parameters, and displays the interface debugging page. When the amount of interface information is large or the memory is large, the storage address of the interface information can also be sent to the debugging terminal, so that the debugging terminal obtains the interface information according to the storage address, parses the interface information, and displays the interface debugging page corresponding to the interface to be debugged.

[0129] 203. Receive debugging request information of the interface to be debugged returned by the debugging terminal.

[0130] For example, the debugging request information corresponding to the interface to be debugged returned by the debugging terminal can be directly received. When the number of debugging request information is large or the memory is large, the debugging request information returned by the debugging terminal can also be indirectly received, for example, by receiving the storage address of the debugging request information sent by the debugging terminal, and obtaining the debugging request information of the interface to be debugged in the memory or cache of the debugging terminal according to the storage address.

[0131] 204. Send the debugging request information to the interface to be debugged through the proxy service interface, and receive the debugging result returned by the interface to be debugged according to the debugging request information.

[0132] For example, the interface address of the interface to be debugged can be obtained in the debugging request information, and the debugging request information can be sent to the interface to be debugged according to the interface address. The actual request environment is mainly determined by the proxy service interface, and the actual request environment can be a debugging environment or a formal environment. After receiving the debugging request information, the interface to be debugged executes the target debugging parameters in the debugging request information, and the interface to be debugged thereby obtains a return value, and returns the return value as a debugging result to the proxy service interface, so that the second interface debugging device receives the debugging result returned by the interface to be debugged.

[0133] 205. Send the debugging result to the debugging terminal, so that the debugging terminal displays the debugging result on the interface debugging page.

[0134] For example, the debugging result is sent to the debugging terminal through the proxy service interface, so that the debugging terminal displays the debugging result on the interface debugging page. For example, after receiving the debugging result, the debugging terminal converts the debugging result into code, obtains the debugging code corresponding to the debugging result, and displays the debugging code on the interface debugging page.

[0135] As can be seen from the above, the embodiment of the present invention obtains the interface document of at least one interface to be debugged and reads the interface information of the interface to be debugged in the interface document, then sends the interface information to the debugging terminal, so that the debugging terminal displays the interface debugging page corresponding to the interface to be debugged according to the interface information, then receives the debugging request information of the interface to be debugged returned by the debugging terminal, sends the debugging request information to the interface to be debugged through the proxy service interface, receives the debugging result returned by the interface to be debugged according to the debugging request information, sends the debugging result to the debugging terminal, so that the debugging terminal displays the debugging result on the interface debugging page; because the scheme reads the interface information of the interface to be debugged in the interface document, the debugging terminal can display the interface debugging page corresponding to the interface information, receives the debugging request information returned by the debugging terminal, and uses the proxy service interface to call the interface to be debugged for debugging, which greatly reduces the complexity of the debugging process, and therefore can greatly improve the debugging efficiency of interface debugging.

[0136] According to the method described in the above embodiment, the following is further described in detail with examples.

[0137] In this embodiment, description will be made by taking an example in which the first interface debugging device is integrated in the debugging terminal and the second interface debugging device is integrated in the debugging server.

[0138] like Fig.13 As shown, an interface debugging method, the specific process is as follows:

[0139] 301. A debugging server obtains an interface document of at least one interface to be debugged, and reads interface information of the interface to be debugged from the interface document.

[0140] For example, the debugging server can directly receive the interface document uploaded by the user or developer, or receive the development document uploaded by the user, and extract the interface document of the interface to be debugged from the development document. When the number of interface documents is large or the memory is large, the storage address of the interface document or development document uploaded or sent by the user or developer can also be received, and the interface document of the interface to be debugged can be obtained according to the storage address. The interface document is identified to obtain the document format of the interface document. When the document format is not in json format, the document format of the interface document is converted into json format to obtain the target interface document. The interface information read in the target interface document can include the following levels: interface name (operation name), first-level field names (including description, required and optional, restrictions, types and verification information (verification conditions), etc.), and for multi-level structures (objects and arrays), the interface information can also include sub-element elements.

[0141] 302. The debugging server sends the interface information to the debugging terminal.

[0142] For example, the debugging server directly sends the interface information to the debugging terminal. When the amount of interface information is large or the memory is large, the storage address of the interface information can also be sent to the debugging terminal, so that the debugging terminal obtains the interface information according to the storage address.

[0143] 303. The debugging terminal generates an interface debugging page corresponding to the interface to be debugged according to the interface information.

[0144] For example, the debugging terminal directly receives the interface information of at least one interface to be debugged sent by the debugging server, thereby obtaining an interface information set. When the number of interfaces to be debugged is large or the memory of the interface information is large, after the debugging server obtains the interface document, it reads the interface information in the interface document, stores the interface information, and sends the storage address to the first interface debugging device. After receiving the storage address, the first interface debugging device obtains the interface information according to the storage address, thereby obtaining an interface information set. The interface identifier or interface address and other information of the interface to be debugged selected by the user on the interface selection page are obtained, and the interface information corresponding to the interface identifier or interface address is filtered out in the interface information set to obtain the target interface information.

[0145] The data type of the interface description data of the interface to be debugged is identified in the target interface information, and the data type may include array, object, string, integer, Boolean, custom or file type, etc. When the data type is array and object, it can be determined that the parsing method of the interface description data is recursive parsing, and the recursive parsing can be to parse the interface description data in multiple levels in a recursive form, so as to obtain the information of the entire object or array; when the data type is string, integer, Boolean, custom or file type, etc., it can be determined that the parsing method of the interface description data is logical parsing. When the data type is array and object, the interface description data can be parsed in a recursive parsing manner to obtain the initial interface request parameters. When the data type is string, integer, Boolean, custom or file type, etc., the interface description data can be parsed in a logical parsing manner to obtain the initial interface request parameters. The initial interface request parameters are merged to obtain the interface request parameters of the interface to be debugged.

[0146] Identify the data structure of the interface parameters of the interface to be debugged and the candidate debugging parameters corresponding to the interface parameters in the interface request parameters, determine the component data structure of the debugging component according to the data structure of the interface parameters, and use the candidate debugging parameters as the basic debugging parameters of the debugging component. For example, a data parameter may include multiple enumeration values, and the user needs to select at least one enumeration value from these enumeration values. These enumeration values ​​can be used as basic debugging parameters, and the user can select the parameter value of the debugging parameter from the basic debugging parameters. After initialization, the component data structure is constructed on the page and displayed to obtain the initial interface debugging page. Add the basic debugging parameters to the initial interface debugging page to obtain the interface debugging page. For example, taking the enumeration value as an example, the enumeration value can be added to the enumeration value selection list of the initial interface debugging page to obtain the interface debugging page.

[0147] 304. The debugging terminal displays an interface debugging page corresponding to the interface to be debugged.

[0148] For example, the user makes a selection operation on the interface selection page of the debugging client, thereby triggering the display of the interface debugging page corresponding to the interface to be debugged. For example, the debugging terminal can set an interface selection control on the interface selection page, and the user can operate the interface selection control on the interface debugging page. In response to the selection operation of the interface selection control, the interface debugging page can be triggered to be displayed on the debugging terminal.

[0149] Optionally, after the debugging terminal displays the interface debugging page corresponding to the interface to be debugged, the user can also manually increase or decrease the optional debugging parameters by triggering the parameter adjustment space, for example, the user triggers the parameter adjustment control corresponding to the optional debugging parameter on the interface debugging page to adjust the optional debugging parameter. For the optional debugging parameter being an object parameter, the user manually triggers the parameter adjustment control on the interface debugging page to increase or decrease the parameter input control of the optional parameter in the object. For the parameter of array type, the user can manually increase or decrease the parameter input control of the array element, thereby obtaining the adjusted parameter input control. When the user triggers the prompt control on the interface debugging page, in response to the prompt operation of the prompt control, the prompt information of the debugging parameter corresponding to the prompt control triggered by the user is displayed on the interface debugging page. According to the type of the parameter input control, at least one type of debugging parameter input by the user in the adjusted parameter input control according to the input identifier and the prompt information is received.

[0150] Optionally, the interface debugging page may also include a scene selection control of at least one scene type, so that the user can directly use a variety of scene debugging parameters and modify them on the basis of them. For example, the user triggers the scene selection control on the interface debugging page to select the debugging scene to be debugged. The debugging terminal responds to the selection operation of the scene selection control, selects the scene debugging parameter corresponding to the debugging scene from the preset scene debugging parameter set, and displays the parameter value corresponding to the scene debugging parameter on the interface debugging page. When the user needs to modify the parameter value corresponding to the scene debugging parameter, the parameter value can be modified through the parameter input control corresponding to the scene debugging parameter, thereby obtaining the target debugging parameter. This makes debugging more convenient.

[0151] Optionally, the interface debugging page may also include at least one type of historical parameter selection control. After the interface debugging page is displayed, the user may also select previously saved historical debugging parameters to debug the interface to be debugged. For example, the user triggers the historical parameter selection control on the interface debugging page to select previously saved historical debugging parameters, and the debugging terminal responds to the selection operation of the historical parameter selection control and determines the historical debugging parameter identifier corresponding to the historical parameter selection control. The historical debugging parameters corresponding to the historical debugging parameter identifier can be screened out from the preset historical debugging parameter set, and the historical debugging parameters can be displayed on the interface debugging page. When the user does not modify or adjust the historical debugging parameters through the parameter input control within the preset time, the historical debugging parameters can be used as the target debugging parameters of the interface to be debugged.

[0152] 305. The debugging terminal receives at least one type of debugging parameter input by the parameter input control according to the type of the parameter input control, and obtains a target debugging parameter.

[0153] For example, when the user does not adjust the parameter input control through the parameter adjustment control, the user can enter the parameter information in the parameter input control according to the input mark and prompt information, and the debugging terminal can receive the parameter information input by the user according to the type of the parameter input control. For example, when the adjustment parameter is a string or numeric type parameter, the type of the corresponding parameter input control can be an input box, and the user directly enters the content in the input box, and the input content can be used as the parameter information. For the string / integer, it can be automatically adapted, and the user can directly enter the content in the input box. When the debugging parameter is a Boolean type parameter, the type of the corresponding parameter input control can be a check box (or switch), and the user can directly click or select the corresponding content in the check box or switch as the input parameter information. When the debugging parameter is an enumeration type parameter, the type of the corresponding parameter input control can be a drop-down box, which can include at least one candidate enumeration value, and the user can directly select at least one enumeration value in the drop-down box as the input parameter information. When the user type is an undefined custom structure, the corresponding parameter input control type is an input box in a specific format, which can be a json format. The user can directly enter a string in the json format in the input box, and use the string in the json format as the input parameter information. The parameter information entered by the user through the input box is divided into one category, the parameter information entered through the drop-down box is divided into another category, and so on, the parameter information is classified. Based on the classification results, the parameter information that needs to be converted is determined in the parameter information. For example, the information entered through the drop-down box, check box or switch is converted. Taking the drop-down box as an example, the selection information entered in the drop-down box is converted into the debugging parameters corresponding to the selection information, and the check information entered in the check box is converted into the debugging parameters corresponding to the check information. The debug parameters obtained after conversion and the debug parameters that do not need to be converted are merged to obtain the target debug parameters of the interface to be debugged.

[0154] When the user adjusts the parameter input control through the parameter adjustment control, the debugging terminal receives the parameter information input by the user in the adjusted parameter input control according to the input identifier and prompt information, classifies the parameter information according to the type of the input control, and converts the parameter information based on the classification result to obtain the target debugging parameters. The specific process is described above and will not be repeated here.

[0155] When the user triggers the scene selection control, the user can modify the scene debugging parameters through the parameter input control corresponding to the scene parameters on the interface debugging page. When the user triggers the parameter input control to modify the scene debugging parameters, the debugging terminal receives the modified parameter information entered in the parameter input control, classifies the modified parameter information based on the type of the parameter input control, and converts the modified parameter information based on the classification result to obtain the target debugging parameters. The specific process is described above and will not be repeated here.

[0156] When the user triggers the historical parameter selection control, the debugging terminal directly uses the historical debugging parameters displayed on the interface debugging page as the target debugging parameters of the interface to be debugged.

[0157] Optionally, after receiving the target debugging parameters of the interface to be debugged, the debugging terminal can also display the target debugging parameters on the interface debugging page. The interface debugging page can also include a save control. When the user triggers the save control, the target debugging parameters are saved to a preset historical parameter debugging set in response to the save operation of the save control, and a target historical parameter selection control corresponding to the target debugging parameters is added to the interface debugging page. When used to trigger the target historical parameter selection control, the target debugging parameters can be displayed on the interface debugging page.

[0158] 306. The debugging terminal checks the target debugging parameter based on the type of the debugging parameter.

[0159] For example, the debugging terminal selects the required parameters from the target debugging parameters according to the input identifier of the debugging parameter, and uses the required parameters as candidate debugging parameters. According to the parameter type of the candidate debugging parameter, the verification rule of the candidate debugging parameter is determined. For example, when the parameter type is a number, the verification rule of the candidate debugging parameter is determined to be a number verification rule, and the number verification rule is used to check whether the parameter value of the candidate debugging parameter complies with the number filling rule. When the parameter type is an email format, the verification rule of the candidate debugging parameter is determined to be a format verification rule, and so on. The corresponding verification rules are used to verify the numbers or email formats filled in by the user to obtain the verification results. For example, when the candidate debugging parameter verification passes, it can be determined that the target debugging parameter verification passes. When the candidate debugging parameter verification fails, it can be determined that the target debugging parameter verification fails. When the target debugging parameter verification fails, when the user triggers the debugging control, an error prompt message is displayed on the interface debugging page.

[0160] 307. When the target debugging parameter verification passes, the debugging terminal generates debugging request information of the interface to be debugged according to the target debugging parameter.

[0161] For example, when the target debugging parameter verification passes, the debugging terminal selects the attribute information of the interface to be debugged from the interface information of the interface to be debugged according to the interface type of the interface to be debugged. The interface name and interface address of the interface to be debugged are identified in the attribute information to obtain the target attribute information. The interface call condition can also be identified in the attribute information. When the user's login status is required in the interface call condition, the login status information of the current user is obtained, and the login status information, target attribute information and target debugging parameters are used as the debugging request information of the interface to be debugged. When the user's login status is not required in the interface call condition, the target attribute information and target debugging parameters can be used as the debugging request information of the interface to be debugged.

[0162] Optionally, after generating the debugging request information of the interface to be debugged, the debugging terminal can also convert the debugging request information into a debugging execution code, and debug the interface to be debugged by executing the debugging execution code, thereby obtaining the debugging result of the interface to be debugged. For example, the user triggers the code viewing control on the interface debugging page, and in response to the viewing operation of the code viewing control, the debugging request information is converted into the debugging execution code through the conversion logic. The debugging execution code is displayed on the interface debugging page, and the user can also trigger the code copy page on the interface debugging page to copy the debugging execution code, thereby reusing the debugging execution code. The user can also trigger the execution operation of the code execution control on the interface debugging page, which is equivalent to triggering the debugging control, thereby debugging the interface to be debugged, and displaying the debugging result of the interface to be debugged on the interface debugging page.

[0163] 308. The debugging terminal sends debugging request information to the debugging server in response to the debugging operation of the debugging control.

[0164] For example, when a user triggers a debugging control on an interface debugging page, the debugging terminal can respond to the debugging operation of the debugging control by directly sending debugging request information to the proxy service interface of the debugging server, and can also send the storage address of the debugging request information to the proxy service interface, so that the debugging server obtains the debugging request information of the interface to be debugged according to the storage address.

[0165] 309. The debugging server sends the debugging request information to the interface to be debugged through the proxy service interface, and receives the debugging result returned by the interface to be debugged according to the debugging request information.

[0166] For example, the debugging server can obtain the interface address of the interface to be debugged in the debugging request information, and send the debugging request information to the interface to be debugged according to the interface address. The actual request environment is mainly determined by the proxy service interface, and the actual request environment can be a debugging environment or a formal environment. After receiving the debugging request information, the interface to be debugged executes the target debugging parameters in the debugging request information, and the interface to be debugged thereby obtains the return value, and returns the return value as the debugging result to the proxy service interface, so that the debugging server receives the debugging result returned by the interface to be debugged.

[0167] 310. The debugging server sends the debugging result to the debugging terminal.

[0168] For example, the debugging server sends the debugging result to the debugging terminal through the proxy service interface, so that the debugging terminal displays the debugging result on the interface debugging page.

[0169] 311. The debugging terminal displays the debugging results on the interface debugging page.

[0170] For example, the debugging result is converted into code to obtain the debugging code corresponding to the debugging result, and the debugging code is displayed on the interface debugging page. The response area of ​​the interface debugging page displaying the debugging result can also include a debugging code copy control. The debugging code copy control is used by the user to copy the debugging code. When the user triggers the debugging code copy control, the debugging code is copied in response to the copy operation of the debugging code copy control.

[0171] The interface debugging process can be seen as the debugging server sending interface information to the debugging terminal. The debugging terminal displays the interface debugging page, allowing the user to operate on the interface debugging page, construct the request body json, obtain the debugging request information, and call the debugging interface according to the debugging request information through the proxy service interface of the debugging server to obtain the debugging result and display the debugging result on the interface debugging page. The specific process can be as follows: Fig.14 shown.

[0172] As can be seen from the above, after the debugging terminal of this embodiment displays the interface debugging page corresponding to the interface to be debugged, the interface debugging page includes at least one type of parameter input control corresponding to the debugging control and the debugging parameter, and then, according to the type of the parameter input control, at least one type of debugging parameter input in the parameter input control is received to obtain the target debugging parameter, and then, based on the type of the debugging parameter, the target debugging parameter is verified, and when the target debugging parameter is verified, the debugging request information of the interface to be debugged is generated according to the target debugging parameter, and in response to the debugging operation of the debugging control, the debugging result of the interface to be debugged is displayed on the interface debugging page, and the debugging result is generated by the debugging server calling the interface to be debugged according to the debugging request information; since this solution only needs to input the debugging parameter through the parameter input control and generate the debugging request information according to the debugging parameter, so that the debugging result is directly displayed on the interface debugging page, there is no need to manually understand the interface document or refer to the content of the interface document, which greatly reduces the complexity of the debugging process, and can also verify the input debugging parameters, so that the debugging efficiency of the interface debugging can be greatly improved.

[0173] In order to better implement the above method, an embodiment of the present invention further provides an interface debugging device (i.e., a first interface debugging device), which can be integrated in a terminal, and the terminal can include a tablet computer, a laptop computer and / or a personal computer, etc.

[0174] For example, Fig.15 As shown, the first interface debugging device may include a debugging page display unit 401, a first receiving unit 402, a verification unit 403, a generation unit 404 and a debugging result display unit 405, as follows:

[0175] (1) Debug page display unit 401;

[0176] The debugging page display unit 401 is used to display an interface debugging page corresponding to the interface to be debugged, and the interface debugging page includes a debugging control and at least one type of parameter input control corresponding to a debugging parameter.

[0177] For example, the debugging page display unit 401 can be specifically used for the user to perform a selection operation on the interface selection page of the debugging client. In response to the selection operation of the interface selection control, the interface debugging page can be triggered to be displayed on the debugging terminal.

[0178] (2) a first receiving unit 402;

[0179] The first receiving unit 402 is used to receive at least one type of debugging parameter input in the parameter input control according to the type of the parameter input control, and obtain a target debugging parameter.

[0180] For example, the first receiving unit 402 can be specifically used to receive at least one type of debugging parameter of the parameter input control according to the type of the parameter input control when the user has not adjusted the parameter input control through the parameter adjustment control; when the user adjusts the parameter input control through the parameter adjustment control, the first receiving unit 402 can be used to receive at least one type of debugging parameter entered by the user in the adjusted parameter input control according to the input identifier and prompt information according to the parameter input control to obtain the target debugging parameter; when the user triggers the scene selection control, the first receiving unit 402 can be used to receive the debugging parameter after the scene debugging parameter is adjusted entered in the parameter input control according to the type of the parameter input control to obtain the target debugging parameter; when the user triggers the historical parameter selection control, the historical debugging parameter corresponding to the historical parameter selection control can be used as the target debugging parameter of the interface to be debugged.

[0181] (3) verification unit 403;

[0182] The verification unit 403 is used to verify the target debugging parameter based on the type of the debugging parameter.

[0183] For example, the verification unit 403 can be specifically used to screen out candidate debugging parameters that need to be verified from the target debugging parameters according to the input identifier of the debugging parameter, determine the verification rules of the candidate debugging parameters according to the parameter types of the candidate debugging parameters, and verify the candidate debugging parameters based on the verification rules.

[0184] (4) generating unit 404;

[0185] The generating unit 404 is used to generate debugging request information of the interface to be debugged according to the target debugging parameters when the target debugging parameters are verified.

[0186] For example, the generating unit 404 can be used to filter out the attribute information of the interface to be debugged from the interface information of the interface to be debugged according to the interface type of the interface to be debugged when the target debugging parameter verification passes.

[0187] (5) Debugging result display unit 405;

[0188] The debugging result display unit 405 is used to display the debugging result of the interface to be debugged on the interface debugging page in response to the debugging operation of the debugging control. The debugging result is generated by the debugging server calling the interface to be debugged according to the debugging request information.

[0189] For example, the debugging result display unit 405 can be specifically used to respond to the debugging operation of the debugging control, send the debugging request information to the debugging server, receive the debugging result of the interface to be debugged returned by the debugging server for the debugging request information, convert the debugging result into code, obtain the debugging code corresponding to the debugging result, and display the debugging code on the interface debugging page. The response area of ​​the interface debugging page that displays the debugging result can also include a debugging code copy control. The debugging code copy control is used for the user to copy the debugging code. When the user triggers the debugging code copy control, the debugging code is copied in response to the copy operation of the debugging code copy control.

[0190] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.

[0191] As can be seen from the above, in this embodiment, after the prompt page display unit 401 displays the interface debugging page corresponding to the interface to be debugged, the interface debugging page includes at least one type of parameter input control corresponding to the debugging control and the debugging parameter, then, the first receiving unit 402 receives at least one type of debugging parameter input in the parameter input control according to the type of the parameter input control, and obtains the target debugging parameter, then, the verification unit 403 verifies the target debugging parameter based on the type of the debugging parameter, and the generating unit 404 generates debugging request information of the interface to be debugged according to the target debugging parameter when the target debugging parameter verification passes, and the debugging result display unit 405 displays the debugging result of the interface to be debugged on the interface debugging page in response to the debugging operation of the debugging control, and the debugging result is generated by the debugging server calling the interface to be debugged according to the debugging request information; since the scheme only needs to input the debugging parameter through the parameter input control, and generate the debugging request information according to the debugging parameter, so that the debugging result is directly displayed on the interface debugging page, there is no need to manually understand the interface document or refer to the content of the interface document, which greatly reduces the complexity of the debugging process, and can also verify the input debugging parameters, so that the debugging efficiency of the interface debugging can be greatly improved.

[0192] In order to better implement the above method, an embodiment of the present invention further provides an interface debugging device (ie, a second interface debugging device), which can be integrated in a server, which can be a single server or a server cluster consisting of multiple servers.

[0193] For example, Fig.16 As shown, the second interface debugging device may include an acquisition unit 501, a first sending unit 502, a second receiving unit 503, a calling unit 504 and a second sending unit 505, as follows:

[0194] (1) Acquisition unit 501;

[0195] The acquisition unit 501 is used to acquire an interface document of at least one interface to be debugged, and read the interface information of the interface to be debugged in the interface document.

[0196] For example, the acquisition unit 501 can be specifically used to directly or indirectly acquire the interface document of the interface to be debugged, identify the interface document, obtain the document format of the interface document, and when the document format is different from the preset document format, convert the document format of the interface document into the preset document format to obtain the target interface document, and read the interface information of the interface to be debugged in the target interface document.

[0197] (2) a first sending unit 502;

[0198] The first sending unit 502 is used to send the interface information to the debugging terminal, so that the debugging terminal displays the interface debugging page corresponding to the interface to be debugged according to the interface information.

[0199] For example, the first sending unit 502 can be specifically used to directly send the interface information to the debugging terminal, so that the debugging terminal parses the interface information, obtains the interface request parameters, generates an interface debugging page according to the interface request parameters, and displays the interface debugging page. When the amount of interface information is large or the memory is large, the storage address of the interface information can also be sent to the debugging terminal, so that the debugging terminal obtains the interface information according to the storage address, and parses the interface information, thereby displaying the interface debugging page corresponding to the interface to be debugged.

[0200] (3) a second receiving unit 503;

[0201] The second receiving unit 503 is configured to receive debugging request information of the interface to be debugged returned by the debugging terminal.

[0202] For example, the second receiving unit 503 can be specifically used to directly receive the debugging request information corresponding to the interface to be debugged returned by the debugging terminal. When the number of debugging request information is large or the memory is large, the storage address of the debugging request information sent by the debugging terminal is received, and according to the storage address, the debugging request information of the interface to be debugged is obtained in the memory or cache of the debugging terminal.

[0203] (4) calling unit 504;

[0204] The calling unit 504 is used to send the debugging request information to the interface to be debugged through the proxy service interface, and receive the debugging result returned by the interface to be debugged according to the debugging request information.

[0205] For example, the calling unit 504 can be specifically used to obtain the interface address of the interface to be debugged in the debugging request information, and send the debugging request information to the interface to be debugged according to the interface address. After receiving the debugging request information, the interface to be debugged executes the target debugging parameter in the debugging request information, and the interface to be debugged thereby obtains the return value, and returns the return value as the debugging result to the proxy service interface, so that the second interface debugging device receives the debugging result returned by the interface to be debugged.

[0206] (5) a second sending unit 505;

[0207] The second sending unit 505 is used to send the debugging result to the debugging terminal, so that the debugging terminal displays the debugging result on the interface debugging page.

[0208] For example, the second sending unit 505 can be specifically used to send the debugging result to the debugging terminal through the proxy service interface, so that the debugging terminal displays the debugging result on the interface debugging page. After receiving the debugging result, the debugging terminal converts the debugging result into code, obtains the debugging code corresponding to the debugging result, and displays the debugging code on the interface debugging page.

[0209] As can be seen from the above, in this embodiment, after the acquisition unit 501 acquires the interface document of at least one interface to be debugged and reads the interface information of the interface to be debugged in the interface document, the first sending unit 502 sends the interface information to the debugging terminal, so that the debugging terminal displays the interface debugging page corresponding to the interface to be debugged according to the interface information, and then, the second receiving unit 503 receives the debugging request information of the interface to be debugged returned by the debugging terminal, the calling unit 504 sends the debugging request information to the interface to be debugged through the proxy service interface, and receives the debugging result returned by the interface to be debugged according to the debugging request information, and the second sending unit 505 sends the debugging result to the debugging terminal, so that the debugging terminal displays the debugging result on the interface debugging page; because the scheme reads the interface information of the interface to be debugged in the interface document, the debugging terminal can display the interface debugging page corresponding to the interface information, receive the debugging request information returned by the debugging terminal, and use the proxy service interface to call the interface to be debugged for debugging, which greatly reduces the complexity of the debugging process, and therefore can greatly improve the debugging efficiency of interface debugging.

[0210] The embodiment of the present invention further provides an electronic device, such as Fig.17 As shown, it shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present invention, specifically:

[0211] The electronic device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will appreciate that Fig.17The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0212] The processor 601 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 602, and calling data stored in the memory 602, it executes various functions of the electronic device and processes data, thereby performing overall detection of the electronic device. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601.

[0213] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.

[0214] The electronic device also includes a power supply 603 for supplying power to each component. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 603 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0215] The electronic device may further include an input unit 604, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0216] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 601 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 will run the application programs stored in the memory 602, thereby realizing various functions, as follows:

[0217] An interface debugging page corresponding to the interface to be debugged is displayed, the interface debugging page includes a debugging control and at least one type of parameter input control corresponding to the debugging parameter, at least one type of debugging parameter input in the parameter input control is received according to the type of the parameter input control, and a target debugging parameter is obtained, and the target debugging parameter is verified based on the type of the debugging parameter, and when the target debugging parameter is verified, debugging request information of the interface to be debugged is generated according to the target debugging parameter, and in response to the debugging operation of the debugging control, a debugging result of the interface to be debugged is displayed on the interface debugging page, and the debugging result is generated by the debugging server calling the interface to be debugged according to the debugging request information.

[0218] or

[0219] Obtain an interface document of at least one interface to be debugged, and read interface information of the interface to be debugged in the interface document, send the interface information to the debugging terminal, so that the debugging terminal displays the interface debugging page corresponding to the interface to be debugged according to the interface information, receive debugging request information of the interface to be debugged returned by the debugging terminal, send the debugging request information to the interface to be debugged through the proxy service interface, receive the debugging result returned by the interface to be debugged according to the debugging request information, send the debugging result to the debugging terminal, so that the debugging terminal displays the debugging result on the interface debugging page.

[0220] The specific implementation of the above operations can be found in the previous embodiments and will not be described in detail here.

[0221] As can be seen from the above, after the interface debugging page corresponding to the interface to be debugged is displayed, the embodiment of the present invention includes at least one type of parameter input control corresponding to the debugging control and the debugging parameter, and then, according to the type of the parameter input control, at least one type of debugging parameter input in the parameter input control is received to obtain the target debugging parameter, and then, based on the type of the debugging parameter, the target debugging parameter is verified, and when the target debugging parameter is verified, the debugging request information of the interface to be debugged is generated according to the target debugging parameter, and in response to the debugging operation of the debugging control, the debugging result of the interface to be debugged is displayed on the interface debugging page, and the debugging result is generated by the debugging server calling the interface to be debugged according to the debugging request information; since the scheme only needs to input the debugging parameter through the parameter input control, and generate the debugging request information according to the debugging parameter, so that the debugging result is directly displayed on the interface debugging page, there is no need to manually understand the interface document or refer to the content of the interface document, which greatly reduces the complexity of the debugging process, and can also verify the input debugging parameters, so that the debugging efficiency of the interface debugging can be greatly improved.

[0222] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0223] To this end, an embodiment of the present invention provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any interface debugging method provided in the embodiment of the present invention. For example, the instructions can execute the following steps:

[0224] An interface debugging page corresponding to the interface to be debugged is displayed, the interface debugging page includes a debugging control and at least one type of parameter input control corresponding to the debugging parameter, at least one type of debugging parameter input in the parameter input control is received according to the type of the parameter input control, and a target debugging parameter is obtained, and the target debugging parameter is verified based on the type of the debugging parameter, and when the target debugging parameter is verified, debugging request information of the interface to be debugged is generated according to the target debugging parameter, and in response to the debugging operation of the debugging control, a debugging result of the interface to be debugged is displayed on the interface debugging page, and the debugging result is generated by the debugging server calling the interface to be debugged according to the debugging request information.

[0225] or

[0226] Obtain an interface document of at least one interface to be debugged, and read interface information of the interface to be debugged in the interface document, send the interface information to the debugging terminal, so that the debugging terminal displays the interface debugging page corresponding to the interface to be debugged according to the interface information, receive debugging request information of the interface to be debugged returned by the debugging terminal, send the debugging request information to the interface to be debugged through the proxy service interface, receive the debugging result returned by the interface to be debugged according to the debugging request information, send the debugging result to the debugging terminal, so that the debugging terminal displays the debugging result on the interface debugging page.

[0227] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0228] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0229] Since the instructions stored in the computer-readable storage medium can execute the steps in any interface debugging method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any interface debugging method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0230] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementations of the above-mentioned interface debugging.

[0231] The above is a detailed introduction to an interface debugging method, device and computer-readable storage medium provided in an embodiment of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. An interface debugging method, characterized in that: include: Displaying an interface debugging page corresponding to the interface to be debugged, wherein the interface debugging page is generated according to the interface information sent by the debugging server, the interface debugging page includes a debugging control and at least one type of parameter input control corresponding to the debugging parameter, and the interface debugging page includes a code viewing control, a code execution control, and a code copy control; According to the type of the parameter input control, receiving at least one type of debugging parameter input in the parameter input control to obtain a target debugging parameter; According to the input identifier of the debugging parameter, the candidate debugging parameters that need to be verified are screened out from the target debugging parameters; Determining a verification rule for the candidate debugging parameter according to a parameter type of the candidate debugging parameter; Based on the verification rule, verify the candidate debugging parameters; When the candidate debugging parameters are verified to be passed, generating debugging request information of the interface to be debugged according to the target debugging parameters; In response to a viewing operation of the code viewing control, converting the debugging request information into a debugging execution code; Displaying the debugging execution code on the interface debugging page; In response to the copy operation of the code copy control, copying the debug execution code; In response to the execution operation of the code execution control, the debugging result of the interface to be debugged is displayed on the interface debugging page.

2. The interface debugging method according to claim 1, characterized in that: Before displaying the interface debugging page corresponding to the interface to be debugged, the method further includes: Receiving interface information of at least one interface to be debugged sent by the debugging server, and obtaining an interface information set; Filtering the interface information of the interface to be debugged currently being debugged from the interface information set to obtain target interface information; Parsing the target interface information to obtain interface request parameters of the interface to be debugged; The interface debugging page is generated according to the interface request parameters.

3. The interface debugging method according to claim 2, characterized in that: The step of parsing the target interface information to obtain the interface request parameters of the interface to be debugged includes: Identifying the data type of the interface description data of the interface to be debugged in the target interface information; Determine, according to the data type, a parsing method corresponding to the interface description data; Based on the parsing method, the interface description data is parsed to obtain the interface request parameters.

4. The interface debugging method according to claim 2, characterized in that: The step of generating the interface debugging page according to the interface request parameter includes: Determining the component data structure and basic debugging parameters of the debugging component of the interface to be debugged according to the interface request parameters; Based on the component data structure, construct an initial interface debugging page; The basic debugging parameters are added to the initial interface debugging page to obtain the interface debugging page.

5. The interface debugging method according to any one of claims 1 to 4, characterized in that: The interface debugging page also includes a parameter adjustment control, an input identifier of the debugging parameter, and a prompt control, wherein the input identifier is used to indicate the user's input authority for the debugging parameter. After the interface debugging page corresponding to the interface to be debugged is displayed, the following is also included: In response to an adjustment operation of the parameter adjustment control, adjusting the parameter input control on the interface debugging page to obtain an adjusted parameter input control; In response to the prompt operation of the prompt control, displaying prompt information corresponding to the debugging parameter on the interface debugging page; The method of receiving at least one type of debugging parameter input in the parameter input control according to the type of the parameter input control to obtain target debugging parameters includes: receiving at least one type of debugging parameter input in the adjusted parameter input control according to the input identifier and prompt information by the user according to the type of the parameter input control to obtain target debugging parameters.

6. The interface debugging method according to claim 5, characterized in that: The step of receiving at least one type of debugging parameter input by a user in the adjusted parameter input control according to the input identifier and the prompt information according to the type of the parameter input control, and obtaining a target debugging parameter includes: Receiving parameter information input by the user in the adjusted parameter input control according to the input identifier and prompt information; Classifying the parameter information according to the type of the input control; Based on the classification result, the parameter information is converted to obtain the target debugging parameters.

7. The interface debugging method according to any one of claims 1 to 4, characterized in that: The interface debugging page also includes a scene selection control of at least one scene type, and after displaying the interface debugging page corresponding to the interface to be debugged, it also includes: In response to the selection operation of the scene selection control, the scene debugging parameter corresponding to the scene type of the scene selection control is screened out from a preset scene debugging parameter set; Displaying the scene debugging parameters on the interface debugging page; The method of receiving at least one type of debugging parameter input in the parameter input control according to the type of the parameter input control to obtain the target debugging parameter includes: receiving the debugging parameter after adjusting the scene debugging parameter input in the parameter input control according to the type of the parameter input control to obtain the target debugging parameter.

8. The interface debugging method according to any one of claims 1 to 4, characterized in that: The interface debugging page also includes at least one type of historical parameter selection control, and after the interface debugging page corresponding to the interface information of the interface to be debugged is displayed, it also includes: In response to a selection operation of the historical parameter selection control, determining a historical debugging parameter identifier corresponding to the historical parameter selection control; Filtering out the historical debugging parameters corresponding to the historical debugging parameter identifier from a preset historical debugging parameter set, and displaying the historical debugging parameters on the interface debugging page; The receiving at least one type of debugging parameter input in the parameter input control according to the type of the parameter input control to obtain the target debugging parameter includes: using the historical debugging parameter as the target debugging parameter.

9. The interface debugging method according to claim 1, characterized in that: After generating the debugging request information of the interface to be debugged according to the target debugging parameter, the method further includes: In response to the debugging operation of the debugging control, sending the debugging request information to the debugging server; receiving a debugging result of the interface to be debugged for the debugging request information returned by the debugging server; The debugging result is displayed on the interface debugging page.

10. The interface debugging method according to claim 9, characterized in that: The interface debugging page also includes a debugging code copy control, and the displaying of the debugging result on the interface debugging page includes: Performing code conversion on the debugging result to obtain a debugging code corresponding to the debugging result; Displaying the debugging code on the interface debugging page; In response to the copy operation of the debug code copy control, the debug code is copied.

11. An interface debugging method, characterized in that: include: Obtaining an interface document of at least one interface to be debugged, and reading interface information of the interface to be debugged in the interface document; The interface information is sent to a debugging terminal, so that the debugging terminal displays an interface debugging page corresponding to the interface to be debugged according to the interface information, the interface debugging page includes debugging controls and at least one type of parameter input controls corresponding to debugging parameters, the interface debugging page includes code viewing controls, code execution controls, and code copy controls, the debugging terminal is used to receive at least one type of debugging parameters input in the parameter input controls according to the types of the parameter input controls, obtain target debugging parameters, screen out candidate debugging parameters that need to be verified from the target debugging parameters according to the input identifiers of the debugging parameters, determine verification rules for the candidate debugging parameters according to the parameter types of the candidate debugging parameters, verify the candidate debugging parameters based on the verification rules, and when the candidate debugging parameters pass the verification, generate debugging request information for the interface to be debugged according to the target debugging parameters; Receiving debugging request information of the interface to be debugged returned by the debugging terminal; Sending the debugging request information to the interface to be debugged through the proxy service interface, and receiving the debugging result returned by the interface to be debugged according to the debugging request information, wherein the debugging result is that in response to the viewing operation of the code viewing control, the debugging request information is converted into a debugging execution code, the debugging execution code is displayed on the interface debugging page, the debugging execution code is copied in response to the copy operation of the code copy control, and the debugging execution code is obtained in response to the execution operation of the code execution control; The debugging result is sent to the debugging terminal, so that the debugging terminal displays the debugging result on the interface debugging page.

12. An interface debugging device, characterized in that: include: A debugging page display unit, used to display an interface debugging page corresponding to the interface to be debugged, wherein the interface debugging page is generated according to the interface information sent by the debugging server, wherein the interface debugging page includes a debugging control and at least one type of parameter input control corresponding to the debugging parameter, and wherein the interface debugging page includes a code viewing control, a code execution control, and a code copy control; A first receiving unit, configured to receive at least one type of debugging parameter input in the parameter input control according to the type of the parameter input control, and obtain a target debugging parameter; A verification unit, configured to screen out candidate debugging parameters that need to be verified from the target debugging parameters according to the input identifier of the debugging parameter, determine verification rules for the candidate debugging parameters according to parameter types of the candidate debugging parameters, and verify the candidate debugging parameters based on the verification rules; A generating unit, configured to generate debugging request information of the interface to be debugged according to the target debugging parameter when the candidate debugging parameter is verified; A debugging result display unit is used to convert the debugging request information into debugging execution code in response to a viewing operation of the code viewing control, display the debugging execution code on the interface debugging page, copy the debugging execution code in response to a copy operation of the code copy control, and display the debugging result of the interface to be debugged on the interface debugging page in response to an execution operation of the code execution control.

13. An interface debugging device, characterized in that: include: An acquisition unit, used to acquire an interface document of at least one interface to be debugged, and read interface information of the interface to be debugged in the interface document; A first sending unit is configured to send the interface information to a debugging terminal, so that the debugging terminal displays an interface debugging page corresponding to the interface to be debugged according to the interface information, the interface debugging page includes debugging controls and at least one type of parameter input controls corresponding to debugging parameters, the interface debugging page includes code viewing controls, code execution controls, and code copy controls, the debugging terminal is configured to receive at least one type of debugging parameters input in the parameter input controls according to the types of the parameter input controls, obtain target debugging parameters, screen out candidate debugging parameters that need to be verified from the target debugging parameters according to input identifiers of the debugging parameters, determine verification rules for the candidate debugging parameters according to parameter types of the candidate debugging parameters, verify the candidate debugging parameters based on the verification rules, and generate debugging request information for the interface to be debugged according to the target debugging parameters when the candidate debugging parameters pass verification; A second receiving unit, configured to receive debugging request information of the interface to be debugged returned by the debugging terminal; A calling unit, configured to send the debugging request information to the interface to be debugged through a proxy service interface, and receive a debugging result returned by the interface to be debugged according to the debugging request information, wherein the debugging result is a result of converting the debugging request information into a debugging execution code in response to a viewing operation of the code viewing control, displaying the debugging execution code on the interface debugging page, copying the debugging execution code in response to a copy operation of the code copy control, and obtaining the result in response to an execution operation of the code execution control; The second sending unit is used to send the debugging result to the debugging terminal, so that the debugging terminal displays the debugging result on the interface debugging page.

14. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to execute the steps in the interface debugging method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the interface debugging method described in any one of claims 1 to 11 are implemented.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the interface debugging method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Dynamic construction method and system for cross-language protocol test request

    CN108614776A

  • Interface test method and system

    CN110198247A