CN111444070B - Interface interaction data processing method and user terminal - Google Patents

Interface interaction data processing method and user terminal Download PDF

Info

Publication number
CN111444070B
CN111444070B CN202010175810.6A CN202010175810A CN111444070B CN 111444070 B CN111444070 B CN 111444070B CN 202010175810 A CN202010175810 A CN 202010175810A CN 111444070 B CN111444070 B CN 111444070B
Authority
CN
China
Prior art keywords
page
interaction data
interface
interface interaction
jumping
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.)
Active
Application number
CN202010175810.6A
Other languages
Chinese (zh)
Other versions
CN111444070A (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.)
Zhejiang Dasou Vehicle Software Technology Co Ltd
Original Assignee
Zhejiang Dasou Vehicle Software 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 Zhejiang Dasou Vehicle Software Technology Co Ltd filed Critical Zhejiang Dasou Vehicle Software Technology Co Ltd
Priority to CN202010175810.6A priority Critical patent/CN111444070B/en
Publication of CN111444070A publication Critical patent/CN111444070A/en
Application granted granted Critical
Publication of CN111444070B publication Critical patent/CN111444070B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Abstract

The application relates to an interface interaction data processing method and a user terminal. The interface interaction data processing method comprises the following steps: recording first interface interaction data generated in the process of jumping from a first page to a second page in response to a jumping operation executed on the first page of the front end, wherein the first interface interaction data comprises interface request data generated by the front end and interface response data of the back end responding to the interface request data; and responding to the current page interface interaction data viewing operation executed on the second page, jumping from the second page to the third page, and displaying the first interface interaction data in the third page. The application solves the problem of complex configuration of interface debugging by the packet grabbing technology and simplifies the configuration of interface debugging.

Description

Interface interaction data processing method and user terminal
Technical Field
The present application relates to the field of interface debugging and testing, and in particular, to an interface interaction data processing method and a user terminal.
Background
In the prior art, before the APP is on line, the APP is debugged in a test environment, and the most important content in the debugging is to ensure that the function of each interface is normal, namely, the request sent by the APP to the server through the interface and the data returned by the server through the interface are normal.
In order to realize interface debugging, in the prior art, a request message and a response message are acquired through a packet capturing technology, and whether an abnormality exists is judged through analysis of the content of the message. However, the following problems were found during the study with the packet-grabbing process: in the packet grabbing process, for the debugging of each interface, the server IP address, port number and packet grabbing tool are required to be manually configured; if the network request message is an HTTPS network request message, a corresponding certificate is required to be configured, so that the interface debugging process is very complex.
Disclosure of Invention
The embodiment of the application provides an interface interaction data processing method and a user terminal, which are used for at least solving the problem of complex configuration of interface debugging through a packet grabbing technology in the related technology.
In a first aspect, an embodiment of the present application provides an interface interaction data processing method, including: recording first interface interaction data generated in the process of jumping from a first page to a second page in response to a jumping operation executed on the first page of the front end, wherein the first interface interaction data comprises interface request data generated by the front end and interface response data of the back end responding to the interface request data; and responding to the current page interface interaction data viewing operation executed on the second page, jumping from the second page to a third page, and displaying the first interface interaction data in the third page.
In some of these embodiments, before recording first interface interaction data generated in a process of jumping from a first page to a second page in response to a jumping operation performed on the first page of the front end, the method further includes: recording second interface interaction data generated in the process of jumping from the fourth page to the first page in response to a jumping operation executed on the fourth page of the front end, wherein the second interface interaction data comprises interface request data generated by the front end and interface response data of the back end responding to the interface request data; after jumping from the second page to a third page in response to a current page interface interaction data viewing operation performed on the second page and presenting the first interface interaction data in the third page, the method further comprises: and responding to the previous page interface interaction data viewing operation executed on the third page, jumping from the third page to a fifth page, and displaying the second interface interaction data in the fifth page.
In some of these embodiments, the first interface interaction data presented in the third page is presented in a list based on an interface identification.
In some of these embodiments, after jumping from the second page to a third page in response to a current page interface interaction data viewing operation performed on the second page and presenting the first interface interaction data in the third page, the method further comprises: and in response to a request operation for the first interface interaction data in the list, jumping from the third page to a sixth page, and displaying details of the first interface interaction data in the sixth page.
In some of these embodiments, after recording first interface interaction data generated during a jump from a first page to a second page of a front end in response to a jump operation performed on the first page, the method further comprises: recording third interface interaction data generated in the process of refreshing the first page in response to a page refreshing operation executed on the first page, wherein the third interface interaction data comprises interface request data generated by the front end and interface response data of the back end responding to the interface request data; and updating the first interface interaction data into the third interface interaction data.
In some of these embodiments, the method further comprises: the method for realizing the interface interaction data of the enabling record comprises the steps of exposing an operation button for receiving the current page interface interaction data viewing operation on a page at the front end.
In some embodiments, the implementation method for enabling recording interface interaction data and exposing an operation button for receiving a current page interface interaction data viewing operation on a page at the front end includes: detecting an operating environment of the front end, wherein the operating environment comprises one of: testing environment, pre-release environment and online environment; enabling a recording interface interaction data realization method under the condition that the running environment of the front end is detected to be a test environment or an upper line environment, and exposing an operation button for receiving the current page interface interaction data viewing operation on a page of the front end; and under the condition that the running environment of the front end is detected to be an upper line environment, disabling an implementation method for recording interactive data of the interface and hiding the operation buttons.
In some of these embodiments, the operation button is displayed superimposed on the upper page layer of the front end, and is movable on the upper page layer of the front end in accordance with a drag operation on the operation button.
In some of these embodiments, before recording first interface interaction data generated in a process of jumping from a first page to a second page in response to a jumping operation performed on the first page of the front end, the method further includes: and acquiring a software development kit and integrating the software development kit into the front end, wherein the software development kit comprises an implementation method for implementing the interface interaction data processing method.
In a second aspect, an embodiment of the present application provides a user terminal, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the interface interaction data processing method according to the first aspect when executing the computer program.
Compared with the related art, the interface interaction data processing method and the user terminal provided by the embodiment of the application record the first interface interaction data generated in the process of jumping from the first page to the second page by responding to the jumping operation executed on the first page of the front end, wherein the first interface interaction data comprises interface request data generated by the front end and interface response data of the back end responding to the interface request data; responding to the current page interface interaction data viewing operation executed on the second page, jumping from the second page to the third page and displaying the first interface interaction data in the third page, the problem of complex configuration of interface debugging through a packet grabbing technology is solved, and the configuration of interface debugging is simplified.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the other features, objects, and advantages of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings required for the description of the embodiments will be briefly described, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
Fig. 1 is a block diagram of a user terminal according to an embodiment of the present application;
FIG. 2 is a flow chart of an interface interaction data processing method according to an embodiment of the present application;
FIG. 3a is a schematic diagram of recording interface interaction data according to an embodiment of the present application;
FIG. 3b is a second schematic diagram of recording interface interaction data according to an embodiment of the present application;
FIG. 4 is a preferred flow chart of an interface interaction data processing method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a display interface of a user terminal after clicking on an entry of an SDK recording page according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a display interface of the user terminal after clicking on "previous page data" according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a display interface of a user terminal after clicking a record according to an embodiment of the present application;
fig. 8 is a second schematic diagram of a display interface of the user terminal after clicking a record according to an embodiment of the present application.
Detailed Description
The present application will be described and illustrated with reference to the accompanying drawings and examples in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by a person of ordinary skill in the art based on the embodiments provided by the present application without making any inventive effort, are intended to fall within the scope of the present application.
It is apparent that the drawings in the following description are only some examples or embodiments of the present application, and it is possible for those of ordinary skill in the art to apply the present application to other similar situations according to these drawings without inventive effort. Moreover, it should be appreciated that while such a development effort might be complex and lengthy, it would nevertheless be a routine undertaking of design, fabrication, or manufacture for those of ordinary skill having the benefit of this disclosure, and thus should not be construed as having the benefit of this disclosure.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly and implicitly understood by those of ordinary skill in the art that the described embodiments of the application can be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," and similar referents in the context of the application are not to be construed as limiting the quantity, but rather as singular or plural. The terms "comprising," "including," "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in connection with the present application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein means two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., "a and/or B" may mean: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship. The terms "first," "second," "third," and the like, as used herein, are merely distinguishing between similar objects and not representing a particular ordering of objects.
The embodiment provides a user terminal. Fig. 1 is a block diagram of a user terminal according to an embodiment of the present application. As shown in fig. 1, the user terminal may include: radio Frequency (RF) circuit 110, memory 120, input unit 130, display unit 140, sensor 150, audio circuit 160, wireless fidelity (Wireless Fidelity, wiFi) module 170, processor 180, and power supply 190. It will be appreciated by those skilled in the art that the user terminal structure shown in fig. 1 is not limiting of the user terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the user terminal in detail with reference to fig. 1:
the RF circuit 110 may be used for receiving and transmitting signals during the process of receiving and transmitting information or communication, specifically, after receiving downlink information of the base station, the downlink information is processed by the processor 180; in addition, the data of the design uplink is sent to the base station. Typically, RF circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, simply referred to as an LNA), a duplexer, and the like. In addition, the RF circuit 10 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to global system for mobile communications (Global System of Mobile communication, abbreviated GSM), general packet radio service (General Packet Radio Service, abbreviated GPRS), code division multiple access (Code Division Multiple Access, abbreviated CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, abbreviated WCDMA), long term evolution (Long Term Evolution, abbreviated LTE), email, short message service (Short Messaging Service, abbreviated SMS), and the like.
The memory 120 may be used to store software programs and modules, and the processor 180 performs various functional applications of the user terminal and data processing by running the software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the user terminal, etc. In addition, memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 130 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the user terminal 100. In particular, the input unit 130 may include a touch panel 131 and other input devices 132. The touch panel 131, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 131 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch panel 131 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 180, and can receive commands from the processor 180 and execute them. In addition, the touch panel 131 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 130 may include other input devices 132 in addition to the touch panel 131. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 140 may be used to display information input by a user or information provided to the user and various menus of the user terminal. The display unit 140 may include a display panel 141, and alternatively, the display panel 141 may be configured in the form of a liquid crystal display (Liquid Crystal Display, abbreviated as LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 131 may cover the display panel 141, and when the touch panel 131 detects a touch operation thereon or thereabout, the touch panel is transferred to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although in fig. 1, the touch panel 131 and the display panel 141 implement the input and output functions of the user terminal as two separate components, in some embodiments, the touch panel 131 and the display panel 141 may be integrated to implement the input and output functions of the user terminal.
The user terminal 100 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 141 and/or the backlight when the user terminal moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for identifying the application of the gesture of the user terminal (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration identification related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured by the user terminal are not described in detail herein.
Audio circuitry 160, a speaker 161, and a microphone 162 may provide an audio interface between the user and the user terminal. The audio circuit 160 may transmit the received electrical signal converted from audio data to the speaker 161, and the electrical signal is converted into a sound signal by the speaker 161 to be output; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, receives the electrical signal from the audio circuit 160, converts the electrical signal into audio data, outputs the audio data to the processor 180 for processing, transmits the audio data to, for example, another user terminal via the RF circuit 110, or outputs the audio data to the memory 120 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and a user terminal can help a user to send and receive emails, browse webpages, access streaming media and the like through the WiFi module 170, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows the WiFi module 170, it is understood that it does not belong to the essential constitution of the user terminal 100, and may be omitted entirely or replaced with other short-range wireless transmission modules, such as a Zigbee module, a WAPI module, or the like, as required within a range not changing the essence of the invention.
The processor 180 is a control center of the user terminal, connects various parts of the entire user terminal using various interfaces and lines, and performs various functions of the user terminal and processes data by running or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the user terminal. Optionally, the processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The user terminal 100 further includes a power supply 190 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 180 via a power management system so as to perform functions such as managing charge, discharge, and power consumption via the power management system.
Although not shown, the user terminal 100 may further include a camera, a bluetooth module, etc., which will not be described herein.
The user terminal 100 provided in this embodiment is used to implement the interface interaction data processing method in the embodiment of the present invention. It should be noted that, the user terminal in this embodiment includes, but is not limited to: and the intelligent mobile phone, the intelligent tablet personal computer, the notebook computer and other user terminals. The interface is usually an API interface, and the front end is usually opposite to the back end, where the front end represents a user side device or a program (such as a software program, an APP program, etc.); the backend represents a server device or program.
In this embodiment, the processor 180 is configured to record first interface interaction data generated in a process of jumping from a first page to a second page in response to a jumping operation performed on the first page of the front end, wherein the first interface interaction data includes interface request data generated by the front end and interface response data of the back end in response to the interface request data; and responding to the current page interface interaction data viewing operation executed on the second page, jumping from the second page to the third page, and displaying the first interface interaction data in the third page.
In some of these embodiments, the processor 180 is further configured to, prior to recording the first interface interaction data generated in the process of jumping from the first page to the second page in response to a jump operation performed on the first page of the front end, the method further comprising: recording second interface interaction data generated in the process of jumping from the fourth page to the first page in response to a jumping operation executed on the fourth page of the front end, wherein the second interface interaction data comprises interface request data generated by the front end and interface response data of the back end responding to the interface request data; after jumping from the second page to the third page in response to the current page interface interaction data viewing operation performed on the second page and presenting the first interface interaction data in the third page, the method further comprises: and in response to the previous page interface interaction data viewing operation performed on the third page, jumping from the third page to the fifth page, and displaying the second interface interaction data in the fifth page.
In some of these embodiments, the processor 180 is further configured to present the first interface interaction data presented in the third page in a list based on the interface identification.
In some of these embodiments, the processor 180 is further configured to, after jumping from the second page to the third page and presenting the first interface interaction data in the third page in response to a current page interface interaction data viewing operation performed on the second page, jump from the third page to the sixth page and presenting details of the first interface interaction data in the sixth page in response to a request operation for the first interface interaction data in the list.
In some of these embodiments, the processor 180 is further configured to record, after recording first interface interaction data generated during a jump from the first page to the second page in response to a jump operation performed on the first page of the front end, third interface interaction data generated during a refresh of the first page in response to a refresh page operation performed on the first page, wherein the third interface interaction data includes interface request data generated by the front end and interface response data of the back end in response to the interface request data; and updating the first interface interaction data into third interface interaction data.
In some of these embodiments, the processor 180 is further configured to enable the implementation of recording interface interaction data and expose an operation button on the front-end page for receiving a current page interface interaction data viewing operation.
In some of these embodiments, the processor 180 is further configured to detect an operating environment of the front end, wherein the operating environment includes one of: testing environment, pre-release environment and online environment; enabling the realization method of recording interface interaction data under the condition that the running environment of the front end is detected to be a test environment or an upper line environment, and exposing an operation button for receiving the current page interface interaction data checking operation on a page of the front end; and under the condition that the operation environment of the front end is detected to be an upper line environment, disabling the realization method of the interactive data of the recording interface and hiding the operation buttons.
In some of these embodiments, the processor 180 is further configured to cause the operation button to be displayed superimposed on the upper page layer of the front end and to be movable on the upper page layer of the front end in accordance with a drag operation on the operation button.
In some embodiments, the first interface interaction data, the second interface interaction data, and the third interface interaction data each comprise data of at least one of: interface identification, interface request time, interface response time, interface request total time consumption, interface request mode, interface request parameter plaintext, interface request parameter ciphertext, interface response result plaintext and interface response result ciphertext.
In some of these embodiments, the processor 180 is further configured to obtain a software development kit (Software Development Kit, abbreviated as SDK) and integrate the SDK into the front end before recording the first interface interaction data generated in the process of jumping from the first page to the second page in response to the jumping operation performed on the first page of the front end, wherein the SDK includes an implementation method for implementing the interface interaction data processing method of the embodiments of the present application.
The embodiment provides an interface interaction data processing method. The interface interaction data processing method is realized by a front end. In this embodiment, the front end includes the user terminal or a program installed in the user terminal. The program may be, for example, an operating system of the user terminal, an application installed in the user terminal, or an SDK integrated in the application. The following describes and illustrates embodiments of the present application by taking an SDK as an example.
FIG. 2 is a flow chart of an interface interaction data processing method according to an embodiment of the present application, as shown in FIG. 2, the flow includes the following steps:
in step S201, the SDK records first interface interaction data generated during a process of jumping from the first page to the second page in response to a jumping operation performed on the first page of the front end, wherein the first interface interaction data includes interface request data generated by the front end and interface response data of the back end in response to the interface request data.
In step S202, the SDK jumps from the second page to the third page in response to the current page interface interaction data viewing operation performed on the second page, and displays the first interface interaction data in the third page.
Compared with the problem that the configuration is complex because the address, port number, certificate and the like of a server are required to be manually configured in the process of capturing the data packet in the network transmission process; by adopting the steps, the server address, the port number or the certificate is not required to be configured in the SDK, and the interface request data generated by the front end and the interface response data generated by the rear end and returned to the front end are directly recorded at the front end, so that the problem of complex configuration of interface debugging by a packet grabbing technology in the related technology is solved, the configuration process is simplified, and the interface debugging efficiency is improved.
In addition, in the related art, the collected interface interaction data is usually stored in a log file or other files, if the interface interaction data needs to be checked, after all the interface interaction data needs to be collected, the interface interaction data is imported into other devices or uploaded into a server for checking and debugging, the process is tedious, and the interface interaction data of each interface is difficult to be checked intuitively and in real time. In the embodiment, the current page interface interaction data viewing operation is executed on the second page at the front end, so that a third page for displaying the first interface interaction data can be jumped, the interface interaction data can be intuitively and real-timely viewed by a debugger, and the interface interaction data is convenient to view.
In this embodiment, the SDK may distinguish or identify the interfaces by analyzing the structure of the data generated from the front end or by reading the interface list, and record the related data of the identified interfaces. The manner of identification and recording of the interface interaction data is not limited thereto.
Fig. 3a and 3b are schematic diagrams of recording interface interaction data according to embodiments of the present invention. As shown in fig. 3a, for the interface interaction data transmitted by encryption, the SDK may record the interface interaction data before and after encryption and decryption, respectively; as shown in fig. 3b, a decryption method may be preconfigured in the SDK, and then after the encrypted interface interaction data is recorded, a plaintext of the interface interaction data may be obtained according to the preconfigured decryption method.
FIG. 4 is a preferred flow chart of an interface interaction data processing method according to an embodiment of the invention, as shown in FIG. 4, the flow comprising the steps of:
in step S401, the SDK records second interface interaction data generated during the process of jumping from the fourth page to the first page in response to the jumping operation performed on the fourth page of the front end, where the second interface interaction data includes interface request data generated by the front end and interface response data of the back end in response to the interface request data.
In step S402, the SDK records, in response to a skip operation performed on a first page of the front end, first interface interaction data generated during a process of skipping from the first page to a second page, where the first interface interaction data includes interface request data generated by the front end and interface response data of the back end in response to the interface request data.
In step S403, the SDK jumps from the second page to the third page in response to the current page interface interaction data viewing operation performed on the second page, and displays the first interface interaction data in the third page.
In step S404, the SDK jumps from the third page to the fifth page in response to the previous page interface interaction data viewing operation performed on the third page, and displays the second interface interaction data in the fifth page.
Through the steps, when the interface is debugged, the second interface interaction data can be checked through the previous page interface interaction data checking operation, namely, the SDK can record the interface interaction data generated in the process of two adjacent page jumps, so that the interface faults can be conveniently found and removed. It should be noted that, although the SDK records the interface interaction data generated during the skip of two pages (the current page and the previous page), and deletes the interface interaction data generated during the skip of other pages is a preferred scheme, but the present invention is not limited thereto, and may also record the interface interaction data generated during the skip of three pages or four pages, for example. And, in the initial case, for example, in the case where the first page is the first page after the application program is opened, no previous page interface interacts data. At this time, a button for receiving the interface interactive data viewing operation may be hidden or made unavailable on the third page.
In some embodiments, in order to clearly display interface interaction data and present key interface interaction data to a debugger, the first interface interaction data displayed in the third page is displayed in a list form based on the interface identifier. Preferably, only part of interface interaction data may be displayed in the third page, for example: critical data such as interface identification, interface request time, interface response time, interface request total time consumption and the like can be folded and hidden for non-critical data or displayed in a next page corresponding to the interface identification.
For example: after the SDK jumps from the second page to the third page in response to a current page interface interaction data viewing operation performed on the second page and presents the first interface interaction data in the third page, the SDK jumps from the third page to the sixth page in response to a request operation for the first interface interaction data in the list and presents details of the first interface interaction data in the sixth page.
In some of these embodiments, the interface interaction data may be generated during a page refresh process in addition to being generated during a page jump. The page refresh can also be regarded as a special page skip process, and is different from the page skip in that after the page refresh, the SDK updates the data in one piece of interface interaction data instead of adding a new piece of interface interaction data. For example, in this embodiment, after the SDK records first interface interaction data generated during a process of jumping from a first page to a second page in response to a jumping operation performed on the first page of the front end, the SDK records third interface interaction data generated during a process of refreshing the first page in response to a refreshing page operation performed on the first page, where the third interface interaction data includes interface request data generated by the front end and interface response data generated by the back end in response to the interface request data; the SDK updates the first interface interaction data into third interface interaction data. Thus, after a page is refreshed, its upper page refers to the logically upper page of the page, and not to the page itself.
Since the front-end operating environment typically includes a test environment, a pre-release environment, and a windup environment. Wherein the interface debugging of the front end is only carried out in a test environment or a pre-release environment. In some embodiments, disabling the implementation method of recording interface interaction data in the interface interaction data processing method in the upper line environment, and hiding an operation button for receiving the current page interface interaction data viewing operation; and in the test environment or the pre-release environment, enabling the implementation method for recording the interface interaction data in the interface interaction data processing method, and exposing an operation button for receiving the current page interface interaction data checking operation. By the mode, the operation buttons for receiving the current page interface interaction data checking operation are hidden or exposed according to the front-end operation environment, and the implementation method for recording the interface interaction data is enabled or disabled according to the front-end operation environment, so that the flexibility of a debugging program is improved.
In some embodiments, the method for implementing the SDK-enabled recording interface interaction data, and exposing an operation button for receiving a current page interface interaction data viewing operation on a page at the front end, includes: the SDK detects an operating environment of the front end, wherein the operating environment comprises one of the following: testing environment, pre-release environment and online environment; under the condition that the running environment of the front end is detected to be a test environment or an upper line environment, the SDK enables the realization method of recording interface interaction data, and an operation button for receiving the current page interface interaction data checking operation is exposed on a page of the front end; under the condition that the operation environment of the front end is detected to be an upper line environment, the SDK disables the realization method of recording interface interaction data and hides the operation buttons. By adopting the mode, the self-adaptive enabling or disabling of the implementation method of the interface interaction data can be realized, and the self-adaptive exposure or hiding of the operation button for receiving the current page interface interaction data viewing operation can be realized.
In some of these embodiments, the SDK may also display an operation button superimposed on the upper layer of the page at the front end, and be able to move on the upper layer of the page at the front end in accordance with a drag operation on the operation button. By the method, the debugging related functions provided by the SDK can be integrated on the basis of not changing the original application program. In addition, the operation button can move on the upper layer of the page at the front end according to the dragging operation, and the operation button can be effectively prevented from shielding the page content.
In some embodiments, the first interface interaction data, the second interface interaction data, and the third interface interaction data each include data of at least one of: interface identification, interface request time, interface response time, interface request total time consumption, interface request mode, interface request parameter plaintext, interface request parameter ciphertext, interface response result plaintext and interface response result ciphertext.
In some of these embodiments, before the SDK records first interface interaction data generated during a jump from a first page to a second page in response to a jump operation performed on the first page at the front end, the method further comprises: the debugger obtains the software SDK and integrates the SDK to the front end, wherein the software development kit comprises an implementation method for implementing the interface interaction data processing method. In the embodiment, the implementation method is packaged in the SDK, so that the rapid distribution of the SDK can be realized, the integration with various application programs can be realized, and the development cost is reduced. On the other hand, the implementation method is packaged in the SDK, so that source codes of the implementation method are protected, and unauthorized use or modification of the source codes is avoided.
The embodiments of the present application will be described and illustrated below by means of preferred embodiments.
In the preferred embodiment, the interface interaction data processing method of the embodiment of the application is realized through a specific SDK. By writing the specific SDK, any application program (APP) can integrate the specific SDK like other third party SDKs, thereby applying the method in a test environment, a pre-release environment. The specific SDK is released to a CocoaPods and other platforms for downloading and use by other development testers. Compared with the mode of directly writing the function of the specific SDK in the source program of the APP, the method is more convenient and flexible to use the SDK to transplant the function, and the source code of the specific SDK is protected from being leaked. It should be noted that: in other embodiments of the present application, the function of the specific SDK may also be written directly in the source program of the APP.
The running environment of the product is divided into a testing environment, a pre-release environment and an upper line environment, and the function is usually enabled only in the testing environment and the pre-release environment, so that the current domain name can be judged by running a program code in the engineering of the created APP, and the current running environment can be distinguished according to the domain name; and turns on a specific SDK function in a test environment or a pre-release environment, and turns off a specific SDK function in an online environment.
The function of the specific SDK in the preferred embodiment is described as follows:
after clicking one page in the APP, clicking the entry of the SDK record page (which is equivalent to an operation button for receiving the interactive data viewing operation of the current page interface, i.e. the small dots in fig. 5, can be dragged randomly on the interface), and displaying the interface of fig. 5. In the preferred embodiment, one row of URLs of the first row in the page as shown in fig. 5 is the domain name and the request address; the second row is the start time and end time, respectively; the third row is total time consuming; if there is an error, an error cause (e.g., URL error 403, server internal problem 503, etc.) is also revealed, facilitating the user to click on a specific record to view.
Clicking on the "last page data" in the upper right corner (equivalent to an operation button for receiving the last page interface interaction data viewing operation) will display the interface interaction data of the last page of the SDK record, as shown in fig. 6. If the page is the default page after the APP is started, no interface of the previous page exchanges data.
Clicking on any one of the records of fig. 6 will display fig. 7 and 8.
Shown in sequence in fig. 7 and 8 are: request means (post, get, etc.); requesting an interface and a domain name; request parameter plaintext; request parameter ciphertext; and returning the ciphertext of the result and returning the plaintext of the result.
The SDK always records interface interaction data of the current page and the last page (if the last page exists); and deleting the record of the original interaction data of the current page interface and generating a record of the new interaction data of the current page interface when refreshing the page every time.
Through the preferred embodiment, after each APP integrates the SDK function, the test can be conveniently carried out, various information does not need to be configured, and the test cost is greatly reduced.
In some embodiments, when the SDK requests the network, the App end (i.e., the front end) sends a request to the server end (i.e., the back end) through the base class of the network request, and the response given to the server end, or the error given to the server end collects a record, where the start time, the end time, the domain name interface, the parameters, and other contents of the network request are automatically parsed and inserted according to the logic of the SDK through automatically grabbing the SessionDataTask of the network request. The content of the returned result of the request is automatically analyzed through automatically grabbing the returned result responsObject, if the encrypted App is owned, the decryption method needs to be informed of the encryption mode of the SDK, or after the decryption is processed by self, the processed response is given into the method of the SDK. If the network request fails, the SDK automatically records NSError thrown by the network request for use.
In the above embodiment, the record is directly made on the network request process, so there is no problem of encryption of the grabbing packets of HTTPS.
In some of these embodiments, the integration and application of the SDK includes the steps of:
firstly, the frame work can be pulled into engineering after being directly downloaded, and the integration of the cobaaps can be used; after integrating the SDK, the SDK is initialized, i.e. the #import < CHRecordDataSDK/CHDataAccordingService.h > SDK file is imported.
Then, when the App starts up, an initialization is performed while controlling whether to open a switch recording network request according to the environment. [ [ CHDataAccordService shareDataAccordService ] setSwitchOpen: YES ]; the boolean value YES NO indicates that the switch is on or off and the project is self-configurable depending on the circumstances. The SDK then exposes a method in the network base class for collecting network requests of the current App. And recording is performed. And the SDK is displayed on an internal UI. The tester can enter and check the current network request through the entry button suspended on the APP.
The scheme provided by the embodiment of the invention can reduce the test cost of the tester and the development cost of the developer. In addition, the scheme provided by the embodiment of the invention has the following beneficial effects:
1. By using the scheme, whether the interface is abnormal or not can be quickly found in the test process.
2. If the interface is newly added in the development process, whether the function of the interface is abnormal or not can be checked through the record of the SDK. In the prior art, whether an interface is abnormal or not is judged by connecting a mobile phone to a computer and then checking a log; the SDK is used in the scheme, so that whether the data returned by the interface is correct or not can be checked on the mobile phone in real time, and whether the interface works normally or not is checked, and the development cost of a developer is reduced.
3. In addition to APP end development, for back end developers, even without the ability to grab packages, the SDK can be used to implement testing. For example, the price 33.00 ten thousand of the car, the data format may be string or int or float type when the database is designed at the server. In order to display data of one float type, the float type needs to be converted into string, and the problem of precision loss can occur in the conversion process, for example, the price of a vehicle is converted into 32.999999 ten thousand. After the problem occurs, a back-end person can know the type and the structure of the returned data of the server by looking up the information recorded by the SDK, so that the problem can be conveniently found.
It should be noted that the steps illustrated in the above-described flow or flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
In addition, in combination with the interface interaction data processing method in the above embodiment, the embodiment of the present application may be implemented by providing a computer readable storage medium. The computer readable storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the interface interaction data processing methods of the above embodiments.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. An interface interaction data processing method, which is characterized by comprising the following steps:
acquiring a software development kit and integrating the software development kit into a front end, wherein the software development kit comprises an implementation method for implementing an interface interaction data processing method, and when the software development kit requests a network, the software development kit sends the request to a rear end through a base class of the network request, and gives a response to a server or gives a collection record to errors of the server;
recording first interface interaction data generated in the process of jumping from a first page to a second page in response to a jumping operation executed on the first page of the front end, wherein the first interface interaction data comprises interface request data generated by the front end and interface response data of the back end responding to the interface request data;
and responding to the current page interface interaction data viewing operation executed on the second page, jumping from the second page to a third page, and displaying the first interface interaction data in the third page.
2. The method for processing interactive data according to claim 1, wherein,
Before recording first interface interaction data generated in a process of jumping from a first page to a second page in response to a jumping operation performed on the first page of the front end, the method further includes: recording second interface interaction data generated in the process of jumping from the fourth page to the first page in response to a jumping operation executed on the fourth page of the front end, wherein the second interface interaction data comprises interface request data generated by the front end and interface response data of the back end responding to the interface request data;
after jumping from the second page to a third page in response to a current page interface interaction data viewing operation performed on the second page and presenting the first interface interaction data in the third page, the method further comprises: and responding to the previous page interface interaction data viewing operation executed on the third page, jumping from the third page to a fifth page, and displaying the second interface interaction data in the fifth page.
3. The interface interaction data processing method according to claim 1, wherein the first interface interaction data presented in the third page is presented in a list form based on an interface identification.
4. The interface interaction data processing method of claim 3, wherein after jumping from the second page to a third page in response to a current page interface interaction data viewing operation performed on the second page and presenting the first interface interaction data in the third page, the method further comprises:
and in response to a request operation for the first interface interaction data in the list, jumping from the third page to a sixth page, and displaying details of the first interface interaction data in the sixth page.
5. The interface interaction data processing method according to claim 1, wherein after recording first interface interaction data generated in a process of jumping from a first page to a second page in response to a jumping operation performed on the first page of a front end, the method further comprises:
recording third interface interaction data generated in the process of refreshing the first page in response to a page refreshing operation executed on the first page, wherein the third interface interaction data comprises interface request data generated by the front end and interface response data of the back end responding to the interface request data;
And updating the first interface interaction data into the third interface interaction data.
6. The interface interaction data processing method of claim 1, wherein the method further comprises:
the method for realizing the interface interaction data of the enabling record comprises the steps of exposing an operation button for receiving the current page interface interaction data viewing operation on a page at the front end.
7. The interface interaction data processing method of claim 6, wherein enabling the recording of the implementation method of the interface interaction data and exposing an operation button for receiving a current page interface interaction data viewing operation on a page of the front end comprises:
detecting an operating environment of the front end, wherein the operating environment comprises one of: testing environment, pre-release environment and online environment;
enabling an implementation method for recording interface interaction data under the condition that the running environment of the front end is detected to be a test environment or a pre-release environment, and exposing an operation button for receiving the current page interface interaction data checking operation on a page of the front end;
and under the condition that the running environment of the front end is detected to be an upper line environment, disabling an implementation method for recording interactive data of the interface and hiding the operation buttons.
8. The interface interaction data processing method according to claim 7, wherein the operation button is displayed superimposed on an upper layer of a page of the front end and is movable on the upper layer of the page of the front end in accordance with a drag operation of the operation button.
9. The interface interaction data processing method according to any one of claims 1 to 8, characterized in that before recording first interface interaction data generated in a process of jumping from a first page to a second page in response to a jumping operation performed on the first page of a front end, the method further comprises:
acquiring a software development kit and integrating the software development kit into the front end, wherein the software development kit comprises an implementation method for implementing the interface interaction data processing method of any one of claims 1 to 7.
10. A user terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the interface interaction data processing method of any of claims 1 to 9 when the computer program is executed by the processor.
CN202010175810.6A 2020-03-13 2020-03-13 Interface interaction data processing method and user terminal Active CN111444070B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010175810.6A CN111444070B (en) 2020-03-13 2020-03-13 Interface interaction data processing method and user terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010175810.6A CN111444070B (en) 2020-03-13 2020-03-13 Interface interaction data processing method and user terminal

Publications (2)

Publication Number Publication Date
CN111444070A CN111444070A (en) 2020-07-24
CN111444070B true CN111444070B (en) 2023-11-21

Family

ID=71648675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010175810.6A Active CN111444070B (en) 2020-03-13 2020-03-13 Interface interaction data processing method and user terminal

Country Status (1)

Country Link
CN (1) CN111444070B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576843A (en) * 2008-05-07 2009-11-11 阿里巴巴集团控股有限公司 Method and device for testing application program interface
CN106874174A (en) * 2015-12-11 2017-06-20 阿里巴巴集团控股有限公司 Interface testing and the implementation method and device of functional test
CN107247660A (en) * 2017-05-05 2017-10-13 北京奇虎科技有限公司 The method of testing and test device of a kind of interface
CN108959487A (en) * 2018-06-22 2018-12-07 福建南威软件有限公司 A kind of page processing method based on the end H5

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6769019B2 (en) * 1997-12-10 2004-07-27 Xavier Ferguson Method of background downloading of information from a computer network
US20050050159A1 (en) * 2003-09-03 2005-03-03 Zeev Suraski Remote debugging of web applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576843A (en) * 2008-05-07 2009-11-11 阿里巴巴集团控股有限公司 Method and device for testing application program interface
CN106874174A (en) * 2015-12-11 2017-06-20 阿里巴巴集团控股有限公司 Interface testing and the implementation method and device of functional test
CN107247660A (en) * 2017-05-05 2017-10-13 北京奇虎科技有限公司 The method of testing and test device of a kind of interface
CN108959487A (en) * 2018-06-22 2018-12-07 福建南威软件有限公司 A kind of page processing method based on the end H5

Also Published As

Publication number Publication date
CN111444070A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN105320598B (en) Method for testing software and device
CN107038112B (en) Application interface debugging method and device
CN107943683B (en) Test script generation method and device, electronic equipment and storage medium
CN104519485B (en) Communication means, device and system between a kind of terminal
CN107357725B (en) Application testing method and device
CN112148579B (en) User interface testing method and device
CN107943685B (en) Traversal path generation method and device, server and storage medium
CN106709282B (en) resource file decryption method and device
CN107276602B (en) Radio frequency interference processing method, device, storage medium and terminal
CN104915290A (en) Application testing method and device
CN111966491B (en) Method for counting occupied memory and terminal equipment
CN109753425A (en) Pop-up processing method and processing device
CN108898020A (en) Leak detection method, device, mobile terminal and storage medium based on agent side
CN106155717A (en) A kind of method and apparatus that SDK is integrated into third party APK
CN110147186A (en) A kind of control method and terminal device of application
CN108090345A (en) Linux system external command performs method and device
CN106533917A (en) Relation chain processing method, device and system
CN110069407B (en) Function test method and device for application program
CN104102560B (en) The method and device of system performance testing
CN107102913B (en) Data back up method, device and computer equipment
CN106708501B (en) Activity monitoring method and device
CN108932264A (en) The determination method, apparatus and storage medium of navigation problem
CN111444070B (en) Interface interaction data processing method and user terminal
JP2015537486A (en) APP PROTECTION METHOD, DEVICE, TERMINAL, PROGRAM, AND RECORDING MEDIUM
CN108664389A (en) A kind of test method, device and terminal

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