CN110875858A - Application test data capturing method, system, equipment and storage medium - Google Patents

Application test data capturing method, system, equipment and storage medium Download PDF

Info

Publication number
CN110875858A
CN110875858A CN201811014483.5A CN201811014483A CN110875858A CN 110875858 A CN110875858 A CN 110875858A CN 201811014483 A CN201811014483 A CN 201811014483A CN 110875858 A CN110875858 A CN 110875858A
Authority
CN
China
Prior art keywords
network
application
network request
request
parameter
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.)
Granted
Application number
CN201811014483.5A
Other languages
Chinese (zh)
Other versions
CN110875858B (en
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 Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke 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 Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201811014483.5A priority Critical patent/CN110875858B/en
Publication of CN110875858A publication Critical patent/CN110875858A/en
Application granted granted Critical
Publication of CN110875858B publication Critical patent/CN110875858B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/02Capturing of monitoring data
    • H04L43/022Capturing of monitoring data by sampling
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/14Arrangements for monitoring or testing data switching networks using software, i.e. software packages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • 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 invention provides a method, a system, equipment and a storage medium for capturing application test data, wherein the method comprises the following steps: the application end stores the network request function name and the network request parameter of the network request sent by the application end; the application end stores the network return parameters returned by the server and the mapping relation between the network return parameters and the network request; generating and displaying a network request list according to a packet capturing request of a user; and if the network parameter viewing request is received, the application end displays the network request parameters and/or the network return parameters corresponding to the network request selected by the user according to the selection of the user in the network request list. The invention snatchs the test data at the application end, is not influenced by special processing such as data encryption and compression, does not trigger the network response timeout setting of the client end, can successfully complete the packet capturing, and simultaneously can rapidly complete the packet capturing without depending on any external conditions.

Description

Application test data capturing method, system, equipment and storage medium
Technical Field
The invention relates to the technical field of data processing, in particular to an application test data capturing method, system, equipment and storage medium.
Background
In the process of development and test of the mobile phone APP (application), the APP (initiated network request (packet capture for short) needs to be checked and modified to verify whether the APP is normally displayed under various conditions (such as normal data, different types of data, null data, super-large data and the like which are not easy to appear at ordinary times) or not.
The conventional packet capturing method generally comprises the following steps: first, prepare a computer. Second, a bag grabber (e.g., a gaddler) is installed on the computer. And thirdly, the mobile phone and the computer are accessed to the wireless network in the same network segment (or a hotspot sharing software is installed at the computer end, and the mobile phone is connected with the hotspot). Step four, checking the ip address of the computer (if the hot spot shared by the computer is found, checking the ip of the hot spot) step five: the mobile phone system is set, a wireless network is set, a high level is clicked, an agent selects manually, a host name is a computer ip address of a buddy, a port number is a port number of a packet capturing tool, and the general condition is default as follows: 8888. and sixthly, installing the certificate of the packet capturing tool (viewing and modifying https) on the mobile phone. And seventhly, operating the bale plucking tool to perform the desired operation.
The adoption of the packet grabbing mode mainly has the following defects:
(1) if the network data is subjected to special processing such as encryption, compression and the like, the packet capturing work cannot be finished;
(2) the network response timeout time is set for many APPs, generally 10-15 seconds, so that the method prevents the APP from continuously waiting when the server is abnormal, and if corresponding operations are not completed in the time period, for example, data is long, corresponding data needs to be found first, then the data is modified and written back, the APP is disconnected, the modification cannot work, and the operation fails;
(3) the operation is complicated, the dependence condition is too much, and the cost is too high.
Disclosure of Invention
The invention aims to provide a method, a system, equipment and a storage medium for capturing application test data, which are used for capturing the test data at an application end, are not influenced by special processing such as data encryption and compression, do not trigger network response timeout setting of a client and can smoothly complete packet capturing.
The embodiment of the invention provides an application test data capturing method, which comprises the following steps:
the application end stores the network request function name and the network request parameter of the network request sent by the application end;
the application end stores the network return parameters returned by the server and the mapping relation between the network return parameters and the network request;
according to a packet capturing request of a user, an application terminal generates and displays a network request list;
and if the network parameter viewing request is received, the application end displays the network request parameters and/or the network return parameters corresponding to the network request selected by the user according to the selection of the user in the network request list.
Optionally, the method further comprises the following steps:
the application terminal judges whether the application is in a test mode or a release mode;
if the application is in the test mode, the application end displays a packet capturing component button in an application display interface, and if the packet capturing component button clicking operation of a user is received, the application end displays a network request list according to a packet capturing request of the user;
and if the application is in the publishing mode, the application end only displays an application display interface and does not display a packet grabbing component button.
Optionally, the method further comprises the following steps:
if a network return parameter modification request is received, the application end displays a modification interface of the corresponding network return parameter according to the selection of the user in the network request list;
and the application terminal modifies the specific network return parameters according to the input of the user on the modification interface.
Optionally, the method further comprises the following steps:
if a network request parameter modification request is received, the application end displays a modification interface of the corresponding network request parameter according to the selection of the user in the network request list;
the application terminal modifies the specific network request parameters according to the input of the user on the modification interface;
the application terminal sends a network request to the server according to the modified network request parameter and the corresponding network request function;
and the application end receives the network return parameters returned by the server and modifies the corresponding network return parameters.
Optionally, the method further comprises the following steps:
the application end stores a callback function of a network request sent by the application end and a corresponding relation between the callback function and the network request;
and if the network return parameters are updated, the application terminal modifies the display interface of the application according to the updated network return parameters and the corresponding callback functions.
The embodiment of the invention also provides an application test data capturing system, which is applied to the application test data capturing method, the system is arranged at an application end, and the system comprises:
the data storage module is used for storing the network request function name and the network request parameter of the network request sent by the application, and storing the network return parameter returned by the server and the mapping relation between the network return parameter and the network request;
the list display module is used for generating and displaying a network request list according to the packet capturing request of the user;
and the parameter viewing module is used for displaying the network request parameters and/or the network return parameters corresponding to the network requests selected by the user according to the selection of the user in the network request list when the network parameter viewing request is received.
Optionally, the method further comprises:
and the mode judging module is used for judging whether the application is in a test mode or a release mode, if the application is in the test mode, a packet capturing component button is displayed in an application display interface, if the packet capturing component button clicking operation of a user is received, the network request list is displayed by the request list display module, and if the application is in the release mode, only the application display interface is displayed, but the packet capturing component button is not displayed.
Optionally, the method further comprises:
the parameter modification module is used for displaying a modification interface of the corresponding network return parameter according to the selection of the user in the network request list when receiving the network return parameter modification request, and modifying the specific network return parameter according to the input of the user in the modification interface;
and the parameter access modification module is used for displaying a modification interface of the corresponding network request parameter according to the selection of the user in the network request list when receiving the network request parameter modification request, modifying the specific network request parameter according to the input of the user in the modification interface, sending the network request to the server according to the modified network request parameter and the corresponding network request function, receiving the network return parameter returned by the server and modifying the corresponding network return parameter.
Optionally, the storage module is further configured to store a callback function of a network request sent by an application and a corresponding relationship between the callback function and the network request;
the system further comprises:
and the parameter-output callback module is used for modifying the display interface of the application according to the updated network return parameters and the corresponding callback functions if the network return parameters are updated.
Optionally, the system is integrated into an application of the data to be grabbed, or the system is packaged as a plug-in and provides an external call interface allowing the application of the data to be grabbed to call.
An embodiment of the present invention further provides an application test data capturing device, including:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the application test data crawling method via execution of the executable instructions.
The embodiment of the invention also provides a computer-readable storage medium for storing a program, and the program realizes the steps of the application test data capture method when being executed.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
The application test data capture method, system, device and storage medium provided by the invention have the following advantages:
the invention snatchs the test data at the application end, is not influenced by special processing such as data encryption and compression, does not trigger the network response timeout setting of the client end, can smoothly complete the packet grabbing, does not depend on any external condition, rapidly completes the packet grabbing, has simple and convenient operation, is convenient for users to use, and reduces the packet grabbing cost.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, with reference to the accompanying drawings.
FIG. 1 is a flow chart of a method for capturing application test data according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for capturing application test data according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an application test data capture system according to an embodiment of the present invention;
FIG. 4 is a block diagram of an application test data capture system according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an application test data capture device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
As shown in fig. 1, an embodiment of the present invention provides an application test data capture method, where the method includes the following steps:
s100: the application end stores the network request function name and the network request parameter of the network request sent by the application end;
s200: the application end stores the network return parameters returned by the server and the mapping relation between the network return parameters and the network request;
s300: according to a packet capturing request of a user, an application terminal generates and displays a network request list;
s400: and if the network parameter viewing request is received, the application end displays the network request parameters and/or the network return parameters corresponding to the network request selected by the user according to the selection of the user in the network request list.
The above sequence numbers are only used for identifying and distinguishing the steps, but are not used as the execution sequence of the steps, and the execution sequence between the steps is not limited to the one shown in fig. 1. In practical applications, the execution sequence of each step can be selected according to requirements. For example, when an application initiates a new network request, the corresponding request function name and request parameter are stored, and when a network return parameter returned by a server response is received, the corresponding request function name and request parameter are stored, and when a packet capturing request of a user is received, a network request list is generated according to the current latest network request function name, network request parameter and network return data.
The network request list may include network request IDs, network request functions corresponding to the network request IDs, and network request parameters corresponding to the network request IDs, displaying the network request functions may facilitate a user to select a desired interface for operation, displaying the network request parameters may facilitate a user to quickly view the network request functions and the network request parameters, and displaying the network request parameters may help a user to quickly find a network request that the user wants to operate because different data may be returned due to different network request parameters. However, the present invention is not limited thereto, and in practical applications, the network request list may include other formats, such as only network request ID and network request function, etc., all of which are within the protection scope of the present invention.
The application test data capturing method provided by the invention directly captures test data at the application end, is not influenced by special processing such as data encryption and compression, does not trigger network response timeout setting of the client end, can smoothly complete packet capturing, and simultaneously can rapidly complete packet capturing without depending on any external condition.
In this embodiment, the method for capturing application test data further includes the following steps:
the application terminal judges whether the application is in a test mode (debug mode) or a release mode (release mode), the test mode refers to an application mode for testing by developers, a compiler can record debugging information to facilitate the testing of the developers, and the release mode is a mode for normal use of the application by users;
if the application is in the test mode, the application end displays a packet capturing component button in an application display interface, and if the packet capturing component button clicking operation of a user is received, the application end displays a network request list according to a packet capturing request of the user;
if the application is in the release mode, the application end only displays an application display interface, does not display a packet capturing component button, and is not allowed to execute packet capturing operation, namely normal use of a user cannot be influenced.
Further, in this embodiment, a service for modifying a network return parameter is also provided, and specifically, the application test data capture method further includes the following steps:
if a network return parameter modification request is received, the application end displays a modification interface of the corresponding network return parameter according to the selection of the user in the network request list;
and the application terminal modifies the specific network return parameters according to the input of the user on the modification interface.
Further, in this embodiment, a service for modifying a network request parameter is also provided, and specifically, in this embodiment, the application test data capture method further includes the following steps:
if a network request parameter modification request is received, the application end displays a modification interface of the corresponding network request parameter according to the selection of the user in the network request list;
the application terminal modifies the specific network request parameters according to the input of the user on the modification interface;
the application terminal sends a network request to the server according to the modified network request parameter and the corresponding network request function;
and the application end receives the network return parameters returned by the server and modifies the corresponding network return parameters.
In this embodiment, after the network return parameter is modified, the display interface of the application may be further modified according to the callback function, and specifically, the application test data capture method further includes the following steps:
the application end stores a callback function of a network request sent by an application and a corresponding relation between the callback function and the network request;
and if the network return parameters are updated, the application terminal modifies the display interface of the application according to the updated network return parameters and the corresponding callback functions.
Fig. 2 is a flowchart of an application test data capture method according to an embodiment of the present invention. It is understood that the flow of the test data capture method is only an example and is not intended to limit the scope of the present invention. In this document and in the drawings, the references each represent a network request parameter and the references each represent a network return parameter.
The application test data capture method of the embodiment comprises the following steps:
s1: starting an application;
s2: after the network connection is generated, a network request is generated;
s3: judging whether the application is currently in a test mode or a release mode, if the application is in the test mode, continuing to the step S4, and if the application is in the release mode, continuing to the step S5;
s4: displaying a grab component button and then proceeding to steps S5 and S7;
s5: normally displaying an application interface;
s6: storing the name of the network request function, the network request parameter, the network return parameter and the callback function into a data group in the capturing component;
s7: a user clicks on the component;
s8: acquiring user data, namely operation data of a user in a network request list;
s9: judging the type of the user selection request, if the user selects to view the data, continuing to the step S10, if the user selects to modify the network return parameters, continuing to the step S11, if the user selects to modify the network request parameters, continuing to the step S12;
s10: if the user clicks the view parameter button, the user jumps to a new page to view the network request parameter or the network return parameter of the network, if the network return parameter is too long, the user can slide up and down to view the content, and two buttons can be arranged on the page:
closing the button: clicking to close the current page, and returning to a network request list page;
copy button: the network return parameters are clicked and copied, so that a user can conveniently format the network return parameters through a formatting tool, and specific contents to be checked can be searched more quickly and conveniently;
if the user has finished using the bale plucking assembly, step S13 may be performed: the bale plucking assembly is closed.
S11: if the user clicks a button for modifying the network return parameter, the user jumps to a new page after clicking, the page is provided with an input box, the network return parameter of the current network request parameter is input by default, the user can directly edit the network return parameter by clicking, and the page is provided with three buttons:
closing the button: clicking to close the current page, and returning to a network request list page;
copying: clicking and copying the network return parameters to facilitate the user to format the network for parameter output through a formatting tool, and putting the new network return parameters into an input box through pasting operation after editing;
determining: after the user clicks, step S14 is executed: and the application updates the new network return parameters to the display interface of the application through the callback function.
If the user has finished using the bale plucking assembly, step S15 may be performed: closing the bale grabbing component;
then, step S16 is executed: displaying the application display interface after the parameters are modified;
if the user finishes using the application, step S18 may be performed: the application is closed.
S12: if the user clicks a button for modifying the network request parameter, the user jumps to a new page after clicking, an input box is arranged in the page, the current network request parameter is input by default, the user can directly edit the current network request parameter by clicking, and the page can be provided with three buttons:
closing: clicking to close the current page, and returning to a network request list page;
copying: clicking and copying the network request parameters, so that a user can conveniently format the network request parameters through a formatting tool, and putting new network request parameters into an input box through pasting operation after editing;
determining: after the user clicks, step S17 is executed: the application re-initiates the network request using the new network request parameters, and performs step S14 after the request is successful.
Therefore, in the test mode, the application test data capture method of the embodiment, by initiating the network request by the application and storing the name of the network request function, the network request parameter, the network return parameter, the callback function and other related information, facilitates the packet capture debugging application, facilitates the user operation, improves the packet capture efficiency, and reduces the packet capture cost.
As shown in fig. 3, an embodiment of the present invention further provides an application test data capture system, which is applied to the application test data capture method, and the system is disposed at an application end, and the system includes:
the data storage module M10 is configured to store a network request function name and a network request parameter of a network request sent by an application, and store a network return parameter returned by the server and a mapping relationship between the network return parameter and the network request;
the list display module M20 is used for generating and displaying a network request list according to the packet capturing request of the user;
and the parameter viewing module M30 is configured to, when receiving the network parameter viewing request, display the network request parameter and/or the network return parameter corresponding to the network request selected by the user according to the selection of the user in the network request list.
The application test data capturing system provided by the invention directly captures test data at the application end, is not influenced by special processing such as data encryption and compression, does not trigger network response timeout setting of the client end, can smoothly complete packet capturing, and simultaneously can rapidly complete packet capturing without depending on any external condition.
In this embodiment, the application test data capture system further includes a mode determination module M40, configured to determine whether the application is in the test mode or the release mode, if the application is in the test mode, display a capture component button in the application display interface, if a user click operation of the capture component button is received, display the network request list by the request list display module, and if the application is in the release mode, display only the application display interface without displaying the capture component button, without affecting normal use of the user.
In this embodiment, the application test data capture system further provides a function of modifying parameters, and specifically, the system further includes:
a parameter modification module M50, configured to, when receiving a network return parameter modification request, display a modification interface of a corresponding network return parameter according to a selection of a user in the network request list, and modify a specific network return parameter according to an input of the user in the modification interface;
and the access parameter modification module M60 is configured to, when receiving a network request parameter modification request, display a modification interface for a corresponding network request parameter according to a selection of a user in the network request list, modify a specific network request parameter according to an input of the user in the modification interface, send a network request to the server according to the modified network request parameter and the corresponding network request function, receive a network return parameter returned by the server, and modify the corresponding network return parameter.
In this embodiment, the storage module is further configured to store a callback function of a network request sent by an application and a correspondence between the callback function and the network request;
the system further comprises a call-out and call-back module M70, configured to modify the display interface of the application according to the updated network return parameter and the corresponding call-back function if the network return parameter is updated.
In this embodiment, the system may be directly integrated into an application of data to be captured, and in the test process, the corresponding data capture function may be directly implemented by the application test data capture system. When the application of the data to be grabbed is not integrated with the application test data grabbing system, the system can be packaged into a plug-in module, and an external calling interface allowing the application of the data to be grabbed to call is provided. And when the application of the data to be captured tests, accessing the external calling interface of the plug-in to realize the data capturing function of the application test data capturing system.
The embodiment of the invention also provides application test data capturing equipment, which comprises a processor; a memory having stored therein executable instructions of the processor; wherein the processor is configured to perform the steps of the application test data crawling method via execution of the executable instructions.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" platform.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 5. The electronic device 600 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 electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one memory unit 620, a bus 630 connecting the different platform components (including the memory unit 620 and the processing unit 610), a display unit 640, etc.
Wherein the storage unit stores program code executable by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present invention described in the above-mentioned electronic prescription flow processing method section of the present specification. For example, the processing unit 610 may perform the steps as shown in fig. 1.
Therefore, when the processor of the application test data capture device executes the program codes in the storage unit, the application can initiate the network request and simultaneously store the name of the network request function, the network request parameter, the network return parameter, the callback function and other related information, so that the packet capture debugging application is facilitated, the user operation is facilitated, the packet capture efficiency is improved, and the packet capture cost is reduced.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, to name a few.
The embodiment of the invention also provides a computer-readable storage medium for storing a program, and the program realizes the steps of the application test data capture method when being executed. In some possible embodiments, aspects of the present invention may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above-mentioned electronic prescription flow processing method section of this specification, when the program product is run on the terminal device.
Referring to fig. 6, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a 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.
Therefore, when the program code in the computer storage medium of the embodiment is executed, the application can initiate the network request and simultaneously store the name of the network request function, the network request parameter, the network return parameter, the callback function and other related information, so that the packet capturing debugging application is facilitated, the user operation is facilitated, the packet capturing efficiency is improved, and the packet capturing cost is reduced.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may 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 (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with 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 readable storage medium may also be any readable medium that is not a 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 readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The application test data capture method, system, device and storage medium provided by the invention have the following advantages:
the invention snatchs the test data at the application end, is not influenced by special processing such as data encryption and compression, does not trigger the network response timeout setting of the client end, can smoothly complete the packet grabbing, does not depend on any external condition, rapidly completes the packet grabbing, has simple and convenient operation, is convenient for users to use, and reduces the packet grabbing cost.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (12)

1. An application test data capture method is characterized by comprising the following steps:
the application end stores the network request function name and the network request parameter of the network request sent by the application end;
the application end stores the network return parameters returned by the server and the mapping relation between the network return parameters and the network request;
according to a packet capturing request of a user, an application terminal generates and displays a network request list;
and if the network parameter viewing request is received, the application end displays the network request parameters and/or the network return parameters corresponding to the network request selected by the user according to the selection of the user in the network request list.
2. The application test data crawling method according to claim 1, further comprising the steps of:
the application terminal judges whether the application is in a test mode or a release mode;
if the application is in the test mode, the application end displays a packet capturing component button in an application display interface, and if the packet capturing component button clicking operation of a user is received, the application end displays a network request list according to a packet capturing request of the user;
and if the application is in the publishing mode, the application end only displays an application display interface and does not display a packet grabbing component button.
3. The application test data crawling method according to claim 1, further comprising the steps of:
if a network return parameter modification request is received, the application end displays a modification interface of the corresponding network return parameter according to the selection of the user in the network request list;
and the application terminal modifies the specific network return parameters according to the input of the user on the modification interface.
4. The application test data crawling method according to claim 1, further comprising the steps of:
if a network request parameter modification request is received, the application end displays a modification interface of the corresponding network request parameter according to the selection of the user in the network request list;
the application terminal modifies the specific network request parameters according to the input of the user on the modification interface;
the application terminal sends a network request to the server according to the modified network request parameter and the corresponding network request function;
and the application end receives the network return parameters returned by the server and modifies the corresponding network return parameters.
5. The application test data capture method of claim 3 or 4, further comprising the steps of:
the application end stores a callback function of a network request sent by the application end and a corresponding relation between the callback function and the network request;
and if the network return parameters are updated, the application terminal modifies the display interface of the application according to the updated network return parameters and the corresponding callback functions.
6. An application test data capture system applied to the application test data capture method of any one of claims 1 to 5, the system being provided at an application end, the system comprising:
the data storage module is used for storing the network request function name and the network request parameter of the network request sent by the data storage module, and storing the network return parameter returned by the server and the mapping relation between the network return parameter and the network request;
the list display module is used for generating and displaying a network request list according to the packet capturing request of the user;
and the parameter viewing module is used for displaying the network request parameters and/or the network return parameters corresponding to the network requests selected by the user according to the selection of the user in the network request list when the network parameter viewing request is received.
7. The application test data capture system of claim 6, further comprising:
and the mode judging module is used for judging whether the application is in a test mode or a release mode, if the application is in the test mode, a packet capturing component button is displayed in an application display interface, if the packet capturing component button clicking operation of a user is received, the network request list is displayed by the request list display module, and if the application is in the release mode, only the application display interface is displayed, but the packet capturing component button is not displayed.
8. The application test data capture system of claim 6, further comprising:
the parameter modification module is used for displaying a modification interface of the corresponding network return parameter according to the selection of the user in the network request list when receiving the network return parameter modification request, and modifying the specific network return parameter according to the input of the user in the modification interface;
and the parameter access modification module is used for displaying a modification interface of the corresponding network request parameter according to the selection of the user in the network request list when receiving the network request parameter modification request, modifying the specific network request parameter according to the input of the user in the modification interface, sending the network request to the server according to the modified network request parameter and the corresponding network request function, receiving the network return parameter returned by the server and modifying the corresponding network return parameter.
9. The application test data capture system of claim 8, wherein the storage module is further configured to store a callback function of a network request issued by an application and a correspondence between the callback function and the network request;
the system further comprises:
and the parameter-output callback module is used for modifying the display interface of the application according to the updated network return parameters and the corresponding callback functions if the network return parameters are updated.
10. The application test data crawling system according to claim 6, wherein the system is integrated into the application for crawling data, or the system is packaged as a plug-in and provides an external call interface allowing application calls for crawling data.
11. An application test data capture device, comprising:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the application test data crawling method of any of claims 1 to 5 via execution of the executable instructions.
12. A computer readable storage medium storing a program which when executed performs the steps of the application test data capture method of any of claims 1 to 5.
CN201811014483.5A 2018-08-31 2018-08-31 Application test data grabbing method, system, equipment and storage medium Active CN110875858B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811014483.5A CN110875858B (en) 2018-08-31 2018-08-31 Application test data grabbing method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811014483.5A CN110875858B (en) 2018-08-31 2018-08-31 Application test data grabbing method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110875858A true CN110875858A (en) 2020-03-10
CN110875858B CN110875858B (en) 2023-06-27

Family

ID=69715524

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811014483.5A Active CN110875858B (en) 2018-08-31 2018-08-31 Application test data grabbing method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110875858B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111937366A (en) * 2020-04-09 2020-11-13 焦旭 Web request processing method and device
CN111970678A (en) * 2020-08-06 2020-11-20 Oppo(重庆)智能科技有限公司 Method and device for grabbing air interface data packet, electronic equipment and storage medium
CN113448839A (en) * 2020-12-24 2021-09-28 北京新氧科技有限公司 Application program testing method, device, equipment and storage medium
CN114650168A (en) * 2022-02-14 2022-06-21 麒麟软件有限公司 Application program security testing method
CN115002203A (en) * 2021-03-02 2022-09-02 京东科技信息技术有限公司 Data packet capturing method, device, equipment and computer readable medium
CN115065627A (en) * 2022-05-20 2022-09-16 北京奇艺世纪科技有限公司 Parameter modification method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105119783A (en) * 2015-09-30 2015-12-02 北京奇艺世纪科技有限公司 Network request data detection method and device
CN105302706A (en) * 2014-06-05 2016-02-03 腾讯科技(深圳)有限公司 Application test method and apparatus
CN106502906A (en) * 2016-10-27 2017-03-15 广州华多网络科技有限公司 A kind of method and apparatus of test application program
CN106681923A (en) * 2016-12-29 2017-05-17 广州华多网络科技有限公司 Software evaluation method and device
CN107294808A (en) * 2017-07-05 2017-10-24 网易(杭州)网络有限公司 The methods, devices and systems of interface testing
CN107688530A (en) * 2017-04-06 2018-02-13 平安科技(深圳)有限公司 Method for testing software and device
CN108399119A (en) * 2017-02-06 2018-08-14 腾讯科技(深圳)有限公司 Browse serves kernel engine data processing, automatic test method and apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105302706A (en) * 2014-06-05 2016-02-03 腾讯科技(深圳)有限公司 Application test method and apparatus
CN105119783A (en) * 2015-09-30 2015-12-02 北京奇艺世纪科技有限公司 Network request data detection method and device
CN106502906A (en) * 2016-10-27 2017-03-15 广州华多网络科技有限公司 A kind of method and apparatus of test application program
CN106681923A (en) * 2016-12-29 2017-05-17 广州华多网络科技有限公司 Software evaluation method and device
CN108399119A (en) * 2017-02-06 2018-08-14 腾讯科技(深圳)有限公司 Browse serves kernel engine data processing, automatic test method and apparatus
CN107688530A (en) * 2017-04-06 2018-02-13 平安科技(深圳)有限公司 Method for testing software and device
CN107294808A (en) * 2017-07-05 2017-10-24 网易(杭州)网络有限公司 The methods, devices and systems of interface testing

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111937366A (en) * 2020-04-09 2020-11-13 焦旭 Web request processing method and device
CN111970678A (en) * 2020-08-06 2020-11-20 Oppo(重庆)智能科技有限公司 Method and device for grabbing air interface data packet, electronic equipment and storage medium
CN111970678B (en) * 2020-08-06 2023-04-28 Oppo(重庆)智能科技有限公司 Method and device for capturing air interface data packet, electronic equipment and storage medium
CN113448839A (en) * 2020-12-24 2021-09-28 北京新氧科技有限公司 Application program testing method, device, equipment and storage medium
CN113448839B (en) * 2020-12-24 2024-01-26 北京新氧科技有限公司 Application program testing method, device, equipment and storage medium
CN115002203A (en) * 2021-03-02 2022-09-02 京东科技信息技术有限公司 Data packet capturing method, device, equipment and computer readable medium
CN114650168A (en) * 2022-02-14 2022-06-21 麒麟软件有限公司 Application program security testing method
CN115065627A (en) * 2022-05-20 2022-09-16 北京奇艺世纪科技有限公司 Parameter modification method and device, electronic equipment and storage medium
CN115065627B (en) * 2022-05-20 2024-04-12 北京奇艺世纪科技有限公司 Parameter modification method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110875858B (en) 2023-06-27

Similar Documents

Publication Publication Date Title
CN110875858B (en) Application test data grabbing method, system, equipment and storage medium
CN106708557B (en) Update processing method and device for terminal application
US9367403B2 (en) Terminal and application restoring method
US10101994B2 (en) Associating a visualization of user interface with source code
CN109783345B (en) Method and system for testing small program performance
CN111274154A (en) Automatic testing method, device, equipment and storage medium
CN111563257B (en) Data detection method and device, computer readable medium and terminal equipment
CN107644075B (en) Method and device for collecting page information
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
CN113360144B (en) Auxiliary processing method, device, storage medium and program product for software development
CN109032911B (en) Frame rate detection method and device for mobile device and electronic device
US11288170B1 (en) Log analysis debugging without running on real production environment
CN109522174B (en) Method, device, terminal and storage medium for controlling adb enabling
CN110825370B (en) Mobile terminal application development method, device and system
CN111782474A (en) Log processing method and device, electronic equipment and medium
CN112052054A (en) Function calling method and device, electronic equipment and storage medium
CN113296912A (en) Task processing method, device and system, storage medium and electronic equipment
CN113760631A (en) Page loading duration determination method, device, equipment and storage medium
CN110647331A (en) Development tool acquisition method and device, storage medium and electronic equipment
CN113608996B (en) Mirror image compiling test method, system, device and readable storage medium
JP2013167971A (en) Portable terminal device, recovery support method and program
CN111583351B (en) Picture generation method and device
CN111506567B (en) Cross-database cleaning method and device for data, computer equipment and medium
CN114117434A (en) Detection method and device

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
GR01 Patent grant
GR01 Patent grant