CN116225600A - Application program recording method, playback method, device, medium and electronic equipment - Google Patents

Application program recording method, playback method, device, medium and electronic equipment Download PDF

Info

Publication number
CN116225600A
CN116225600A CN202310211790.7A CN202310211790A CN116225600A CN 116225600 A CN116225600 A CN 116225600A CN 202310211790 A CN202310211790 A CN 202310211790A CN 116225600 A CN116225600 A CN 116225600A
Authority
CN
China
Prior art keywords
network request
request
target
application program
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310211790.7A
Other languages
Chinese (zh)
Inventor
高鹏
陆家源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Original Assignee
Douyin Vision 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 Douyin Vision Co Ltd filed Critical Douyin Vision Co Ltd
Priority to CN202310211790.7A priority Critical patent/CN116225600A/en
Publication of CN116225600A publication Critical patent/CN116225600A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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 
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management Or Editing Of Information On Record Carriers (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention relates to an application program recording method, a playback method, a device, a medium and electronic equipment, and relates to the technical field of computers. Based on the first parameter information of the first network request, the number of network requests to be recorded in the recording process can be reduced, so that the corresponding first network requests can be quickly matched in the playback process, and the influence of the number of the network requests on the playback performance is reduced.

Description

Application program recording method, playback method, device, medium and electronic equipment
Technical Field
The disclosure relates to the field of computer technology, and in particular, to an application program recording method, a playback method, a device, a medium and electronic equipment.
Background
The recording and playback technology refers to a method for recording data by operating a user in a period of time and then playing back the recorded data so as to reproduce the use condition of the user. In related recording and playback technologies, a touch event is generally recorded, and when playback is performed, the touch event is restored in a playback device according to screen coordinates of the recorded touch event. However, the related recording and playback technology mainly aims at UI (User Interface) to record, but ignores the recording of the network request, and because the network request also affects the performance displayed by the UI, how to record the network request is also a critical technical problem.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides an application program recording method, applied to a recording device, the method including:
in response to a recording request for a first application program, acquiring a first network request initiated by the first application program during recording, wherein the first network request comprises a network request related to user interface presentation of the first application program;
and responding to a recording ending request aiming at the first application program, and acquiring a target recording file based on the first network request and first parameter information corresponding to the first network request, wherein the target recording file is used for playing back an event corresponding to a second network request triggered by a second application program according to the first parameter information of the first network request included in the target recording file in the second application program of the playback device.
In a second aspect, the present disclosure provides an application playback method applied to a playback device, the method including:
acquiring a target recording file sent by recording equipment, wherein the target recording file comprises a first network request related to a first application program in the recording equipment and first parameter information corresponding to the first network request, and the first network request comprises a network request related to user interface display of the first application program;
Responsive to a playback request for a second application of the playback device, obtaining a second network request triggered by the second application, wherein the second network request includes a network request related to a user interface presentation of the second application;
determining target parameter information corresponding to the second network request in the target recording file based on the second network request, wherein the target parameter information comprises first parameter information corresponding to the first network request matched with the second network request in the target recording file;
and playing back the event corresponding to the second network request based on the target parameter information.
In a third aspect, the present disclosure provides an application program recording apparatus, applied to a recording device, the method including:
a first acquisition module configured to acquire a first network request initiated by a first application program during recording in response to a recording request for the first application program, wherein the first network request includes a network request related to a user interface presentation of the first application program;
the obtaining module is configured to respond to a recording ending request for the first application program, obtain a target recording file based on the first network request and first parameter information corresponding to the first network request, wherein the target recording file is used for playing back an event corresponding to a second network request triggered by a second application program in the second application program of the playback device according to the first parameter information of the first network request included in the target recording file.
In a fourth aspect, the present disclosure provides an application playback apparatus applied to a playback device, the apparatus comprising:
the second acquisition module is configured to acquire a target recording file sent by recording equipment, wherein the target recording file comprises a first network request related to a first application program in the recording equipment and first parameter information corresponding to the first network request, and the first network request comprises a network request related to user interface display of the first application program;
a third acquisition module configured to acquire a second network request triggered by a second application program of the playback device in response to a playback request of the second application program, wherein the second network request includes a network request related to a user interface presentation of the second application program;
a determining module configured to determine, based on the second network request, target parameter information corresponding to the second network request in the target record file, where the target parameter information includes first parameter information corresponding to the first network request matched with the second network request in the target record file;
And the playback module is configured to play back the event corresponding to the second network request based on the target parameter information.
In a fifth aspect, the present disclosure provides a computer readable storage medium having stored thereon a computer program which when executed by a processing device performs the steps of the method of the first aspect or performs the steps of the method of the second aspect.
In a sixth aspect, the present disclosure provides an electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method according to the first aspect or to carry out the steps of the method according to the second aspect.
Based on the technical scheme, the target recording file is obtained by recording the first network request initiated by the first application program and based on the first network request and the first parameter information corresponding to the first network request, wherein the first network request comprises the network request related to the user interface display of the first application program, so that the playback device plays back an event corresponding to the second network request triggered by the second application program according to the first parameter information of the first network request included in the target recording file in the second application program of the playback device. Based on the first parameter information of the first network request, the number of network requests to be recorded in the recording process can be reduced, so that the corresponding first network requests can be quickly matched in the playback process, and the influence of the number of the network requests on the playback performance is reduced.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale. In the drawings:
fig. 1 is an application scenario diagram of an application recording method and an application playback method according to an exemplary embodiment.
Fig. 2 is an application scenario diagram of an application recording method and an application playback method according to another exemplary embodiment.
Fig. 3 is a flowchart of an application recording method provided according to an exemplary embodiment.
Fig. 4 is a flow chart for determining a first network request, provided in accordance with an exemplary embodiment.
Fig. 5 is a flowchart of an application playback method provided in accordance with an exemplary embodiment.
Fig. 6 is a detailed flow chart of step 530 shown in fig. 5.
Fig. 7 is a schematic diagram of module connection of an application recording apparatus according to an exemplary embodiment.
Fig. 8 is a schematic diagram of module connection of an application playback apparatus according to an exemplary embodiment.
Fig. 9 is a schematic structural view of an electronic device provided according to an exemplary embodiment.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
For example, in response to receiving an active request from a user, a prompt is sent to the user to explicitly prompt the user that the operation it is requesting to perform will require personal information to be obtained and used with the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium for executing the operation of the technical scheme of the present disclosure according to the prompt information.
As an alternative but non-limiting implementation, in response to receiving an active request from a user, the manner in which the prompt information is sent to the user may be, for example, a popup, in which the prompt information may be presented in a text manner. In addition, a selection control for the user to select to provide personal information to the electronic device in a 'consent' or 'disagreement' manner can be carried in the popup window.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
Meanwhile, it can be understood that the data (including but not limited to the data itself, the acquisition or the use of the data) related to the technical scheme should conform to the requirements of the corresponding laws and regulations and related regulations.
Fig. 1 is an application scenario diagram of an application recording method and an application playback method according to an exemplary embodiment. As shown in fig. 1, the application recording method and the application playback method provided in the embodiments of the present disclosure are applicable to the application scenario shown in fig. 1, where the application scenario includes a recording device 101 and a playback device 102. Wherein the recording device 101 and the playback device 102 may be communicatively connected. It should be understood that a communication connection may refer to data interaction by way of a wired connection or a wireless connection.
Recording device 101 may obtain a first network request initiated by a first application program in response to a recording request for the first application program of recording device 101, and obtain a target recording file based on the first network request and first parameter information corresponding to the first network request. The recording device 101 sends the target recording file to the playback device 102, the playback device 102 receives the target recording file sent by the recording device 101, responds to a playback request for the second application program, obtains a second network request triggered by the second application program, and determines target parameter information corresponding to the second network request in the target recording file based on the second network request, so as to play back an event corresponding to the second network request based on the target parameter information.
Fig. 2 is an application scenario diagram of an application recording method and an application playback method according to another exemplary embodiment. As shown in fig. 2, the application recording method and the application playback method provided in the embodiments of the present disclosure are applicable to the application scenario shown in fig. 2, where the application scenario includes a recording device 201, a testing end 202, and a playback device 203. Wherein the recording device 201 is communicatively connected to the testing terminal 202, and the testing terminal 202 is communicatively connected to the playback device 203. It should be understood that a communication connection may refer to data interaction by way of a wired connection or a wireless connection.
The recording device 201 may obtain a first network request initiated by a first application program in response to a recording request for the first application program of the recording device 201, and obtain a target recording file based on the first network request and first parameter information corresponding to the first network request. The recording device 201 sends the target recording file to the testing terminal 202, and the testing terminal 202 receives the target recording file sent by the recording device 201 and stores the target recording file. Upon playback, the test terminal 202 transmits the target recording file to the playback device 203. The playback device 203 receives the target record file sent by the test end 202, responds to the playback request for the second application program, obtains the second network request triggered by the second application program, and determines target parameter information corresponding to the second network request in the target record file based on the second network request, so as to play back the event corresponding to the second network request based on the target parameter information, and obtain a playback result. The playback device 203 may send the playback result to the test terminal 202 to determine at the test terminal 202 whether playback of the event meets the requirements based on the playback result.
It should be noted that, the testing end 202 may send the target record file to multiple playback devices 203 at the same time, so as to perform batch testing. In addition, the screen resolution of the plurality of playback devices 203 may be different from the screen resolution of the recording device 201.
Fig. 3 is a flowchart of an application recording method provided according to an exemplary embodiment. As shown in fig. 3, the embodiment of the present disclosure provides an application program recording method that can be performed by the recording apparatus 101 of fig. 1 or the recording apparatus 201 of fig. 2. As shown in fig. 3, the application recording method may include the following steps.
In step 310, a first network request initiated by a first application is obtained during recording in response to a recording request for the first application, wherein the first network request includes a network request related to a user interface presentation of the first application.
Here, the first Application may refer to an Application (APP) that needs to be tested. The recording request for the first application may be triggered by the recording device receiving a request to start recording, which may be entered by a user on the recording device, for example, by the user clicking a "start recording" button on the recording device to enter the recording request.
The recording device obtains a first network request initiated by a first application program during recording in response to the recording request. Wherein the first network request is some specific network request of all network requests triggered by the first application program.
It should be understood that the recording device may not record all network requests generated by the first application program during the recording period, but determine whether the network request triggered by the first application program belongs to the first network request, if so, record the network request, and if not, record the network request.
As some examples, the first network request may be a network request related to a user interface presentation of the first application.
Here, the network request related to the user interface presentation of the first application means that the resource requested by the network request to the server is related to the UI presentation of the first application. For example, if a network request requests resources from a server that belong to information flow (Feed) content, the network request is related to UI presentation. If the network requests resources requested from the server that belong to a channel list (e.g., news channels) resource in the first application, the network request is associated with the UI presentation. If the network request requests resources from the server that belong to the AB test resources, the network request is related to UI presentation. The AB test refers to that an application program makes two (A/B) or more (A/B/N) versions, and the versions are randomly accessed by visitor groups with the same or similar components respectively in the same time dimension.
As yet other examples, the first network request may include a network request related to a user interface presentation of the first application and not belonging to a request for static resources.
Here, a network request that does not belong to a request for a static resource means that a resource requested by the network request to a server does not belong to a static address, and for example, a resource such as a picture belongs to a storage using the static address. Wherein the resources belonging to the static address will not change in general and will not affect the playback result even if the data in the server is used. If the resource requested by the network request to the server does not belong to the static address, the resource may change in a mode, so that in the playback process, even if the playback device initiates a network request consistent with the recording, the resource obtained by the network request may change, thereby causing inaccurate playback results.
It should be noted that the network request initiated by the first application may be actively initiated by the first application. For example, when the first application program starts to enter the first screen page, no touch event (such as clicking, sliding and the like) is generated, the first application program also actively initiates a network request to acquire the UI resource of the first screen page. For another example, the first application may perform a regular refresh during the running process, and each refresh may actively generate a network request to request the refreshed UI resource. Of course, the network request initiated by the first application may also be triggered by a touch event directed to a page of the first application. For example, the user triggers the first application to initiate a network request by clicking a page refresh button in the page to request refreshed page data. Therefore, the application program recording method provided by the embodiment of the present disclosure may detect all network requests initiated by the first application program to determine whether the network requests belong to the first network request.
In step 320, in response to the recording end request for the first application program, a target recording file is obtained based on the first network request and first parameter information corresponding to the first network request, where the target recording file is used by a playback device in a second application program of the playback device, and an event corresponding to a second network request triggered by the second application program is played back according to the first parameter information of the first network request included in the target recording file.
Here, the recording end request may be input by the user on the recording apparatus, for example, the user clicks a "end recording" button on the recording apparatus to input the recording end request. And the recording equipment receives a recording end request to indicate that the recording is ended, and obtains a target recording file based on the first network request and first parameter information corresponding to the first network request.
The target recording file may be a file in Json (JavaScript Object Notation, JS object numbered musical notation, which is a lightweight data exchange format) format. In the target recording file, the first network request and the first parameter information may be stored in a data format of "first network request—first parameter information".
It should be understood that one or more first network requests and first parameter information corresponding to the first network requests may be included in the target recording file.
It should be noted that, the target recording file is used for being pushed to the playback device, and the playback device starts playback for the second application program after receiving the target recording file. Specifically, the playback device plays back an event corresponding to a second network request triggered by the second application program according to first parameter information of the first network request included in the target recording file.
Wherein the second network request is a network request triggered by a second application of the playback device that matches the first network request. The event corresponding to the second network request triggered by the second application program may refer to a touch event, such as a touch event that a click, a slide, etc. triggers a network request, or may refer to an event that the second application program actively initiates a touch event that triggers a network request, such as a refresh event initiated by the second application program at regular time.
It should be understood that the second application in the playback device and the first application in the recording device belong to the same application installed on different terminal devices.
And the first network request comprises a network request related to user interface display of the first application program, so that the playback equipment plays back an event corresponding to a second network request triggered by the second application program according to the first parameter information of the first network request included in the target recording file in the second application program of the playback equipment. Based on the first parameter information of the first network request, the number of network requests to be recorded in the recording process can be reduced, so that the corresponding first network requests can be quickly matched in the playback process, and the influence of the number of the network requests on the playback performance is reduced.
In some implementations, where the first network request includes a network request related to the user interface presentation of the first application and not belonging to the requesting static resource, the network request may be determined to belong to the first network request if the network request initiated by the first application satisfies a preset condition.
Here, the preset condition includes that a request path of a network request initiated by the first application program includes a preset parameter, the network request does not belong to a request for requesting a static resource, and response data corresponding to the network request is related to a user interface presentation of the first application program, and the preset parameter is a parameter for indicating that the request path is an interface related to the user interface presentation of the first application program.
The preset parameter may be a parameter indicating that a URL (Uniform Resource Locator ) interface of the server requesting the path access is an interface related to a user interface presentation of the first application program. For example, in the case where the network request initiated by the first application program is for requesting the target Feed content, a preset parameter for indicating a URL interface for providing the target Feed content to the access server is carried in a request path of the network request. Therefore, the recording device can determine whether the network request belongs to the network request related to the user interface presentation of the first application program according to the path (path) parameter carried in the request path of the network request initiated by the first application program. In the event that the path parameters include preset parameters, it is determined that the network request is a network request related to a user interface presentation of the first application.
The network request does not belong to a request for a static resource, which means that the resource provided by the URL interface to which the network request accesses is not stored using a static address. It should be understood that resources such as pictures belong to storage with static addresses. The resources belonging to the static address will generally not change and even if the data in the server is used, the playback result will not be affected. If the resource requested by the network request to the server does not belong to the static address, the resource may change in a mode, so that in the playback process, even if the playback device initiates a network request consistent with the recording, the resource obtained by the network request may change, thereby causing inaccurate playback results.
The response data corresponding to the network request is related to the user interface display of the first application program, which means that the response data obtained from the server by the network request initiated by the first application program affects the user interface display. For example, if the response data is information stream data, channel list resource, AB test resource, and the like, the response data corresponding to the network request is related to the user interface presentation of the first application program. The response data corresponding to the network request is irrelevant to the user interface display of the first application program, which means that the response data obtained from the server by the network request initiated by the first application program does not influence the user interface display. For example, in the case where the network request sent by the first application program to the server is a login request, the server sends response data of success or failure to the first application program in response to the login request, and the response data of success or failure does not affect the user interface presentation of the first application program. The login request is thus a network request that is independent of the user interface presentation of the first application.
In the embodiment of the present disclosure, the first network request may be a network request that the request path initiated by the first application program includes a preset parameter, a network request that does not belong to a request static resource, and a network request that response data corresponding to the network request is related to user interface presentation of the first application program.
Fig. 4 is a flow chart for determining a first network request, provided in accordance with an exemplary embodiment. As shown in fig. 4, the first network request may be determined by the following steps.
S410, acquiring a network request initiated by a first application program.
S420, judging whether the request path of the network request comprises preset parameters.
S430, judging whether the network request belongs to a request for static resources or not under the condition that the preset parameters are included.
S440, judging whether the response data corresponding to the network request is related to the user interface presentation of the first application program under the condition that the request does not belong to the request for the static resource.
S450, determining that the network request belongs to the first network request under the condition that the response data corresponding to the network request is related to the user interface display of the first application program.
S460, discarding the network request under the condition that the preset parameters are not included; discarding the network request in the case of a request belonging to the request for static resources; and discarding the network request under the condition that the response data corresponding to the network request is irrelevant to the user interface presentation of the first application program.
It should be noted that, in S410, the recording device may detect a return of the network request initiated by the first application program, so as to obtain the network request initiated by the first application program.
Therefore, the network request which is initiated by the first application program and meets the preset condition is determined to be the first network request, the network request which is generated by the first application program in the recording process, is irrelevant to the user interface display of the first application program and belongs to the request static resource can be filtered, and the related data of the first network request is recorded, so that the number of network requests which need to be recorded in the recording process is reduced, the corresponding first network request can be quickly matched in the playback process, and the influence of the number of the network requests on the playback performance is reduced.
In some implementations, the first parameter information may include a first request path corresponding to the first network request, a first target parameter included in the first request path, and response data sent by the server in response to the first network request.
Here, the first request path corresponding to the first network request refers to a URL interface of a server that the first network request needs to access. The first target parameter included in the first request path refers to a parameter carried by the first network request and used for being sent to the URL interface, and the first target parameter is used for enabling the URL interface to determine response data according to the first target parameter. For example, if the first network request is a network request for requesting a server for a resource of a certain channel list (such as a news channel) in the first application program, the URL interface for indicating the resource accessing the certain channel list and the channel parameter for indicating the certain channel list are carried in the first network request. The channel parameter can be understood as a first target parameter, and the server receives the first network request and returns response data corresponding to the channel parameter to the recording device through the corresponding URL interface. For another example, if the first network request is a login request, the first network request carries a URL interface for indicating access to login and a parameter (such as a user name and a password) related to login. The parameter related to login can be understood as a first target parameter, and when the server receives a login request, a login result, such as success or failure, of the parameter related to login is returned to the recording device through the URL interface for login.
The response data transmitted by the server in response to the first network request refers to data transmitted by the server to the recording apparatus in response to the first network request. The response data may be information stream content, resources of a channel list, AB test resources, etc.
It should be noted that, in the first network request, the first request path and the first target parameter included in the first request path are carried, and the recording device may directly record the first request path and the first target parameter without distinguishing the type of the first target parameter included in the first request path.
In the target recording file, the first network request and the first parameter information may be stored in a data format of "first network request-first request path-first target parameter-response data".
It should be appreciated that the first network request, the first request path, and the first target parameter may be used to determine a matching first network request in the target recording file for the playback device to trigger a second network request during playback.
Therefore, by recording the first request path corresponding to the first network request, the first target parameter included in the first request path and the response data sent by the server in response to the first network request, the playback device can accurately locate the first network request matched with the second network request triggered by the playback device in the playback process, so that the response data corresponding to the second network request is obtained, and accurate playback is performed according to the response data.
Fig. 5 is a flowchart of an application playback method provided in accordance with an exemplary embodiment. As shown in fig. 5, the presently disclosed embodiments provide an application playback method that may be performed by the playback device 102 of fig. 1 or the playback device 203 of fig. 2. As shown in fig. 5, the application playback method may include the following steps.
In step 510, a target recording file sent by the recording device is obtained.
Here, in the application scenario shown in fig. 1, the playback device may receive the target recording file transmitted by the recording device through a communication link with the recording device. In the application scenario shown in fig. 2, the recording device may send the target recording file to the testing end, and the playback device receives the target recording file sent by the testing end.
The target recording file comprises a first network request related to a first application program in the recording device and first parameter information corresponding to the first network request, and the first network request comprises a network request related to user interface display of the first application program.
It should be understood that the target recording file has been described in detail in the embodiment of the application recording method, and will not be described herein.
In step 520, a second network request triggered by a second application of the playback device is obtained in response to a playback request for the second application, wherein the second network request includes a network request related to a user interface presentation of the second application.
Here, the playback request refers to a request for instructing the playback device to start playback of an event included in the recorded file, and the playback request may be input by a user on the playback device, for example, the user may click a "start playback" button in the playback device to input the playback request. Of course, the playback request may also be issued by the test end 202 shown in fig. 2, for example, the test end 202 sends the target recording file to one or more playback devices, and issues a playback request to the one or more playback devices to start the one or more playback devices to play back according to the target recording file.
The playback device obtains a second network request triggered by a second application in response to the playback request. The playback device may perform HOOK on all interfaces of the second application that may initiate network requests, so as to acquire all network requests triggered by the second application, and determine to obtain the second network request from the acquired network requests triggered by the second application. The HOOK function may perform further data processing on the network request triggered by the second application program, for example, determine whether the network request triggered by the HOOK belongs to the second network request, perform the next data processing if the network request belongs to the second network request, and transfer the network request triggered by the HOOK to the server without performing the next data processing if the network request does not belong to the second network request.
As some examples, where the first network request includes a network request related to a user interface presentation of the first application, the second network request may be a network request including a network request related to a user interface presentation of the second application.
As yet other examples, where the first network request includes a network request related to a user interface presentation of the first application and not belonging to a request for static resources, the second network request may include a network request related to a user interface presentation of the second application and not belonging to a request for static resources.
It should be understood that the meaning of the second network request is consistent with the meaning of the first network request in the above embodiment of the application recording method, and reference may be made to the description of the first network request in the above embodiment of the application recording method, and the meaning of the second network request will not be described in detail herein.
It is to be noted that, for the HOOK-up network request, the playback device may determine whether the HOOK-up network request belongs to the second network request based on the method provided in S410 to S460 shown in fig. 4. For example, in the case that the network request triggered by the second application program meets a preset condition, determining that the network request belongs to the second network request, where the preset condition includes that a request path of the network request initiated by the second application program includes a preset parameter, that the network request does not belong to a request for requesting a static resource, and that response data corresponding to the network request is related to a user interface presentation of the second application program, where the preset parameter is a parameter for indicating that the request path is an interface related to the user interface presentation of the second application program.
In step 530, based on the second network request, target parameter information corresponding to the second network request is determined in the target record file, where the target parameter information includes first parameter information corresponding to the first network request matched with the second network request in the target record file.
After determining the second network request, the playback device searches for a first network request matched with the second network request in the target record file based on the second network request, and the first parameter information of the first network request is the target parameter information corresponding to the second network request.
It should be understood that in the target recording file, the first network request and the first parameter information may be stored in a data format of "first network request—first parameter information". The playback device may then match the second network request with the first network request to determine a first network request in the target recording file that matches the second network request.
It should be noted that, the detailed description of the first parameter information may refer to the related content of the embodiment of the application recording method, which is not described herein.
In step 540, based on the target parameter information, the event corresponding to the second network request is played back.
Here, the network request initiated by the second application may be actively initiated by the second application. For example, when the second application program starts to enter the first screen page, no touch event (such as clicking, sliding, etc.) is generated, and the second application program also actively initiates a network request to acquire the UI resource of the first screen page. For another example, the second application may perform a regular refresh during running, and each refresh may actively generate a network request to request the refreshed UI resource. Of course, the network request initiated by the second application may also be triggered by a touch event directed to a page of the second application. For example, the user triggers the second application to initiate a network request by clicking a page refresh button in the page to request refreshed page data.
Therefore, the event corresponding to the second network request is played back based on the target parameter information, and the event triggering the second network request is played back through the target parameter information. The event triggering the second network request may be a touch event, and then data related to the touch event, such as triggering time of the touch event, corresponding screen coordinates, and the like, may also be recorded in the target recording file, so as to restore the touch event recorded in the recording process in the playback device. Of course, the event triggering the second network request may also be an event actively initiated by the second application program, and the event actively initiated by the second application program may also be recorded in the target record file, and of course, the event actively initiated by the second application program may also not be recorded in the target record file.
It should be understood that playing back the event corresponding to the second network request based on the target parameter information refers to playing back the event by using the data in the target recording file, and the playback device does not actually send the second network request to the server.
It should be noted that the recorded playback of the application is actually divided into two parts, a network request part and a UI part. The UI part is used for displaying the UI elements acquired by the network request part.
Therefore, the target recording file sent by the recording equipment is obtained, and the target parameter information corresponding to the second network request is determined in the target recording file, so that the event corresponding to the second network request is played back based on the target parameter information.
Fig. 6 is a detailed flow chart of step 530 shown in fig. 5. As shown in fig. 6, step 530 may include the following steps.
In step 531, according to the second parameter information carried by the second network request, a candidate network request matched with the second parameter information is determined in the target record file, where the candidate network request includes the first network request matched with the first parameter information and the second parameter information in the target record file.
Here, the first parameter information includes a first request path corresponding to the first network request, a first target parameter included in the first request path, and response data transmitted by the server in response to the first network request. Correspondingly, the second parameter information carried by the second network request comprises a second request path corresponding to the second network request and a second target parameter included in the second request path.
Wherein the meaning of the second request path is consistent with the meaning of the first request path, and the meaning of the second target parameter is consistent with the meaning of the first target parameter, reference may be made to the related description of the above embodiments, and detailed descriptions of the second request path and the second target parameter are not provided herein.
In the target recording file, the first network request and the first parameter information may be stored in a data format of "first network request-first request path-first target parameter-response data". And searching a first network request matched with the first parameter information and the second parameter information in the target record file according to the second parameter information carried by the second network request, wherein the first network request is the candidate network request.
In some implementations, in a case where the service source of the second network request triggered by the second application is configured with a key parameter, the playback device may determine the candidate network request in the target record file based on the second request path carried by the second network request and the second target parameter.
Here, the service source of the second network request refers to a functional module in the second application program that triggers the second network request. For example, different channel lists may be considered a service source, and different operations may be considered different service sources. For example, a pull-down refresh, a click channel refresh, a click Tab refresh are all refresh operations, but the source of traffic triggering the refresh operations is different.
For different types of service sources in the second application, it may be configured with key parameters for characterizing the type to which the service source belongs. For example, different key parameters may be configured for each of the drop-down refresh, the click channel refresh, and the click Tab refresh, to indicate a distinction between different types of service source triggered refresh requests by the different key parameters.
It should be noted that, when the service source initiates the network request, the key parameter of the service source is carried in the network request to request the correct response data from the server through the network request. When the network request carries the key parameters, the server returns response data corresponding to the key parameters, and if the key parameters are different, the returned data are different. For example, the pull-down refresh, the click channel refresh, and the click Tab refresh all belong to the refresh type network request, but the key parameters carried by the triggered network request are different, so that different resources are obtained from the server.
If the service source of the second network request triggered by the second application program is configured with a key parameter, it is indicated that the second network request is a dedicated request initiated by the service source indicated by the key parameter, so that the playback device may determine the candidate network request in the target record file based on the second request path carried by the second network request and the second target parameter. The candidate network request comprises a first network request of which the first request path and the first target parameter in the target record file are matched with the second request path and the second target parameter, and the key parameter is used for representing the type of the service source.
In the target recording file, the first network request and the first parameter information may be stored in a data format of "first network request-first request path-first target parameter-response data". And searching a first network request of which the first request path and the first target parameter are matched with the second request path and the second target parameter in the target record file according to the second request path and the second target parameter carried by the second network request, wherein the searched first network request is the candidate network request.
As some examples, both the first request path and the first target parameter matching the second request path and the second target parameter may mean that the first request path and the first target parameter are identical to the second request path and the second target parameter.
As yet other examples, both the first request path and the first target parameter matching the second request path and the second target parameter may mean that the first target parameter is identical to the second target parameter and that the prefix portion of the first request path is identical to the prefix portion of the second request path.
In other embodiments, where the service source is not configured with critical parameters, the playback device may determine a candidate network request in the target record file based on the second request path carried by the second network request, where the candidate network request includes a first network request in the target record file for which the first request path matches the second request path.
Here, if the service source is not configured with the key parameters, it is indicated that the second network request is a general request, such as a login request. At this time, the UI display may not be affected regardless of the second target parameter included in the second network request, that is, the response data returned by the server corresponding to the second target parameter carried in the second network request. For example, the second target parameters such as the user name, the password and the like carried in the login request do not affect UI display.
Thus, the playback device may determine candidate network requests in the target recording file based only on the second request path carried by the second network request. In the target record file, the first network request and the first parameter information may be stored in a data format of "first network request-first request path-first target parameter-response data". And searching a first network request matched with the first request path and the second request path in the target record file according to a second request path carried by the second network request, wherein the first network request is the candidate network request.
As some examples, the first request path matching the second request path may mean that the first request path is identical to the second request path.
As yet other examples, the first request path matching the second request path may mean that the prefix portion of the first request path is the same as the prefix portion of the second request path.
Therefore, whether the service source triggering the second network request is configured with the key parameters or not is judged, and the candidate network request is determined in the target record file based on the second request path carried by the second network request and the second target parameters under the condition that the key parameters are configured, or the candidate network request is determined in the target record file based on the second request path carried by the second network request under the condition that the key parameters are not configured, so that the playback equipment can be ensured to find the first network request matched with the second network request in the target record file in the playback process, and accurate playback is realized.
In step 532, a target network request matching the trigger time is determined from the candidate network requests according to the trigger time of the second network request.
Here, the trigger time of the second network request refers to the time at which the second network request is triggered during playback. Wherein the trigger time of the second network request is actually used to represent the trigger timing of the second network request. For example, during playback, the trigger times of network request a, network request B, network request C, and network request D are actually reflected in the corresponding timings, with network request a triggered at 14:33:24, network request B triggered at 14:33:30, network request C triggered at 14:33:32, and network request B triggered at 14:33:50. For example, network request a is a first triggered network request and network request B is a second triggered network request.
In some embodiments, the candidate network requests may be ranked according to the sequence of the triggering times of the candidate network requests, so as to obtain a ranking result. And then searching candidate network requests with the triggering time sequence of the candidate network requests matched with the time sequence corresponding to the triggering time sequence of the second network requests in the sequencing result according to the triggering time of the second network requests, wherein the searched candidate network requests are target network requests.
For example, in the recording process, if clicking is performed first and then sliding is performed, and in the playback process, if the trigger time of the second network request is at the time sequence of clicking, then the network request corresponding to the clicking action is matched.
In step 533, based on the first parameter information corresponding to the target network request, target parameter information corresponding to the second network request is obtained.
Here, the first parameter information corresponding to the target network request may be determined as the target parameter information corresponding to the second network request.
It should be noted that the playback device does not actually send the second network request to the server, but performs playback based on the target parameter information determined in the target recording file.
Therefore, the first network request matched with the second network request can be accurately determined in the target recording file according to the second parameter information carried by the second network request and the triggering time, so that the accurate target parameter information is obtained, and accurate playback is realized according to the target parameter information.
It should be noted that, if the first network request matching the second network request cannot be determined in the target recording file, which means that, in the recording process, the first network request corresponding to the second network request is not recorded in the target recording file, the playback device may send the second network request to the server to request response data from the server.
Fig. 7 is a schematic diagram of module connection of an application recording apparatus according to an exemplary embodiment. As shown in fig. 7, an embodiment of the present disclosure provides an application program recording apparatus, applied to a recording device, an application program recording apparatus 700 includes:
a first obtaining module 701 configured to obtain, during recording, a first network request initiated by a first application in response to a recording request for the first application, wherein the first network request includes a network request related to a user interface presentation of the first application;
The obtaining module 702 is configured to respond to a recording end request for the first application program, obtain a target recording file based on the first network request and first parameter information corresponding to the first network request, where the target recording file is used by a playback device in a second application program of the playback device, and play back an event corresponding to a second network request triggered by the second application program according to the first parameter information of the first network request included in the target recording file.
Optionally, the first network request includes a network request related to the user interface presentation of the first application program and not belonging to a request for static resources, and the first obtaining module 701 is specifically configured to:
determining that the network request belongs to the first network request under the condition that the network request initiated by the first application program meets a preset condition;
the preset condition includes that a request path of a network request initiated by the first application program includes a preset parameter, the network request does not belong to a request for requesting a static resource, response data corresponding to the network request is related to user interface display of the first application program, and the preset parameter is a parameter for indicating that the request path is an interface related to the user interface display of the first application program.
Optionally, the first parameter information includes a first request path corresponding to the first network request, a first target parameter included in the first request path, and response data sent by the server in response to the first network request.
With respect to the application recording apparatus 700 in the above embodiment, the specific manner in which the respective modules perform the operations has been described in detail in the embodiment regarding the application recording method, and will not be described in detail herein.
Fig. 8 is a schematic diagram of module connection of an application playback apparatus according to an exemplary embodiment. As shown in fig. 8, an embodiment of the present disclosure provides an application playback apparatus, applied to a playback device, the application playback apparatus 800 including:
the second acquisition module is configured to acquire a target recording file sent by recording equipment, wherein the target recording file comprises a first network request related to a first application program in the recording equipment and first parameter information corresponding to the first network request, and the first network request comprises a network request related to user interface display of the first application program;
a third acquisition module configured to acquire a second network request triggered by a second application program of the playback device in response to a playback request of the second application program, wherein the second network request includes a network request related to a user interface presentation of the second application program;
A determining module configured to determine, based on the second network request, target parameter information corresponding to the second network request in the target record file, where the target parameter information includes first parameter information corresponding to the first network request matched with the second network request in the target record file;
and the playback module is configured to play back the event corresponding to the second network request based on the target parameter information.
Optionally, the determining module includes:
a first determining unit, configured to determine, according to second parameter information carried by the second network request, a candidate network request matched with the second parameter information in the target recording file, where the candidate network request includes the first network request matched with the first parameter information and the second parameter information in the target recording file;
a second determining unit configured to determine a target network request matching a trigger time of the second network request among the candidate network requests according to the trigger time;
and a third determining unit configured to obtain target parameter information corresponding to the second network request based on the first parameter information corresponding to the target network request.
Optionally, the first parameter information includes a first request path corresponding to the first network request, a first target parameter included in the first request path, and response data sent by a server in response to the first network request; the second parameter information carried by the second network request comprises a second request path corresponding to the second network request and a second target parameter included in the second request path;
the first determination unit is specifically configured to:
determining the candidate network request in the target record file based on the second request path carried by the second network request and the second target parameter under the condition that the second application program triggers the service source of the second network request to be configured with key parameters, wherein the candidate network request comprises a first network request of which the first request path and the first target parameter in the target record file are matched with the second request path and the second target parameter, and the key parameters are used for representing the type of the service source;
and under the condition that the service source is not configured with the key parameters, determining the candidate network request in the target record file based on a second request path carried by the second network request, wherein the candidate network request comprises a first network request of which the first request path in the target record file is matched with the second request path.
Optionally, the first network request includes a network request related to a user interface presentation of the first application and not belonging to a request for static resources, and the second network request includes a network request related to a user interface presentation of the second application and not belonging to a request for static resources.
With respect to the application playback apparatus 800 in the above-described embodiment, the specific manner in which the respective modules perform operations has been described in detail in the embodiment regarding the application playback method, and will not be described in detail here.
Referring now to fig. 9, a schematic diagram of an electronic device (e.g., recording device or playback device of fig. 1 or 2) 900 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 9 is merely an example, and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 9, the electronic device 900 may include a processing means (e.g., a central processor, a graphics processor, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage means 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
In general, the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 907 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 908 including, for example, magnetic tape, hard disk, etc.; and a communication device 909. The communication means 909 may allow the electronic device 900 to communicate wirelessly or by wire with other devices to exchange data. While fig. 9 shows an electronic device 900 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When executed by the processing device 901, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some embodiments, the recording device, playback device may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in response to a recording request for a first application program, acquiring a first network request initiated by the first application program during recording, wherein the first network request comprises a network request related to user interface presentation of the first application program; and responding to a recording ending request aiming at the first application program, and acquiring a target recording file based on the first network request and first parameter information corresponding to the first network request, wherein the target recording file is used for playing back an event corresponding to a second network request triggered by a second application program according to the first parameter information of the first network request included in the target recording file in the second application program of the playback device.
Alternatively, the computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquiring a target recording file sent by recording equipment, wherein the target recording file comprises a first network request related to a first application program in the recording equipment and first parameter information corresponding to the first network request, and the first network request comprises a network request related to user interface display of the first application program; responsive to a playback request for a second application of the playback device, obtaining a second network request triggered by the second application, wherein the second network request includes a network request related to a user interface presentation of the second application; determining target parameter information corresponding to the second network request in the target recording file based on the second network request, wherein the target parameter information comprises first parameter information corresponding to the first network request matched with the second network request in the target recording file; and playing back the event corresponding to the second network request based on the target parameter information.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ 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 computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. The name of a module does not in some cases define the module itself.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims. The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.

Claims (11)

1. An application program recording method, applied to a recording device, the method comprising:
in response to a recording request for a first application program, acquiring a first network request initiated by the first application program during recording, wherein the first network request comprises a network request related to user interface presentation of the first application program;
and responding to a recording ending request aiming at the first application program, and acquiring a target recording file based on the first network request and first parameter information corresponding to the first network request, wherein the target recording file is used for playing back an event corresponding to a second network request triggered by a second application program according to the first parameter information of the first network request included in the target recording file in the second application program of the playback device.
2. The method of claim 1, wherein the first network request comprises a network request related to a user interface presentation of the first application and not belonging to a requesting static resource, the first network request determined by:
determining that the network request belongs to the first network request under the condition that the network request initiated by the first application program meets a preset condition;
the preset condition includes that a request path of a network request initiated by the first application program includes a preset parameter, the network request does not belong to a request for requesting a static resource, response data corresponding to the network request is related to user interface display of the first application program, and the preset parameter is a parameter for indicating that the request path is an interface related to the user interface display of the first application program.
3. The method according to claim 1 or 2, wherein the first parameter information includes a first request path corresponding to the first network request, a first target parameter included in the first request path, and response data transmitted by a server in response to the first network request.
4. An application playback method, for application to a playback device, the method comprising:
acquiring a target recording file sent by recording equipment, wherein the target recording file comprises a first network request related to a first application program in the recording equipment and first parameter information corresponding to the first network request, and the first network request comprises a network request related to user interface display of the first application program;
responsive to a playback request for a second application of the playback device, obtaining a second network request triggered by the second application, wherein the second network request includes a network request related to a user interface presentation of the second application;
determining target parameter information corresponding to the second network request in the target recording file based on the second network request, wherein the target parameter information comprises first parameter information corresponding to the first network request matched with the second network request in the target recording file;
and playing back the event corresponding to the second network request based on the target parameter information.
5. The method of claim 4, wherein determining, based on the second network request, target parameter information corresponding to the second network request in the target record file includes:
according to second parameter information carried by the second network request, determining a candidate network request matched with the second parameter information in the target recording file, wherein the candidate network request comprises the first network request matched with the first parameter information and the second parameter information in the target recording file;
determining a target network request matched with the triggering time in the candidate network requests according to the triggering time of the second network request;
and obtaining the target parameter information corresponding to the second network request based on the first parameter information corresponding to the target network request.
6. The method of claim 5, wherein the first parameter information includes a first request path corresponding to the first network request, a first target parameter included in the first request path, and response data transmitted by a server in response to the first network request; the second parameter information carried by the second network request comprises a second request path corresponding to the second network request and a second target parameter included in the second request path;
And determining a candidate network request matched with the second parameter information in the target record file according to the second parameter information carried by the second network request, wherein the candidate network request comprises the following components:
determining the candidate network request in the target record file based on the second request path carried by the second network request and the second target parameter under the condition that the second application program triggers the service source of the second network request to be configured with key parameters, wherein the candidate network request comprises a first network request of which the first request path and the first target parameter in the target record file are matched with the second request path and the second target parameter, and the key parameters are used for representing the type of the service source;
and under the condition that the service source is not configured with the key parameters, determining the candidate network request in the target record file based on a second request path carried by the second network request, wherein the candidate network request comprises a first network request of which the first request path in the target record file is matched with the second request path.
7. The method of any of claims 4 to 6, wherein the first network request comprises a network request related to a user interface presentation of the first application and not belonging to a request for static resources, and wherein the second network request comprises a network request related to a user interface presentation of the second application and not belonging to a request for static resources.
8. An application recording apparatus, for use with a recording device, the method comprising:
a first acquisition module configured to acquire a first network request initiated by a first application program during recording in response to a recording request for the first application program, wherein the first network request includes a network request related to a user interface presentation of the first application program;
the obtaining module is configured to respond to a recording ending request for the first application program, obtain a target recording file based on the first network request and first parameter information corresponding to the first network request, wherein the target recording file is used for playing back an event corresponding to a second network request triggered by a second application program in the second application program of the playback device according to the first parameter information of the first network request included in the target recording file.
9. An application playback apparatus for use with a playback device, the apparatus comprising:
the second acquisition module is configured to acquire a target recording file sent by recording equipment, wherein the target recording file comprises a first network request related to a first application program in the recording equipment and first parameter information corresponding to the first network request, and the first network request comprises a network request related to user interface display of the first application program;
a third acquisition module configured to acquire a second network request triggered by a second application program of the playback device in response to a playback request of the second application program, wherein the second network request includes a network request related to a user interface presentation of the second application program;
a determining module configured to determine, based on the second network request, target parameter information corresponding to the second network request in the target record file, where the target parameter information includes first parameter information corresponding to the first network request matched with the second network request in the target record file;
And the playback module is configured to play back the event corresponding to the second network request based on the target parameter information.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processing device, implements the steps of the method of any one of claims 1 to 3 or the steps of the method of any one of claims 4 to 7.
11. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method of any one of claims 1 to 3 or to carry out the steps of the method of any one of claims 4 to 7.
CN202310211790.7A 2023-02-27 2023-02-27 Application program recording method, playback method, device, medium and electronic equipment Pending CN116225600A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310211790.7A CN116225600A (en) 2023-02-27 2023-02-27 Application program recording method, playback method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310211790.7A CN116225600A (en) 2023-02-27 2023-02-27 Application program recording method, playback method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116225600A true CN116225600A (en) 2023-06-06

Family

ID=86587115

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310211790.7A Pending CN116225600A (en) 2023-02-27 2023-02-27 Application program recording method, playback method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116225600A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117234949A (en) * 2023-11-13 2023-12-15 广州品唯软件有限公司 Test data noise reduction method and device, storage medium and computer equipment
CN117472720A (en) * 2023-12-28 2024-01-30 北京中科闻歌科技股份有限公司 General data acquisition system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117234949A (en) * 2023-11-13 2023-12-15 广州品唯软件有限公司 Test data noise reduction method and device, storage medium and computer equipment
CN117234949B (en) * 2023-11-13 2024-03-19 广州品唯软件有限公司 Test data noise reduction method and device, storage medium and computer equipment
CN117472720A (en) * 2023-12-28 2024-01-30 北京中科闻歌科技股份有限公司 General data acquisition system

Similar Documents

Publication Publication Date Title
CN111510760B (en) Video information display method and device, storage medium and electronic equipment
CN116225600A (en) Application program recording method, playback method, device, medium and electronic equipment
CN110619100B (en) Method and apparatus for acquiring data
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN111368185A (en) Data display method and device, storage medium and electronic equipment
CN111694757B (en) Application program testing method and device, electronic equipment and computer readable storage medium
CN111488185B (en) Page data processing method, device, electronic equipment and readable medium
CN111432001B (en) Method, apparatus, electronic device and computer readable medium for jumping scenes
US11886798B2 (en) Method and apparatus for obtaining loading time length of image in webpage, and electronic device
CN111163336B (en) Video resource pushing method and device, electronic equipment and computer readable medium
CN111291206A (en) Method and device for marking house source, electronic equipment and storage medium
CN109902726B (en) Resume information processing method and device
CN113032172B (en) Abnormality detection method and device and electronic equipment
CN114021016A (en) Data recommendation method, device, equipment and storage medium
CN112291121B (en) Data processing method and related equipment
CN111552620B (en) Data acquisition method, device, terminal and storage medium
CN111311358B (en) Information processing method and device and electronic equipment
WO2023134617A1 (en) Template selection method and apparatus, and electronic device and storage medium
CN113836415A (en) Information recommendation method, device, medium and equipment
CN113656286A (en) Software testing method and device, electronic equipment and readable storage medium
CN112306858A (en) Test method and device and electronic equipment
CN112287171A (en) Information processing method and device and electronic equipment
CN112463573A (en) Method, device, terminal and storage medium for testing application
CN112084440B (en) Data verification method, device, electronic equipment and computer readable medium
CN117667710A (en) Determination method, test method, device, medium and equipment for page test case

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