CN113515437A - Method and device for debugging interface - Google Patents

Method and device for debugging interface Download PDF

Info

Publication number
CN113515437A
CN113515437A CN202010278980.7A CN202010278980A CN113515437A CN 113515437 A CN113515437 A CN 113515437A CN 202010278980 A CN202010278980 A CN 202010278980A CN 113515437 A CN113515437 A CN 113515437A
Authority
CN
China
Prior art keywords
data
interface
debugged
file
request
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
CN202010278980.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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010278980.7A priority Critical patent/CN113515437A/en
Publication of CN113515437A publication Critical patent/CN113515437A/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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3648Software debugging using additional hardware
    • G06F11/3656Software debugging using additional hardware using a specific debug interface

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for debugging an interface, and relates to the technical field of computers. One embodiment of the method comprises: receiving a network request of an interface to be debugged; acquiring first data corresponding to the interface to be debugged according to the network request; judging whether the first data needs to be modified or not; if so, modifying the first data to generate second data, and taking the second data as new first data; if not, debugging the interface to be debugged by using the first data. According to the implementation method, the technical defects that the server needs to be updated and the first data cannot be flexibly modified when the first data is modified are overcome, the first data to be debugged can be efficiently and flexibly modified, the server does not need to be updated, and the technical effect of improving the efficiency is achieved.

Description

Method and device for debugging interface
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for debugging an interface.
Background
In application development, different interfaces need to be displayed according to different requested data by requesting data in a server. However, in the development process, the development work of the server is generally performed simultaneously with the application, and the development of the server is then coordinated with the application after the development of the server is completed.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
1. when debugging the application, there may be a case that the server does not complete development and further cannot return data to be requested, so that the application cannot be tested independently, joint debugging time is prolonged, and testing efficiency is low.
2. There are many situations in which data is returned by a server, and if application development wants to verify various situations, the server generally needs to be modified and reissued, or requested data is modified by packet capture, which results in increased debugging time cost and poor debugging flexibility.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for debugging an interface, which can achieve the technical effects of efficiently and flexibly modifying first data to be debugged, without updating a server, and improving efficiency.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of debugging an interface, including:
receiving a network request of an interface to be debugged;
acquiring first data corresponding to the interface to be debugged according to the network request;
judging whether the first data needs to be modified or not;
if so, modifying the first data to generate second data, and taking the second data as new first data;
if not, debugging the interface to be debugged by using the first data;
the first data is used for debugging an interface to be debugged.
Optionally, obtaining, according to the network request, first data corresponding to the interface to be debugged includes:
judging whether the mode of acquiring the first data corresponding to the interface to be debugged is from the local or not according to the network request;
if so, acquiring first data corresponding to the interface to be debugged from a local file;
if not, sending a request for acquiring the first data to the server; receiving a request result returned by the server; and determining the request result as first data corresponding to the interface to be debugged.
Optionally, before obtaining the first data corresponding to the interface to be debugged from the local file, the method includes:
configuring a configuration file corresponding to each interface to be debugged corresponding to the application in a local mode;
associating the interface to be debugged with the file name of the configuration file to generate an association result;
generating a local file according to the configuration file and the association result;
and the storage form of the local file is JSON.
Optionally, before obtaining the first data corresponding to the interface to be debugged from the local file, the method further includes:
packaging the network request corresponding to the interface to be debugged to generate a packaging file;
and configuring the interface name and the entry parameter of the interface to be debugged as dynamic replacement in the package file.
Optionally, modifying the first data to generate second data, and using the second data as new first data includes:
clicking a suspension button for modifying first data to generate a modified popup window corresponding to the first data; wherein modifying the elements in the popup comprises: the method comprises the following steps that an interface name, a request parameter corresponding to the interface name and a return parameter corresponding to the interface name are obtained;
modifying at least one element in the modification popup;
and determining the modified result as first data, and taking the second data as new first data.
According to an aspect of an embodiment of the present invention, there is provided an apparatus for debugging an interface, including:
the request receiving module is used for receiving a network request of an interface to be debugged;
the first data acquisition module is used for acquiring first data corresponding to the interface to be debugged according to the network request;
the judging module is used for judging whether the first data needs to be modified or not;
the first data updating module is used for modifying the first data to generate second data if the first data is the first data, and the second data is used as new first data;
the debugging module is used for debugging the interface to be debugged by utilizing the first data if the interface to be debugged is not debugged;
the first data is used for debugging an interface to be debugged.
Optionally, the first data obtaining module is further configured to determine, according to the network request, whether a manner of obtaining first data corresponding to the interface to be debugged is to obtain the first data from a local area;
if so, acquiring first data corresponding to the interface to be debugged from a local file;
if not, sending a request for acquiring the first data to the server; receiving a request result returned by the server; and determining the request result as first data corresponding to the interface to be debugged.
Optionally, the debugging device further includes a local obtaining module, configured to, before obtaining the first data corresponding to the interface to be debugged from the local file,
configuring a configuration file corresponding to each interface to be debugged corresponding to the application in a local mode;
associating the interface to be debugged with the file name of the configuration file to generate an association result;
generating a local file according to the configuration file and the association result;
and the storage form of the local file is JSON.
Optionally, the debugging device further comprises an encapsulation module, configured to, before obtaining the first data corresponding to the interface to be debugged from the local file,
packaging the network request corresponding to the interface to be debugged to generate a packaging file;
and configuring the interface name and the entry parameter of the interface to be debugged as dynamic replacement in the package file.
Optionally, modifying the first data to generate second data, and using the second data as new first data includes:
clicking a suspension button for modifying first data to generate a modified popup window corresponding to the first data; wherein modifying the elements in the popup comprises: the method comprises the following steps that an interface name, a request parameter corresponding to the interface name and a return parameter corresponding to the interface name are obtained;
modifying at least one element in the modification popup;
and determining the modified result as first data, and taking the second data as new first data.
According to another aspect of the embodiments of the present invention, there is provided an electronic device for debugging an interface, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method of debugging an interface provided by the present invention.
According to a further aspect of the embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the method of debugging an interface provided by the present invention.
One embodiment of the above invention has the following advantages or benefits:
according to the method and the device, the technical means for modifying the first data is adopted, the technical defects that the server needs to be updated and the first data cannot be modified flexibly when the first data is modified are avoided, the first data to be debugged can be modified efficiently and flexibly, the server does not need to be updated, and the technical effect of improving the efficiency is achieved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a main flow of a method of debugging an interface according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the execution logic of an interface-corresponding code according to an embodiment of the invention;
FIG. 3 is a schematic diagram of the main blocks of an apparatus for debugging an interface according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a method for debugging an interface according to an embodiment of the present invention, as shown in fig. 1, including:
step S101, receiving a network request of an interface to be debugged;
step S102, acquiring first data corresponding to the interface to be debugged according to the network request;
step S103, judging whether the first data needs to be modified;
step S104, if yes, modifying the first data to generate second data, and taking the second data as new first data;
step S105, if not, debugging the interface to be debugged by using the first data;
the first data is used for debugging an interface to be debugged.
As the application needs to be debugged in the development process. Therefore, the first data of the interface to be debugged can be requested to be debugged in a network request mode, and then the interface to be debugged is debugged according to the first data.
Specifically, the network request may be classified into three levels, which are: requesting data configured within an application, requesting data configured by a server, requesting modified data.
The data configured in the application mainly refers to data configured at the client (i.e. locally). In the present application, if the reading of the first data can be completed locally, the data does not need to be requested from the server.
According to the optional embodiment of the application, the data configured in the application is requested, the technical means for reading the data for debugging is realized by utilizing the data configured locally, the technical defects that in the prior art, when a server and a client where the application is located are subjected to joint debugging, the WiFi environment is needed, and when joint debugging testing is carried out, packet capturing operation is needed, the debugging efficiency is low in the prior art are overcome, the technical defect that debugging can not be carried out through packet capturing operation exists when encrypted data is obtained, the server is not needed to be relied on in the development stage and the debugging stage, and the technical effects of the debugging efficiency and the development efficiency of the application are improved.
In an optional embodiment of the present application, when the first data cannot be obtained locally, the first data of the interface to be debugged may also be called by using the server. The data configured for the requesting server is requested corresponding to the network request at the server.
Specifically, obtaining first data corresponding to the interface to be debugged according to the network request includes:
judging whether the mode of acquiring the first data corresponding to the interface to be debugged is from the local or not according to the network request;
if so, sending a request for requesting data configured in the application to the local, and acquiring first data corresponding to the interface to be debugged from a local file;
if not, sending a request for acquiring the first data to the server to request the server to configure the data; receiving a request result returned by the server; and determining the request result as first data corresponding to the interface to be debugged.
After the first data is determined, the first data needs to be judged, and whether the first data needs to be modified is judged. According to the method and the device, the first data are acquired locally, the technical means that the first data are modified locally are adopted, the technical defects that the server needs to be updated and the first data cannot be modified flexibly when the first data are modified are avoided, the first data to be debugged can be modified efficiently and flexibly, the server does not need to be updated, and the technical effect of improving the efficiency is achieved.
Specifically, modifying the first data to generate second data, and using the second data as new first data includes:
clicking a suspension button for modifying first data to generate a modified popup window corresponding to the first data; wherein modifying the elements in the popup comprises: the method comprises the following steps that an interface name, a request parameter corresponding to the interface name and a return parameter corresponding to the interface name are obtained;
modifying at least one element in the modification popup;
and determining the modified result as first data, and taking the second data as new first data.
For example, in the process of application development, if the error code needs to be checked, only the contents of the locally configured JSON file need to be modified, and the expected error code can be easily observed. The process of network request to the server is omitted, and the efficiency of application development is improved.
The technical means of modifying the first data by utilizing the modification popup is utilized, so that the modification process is simpler and more transparent, the same effect can be realized by directly modifying the local code conveniently, only different implementation modes exist, the technical defects that a person debugging and applying the application may not know the code and the code cannot be directly modified are avoided, and the technical effects of improving the modification efficiency and the debugging efficiency are further achieved.
The floating button and the modification popup window can not open the function of modifying data to a user when the application is formally on-line.
Optionally, before obtaining the first data corresponding to the interface to be debugged from the local file, the method includes:
configuring a configuration file corresponding to each interface to be debugged corresponding to the application in a local mode;
associating the interface to be debugged with the file name of the configuration file to generate an association result;
generating a local file according to the configuration file and the association result;
and the storage form of the local file is JSON.
If the first data needs to be modified, the local file can be directly modified. Moreover, the annotation explanation can be added in the local file, so that the technical defects that the complete data structure returned by the server cannot be determined and the maintainability is poor in the prior art are solved when the data structure is conveniently checked subsequently.
Optionally, before obtaining the first data corresponding to the interface to be debugged from the local file, the method further includes:
packaging the network request corresponding to the interface to be debugged to generate a packaging file;
and configuring the interface name and the entry parameter of the interface to be debugged as dynamic replacement in the package file.
The following describes the execution logic of the code corresponding to the interface of the present application in detail with a specific embodiment.
Fig. 2 is a schematic diagram of execution logic of interface-corresponding code according to an embodiment of the present invention, as shown in fig. 2, including:
step S201, starting an application;
step S202, judging whether the current application is an online formal environment or a test environment; if the environment is an online formal environment, executing step S203, and if the environment is a test environment, executing step S204;
step S203, according to the server request, obtaining a feedback result, and executing step S2010;
step S204, judging whether the mode of acquiring the first data corresponding to the interface is from local; if yes, go to step S205; if not, go to step S206;
step S205, acquiring first data corresponding to the interface from a local file;
step S206, acquiring first data corresponding to the interface from a server;
step S207, judging whether the first data in step S205 or step S206 needs to be modified; if yes, go to step S208; if not, executing step S2010;
s208, clicking a floating button displayed at the upper left corner of the interface and used for modifying first data to generate a modified popup window corresponding to the first data;
step S209, modifying the elements in the first data in the modification popup;
and step S2010, displaying on an interface corresponding to the application.
Fig. 3 is a schematic diagram of main blocks of an apparatus for debugging an interface according to an embodiment of the present invention, and as shown in fig. 3, there is provided an apparatus 300 for debugging an interface, including:
a request receiving module 301, configured to receive a network request of an interface to be debugged;
a first data obtaining module 302, configured to obtain, according to the network request, first data corresponding to the interface to be debugged;
a judging module 303, configured to judge whether the first data needs to be modified;
a first data updating module 304, configured to modify the first data to generate second data if the first data is modified, and use the second data as new first data;
a debugging module 305, configured to debug the interface to be debugged by using the first data if the interface to be debugged is not debugged;
the first data is used for debugging an interface to be debugged.
Fig. 4 illustrates an exemplary system architecture 400 to which the debug interface method or debug interface apparatus of embodiments of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 401, 402, 403. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the debug interface method provided by the embodiment of the present invention is generally executed by the server 405, and accordingly, the debug interface apparatus is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a sending module, an obtaining module, a determining module, and a first processing module. The names of these modules do not form a limitation on the modules themselves in some cases, and for example, the sending module may also be described as a "module sending a picture acquisition request to a connected server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
receiving a network request of an interface to be debugged;
acquiring first data corresponding to the interface to be debugged according to the network request;
judging whether the first data needs to be modified or not;
if so, modifying the first data to generate second data, and taking the second data as new first data;
if not, debugging the interface to be debugged by using the first data;
the first data is used for debugging an interface to be debugged.
According to the technical scheme of the embodiment of the invention, the following beneficial effects can be achieved:
according to the method and the device, the first data are acquired locally, the technical means that the first data are modified locally are adopted, the technical defects that the server needs to be updated and the first data cannot be modified flexibly when the first data are modified are avoided, the first data to be debugged can be modified efficiently and flexibly, the server does not need to be updated, and the technical effect of improving the efficiency is achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A method of debugging an interface, comprising:
receiving a network request of an interface to be debugged;
acquiring first data corresponding to the interface to be debugged according to the network request;
judging whether the first data needs to be modified or not;
if so, modifying the first data to generate second data, and taking the second data as new first data;
if not, debugging the interface to be debugged by using the first data;
the first data is used for debugging an interface to be debugged.
2. The method according to claim 1, wherein obtaining the first data corresponding to the interface to be debugged according to the network request comprises:
judging whether the mode of acquiring the first data corresponding to the interface to be debugged is from the local or not according to the network request;
if so, acquiring first data corresponding to the interface to be debugged from a local file;
if not, sending a request for acquiring the first data to the server; receiving a request result returned by the server; and determining the request result as first data corresponding to the interface to be debugged.
3. The method according to claim 2, wherein before acquiring the first data corresponding to the interface to be debugged from the local file, the method includes:
configuring a configuration file corresponding to each interface to be debugged corresponding to the application in a local mode;
associating the interface to be debugged with the file name of the configuration file to generate an association result;
generating a local file according to the configuration file and the association result;
and the storage form of the local file is JSON.
4. The method according to claim 2, before acquiring the first data corresponding to the interface to be debugged from the local file, further comprising:
packaging the network request corresponding to the interface to be debugged to generate a packaging file;
and configuring the interface name and the entry parameter of the interface to be debugged as dynamic replacement in the package file.
5. The method according to any one of claims 1-4, wherein modifying the first data to generate second data, and using the second data as new first data comprises:
clicking a suspension button for modifying first data to generate a modified popup window corresponding to the first data; wherein modifying the elements in the popup comprises: the method comprises the following steps that an interface name, a request parameter corresponding to the interface name and a return parameter corresponding to the interface name are obtained;
modifying at least one element in the modification popup;
and determining the modified result as first data, and taking the second data as new first data.
6. An apparatus for debugging an interface, comprising:
the request receiving module is used for receiving a network request of an interface to be debugged;
the first data acquisition module is used for acquiring first data corresponding to the interface to be debugged according to the network request;
the judging module is used for judging whether the first data needs to be modified or not;
the first data updating module is used for modifying the first data to generate second data if the first data is the first data, and the second data is used as new first data;
the debugging module is used for debugging the interface to be debugged by utilizing the first data if the interface to be debugged is not debugged;
the first data is used for debugging an interface to be debugged.
7. The apparatus according to claim 6, wherein the first data obtaining module is further configured to determine, according to the network request, whether a manner of obtaining the first data corresponding to the interface to be debugged is to obtain the first data from a local area;
if so, acquiring first data corresponding to the interface to be debugged from a local file;
if not, sending a request for acquiring the first data to the server; receiving a request result returned by the server; and determining the request result as first data corresponding to the interface to be debugged.
8. The apparatus according to claim 7, further comprising a local obtaining module, configured to, before obtaining the first data corresponding to the interface to be debugged from a local file,
configuring a configuration file corresponding to each interface to be debugged corresponding to the application in a local mode;
associating the interface to be debugged with the file name of the configuration file to generate an association result;
generating a local file according to the configuration file and the association result;
and the storage form of the local file is JSON.
9. The apparatus according to claim 8, further comprising an encapsulation module, configured to, before obtaining the first data corresponding to the interface to be debugged from the local file,
packaging the network request corresponding to the interface to be debugged to generate a packaging file;
and configuring the interface name and the entry parameter of the interface to be debugged as dynamic replacement in the package file.
10. The apparatus according to any of claims 5-9, wherein modifying the first data to generate second data, the second data being used as new first data comprises:
clicking a suspension button for modifying first data to generate a modified popup window corresponding to the first data; wherein modifying the elements in the popup comprises: the method comprises the following steps that an interface name, a request parameter corresponding to the interface name and a return parameter corresponding to the interface name are obtained;
modifying at least one element in the modification popup;
and determining the modified result as first data, and taking the second data as new first data.
11. An electronic device that debugs an interface, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN202010278980.7A 2020-04-10 2020-04-10 Method and device for debugging interface Pending CN113515437A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010278980.7A CN113515437A (en) 2020-04-10 2020-04-10 Method and device for debugging interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010278980.7A CN113515437A (en) 2020-04-10 2020-04-10 Method and device for debugging interface

Publications (1)

Publication Number Publication Date
CN113515437A true CN113515437A (en) 2021-10-19

Family

ID=78060567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010278980.7A Pending CN113515437A (en) 2020-04-10 2020-04-10 Method and device for debugging interface

Country Status (1)

Country Link
CN (1) CN113515437A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130194618A1 (en) * 2012-01-31 2013-08-01 Bruce A. Link Method of image processing from multiple scanners
CN103853632A (en) * 2012-12-07 2014-06-11 华为技术有限公司 Snapshot method, service node, master control node and system
CN109788010A (en) * 2017-11-13 2019-05-21 北京京东尚科信息技术有限公司 A kind of method and apparatus of data localization access
CN109992495A (en) * 2017-12-29 2019-07-09 北京京东尚科信息技术有限公司 The method and apparatus of interface testing
CN110489101A (en) * 2019-07-15 2019-11-22 北京字节跳动网络技术有限公司 Interface analogy method, system, medium and electronic equipment
CN110737726A (en) * 2018-07-03 2020-01-31 北京京东尚科信息技术有限公司 method and device for determining test data of interface to be tested
CN110851208A (en) * 2019-11-08 2020-02-28 京东数字科技控股有限公司 Interface parameter and response data modification method and device
WO2020048391A1 (en) * 2018-09-04 2020-03-12 京东数字科技控股有限公司 Methods and apparatuses for deploying and invoking web services based on multi-tenancy technology

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130194618A1 (en) * 2012-01-31 2013-08-01 Bruce A. Link Method of image processing from multiple scanners
CN103853632A (en) * 2012-12-07 2014-06-11 华为技术有限公司 Snapshot method, service node, master control node and system
CN109788010A (en) * 2017-11-13 2019-05-21 北京京东尚科信息技术有限公司 A kind of method and apparatus of data localization access
CN109992495A (en) * 2017-12-29 2019-07-09 北京京东尚科信息技术有限公司 The method and apparatus of interface testing
CN110737726A (en) * 2018-07-03 2020-01-31 北京京东尚科信息技术有限公司 method and device for determining test data of interface to be tested
WO2020048391A1 (en) * 2018-09-04 2020-03-12 京东数字科技控股有限公司 Methods and apparatuses for deploying and invoking web services based on multi-tenancy technology
CN110489101A (en) * 2019-07-15 2019-11-22 北京字节跳动网络技术有限公司 Interface analogy method, system, medium and electronic equipment
CN110851208A (en) * 2019-11-08 2020-02-28 京东数字科技控股有限公司 Interface parameter and response data modification method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
YONGJE LEE.ET AI: "The new real-time debug interface for efficient code reuse attack detection", IEEE, 11 February 2016 (2016-02-11) *
成典勤;江炎军;: "基于OGC Web服务规范的Web GIS研究与实现", 安康师专学报, no. 04, 30 August 2006 (2006-08-30) *
杨立睿;巩宪锋;: "基于ARM&Linux的嵌入式设备远程调试模块设计", 现代电子技术, no. 08, 15 April 2009 (2009-04-15) *

Similar Documents

Publication Publication Date Title
CN110442524B (en) Method and device for testing web service interface with authentication authorization
CN108574604B (en) Test method and device
CN109684188B (en) Test method and device
CN107644075B (en) Method and device for collecting page information
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN110765752B (en) Test question generation method and device, electronic equipment and computer readable storage medium
US10997357B2 (en) User interface navigation management
CN113055391B (en) Method and device for policy configuration conversion during firewall replacement
CN110807535A (en) Construction method and construction device of unified reservation platform and unified reservation platform system
CN112433713A (en) Application program design graph processing method and device
CN111324470A (en) Method and device for generating information
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN107562629B (en) Method and device for testing
CN111026629A (en) Method and device for automatically generating test script
CN111488268A (en) Dispatching method and dispatching device for automatic test
CN111338928A (en) Chrome-based browser testing method and device
CN115454956A (en) Log generation method and device, electronic equipment and storage medium
CN113515437A (en) Method and device for debugging interface
CN113407229B (en) Method and device for generating offline scripts
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN113760727A (en) Interface regression testing method and device
CN112860447B (en) Interaction method and system between different applications
CN112131095A (en) Pressure testing method and device
CN113821430A (en) Multi-service testing method and device
CN113704079A (en) Interface testing method and device based on Protobuf

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