CN116627546A - Interface debugging method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN116627546A
CN116627546A CN202310508112.7A CN202310508112A CN116627546A CN 116627546 A CN116627546 A CN 116627546A CN 202310508112 A CN202310508112 A CN 202310508112A CN 116627546 A CN116627546 A CN 116627546A
Authority
CN
China
Prior art keywords
interface
request
parameters
debugging
class
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
CN202310508112.7A
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.)
Kangjian Information Technology Shenzhen Co Ltd
Original Assignee
Kangjian Information Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kangjian Information Technology Shenzhen Co Ltd filed Critical Kangjian Information Technology Shenzhen Co Ltd
Priority to CN202310508112.7A priority Critical patent/CN116627546A/en
Publication of CN116627546A publication Critical patent/CN116627546A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • 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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to research and development management used in the digital medical field, and discloses an interface debugging method, which comprises the following steps: generating a plurality of interface request parameters according to a preset parameter construction method; storing the request metadata in the interface request parameters into a preset file, and calling the request metadata in the preset file and the interface parameters in the interface request parameters to perform configuration assembly when an interface debugging request is initiated, so as to obtain a framework configuration class; generating a corresponding frame service class based on the frame configuration class, and performing debugging service processing on an interface to be debugged in the interface debugging request by utilizing the frame service class to obtain a response message; and taking the response message as an interface calling result and carrying out result display on the interface calling result. In addition, the application also relates to a blockchain technology, and the interface request parameters can be stored in nodes of the blockchain. The application also provides an interface debugging device, electronic equipment and a storage medium. The application can improve the efficiency of interface debugging.

Description

Interface debugging method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of research and development management, and in particular, to an interface debugging method, an apparatus, an electronic device, and a storage medium.
Background
In the field of digital medical treatment, there are many medical data suitable for different medical scenes, and medical data interaction under different medical scenes is a key step for solving medical problems. The interaction between the medical data of different medical scenes depends on a service development framework, and the service development framework is used for solving the problems of service management and communication between the medical data of different medical scenes under a micro-service architecture, so that the service management requirements corresponding to the medical data such as service discovery, load balancing, flow scheduling and the like can be realized. In order to ensure that the service development framework can be better applied, the framework interface needs to be debugged.
The existing interface debugging method generally realizes the effect of interface calling by developing a consumer service, and the method needs to independently write an engineering file to realize the interface calling, which takes longer time and further leads to low efficiency of the interface calling. Therefore, it is needed to propose an efficient interface calling method applied in the digital medical field.
Disclosure of Invention
The application provides an interface debugging method, an interface debugging device, electronic equipment and a storage medium, and mainly aims to improve the efficiency of interface debugging.
In order to achieve the above object, the present application provides an interface debugging method, including:
generating a plurality of interface request parameters according to a preset parameter construction method, wherein the interface request parameters comprise request metadata, interface parameters and editing parameters;
storing the request metadata in the interface request parameters into a preset file, and calling the request metadata in the preset file and the interface parameters in the interface request parameters to perform configuration assembly when an interface debugging request is initiated to obtain a framework configuration class;
generating a corresponding frame service class based on the frame configuration class, and performing debugging service processing on an interface to be debugged in the interface debugging request by utilizing the frame service class to obtain a response message;
and taking the response message as an interface calling result and carrying out result display on the interface calling result.
Optionally, the generating a plurality of interface request parameters according to a preset parameter construction method includes:
judging whether an object code exists in a preset project, and if the object code exists in the preset project, selecting any class method in the preset project;
generating corresponding interface request parameters in a request editing page window by using the arbitrary type method;
and if the target code does not exist in the preset engineering, taking the predefined parameter as an interface request parameter.
Optionally, the generating the corresponding interface request parameter in the request editing page window by using the arbitrary class method includes:
extracting a method annotation section in any class of methods in the request editing page window, and judging whether an attribute value exists in the method annotation section;
if the attribute value exists in the method annotation section, the attribute value is used as the interface request parameter;
and if the attribute value does not exist in the method annotation section, generating a random value according to the arbitrary class method, and taking the random value as the interface request parameter.
Optionally, the calling the request metadata in the preset file and the interface parameters in the interface request parameters to perform configuration assembly to obtain a framework configuration class includes:
calling request metadata in the preset file, and analyzing the request metadata to obtain analysis metadata;
and initializing a configuration class by taking the reference configuration as a center and taking the analysis metadata and the interface parameters as reference data to obtain a framework configuration class.
Optionally, the parsing processing is performed on the request metadata to obtain parsed metadata, including:
and inputting the request metadata into a preset analyzer for data analysis to obtain analysis metadata.
Optionally, the processing the debug service of the interface to be debugged in the interface debug request by using the framework service class to obtain a response message includes:
calling a corresponding service method according to the frame service class, and taking the editing parameter in the interface request parameter as the form parameter of the service method to obtain a target service method;
and debugging the interface to be debugged by using the target service method to obtain a response message.
Optionally, the storing the request metadata in the interface request parameter in a preset file includes:
and calling a preset calling tool to store the request metadata into a preset file.
In order to solve the above problem, the present application further provides an interface debugging device, the device comprising:
the parameter generation module is used for generating a plurality of interface request parameters according to a preset parameter construction method, wherein the interface request parameters comprise request metadata, interface parameters and editing parameters;
the configuration assembly module is used for storing the request metadata in the interface request parameters into a preset file, and when an interface debugging request is initiated, the request metadata in the preset file and the interface parameters in the interface request parameters are called for configuration assembly to obtain a framework configuration class;
the debugging service module is used for generating a corresponding frame service class based on the frame configuration class, and carrying out debugging service processing on an interface to be debugged in the interface debugging request by utilizing the frame service class to obtain a response message;
and the result generation module is used for taking the response message as an interface calling result and carrying out result display on the interface calling result.
In order to solve the above-mentioned problems, the present application also provides an electronic apparatus including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the interface debugging method described above.
In order to solve the above-mentioned problems, the present application also provides a storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the above-mentioned interface debugging method.
In the embodiment of the application, the framework configuration class is obtained by configuring and assembling the interface request parameters, and the framework service class corresponding to the framework configuration class is utilized to carry out debugging service processing, so that the debugging efficiency and accuracy are improved, the debugging service obtains the response message and takes the response message as an interface calling result, the quick simulation of the request message is realized, and the interface calling result is displayed. Therefore, the interface debugging method, the device, the electronic equipment and the storage medium can solve the problem of low efficiency of improving interface debugging.
Drawings
FIG. 1 is a flowchart of an interface debugging method according to an embodiment of the present application;
FIG. 2 is a detailed flow chart of one of the steps shown in FIG. 1;
FIG. 3 is a functional block diagram of an interface debugging device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device implementing the interface debugging method according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The embodiment of the application provides an interface debugging method. The execution body of the interface debugging method includes, but is not limited to, at least one of a server, a terminal and the like capable of being configured to execute the method provided by the embodiment of the application. In other words, the interface debugging method may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (ContentDelivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Referring to fig. 1, a flow chart of an interface debugging method according to an embodiment of the application is shown.
In this embodiment, the interface debugging method includes the following steps S1 to S4:
s1, generating a plurality of interface request parameters according to a preset parameter construction method, wherein the interface request parameters comprise request metadata, interface parameters and editing parameters.
In the embodiment of the application, the preset parameter construction method comprises the steps of automatically producing the request parameter or customizing the request parameter by selecting a class method, wherein the selection of different methods is selected according to different environments. The preset parameter construction method can conveniently and rapidly edit the interface request parameters.
Specifically, referring to fig. 2, the generating a plurality of interface request parameters according to the preset parameter configuration method includes the following steps S11-S13:
judging whether an object code exists in a preset project, and if the object code exists in the preset project, selecting any class method in the preset project;
generating corresponding interface request parameters in a request editing page window by using the arbitrary type method;
and if the target code does not exist in the preset engineering, taking the predefined parameter as an interface request parameter.
In detail, the preset project is an IDEA project, wherein IDEA refers to an integrated development tool specific to Java, and the tool can be applied in the field of digital medical treatment. The object codes are interface and method source codes. If the corresponding interface and method source codes exist in the IDEA project, one of the methods in one class in the IDEA is selected, a request editing page window is opened, request parameters of the corresponding method are automatically generated, the request parameters comprise addresses, interface, method, version, group, parameters and the like, and the parameters can generate random values of the corresponding parameter types according to the shape parameters corresponding to the method.
Further, the generating the corresponding interface request parameter in the request editing page window by using the arbitrary class method includes:
extracting a method annotation section in any class of methods in the request editing page window, and judging whether an attribute value exists in the method annotation section;
if the attribute value exists in the method annotation section, the attribute value is used as the interface request parameter;
and if the attribute value does not exist in the method annotation section, generating a random value according to the arbitrary class method, and taking the random value as the interface request parameter.
In detail, the attribute value refers to an attribute example value with a specified format, if the attribute value does not exist in the method annotation section, a random value is generated according to the arbitrary class method, namely, parameters generate a random value of a corresponding parameter type according to a shape parameter corresponding to a method.
For example, the method annotation section is as follows:
/**
* @ param userName $ example @ Zhang san
*/
Wherein the userName will not generate a random value, but rather use the example value "Zhang Sanj" as the value of the request field.
Specifically, if there is no corresponding interface and method source code in the IDEA project, a window for requesting to edit the page may be opened, interface and method information may be automatically input, and then corresponding parameters data may be edited according to the method shape parameters and the request may be sent.
Further, the interface request parameters include request metadata, interface parameters and editing parameters, and since the interface request parameters include address, interface, method, version, group, parameters, etc., the protocol, address, version and group belong to the request metadata, the interface belongs to the interface parameters, and method, methodType, param all belong to the editing parameters.
S2, storing the request metadata in the interface request parameters into a preset file, and calling the request metadata in the preset file and the interface parameters in the interface request parameters to perform configuration assembly when an interface debugging request is initiated, so as to obtain a framework configuration class.
In the embodiment of the present application, the storing the request metadata in the interface request parameter in a preset file includes:
and calling a preset calling tool to store the request metadata into a preset file.
In detail, the tool may provide PersistentStateComponent API for the IDEA, and the preset file is a local file, i.e., persistentStateComponent API for invoking IDEA to save data to the local file.
Preferably, a function page for storing and displaying the request metadata is provided, the request metadata in the interface request parameters is edited and stored, and the stored request metadata is selected when the request editing page edits the data, so that the efficiency of editing the request data by a user is improved.
Specifically, the calling the request metadata in the preset file and the interface parameters in the interface request parameters to perform configuration assembly to obtain a framework configuration class includes:
calling request metadata in the preset file, and analyzing the request metadata to obtain analysis metadata;
and initializing a configuration class by taking the reference configuration as a center and taking the analysis metadata and the interface parameters as reference data to obtain a framework configuration class.
In detail, the reference configuration is a reference configuration, the reference configuration is taken as a center, and the request metadata and the interface parameters are taken as reference data to initialize configuration classes, so as to obtain framework configuration classes.
Further, the parsing processing is performed on the request metadata to obtain parsed metadata, including:
and inputting the request metadata into a preset analyzer for data analysis to obtain analysis metadata.
In detail, the preset parser may implement a parsing function.
And S3, generating a corresponding frame service class based on the frame configuration class, and performing debugging service processing on the interface to be debugged in the interface debugging request by utilizing the frame service class to obtain a response message.
In the embodiment of the application, generating the corresponding frame service class based on the frame configuration class refers to generating a generalized call service class GenericService of the Dubbo frame through the frame configuration class ReferenceConfig configuration class, wherein GenericService is a generalized interface provided by Dubbo and used for performing generalized call.
Specifically, the performing, by using the framework service class, a debug service process on the interface to be debugged in the interface debug request, to obtain a response packet, including:
calling a corresponding service method according to the frame service class, and taking the editing parameter in the interface request parameter as the form parameter of the service method to obtain a target service method;
and debugging the interface to be debugged by using the target service method to obtain a response message.
In detail, the corresponding service method is called through the framework service class GenericService, wherein the corresponding service method is $invokesync (method, parameters), methodType, param of the editing parameter method, parameters in the interface request parameter is taken as a parameter of the method, and the $invokesync method sends the request to the corresponding interface of the target service.
S4, taking the response message as an interface calling result and displaying the interface calling result.
In the embodiment of the application, the response message is used as an interface calling result, and the interface calling result is displayed by using a plug-in.
In the embodiment of the application, the framework configuration class is obtained by configuring and assembling the interface request parameters, and the framework service class corresponding to the framework configuration class is utilized to carry out debugging service processing, so that the debugging efficiency and accuracy are improved, the debugging service obtains the response message and takes the response message as an interface calling result, the quick simulation of the request message is realized, and the interface calling result is displayed. Therefore, the interface debugging method provided by the application can solve the problem of low efficiency of improving interface debugging.
Fig. 3 is a functional block diagram of an interface debugging device according to an embodiment of the present application.
The interface debugging device 100 of the present application may be installed in an electronic apparatus. The interface debugging device 100 may include a parameter generation module 101, a configuration assembly module 102, a debugging service module 103, and a result generation module 104 according to the implemented functions. The module of the application, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the present embodiment, the functions concerning the respective modules/units are as follows:
the parameter generating module 101 is configured to generate a plurality of interface request parameters according to a preset parameter configuration method, where the interface request parameters include request metadata, interface parameters, and editing parameters;
the configuration assembling module 102 is configured to store the request metadata in the interface request parameters into a preset file, and when an interface debugging request is initiated, invoke the request metadata in the preset file and the interface parameters in the interface request parameters to perform configuration assembling to obtain a framework configuration class;
the debug service module 103 is configured to generate a corresponding frame service class based on the frame configuration class, and perform debug service processing on the interface to be debugged in the interface debug request by using the frame service class to obtain a response message;
the result generating module 104 is configured to take the response packet as an interface call result and perform result display on the interface call result.
In detail, the specific embodiments of the modules of the interface debugging device 100 are as follows:
generating a plurality of interface request parameters according to a preset parameter construction method, wherein the interface request parameters comprise request metadata, interface parameters and editing parameters.
In the embodiment of the application, the preset parameter construction method comprises the steps of automatically producing the request parameter or customizing the request parameter by selecting a class method, wherein the selection of different methods is selected according to different environments. The preset parameter construction method can conveniently and rapidly edit the interface request parameters.
Specifically, the generating a plurality of interface request parameters according to the preset parameter construction method includes:
judging whether an object code exists in a preset project, and if the object code exists in the preset project, selecting any class method in the preset project;
generating corresponding interface request parameters in a request editing page window by using the arbitrary type method;
and if the target code does not exist in the preset engineering, taking the predefined parameter as an interface request parameter.
In detail, the preset project is an IDEA project, wherein IDEA refers to an integrated development tool specific to Java, and the tool can be applied in the field of digital medical treatment. The object codes are interface and method source codes. If the corresponding interface and method source codes exist in the IDEA project, one of the methods in one class in the IDEA is selected, a request editing page window is opened, request parameters of the corresponding method are automatically generated, the request parameters comprise addresses, interface, method, version, group, parameters and the like, and the parameters can generate random values of the corresponding parameter types according to the shape parameters corresponding to the method.
Further, the generating the corresponding interface request parameter in the request editing page window by using the arbitrary class method includes:
extracting a method annotation section in any class of methods in the request editing page window, and judging whether an attribute value exists in the method annotation section;
if the attribute value exists in the method annotation section, the attribute value is used as the interface request parameter;
and if the attribute value does not exist in the method annotation section, generating a random value according to the arbitrary class method, and taking the random value as the interface request parameter.
In detail, the attribute value refers to an attribute example value with a specified format, if the attribute value does not exist in the method annotation section, a random value is generated according to the arbitrary class method, namely, parameters generate a random value of a corresponding parameter type according to a shape parameter corresponding to a method.
For example, the method annotation section is as follows:
/**
* @ param userName $ example @ Zhang san
*/
Wherein the userName will not generate a random value, but rather use the example value "Zhang Sanj" as the value of the request field.
Specifically, if there is no corresponding interface and method source code in the IDEA project, a window for requesting to edit the page may be opened, interface and method information may be automatically input, and then corresponding parameters data may be edited according to the method shape parameters and the request may be sent.
Further, the interface request parameters include request metadata, interface parameters and editing parameters, and since the interface request parameters include address, interface, method, version, group, parameters, etc., the protocol, address, version and group belong to the request metadata, the interface belongs to the interface parameters, and method, methodType, param all belong to the editing parameters.
And step two, storing the request metadata in the interface request parameters into a preset file, and calling the request metadata in the preset file and the interface parameters in the interface request parameters to perform configuration assembly when an interface debugging request is initiated, so as to obtain a framework configuration class.
In the embodiment of the present application, the storing the request metadata in the interface request parameter in a preset file includes:
and calling a preset calling tool to store the request metadata into a preset file.
In detail, the tool may provide PersistentStateComponent API for the IDEA, and the preset file is a local file, i.e., persistentStateComponent API for invoking IDEA to save data to the local file.
Preferably, a function page for storing and displaying the request metadata is provided, the request metadata in the interface request parameters is edited and stored, and the stored request metadata is selected when the request editing page edits the data, so that the efficiency of editing the request data by a user is improved.
Specifically, the calling the request metadata in the preset file and the interface parameters in the interface request parameters to perform configuration assembly to obtain a framework configuration class includes:
calling request metadata in the preset file, and analyzing the request metadata to obtain analysis metadata;
and initializing a configuration class by taking the reference configuration as a center and taking the analysis metadata and the interface parameters as reference data to obtain a framework configuration class.
In detail, the reference configuration is a reference configuration, the reference configuration is taken as a center, and the request metadata and the interface parameters are taken as reference data to initialize configuration classes, so as to obtain framework configuration classes.
Further, the parsing processing is performed on the request metadata to obtain parsed metadata, including:
and inputting the request metadata into a preset analyzer for data analysis to obtain analysis metadata.
In detail, the preset parser may implement a parsing function.
Generating a corresponding frame service class based on the frame configuration class, and performing debugging service processing on an interface to be debugged in the interface debugging request by using the frame service class to obtain a response message.
In the embodiment of the application, generating the corresponding frame service class based on the frame configuration class refers to generating a generalized call service class GenericService of the Dubbo frame through the frame configuration class ReferenceConfig configuration class, wherein GenericService is a generalized interface provided by Dubbo and used for performing generalized call.
Specifically, the performing, by using the framework service class, a debug service process on the interface to be debugged in the interface debug request, to obtain a response packet, including:
calling a corresponding service method according to the frame service class, and taking the editing parameter in the interface request parameter as the form parameter of the service method to obtain a target service method;
and debugging the interface to be debugged by using the target service method to obtain a response message.
In detail, the corresponding service method is called through the framework service class GenericService, wherein the corresponding service method is $invokesync (method, parameters), methodType, param of the editing parameter method, parameters in the interface request parameter is taken as a parameter of the method, and the $invokesync method sends the request to the corresponding interface of the target service.
And step four, taking the response message as an interface calling result and displaying the interface calling result.
In the embodiment of the application, the response message is used as an interface calling result, and the interface calling result is displayed by using a plug-in.
In the embodiment of the application, the framework configuration class is obtained by configuring and assembling the interface request parameters, and the framework service class corresponding to the framework configuration class is utilized to carry out debugging service processing, so that the debugging efficiency and accuracy are improved, the debugging service obtains the response message and takes the response message as an interface calling result, the quick simulation of the request message is realized, and the interface calling result is displayed. Therefore, the interface debugging device provided by the application can solve the problem of low efficiency of improving interface debugging.
Fig. 4 is a schematic structural diagram of an electronic device for implementing an interface debugging method according to an embodiment of the present application.
The electronic device 1 may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as an interface debugging program, stored in the memory 11 and executable on the processor 10.
The processor 10 may be formed by an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed by a plurality of integrated circuits packaged with the same function or different functions, including one or more central processing units (Central Processing Unit, CPU), a microprocessor, a digital processing chip, a graphics processor, a combination of various control chips, and so on. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, executes or executes programs or modules (e.g., an interface debugging program, etc.) stored in the memory 11, and invokes data stored in the memory 11 to perform various functions of the electronic device and process data.
The memory 11 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 11 may in other embodiments also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only for storing application software installed in an electronic device and various types of data, such as code of an interface debugging program, but also for temporarily storing data that has been output or is to be output.
The communication bus 12 may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
The communication interface 13 is used for communication between the electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), or alternatively a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
Fig. 4 shows only an electronic device with components, it being understood by a person skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or may combine certain components, or may be arranged in different components.
For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The interface debugging program stored in the memory 11 of the electronic device 1 is a combination of instructions which, when run in the processor 10, can implement:
generating a plurality of interface request parameters according to a preset parameter construction method, wherein the interface request parameters comprise request metadata, interface parameters and editing parameters;
storing the request metadata in the interface request parameters into a preset file, and calling the request metadata in the preset file and the interface parameters in the interface request parameters to perform configuration assembly when an interface debugging request is initiated to obtain a framework configuration class;
generating a corresponding frame service class based on the frame configuration class, and performing debugging service processing on an interface to be debugged in the interface debugging request by utilizing the frame service class to obtain a response message;
and taking the response message as an interface calling result and carrying out result display on the interface calling result.
In particular, the specific implementation method of the above instructions by the processor 10 may refer to the description of the relevant steps in the corresponding embodiment of the drawings, which is not repeated herein.
Further, the modules/units integrated in the electronic device 1 may be stored in a storage medium if implemented in the form of software functional units and sold or used as separate products. The storage medium may be volatile or nonvolatile. For example, the computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
The present application also provides a storage medium storing a computer program which, when executed by a processor of an electronic device, can implement:
generating a plurality of interface request parameters according to a preset parameter construction method, wherein the interface request parameters comprise request metadata, interface parameters and editing parameters;
storing the request metadata in the interface request parameters into a preset file, and calling the request metadata in the preset file and the interface parameters in the interface request parameters to perform configuration assembly when an interface debugging request is initiated to obtain a framework configuration class;
generating a corresponding frame service class based on the frame configuration class, and performing debugging service processing on an interface to be debugged in the interface debugging request by utilizing the frame service class to obtain a response message;
and taking the response message as an interface calling result and carrying out result display on the interface calling result.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present application and not for limiting the same, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present application without departing from the spirit and scope of the technical solution of the present application.

Claims (10)

1. An interface debugging method, comprising:
generating a plurality of interface request parameters according to a preset parameter construction method, wherein the interface request parameters comprise request metadata, interface parameters and editing parameters;
storing the request metadata in the interface request parameters into a preset file, and calling the request metadata in the preset file and the interface parameters in the interface request parameters to perform configuration assembly when an interface debugging request is initiated to obtain a framework configuration class;
generating a corresponding frame service class based on the frame configuration class, and performing debugging service processing on an interface to be debugged in the interface debugging request by utilizing the frame service class to obtain a response message;
and taking the response message as an interface calling result and carrying out result display on the interface calling result.
2. The interface debugging method of claim 1, wherein the generating a plurality of interface request parameters according to a preset parameter configuration method comprises:
judging whether an object code exists in a preset project, and if the object code exists in the preset project, selecting any class method in the preset project;
generating corresponding interface request parameters in a request editing page window by using the arbitrary type method;
and if the target code does not exist in the preset engineering, taking the predefined parameter as an interface request parameter.
3. The interface debugging method of claim 2, wherein generating the corresponding interface request parameters in the request editing page window using the arbitrary class method comprises:
extracting a method annotation section in any class of methods in the request editing page window, and judging whether an attribute value exists in the method annotation section;
if the attribute value exists in the method annotation section, the attribute value is used as the interface request parameter;
and if the attribute value does not exist in the method annotation section, generating a random value according to the arbitrary class method, and taking the random value as the interface request parameter.
4. The interface debugging method of claim 1, wherein the invoking the request metadata in the preset file and the interface parameters in the interface request parameters to perform configuration assembly, to obtain a framework configuration class, comprises:
calling request metadata in the preset file, and analyzing the request metadata to obtain analysis metadata;
and initializing a configuration class by taking the reference configuration as a center and taking the analysis metadata and the interface parameters as reference data to obtain a framework configuration class.
5. The interface debugging method of claim 4, wherein the parsing the request metadata to obtain parsed metadata comprises:
and inputting the request metadata into a preset analyzer for data analysis to obtain analysis metadata.
6. The interface debugging method of claim 1, wherein the using the framework service class to perform debugging service processing on the interface to be debugged in the interface debugging request, to obtain the response message comprises:
calling a corresponding service method according to the frame service class, and taking the editing parameter in the interface request parameter as the form parameter of the service method to obtain a target service method;
and debugging the interface to be debugged by using the target service method to obtain a response message.
7. The interface debugging method of claim 1, wherein the saving the request metadata in the interface request parameters to a preset file comprises:
and calling a preset calling tool to store the request metadata into a preset file.
8. An interface debugging device, the device comprising:
the parameter generation module is used for generating a plurality of interface request parameters according to a preset parameter construction method, wherein the interface request parameters comprise request metadata, interface parameters and editing parameters;
the configuration assembly module is used for storing the request metadata in the interface request parameters into a preset file, and when an interface debugging request is initiated, the request metadata in the preset file and the interface parameters in the interface request parameters are called for configuration assembly to obtain a framework configuration class;
the debugging service module is used for generating a corresponding frame service class based on the frame configuration class, and carrying out debugging service processing on an interface to be debugged in the interface debugging request by utilizing the frame service class to obtain a response message;
and the result generation module is used for taking the response message as an interface calling result and carrying out result display on the interface calling result.
9. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the interface debugging method of any of claims 1-7.
10. A storage medium storing a computer program which, when executed by a processor, implements the interface debugging method of any one of claims 1 to 7.
CN202310508112.7A 2023-05-06 2023-05-06 Interface debugging method and device, electronic equipment and storage medium Pending CN116627546A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310508112.7A CN116627546A (en) 2023-05-06 2023-05-06 Interface debugging method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310508112.7A CN116627546A (en) 2023-05-06 2023-05-06 Interface debugging method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116627546A true CN116627546A (en) 2023-08-22

Family

ID=87640946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310508112.7A Pending CN116627546A (en) 2023-05-06 2023-05-06 Interface debugging method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116627546A (en)

Similar Documents

Publication Publication Date Title
CN111813963B (en) Knowledge graph construction method and device, electronic equipment and storage medium
CN113704665B (en) Dynamic service release method and device, electronic equipment and storage medium
CN113238929B (en) Code testing method and device based on Mock data, electronic equipment and storage medium
CN113806434B (en) Big data processing method, device, equipment and medium
CN112528307A (en) Service request checking method and device, electronic equipment and storage medium
CN111694844A (en) Enterprise operation data analysis method and device based on configuration algorithm and electronic equipment
CN113468175B (en) Data compression method, device, electronic equipment and storage medium
CN112486490B (en) Front-end code packaging method and device, electronic equipment and storage medium
CN113297180A (en) Data migration method and device, electronic equipment and storage medium
CN114816371B (en) Message processing method, device, equipment and medium
CN116028045A (en) Third party application code rapid distribution method, device, equipment and storage medium
CN116627546A (en) Interface debugging method and device, electronic equipment and storage medium
CN114721952A (en) Method, device, equipment and storage medium for synchronously deploying multiple sets of test environments
CN114911479A (en) Interface generation method, device, equipment and storage medium based on configuration
CN114844693A (en) Lightweight communication data encryption method, device, equipment and storage medium
CN112527443A (en) Prompt box display method and device, electronic equipment and computer readable storage medium
CN112667244A (en) Data verification method and device, electronic equipment and computer readable storage medium
CN115934576B (en) Test case generation method, device, equipment and medium in transaction scene
CN113704109B (en) Front-end and back-end data interaction method and device, electronic equipment and storage medium
CN113032168B (en) Data transmission rate dynamic adjustment method and device, electronic equipment and storage medium
CN117827869A (en) Database operation method, device and equipment for automatic filling of universal fields
CN114942855A (en) Interface calling method and device, electronic equipment and storage medium
CN116414708A (en) Project testing method and device, electronic equipment and storage medium
CN116521137A (en) Message notification method, device, equipment and storage medium
CN116610465A (en) Event notification-based message sending method and device, electronic equipment and medium

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