CN114936146A - Service debugging method and device, storage medium and electronic equipment - Google Patents

Service debugging method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114936146A
CN114936146A CN202210410976.0A CN202210410976A CN114936146A CN 114936146 A CN114936146 A CN 114936146A CN 202210410976 A CN202210410976 A CN 202210410976A CN 114936146 A CN114936146 A CN 114936146A
Authority
CN
China
Prior art keywords
interface
service
information
list
debugging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210410976.0A
Other languages
Chinese (zh)
Inventor
李茂展
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jindi Technology Co Ltd
Original Assignee
Beijing Jindi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jindi Technology Co Ltd filed Critical Beijing Jindi Technology Co Ltd
Priority to CN202210410976.0A priority Critical patent/CN114936146A/en
Publication of CN114936146A publication Critical patent/CN114936146A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Abstract

The embodiment of the invention discloses a service debugging method, a service debugging device, a storage medium and electronic equipment, wherein the method comprises the following steps: acquiring an access address and an RPC access port of a service; acquiring an interface list of the service and the access information of each interface in the interface list based on the access address and the RPC access port; displaying the interface list in a first area of a page; and debugging each interface in the service based on each interface displayed in the interface list and the acquired parameter entering information and parameter exiting information of each interface.

Description

Service debugging method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a service debugging method and apparatus, a storage medium, and an electronic device.
Background
Remote Procedure Call (RPC) is a computer communication protocol that allows a program running on one computer to Call a subroutine of another address space, typically a computer of an open network. The gPC is a high-performance and universal open-source RPC framework, when the gPC is used, service definition is firstly defined, one or more methods capable of performing RPC are specified, a service end (namely a gPC service end) can realize the methods and is deployed as gPC service, and therefore a client can realize transparent calling of the gPC service through a stub object provided by the gPC.
In Java programs, when a development client and a server communicate using Grpc, a developer wants to be able to perform call debugging in the manner of developing a normal HTTP request after the development of the server.
However, since the gRPC is a C/S (Client/Server) architecture, in the debugging process of the gRPC service development stage, a dedicated Client code needs to be written to call the gRPC service, which results in a tedious and time-consuming debugging process of the gRPC service and thus results in low efficiency of the whole development.
Aiming at the problems, a gPC-Swagger debugging tool is developed at present, the gPC-Swagger is a gPC debugging tool developed based on gPC reflection, packaging and calling are carried out in a Swagger mode, when the gPC-Swagger debugging tool is used, firstly, a service needs to be registered, namely, an address of a target service is input, then, a service method provided by the current gPC service is obtained through reflection, for example, a simple registration service page is provided in FIG. 1, the address of the gPC-Swagger server is http://127.0.0.1:8080, the address of the grPC service is filled in an endpointer Register, available Services can be listed in Services after successful registration, and the user can jump to a UI interface of the gPC-Swagger by clicking the available Services; and displaying the clicked interface of the available service and the access parameter on the UI page of the gPC-swagger, and clicking the Try it out to start debugging by the interface, as shown in FIG. 2.
It can be seen that the gRPC-swagger currently used still needs to be registered and can only be checked through a single interface, and the packaging type is not available, so that the usage is tedious, part of the packaging types cannot be used, and the comprehensive usability is not high.
Disclosure of Invention
In order to overcome the defects of the prior art, the present invention provides a service debugging method, a service debugging device, a storage medium and an electronic device, so as to solve the problem of low development efficiency caused by the complicated debugging process and time consumption of the existing service debugging tool.
In order to achieve the above object, the present invention provides a service debugging method, including:
acquiring an access address and an RPC access port of a service;
acquiring an interface list of the service and the access information of each interface in the interface list based on the access address and the RPC access port;
displaying the interface list in a first area of a page; and
and debugging each interface in the service based on each interface shown in the interface list and the acquired parameter entering information and parameter exiting information of each interface.
Optionally, debugging each interface in the service based on each interface shown in the interface list and the obtained parameter entering information and parameter exiting information of each interface includes:
aiming at any selected target interface in the interface list, showing the participation information of the target interface in a second area of the page, and showing the participation information of the target interface in a third area of the page;
acquiring and displaying input data aiming at the access information in the second area; and
and executing debugging operation on the target interface to acquire and display a corresponding output result aiming at the parameter information in the third area.
Optionally, the method further comprises:
and storing the access address of the service and the RPC access port in a cache so as to obtain the access address of the service and the RPC access port from the cache when debugging each interface in the service.
Optionally, based on the access address and the RPC access port, acquiring the interface list of the service and the entry and exit information of each interface in the interface list, including:
and based on the access address and the RPC access port, sending a simulation request to a server side at a client side through an RPC frame protocol so as to obtain an interface list of the service and the access information of each interface in the interface list.
Optionally, displaying the interface list in a first area of a page, including:
and displaying the calling path of each interface in the interface list in a first specific format in the first area of the page.
Optionally, for any selected target interface in the interface list, showing the entry information of the target interface in the second area of the page, and showing the exit information of the target interface in the third area of the page, including for any selected target interface in the interface list:
displaying the reference information of the target interface in a second specific format in a second area of the page; and
and displaying the participation information of the target interface in a third specific format in a third area of the page.
Optionally, the interface list includes an interface on which the service depends.
Optionally, the interface list of the service includes interfaces with nesting logic.
In order to achieve the above object, the present invention further provides a service debugging apparatus, including:
the address port acquisition module is used for acquiring an access address of the service and an RPC access port;
an interface list acquisition module, configured to acquire an interface list of the service and entry and exit parameters of each interface in the interface list based on the access address and the RPC access port;
the interface list display module is used for displaying the interface list in a first area of a page;
and the debugging module is used for debugging each interface in the service based on each interface displayed in the interface list and the acquired parameter entering information and parameter exiting information of each interface.
Compared with the prior art, the service debugging method, the device, the storage medium and the electronic equipment have the advantages that on one hand, a user can directly access a specific swagger port, the swagger address can be viewed by the parameter carrying service address and rpc port, and all rpc calling interfaces of the service are included; on the other hand, a user does not need to care about the packaging type during debugging, the user can obtain a result by changing parameter values according to a template existing in the page and clicking the parameter values, and the using mode of the method is almost consistent with that of the conventional swagger, so that the problems that the existing rpc service is complex in debugging and time-consuming are solved.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing in more detail embodiments of the present invention with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings, like reference numbers generally represent like parts or steps.
FIG. 1 is a schematic illustration of a registration interface of a prior art gPRC-swagger debugging tool;
FIG. 2 is a schematic illustration of a debug page of a prior art gPRC-swagger debug tool;
FIG. 3 is a flowchart illustrating a service debugging method according to an exemplary embodiment of the present invention;
FIG. 4 is a diagram illustrating a user entering an access address and an RPC port of a service to be debugged via a client browser in an exemplary embodiment of the invention;
FIG. 5 is a schematic page view of a platform for recording RPC services in an exemplary embodiment of the invention;
FIG. 6 is a diagram illustrating a list of interfaces in an exemplary embodiment of the invention;
FIG. 7 is a diagram illustrating the selection of a target interface for debugging in an embodiment of the invention;
fig. 8 is a schematic structural diagram of a service debugging apparatus according to an exemplary embodiment of the present invention.
Fig. 9 is a structure of an electronic device according to an exemplary embodiment of the present invention.
Detailed Description
Hereinafter, example embodiments according to the present invention will be described in detail with reference to the accompanying drawings. It should be understood that the described embodiments are only some of the embodiments of the present invention, and not all of the embodiments of the present invention, and it should be understood that the present invention is not limited by the exemplary embodiments described herein.
It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless it is specifically stated otherwise.
It will be understood by those of skill in the art that the terms "first," "second," and the like in the embodiments of the present invention are used merely to distinguish one element, step, device, module, or the like from another element, and do not denote any particular technical or logical order therebetween.
It should also be understood that in embodiments of the present invention, "a plurality" may refer to two or more and "at least one" may refer to one, two or more.
It is also to be understood that any reference to any component, data, or structure in the embodiments of the invention may be generally understood as one or more, unless explicitly defined otherwise or stated to the contrary hereinafter.
In addition, the term "and/or" in the present invention is only one kind of association relationship describing the associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In the present invention, the character "/" generally indicates that the preceding and following related objects are in an "or" relationship.
It should also be understood that the description of the embodiments of the present invention emphasizes the differences between the embodiments, and the same or similar parts may be referred to each other, so that the descriptions thereof are omitted for brevity.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Embodiments of the invention are operational with numerous other general purpose or special purpose computing system environments or configurations, and with numerous other electronic devices, such as terminal devices, computer systems, servers, etc. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with electronic devices, such as terminal devices, computer systems, servers, and the like, include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above, and the like.
Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
Exemplary method
Fig. 3 is a flowchart illustrating a service debugging method according to an exemplary embodiment of the present invention. The present embodiment can be applied to an electronic device, and as shown in fig. 3, a service debugging method includes the following steps:
step 101, obtaining an access address and an RPC access port of a service.
In the embodiment of the present invention, the service is a target framework service, and may be an RPC framework service, and specifically, the RPC framework service may be a Grpc service.
In an embodiment of the present invention, the manner of obtaining the access address of the service and the RPC access port may be to obtain the access address of the service to be debugged and the RPC port input by a client browser applying the present invention, as shown in fig. 4, when a user inputs the access address of the service to be debugged and the RPC port through the client browser, the access address of the service and the RPC port are obtained.
In another embodiment of the present invention, the access address and the RPC access port of the service may also be obtained through a platform for recording the RPC service, and fig. 5 is a display page of the platform for recording the RPC service, where relevant information of the currently started service, such as the access address (IP) of the service and the port (RPC) of the RPC service, is recorded in the example list, and other information is irrelevant to the present invention and is not described herein again. Specifically, when a certain RPC service is started, the service is automatically registered in the instance list, and the service is automatically removed from the instance list when the service is offline, and an interface for debugging the service is provided on the interface, such as a "debugging" button in fig. 5, and when a user debugs a certain service, the corresponding debugging button is clicked, so that the access address and the RPC port information of the service are obtained, and the client to which the present invention is applied jumps.
And 102, acquiring an interface list of the service and the access information of each interface in the interface list based on the access address and the RPC access port.
Optionally, step 102 comprises:
and 102-1, sending a request to a server side through an RPC frame protocol at a client side based on the access address and the RPC access port so as to acquire all interfaces and access information of the service.
In the embodiment of the invention, the client is the client applying the invention, the server is an RPC server which can be a Grpc server, wherein Grpc is a high-performance and universal open-source RPC framework, when the Grpc is used, the service definition is firstly defined, one or more methods capable of performing RPC are specified, the server equipment can realize the methods and is deployed as the Grpc service, and therefore, the client can realize transparent calling of the Grpc service through a stub object provided by the Grpc.
Specifically, when the client side obtains an access address and an RPC access port of the RPC service, the obtained access address and the RPC port are used as request parameters, and a request interface obtaining request is sent to the server side through an RPC frame protocol; and after receiving the interface acquisition request, the server starts the service and returns all the interfaces for acquiring the service and the access information to the client, wherein the acquired interfaces have nested logical interfaces, so that a user does not need to care about the types of the interfaces.
Therefore, all interfaces and access reference information of the service can be obtained only by sending requests at the client based on the access address of the service and the RPC access port, and the corresponding client does not need to be independently compiled for each server service, so that time and labor are saved, and the efficiency of service debugging is improved.
And 102-2, disassembling each interface and the access information corresponding to each interface to obtain an interface list of the service and the access information of each interface in the interface list.
The interfaces and access information of the service acquired from the server may be disordered, so that the information received from the server needs to be disassembled, each interface and access information corresponding to each interface are disassembled, and an interface list is obtained according to the disassembling result, wherein the interface list includes all the acquired interfaces and the access information of each interface.
Optionally, in the process of disassembling the interface and the access information corresponding to the interface, the interface and the access information corresponding to the interface are further converted from a second format to a first format for a user to check during debugging, where the second format is a format supported by the server, and the first format is a format supported by the client, i.e., the debugging platform, to which the present invention is applied.
Optionally, in the process of disassembling the interfaces and the access reference information corresponding to the interfaces, each interface and the access reference information corresponding to the interface are packaged into a specific structure so that the front end can analyze the specific structure into a format which can be viewed by a user, and the specific structure calls a path for each interface and an access parameter combination of the interface.
Optionally, the interface list further includes, in addition to the interface implemented by the service itself, an interface that depends on introducing a Maven dependency relationship and access information thereof, that is, when the server receives an interface acquisition request, a Maven dependency is introduced and the service is started, and the interface and access information acquired from the server include an interface that depends on introducing a Maven dependency relationship and access information thereof.
Optionally, after obtaining the access address and the RPC access port of service, the access address and the RPC access port of service are stored in the buffer memory, so that right when debugging each interface in the service, can follow obtain in the buffer memory the access address and the RPC access port of service, promptly when debugging each interface in the service, need not to carry IP and port again when the front end carries the interface and goes out and consult the request, the rear end can directly obtain corresponding IP address and port from the buffer memory, assembles into the required parameter format of debugging request and initiates the debugging request.
Step 103, displaying the interface list in a first area of the page.
In the embodiment of the present invention, the obtained interface information and the access parameter information thereof in the interface list are encapsulated into a specific encapsulation structure, the encapsulation structure is an access parameter combination of each interface call path and the interface, the front end displays the call path of each interface in the interface list in a first specific format after analyzing the access parameter combination, and the first specific format may be any format convenient for a debugging user to understand.
Fig. 6 is a schematic diagram illustrating a front-end obtaining interface list in an embodiment of the present invention, where fig. 6 illustrates a first area and a second area, where the first area 61 illustrates a call path of each interface in the interface list, for example, the first area is a call path of one interface, and the second area 62 is used for illustrating interface reference information.
And 104, debugging each interface in the service based on each interface shown in the interface list and the acquired parameter entering information and parameter exiting information of each interface.
Specifically, step 104 includes:
104-1, aiming at any selected target interface in the interface list, displaying the participation information of the target interface in a second area of the page, and displaying the participation information of the target interface in a third area of the page;
in the embodiment of the present invention, when a user selects any target interface in the interface list or the front end automatically cycles through the interfaces in the interface list, the selected target interface (call path of the interface) is displayed in the first area of the page, the entry parameter of the selected target interface is displayed in the second area of the page, in order to facilitate the debugging user to understand that the entry parameter of the target interface is displayed in the second area of the page in the second specific format, the second specific format is any format that can be understood by the debugging user, the exit parameter of the selected target interface is displayed in the third area of the page, in order to facilitate the debugging user to understand, the exit parameter of the target interface is displayed in the second area of the page in the third specific format, the third specific format is any format that can be understood by the debugging user, as shown in fig. 7, when a target interface is selected in the interface list in the first area 61 of the page in fig. 6, assuming that a call path of the selected target interface is a target interface of/google, protobuf, com, jindidata, user, remoteusercentrserver, modifyuser, the second area 62 of the page displays the selected target interface and shows the access information of the target interface, and may receive input data for the access information, and the third area 63 shows the access information of the selected target interface.
It should be noted that, in the embodiment of the present invention, the presentation formats in the first, second, and third areas are consistent with the conventional Swagger format, and are not described herein again.
Step 104-2 acquires and presents input data for the reference information in the second area.
And step 104-3, executing debugging operation on the target interface to acquire and display a corresponding output result aiming at the parameter information in the third area.
Specifically, when a debugging request is received on the debugging page, if a user triggers debugging on the page, access parameter values and interface information carried by the front end are acquired, the back end acquires corresponding IP addresses and ports from the cache, assembles the IP addresses and the ports into a parameter format required by the request, and initiates a debugging request to the server, and the server returns a return value to the front end and performs rendering display, as shown in a third area 73 in fig. 7.
Exemplary devices
Fig. 8 is a schematic structural diagram of a service debugging apparatus according to an exemplary embodiment of the present invention. As shown in fig. 8, a service debugging apparatus according to this embodiment includes:
the address port obtaining module 801 is configured to, in this embodiment of the present invention, use the service as a target frame service, which may be an RPC frame service, and specifically, the RPC frame service may be a Grpc service.
When service debugging is required, an access address of the service, such as an IP address and an RPC access port, is required to be obtained, and the obtaining of the access address of the service and the port of the RPC may be performed in any feasible manner.
In another embodiment of the present invention, the access address and the RPC access port of the service can also be obtained by the platform recording the RPC service.
An interface list obtaining module 802, configured to obtain, based on the access address and the RPC access port, an interface list of the service and entry and exit information of each interface in the interface list.
Optionally, the interface list obtaining module 802 includes:
and the simulation request unit is used for sending a simulation request to the server side through an RPC frame protocol at the client side based on the access address and the RPC access port so as to acquire all interfaces and access reference information of the service.
In the embodiment of the invention, the client is a client applying the invention, the server is an RPC server which can be a Grpc server, wherein the Grpc is a high-performance and universal open-source RPC framework, when the Grpc is used, the service definition is firstly formulated, one or more methods capable of performing RPC are specified, the server equipment can realize the methods, and the methods are deployed as the Grpc service, so that the client can realize transparent call to the Grpc service through a stub object provided by the Grpc.
Specifically, when the client side obtains an access address and an RPC access port of the RPC service, the obtained access address and the RPC port are used as request parameters, and a request interface obtaining request is sent to the server side through an RPC frame protocol; and after receiving the interface acquisition request, the server starts the service and returns all the interfaces for acquiring the service and the access information to the client, wherein the acquired interfaces have nested logical interfaces.
Therefore, all interfaces and access reference information of the service can be obtained only by sending requests at the client based on the access address of the service and the RPC access port, and the corresponding client does not need to be independently compiled for each server service, so that time and labor are saved, and the efficiency of service debugging is improved.
And the interface information processing unit is used for disassembling each interface and the access information corresponding to each interface to obtain an interface list of the service and the access information of each interface in the interface list.
The interfaces and access information of the service acquired from the server may be disordered, so that the information received from the server needs to be disassembled, each interface and access information corresponding to each interface are disassembled, and an interface list is obtained according to the disassembling result, wherein the interface list includes all the acquired interfaces and the access information of each interface.
Optionally, in the process of disassembling the interface and the access information corresponding to the interface, the interface and the access information corresponding to the interface are further converted from a second format to a first format for a user to check during debugging, where the second format is a format supported by the server, and the first format is a format supported by the client, i.e., the debugging platform, to which the present invention is applied.
Optionally, in the process of disassembling the interfaces and the access reference information corresponding to the interfaces, each interface and the access reference information corresponding to the interface are packaged into a specific structure so that the front end can analyze the specific structure into a format which can be viewed by a user, and the specific structure calls a path for each interface and an access parameter combination of the interface.
Optionally, the interface list further includes, in addition to the interface implemented by the service itself, an interface that depends on introducing a Maven dependency relationship and access information thereof, that is, when the server receives an interface acquisition request, a Maven dependency is introduced and the service is started, and the interface and access information acquired from the server include an interface that depends on introducing a Maven dependency relationship and access information thereof.
Optionally, after the access address and the RPC access port of the service are obtained, the access address and the RPC access port of the service are stored in the cache, so that when each interface in the service is debugged, the access address and the RPC access port of the service can be obtained from the cache, that is, when each interface in the service is debugged, the front end carries the interface and does not need to carry the IP and the port when the access request is carried out, and the rear end can directly obtain the corresponding IP address and the port from the cache, assemble the IP address and the port into a parameter format required by the debugging request, and initiate the debugging request.
An interface list display module 803, configured to display the interface list in the first area of the page.
In the embodiment of the present invention, the obtained interface information and the access parameter information thereof in the interface list are encapsulated into a specific encapsulation structure, the encapsulation structure is an access parameter combination of each interface call path and the interface, the front end displays the call path of each interface in the interface list in a first specific format after analyzing the access parameter combination, and the first specific format may be any format convenient for a debugging user to understand.
The debugging module 804 is configured to debug each interface in the service based on each interface shown in the interface list and the obtained parameter entry information and parameter exit information of each interface.
Specifically, the debugging module 804 includes:
the target interface selection display unit is used for displaying the participation information of the target interface in a second area of the page and displaying the participation information of the target interface in a third area of the page aiming at any selected target interface in the interface list;
in the embodiment of the present invention, when a user selects any target interface in the interface list or the front end automatically cycles through the interfaces in the interface list, the selected target interface (call path of the interface) is displayed in the first area of the page, the entry parameter of the selected target interface is displayed in the second area of the page, in order to facilitate the debugging user to understand that the entry parameter of the target interface is displayed in the second area of the page in the second specific format, the second specific format is any format understandable by the debugging user, the exit parameter of the selected target interface is displayed in the third area of the page, in order to facilitate the debugging user to understand, the exit parameter of the target interface is displayed in the second area of the page in the third specific format, the third specific format is any format understandable by the debugging user, as shown in fig. 7, when a target interface is selected in the interface list in the first area of the page in fig. 6, assuming that the call path of the selected target interface is/google, protobuf, com, jindidata, user, remoteusercenterserver, modifyuser, the second area 62 of the page displays the selected target interface and shows the reference information of the target interface, and the third area 63 shows the reference information of the selected target interface.
It should be noted that, in the embodiment of the present invention, the presentation formats in the first, second, and third areas are consistent with the conventional Swagger format, and are not described herein again.
And the parameter input data acquisition unit is used for acquiring and displaying the input data aiming at the parameter input information in the second area.
And the debugging execution unit is used for executing debugging operation on the target interface so as to obtain and display a corresponding output result aiming at the parameter information in the third area.
Specifically, when a debugging request is received on the debugging page, if a user triggers debugging on the page, access parameter values and interface information carried by the front end are acquired, the back end acquires corresponding IP addresses and ports from the cache, assembles the IP addresses and the ports into a parameter format required by the request, and initiates a debugging request to the server, and the server returns a return value to the front end and performs rendering display, as shown in a third area 73 in fig. 7.
Exemplary electronic device
Fig. 9 is a structure of an electronic device according to an exemplary embodiment of the present invention. The electronic device may be either or both of the first device and the second device, or a stand-alone device separate from them, which stand-alone device may communicate with the first device and the second device to receive the acquired input signals therefrom. Fig. 9 illustrates a block diagram of an electronic device in accordance with an embodiment of the disclosure. As shown in fig. 9, the electronic device includes one or more processors 91 and memory 92.
The processor 91 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
Memory 92 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 91 may execute the program instructions to implement the service debugging method of the software program of the various embodiments of the present disclosure described above and/or other desired functions. In one example, the electronic device may further include: an input device 93 and an output device 94, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
The input device 93 may also include, for example, a keyboard, a mouse, and the like.
The output device 94 can output various information to the outside. The output devices 94 may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, among others.
Of course, for simplicity, only some of the components of the electronic device relevant to the present disclosure are shown in fig. 9, omitting components such as buses, input/output interfaces, and the like. In addition, the electronic device may include any other suitable components, depending on the particular application.
Exemplary computer program product and computer-readable storage Medium
In addition to the above-described methods and apparatus, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the service commissioning method according to various embodiments of the present disclosure described in the "exemplary methods" section above of this specification.
The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform steps in a service commissioning method according to various embodiments of the present disclosure described in the "exemplary methods" section above of this specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by one skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the devices, apparatuses, and methods of the present disclosure, each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure. The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A service commissioning method comprising:
acquiring an access address and an RPC access port of a service;
acquiring an interface list of the service and the access information of each interface in the interface list based on the access address and the RPC access port;
displaying the interface list in a first area of a page; and
and debugging each interface in the service based on each interface shown in the interface list and the acquired parameter entering information and parameter exiting information of each interface.
2. The service debugging method according to claim 1, wherein debugging each interface in the service based on each interface shown in the interface list and the obtained entry and exit information of each interface comprises:
aiming at any selected target interface in the interface list, showing the participation information of the target interface in a second area of the page, and showing the participation information of the target interface in a third area of the page;
acquiring and displaying input data aiming at the parameter entering information in the second area; and
and executing debugging operation on the target interface to acquire and display a corresponding output result aiming at the parameter information in the third area.
3. The service debugging method of claim 1 wherein the method further comprises:
and storing the access address and the RPC access port of the service in a cache so as to obtain the access address and the RPC access port of the service from the cache when debugging each interface in the service.
4. The service debugging method of claim 1, wherein obtaining the interface list of the service and the entry and exit information of each interface in the interface list based on the access address and the RPC access port comprises:
and based on the access address and the RPC access port, sending a simulation request to a server side at a client side through an RPC frame protocol so as to obtain an interface list of the service and the access information of each interface in the interface list.
5. The service debugging method of claim 1 wherein exposing the list of interfaces in a first region of a page comprises:
and displaying the calling path of each interface in the interface list in a first specific format in the first area of the page.
6. The service debugging method of claim 2 wherein presenting, for any selected target interface in the interface list, the entry information for the target interface in the second region of the page and the exit information for the target interface in the third region of the page comprises, for any selected target interface in the interface list:
displaying the reference information of the target interface in a second specific format in a second area of the page; and
and displaying the participation information of the target interface in a third specific format in a third area of the page.
7. A service debugging method in accordance with claim 1, wherein the interface list includes interfaces on which the service depends.
8. The service debugging method of claim 1 wherein the interface list of the service contains interfaces with nested logic.
9. A service commissioning apparatus comprising:
the address port acquisition module is used for acquiring an access address of the service and an RPC access port;
an interface list acquisition module, configured to acquire an interface list of the service and entry and exit parameters of each interface in the interface list based on the access address and the RPC access port;
the interface list display module is used for displaying the interface list in a first area of a page;
and the debugging module is used for debugging each interface in the service based on each interface displayed in the interface list and the acquired parameter input information and parameter output information of each interface.
10. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the service commissioning method according to any one of claims 1 to 8.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the service debugging method according to any one of claims 1 to 8 when executing the computer program.
CN202210410976.0A 2022-04-19 2022-04-19 Service debugging method and device, storage medium and electronic equipment Pending CN114936146A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210410976.0A CN114936146A (en) 2022-04-19 2022-04-19 Service debugging method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210410976.0A CN114936146A (en) 2022-04-19 2022-04-19 Service debugging method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114936146A true CN114936146A (en) 2022-08-23

Family

ID=82861896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210410976.0A Pending CN114936146A (en) 2022-04-19 2022-04-19 Service debugging method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114936146A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737598A (en) * 2023-08-14 2023-09-12 北京国电通网络技术有限公司 Page debugging method, device, electronic equipment and computer readable medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783748A (en) * 2019-11-06 2021-05-11 腾讯科技(深圳)有限公司 Program debugging method, device, equipment and computer readable storage medium
CN113238815A (en) * 2021-05-13 2021-08-10 北京京东振世信息技术有限公司 Interface access control method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783748A (en) * 2019-11-06 2021-05-11 腾讯科技(深圳)有限公司 Program debugging method, device, equipment and computer readable storage medium
CN113238815A (en) * 2021-05-13 2021-08-10 北京京东振世信息技术有限公司 Interface access control method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
加拉萨假期: "【Golang】无敌好用GRPC接口测试工具的使用-Swagger", pages 1 - 7, Retrieved from the Internet <URL:《https://blog.csdn.net/m0_38059938/article/details/106863286》> *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737598A (en) * 2023-08-14 2023-09-12 北京国电通网络技术有限公司 Page debugging method, device, electronic equipment and computer readable medium
CN116737598B (en) * 2023-08-14 2023-10-20 北京国电通网络技术有限公司 Page debugging method, device, electronic equipment and computer readable medium

Similar Documents

Publication Publication Date Title
CN109933522B (en) Test method, test system and storage medium for automatic case
CN110187931B (en) Method and device for running small program
CN110198247B (en) Interface test method and system
CN106649084B (en) The acquisition methods and device of function call information, test equipment
US8479209B2 (en) Automated execution of virtual appliances
US10229032B2 (en) Break on next called function or method in java debugger agent
CN111026634A (en) Interface automation test system, method, device and storage medium
CN110457038B (en) Card display method, device and equipment of auxiliary application terminal and storage medium
CN110196809B (en) Interface testing method and device
CN113778848A (en) Test code generation method, device, computer system and medium
CN113485880A (en) Test method and device
CN113032244A (en) Interface testing method, device, computer system and computer readable storage medium
CN109582317A (en) Method and apparatus for debugging boarding application
CN114936146A (en) Service debugging method and device, storage medium and electronic equipment
CN110955409A (en) Method and device for creating resources on cloud platform
CN114661375A (en) Application integration method and device
US11288170B1 (en) Log analysis debugging without running on real production environment
CN110717992B (en) Method, apparatus, computer system and readable storage medium for scheduling model
US9542171B2 (en) Managing an application modification process
CN110825370A (en) Mobile terminal application development method, device and system
CN113656439A (en) Data query method and device, storage medium and electronic equipment
CN112491940A (en) Request forwarding method and device of proxy server, storage medium and electronic equipment
US20230214310A1 (en) Infrastructure to integrate an integrated development environment (ide) with game engines
CN114816385B (en) Integration method, device and equipment of heterogeneous system and storage medium
CN114116462A (en) Method and device for automatically testing and integrating front end and back end of Web project

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination