CN111506496A - Test data acquisition method and device, electronic equipment and storage medium - Google Patents

Test data acquisition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111506496A
CN111506496A CN202010167773.4A CN202010167773A CN111506496A CN 111506496 A CN111506496 A CN 111506496A CN 202010167773 A CN202010167773 A CN 202010167773A CN 111506496 A CN111506496 A CN 111506496A
Authority
CN
China
Prior art keywords
target
recording
application program
behavior data
identifier
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.)
Withdrawn
Application number
CN202010167773.4A
Other languages
Chinese (zh)
Inventor
王腾
傅瑞
张清波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202010167773.4A priority Critical patent/CN111506496A/en
Publication of CN111506496A publication Critical patent/CN111506496A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The embodiment of the disclosure provides a test data acquisition method, a test data acquisition device, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving a recording start request sent by a user terminal, wherein the recording start request carries a target application program identifier or a target interface identifier; recording application behavior data of a target application program corresponding to the target application program identifier, or recording application behavior data of a target interface corresponding to the target interface identifier; and sending the recorded application behavior data to a target protocol analysis server, so that the user terminal acquires the application behavior data subjected to protocol analysis from the target protocol analysis server as test data. Therefore, by the technical scheme provided by the embodiment of the disclosure, the test data required by the tester can be recorded in real time, and only the test data required by the tester needs to be stored, so that the storage cost is greatly reduced.

Description

Test data acquisition method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for acquiring test data, an electronic device, and a storage medium.
Background
With the rapid development of the mobile internet technology, more and more users use the intelligent terminal, and the intelligent terminal used by the user can be called a user terminal. When a user uses an application installed in the user terminal, the user terminal generates behavior data about the application, and the user terminal reports the behavior data to the server.
And, during the process of using the application program installed in the test terminal, the test terminal will also generate test data related to the application program, and the test terminal will also upload the test data to the server. After receiving the behavior data uploaded by the user terminal and the test data uploaded by the test terminal, the server generates a log file based on the behavior data and the test data.
When a tester needs to test whether test data is abnormal or not, the tester needs to acquire the test data, and a common method in the related art is as follows: and acquiring the log file from the server, and inquiring the test data from the log file. However, because the log file has a lot of data, it takes a long time to query the test data that the tester wants from the log file, which results in a low query efficiency and makes it impossible to obtain the test data in real time.
Disclosure of Invention
In order to solve the technical problems that in the related art, when a tester needs to test data, a log file needs to be acquired from a server, and the time required for inquiring the test data wanted by the tester from the log file is long, so that the inquiring efficiency is low, and the test data cannot be acquired in real time, the embodiment of the disclosure provides a test data acquiring method and device, an electronic device and a storage medium.
In a first aspect, an embodiment of the present disclosure provides a method for acquiring test data, where the method includes:
receiving a recording start request sent by a user terminal, wherein the recording start request carries a target application program identifier or a target interface identifier;
recording application behavior data of a target application program corresponding to the target application program identifier, or recording application behavior data of a target interface corresponding to the target interface identifier;
and sending the recorded application behavior data to a target protocol analysis server, so that the user terminal acquires the application behavior data subjected to protocol analysis from the target protocol analysis server as test data.
Optionally, the recording of the application behavior data of the target application corresponding to the target application identifier includes:
embedding a recording script into an application program frame code of the target application program, wherein the recording script is used for recording application behavior data of the target application program corresponding to the target application program identifier;
and executing the recording script to obtain the application behavior data of the target application program.
Optionally, the recording of the application behavior data of the target interface corresponding to the target interface identifier includes:
in an application program frame code of an application program where a target interface is located, starting an application behavior data recording switch corresponding to the target interface, wherein the target interface is an interface with a target interface identifier;
and recording the application behavior data of the target interface.
Optionally, the recording request is sent by the user terminal after receiving an operation of a target button of a target page by a user, where the target button has a recording start identifier.
Optionally, the method further includes:
receiving a recording ending request sent by a user terminal, wherein the recording ending request carries a target application program identifier or a target interface identifier, and the recording ending request is sent after the user terminal receives that the user operates the target button again;
and stopping recording the application behavior data of the target application program corresponding to the target application program identifier, or stopping recording the application behavior data of the target interface corresponding to the target interface identifier.
In a second aspect, an embodiment of the present disclosure provides a test data acquiring apparatus, including:
the first request receiving module is used for receiving a recording starting request sent by a user terminal, wherein the recording starting request carries a target application program identifier or a target interface identifier;
the data recording module is used for recording application behavior data of a target application program corresponding to the target application program identifier, or recording application behavior data of a target interface corresponding to the target interface identifier;
and the data sending module is used for sending the recorded application behavior data to a target protocol analysis server so that the user terminal can obtain the application behavior data after protocol analysis from the target protocol analysis server as test data.
Optionally, the data recording module is specifically configured to:
embedding a recording script into an application program frame code of the target application program, wherein the recording script is used for recording application behavior data of the target application program corresponding to the target application program identifier;
and executing the recording script to obtain the application behavior data of the target application program.
Optionally, the data recording module is specifically configured to:
in an application program frame code of an application program where a target interface is located, starting an application behavior data recording switch corresponding to the target interface, wherein the target interface is an interface with a target interface identifier;
and recording the application behavior data of the target interface.
Optionally, the recording request is sent by the user terminal after receiving an operation of a target button of a target page by a user, where the target button has a recording start identifier.
Optionally, the apparatus further comprises:
the second request receiving module is used for receiving a recording ending request sent by the user terminal, wherein the recording ending request carries a target application program identifier or a target interface identifier, and the recording ending request is sent after the user terminal receives that the user operates the target button again;
and the data recording stopping module is used for stopping recording the application behavior data of the target application program corresponding to the target application program identifier, or stopping recording the application behavior data of the target interface corresponding to the target interface identifier.
In a third aspect, an embodiment of the present disclosure provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the test data acquiring method according to the first aspect when executing the program.
In a fourth aspect, the disclosed embodiments provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the test data acquisition method according to the first aspect.
According to the technical scheme provided by the embodiment of the disclosure, a recording start request sent by a user terminal is received, wherein the recording start request carries a target application program identifier or a target interface identifier; recording application behavior data of a target application program corresponding to the target application program identifier, or recording application behavior data of a target interface corresponding to the target interface identifier; and sending the recorded application behavior data to a target protocol analysis server, so that the user terminal acquires the application behavior data subjected to protocol analysis from the target protocol analysis server as test data.
Therefore, through the technical scheme provided by the embodiment of the disclosure, the test data required by the tester can be recorded in real time, unlike the related art, which takes a long time to inquire the test data required by the tester from the log file. Moreover, in the related art, the user terminal needs to store the log file to the local, but in the embodiment of the disclosure, only the test data needed by the tester needs to be stored, so that the storage cost is greatly reduced.
Drawings
FIG. 1 is a flowchart illustrating steps of a method for obtaining test data according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating steps of another method for obtaining test data according to an embodiment of the present disclosure;
fig. 3 is a block diagram of a test data acquisition apparatus according to an embodiment of the present disclosure;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, the present disclosure is described in further detail with reference to the accompanying drawings and the detailed description.
In order to solve the technical problems that in the related art, when a tester needs to test data, a log file needs to be acquired from a server, and the time required for inquiring the test data wanted by the tester from the log file is long, so that the inquiring efficiency is low, and the test data cannot be acquired in real time, the embodiment of the disclosure provides a test data acquiring method and device, an electronic device and a storage medium.
In a first aspect, a detailed description is first provided for a test data acquisition method provided in an embodiment of the present disclosure.
It should be noted that an execution subject of the test data acquisition method provided by the embodiment of the present disclosure may be a server or the like. Specifically, when a service is online, that is, an application program is online, the application program is usually issued to a plurality of servers, and any one of the plurality of servers may be a server serving as an execution subject, which is not specifically limited in this embodiment of the present disclosure.
As shown in fig. 1, a method for obtaining test data provided by an embodiment of the present disclosure may include the following steps:
s110, receiving a recording start request sent by the user terminal.
Wherein, the recording start request carries the target application program identifier, or the target interface identifier.
In one embodiment, when a tester wants to record application behavior data of an application, the tester may trigger a user terminal used by the tester to send a recording start request to a server serving as an execution subject, where the recording start request carries an application identifier of the application. For clarity of the scheme description, the application may be referred to as a target application, and the application identifier of the application may be referred to as a target application identifier. The target application identifier may be information for identifying the target application for a user, such as a name of the target application, and this is not specifically limited in this embodiment of the disclosure.
In another embodiment, when a tester wants to record application behavior data of a certain interface of a certain application program, the tester may trigger a user terminal used by the tester to send a recording start request to a server as an execution subject, where the recording start request carries an interface identifier of the interface. For clarity of description of the scheme, the interface may be referred to as a target interface, and the interface identifier of the interface may be referred to as a target interface identifier. The target interface identifier may be information of the target interface, such as a name of the target interface, that is identified by the user, which is not specifically limited in this embodiment of the disclosure.
In practical application, as an implementation manner of the embodiment of the present disclosure, the recording request may be sent after the user terminal receives an operation of a target button of a target page by a user, where the target button has a recording start identifier.
Specifically, a button marked "start recording" may be set on a web page of the user terminal used by the tester. Moreover, the tester can select a certain server which has issued the application program on the web page, and after selecting to record a single application program or a single interface in the server, the tester can click a button marked with 'start recording', and the user terminal sends a recording start request to the server after receiving the click operation of the tester on the mark marked with 'start recording'.
And S120, recording application behavior data of the target application program corresponding to the target application program identifier, or recording application behavior data of the target interface corresponding to the target interface identifier.
Specifically, after receiving the recording start request, the server serving as the execution subject parses the recording start request to obtain a target application program identifier or a target interface identifier carried by the recording start request. Moreover, when the recording start request carries the target application identifier, the server serving as the execution subject may record application behavior data of the target application corresponding to the target application identifier. When the recording start request carries the target interface identifier, the server serving as the execution subject may record application behavior data of the target interface corresponding to the target interface identifier.
In one embodiment, recording the application behavior data of the target application identifying the corresponding target application may include the following two steps, step a1 and step a 2:
step a1, embedding the recording script in the application framework code of the target application.
The recording script is used for recording application behavior data of the target application program corresponding to the target application program identification.
And a2, executing the recording script to obtain the application behavior data of the target application program.
Specifically, since the application program exists depending on the application program framework, when recording the application behavior data of the target application program, the recording script may be embedded in the application program framework code of the target application program, and then the recording script is executed, and in the execution process of the recording script, the server serving as the execution subject records the application behavior data of the target application program, so as to obtain the application behavior data of the target application program.
In another embodiment, the recording of the application behavior data of the target interface corresponding to the target interface identifier may include the following steps, step b1 and step b 2:
step b1, in the application program frame code of the application program where the target interface is located, the application behavior data recording switch corresponding to the target interface is turned on, and the target interface is an interface with a target interface identifier.
And b2, recording the application behavior data of the target interface.
Specifically, the application program exists depending on the application program framework, and the application behavior data recording switch corresponding to each interface can be set in the application program framework, so that when the application behavior data of the target interface corresponding to the target interface identifier is recorded, the application behavior data recording switch corresponding to the target interface can be turned on in the application program framework code of the application program where the target interface is located. After the application behavior data recording switch corresponding to the target interface is turned on, the server serving as the execution subject may record the application behavior data of the target interface.
S130, the recorded application behavior data is sent to the target protocol analysis server, so that the user terminal can obtain the application behavior data after the protocol analysis from the target protocol analysis server as test data.
Specifically, after the application behavior data of the target application program is recorded by the server serving as the execution subject, or after the application behavior data of the target interface is received, the recorded application behavior data may be sent to a target protocol analysis server corresponding to the server serving as the execution subject, and after the application behavior data recorded by the execution subject is received by the target protocol analysis server, the recorded application behavior data may be subjected to protocol analysis and stored as a test data file required by the user terminal.
According to the technical scheme provided by the embodiment of the disclosure, a recording start request sent by a user terminal is received, wherein the recording start request carries a target application program identifier or a target interface identifier; recording application behavior data of a target application program corresponding to the target application program identifier, or recording application behavior data of a target interface corresponding to the target interface identifier; and sending the recorded application behavior data to a target protocol analysis server, so that the user terminal acquires the application behavior data subjected to protocol analysis from the target protocol analysis server as test data. Therefore, through the technical scheme provided by the embodiment of the disclosure, the test data required by the tester can be recorded in real time, unlike the related art, which takes a long time to inquire the test data required by the tester from the log file. Moreover, in the related art, the user terminal needs to store the log file to the local, but in the embodiment of the disclosure, only the test data needed by the tester needs to be stored, so that the storage cost is greatly reduced.
On the basis of the foregoing embodiment, in an implementation manner, the test data acquiring method may further include the following steps, as shown in fig. 2, S140 and S150:
s140, receiving a recording end request sent by the user terminal.
The recording end request carries a target application program identifier or a target interface identifier, and the recording end request is sent after the user terminal receives the user operation target button again.
S150, stopping recording the application behavior data of the target application program corresponding to the target application program identifier, or stopping recording the application behavior data of the target interface corresponding to the target interface identifier.
Specifically, a button marked "start recording" may be set on a web page of the user terminal used by the tester. After obtaining the application behavior data required by the tester, the tester can click the button marked with 'start recording' again. And after receiving the click operation marked with the record start by the tester again, the user terminal sends a record end request to the server serving as an execution main body. And after receiving the recording ending request, the server serving as the execution subject stops recording the application behavior data of the target application program corresponding to the target application program identifier, or stops recording the application behavior data of the target interface corresponding to the target interface identifier.
According to the technical scheme provided by the embodiment of the disclosure, a recording start request sent by a user terminal is received, wherein the recording start request carries a target application program identifier or a target interface identifier; recording application behavior data of a target application program corresponding to the target application program identifier, or recording application behavior data of a target interface corresponding to the target interface identifier; and sending the recorded application behavior data to a target protocol analysis server, so that the user terminal acquires the application behavior data subjected to protocol analysis from the target protocol analysis server as test data. Therefore, through the technical scheme provided by the embodiment of the disclosure, the test data required by the tester can be recorded in real time, unlike the related art, which takes a long time to inquire the test data required by the tester from the log file. Moreover, in the related art, the user terminal needs to store the log file to the local, but in the embodiment of the disclosure, only the test data needed by the tester needs to be stored, so that the storage cost is greatly reduced. Also, at the end of recording, the user terminal may transmit a recording end request to the server as an execution subject to stop recording the test data.
It is noted that, for simplicity of explanation, method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present disclosure is not limited by the order of acts, as some steps may, in accordance with the present disclosure, occur in other orders and concurrently. Further, those skilled in the art will appreciate that the embodiments described in the specification are exemplary embodiments and that no single embodiment is necessarily required by the disclosure.
In a second aspect, an embodiment of the present disclosure provides a test data acquiring apparatus, as shown in fig. 3, the apparatus including:
a first request receiving module 310, configured to receive a recording start request sent by a user terminal, where the recording start request carries a target application identifier or a target interface identifier;
a data recording module 320, configured to record application behavior data of a target application corresponding to the target application identifier, or record application behavior data of a target interface corresponding to the target interface identifier;
a data sending module 330, configured to send the recorded application behavior data to a target protocol analysis server, so that the user terminal obtains the application behavior data after protocol analysis from the target protocol analysis server, where the application behavior data is used as test data.
According to the technical scheme provided by the embodiment of the disclosure, a recording start request sent by a user terminal is received, wherein the recording start request carries a target application program identifier or a target interface identifier; recording application behavior data of a target application program corresponding to the target application program identifier, or recording application behavior data of a target interface corresponding to the target interface identifier; and sending the recorded application behavior data to a target protocol analysis server, so that the user terminal acquires the application behavior data subjected to protocol analysis from the target protocol analysis server as test data.
Therefore, through the technical scheme provided by the embodiment of the disclosure, the test data required by the tester can be recorded in real time, unlike the related art, which takes a long time to inquire the test data required by the tester from the log file. Moreover, in the related art, the user terminal needs to store the log file to the local, but in the embodiment of the disclosure, only the test data needed by the tester needs to be stored, so that the storage cost is greatly reduced.
Optionally, the data recording module is specifically configured to:
embedding a recording script into an application program frame code of the target application program, wherein the recording script is used for recording application behavior data of the target application program corresponding to the target application program identifier;
and executing the recording script to obtain the application behavior data of the target application program.
Optionally, the data recording module is specifically configured to:
in an application program frame code of an application program where a target interface is located, starting an application behavior data recording switch corresponding to the target interface, wherein the target interface is an interface with a target interface identifier;
and recording the application behavior data of the target interface.
Optionally, the recording request is sent by the user terminal after receiving an operation of a target button of a target page by a user, where the target button has a recording start identifier.
Optionally, the apparatus further comprises:
the second request receiving module is used for receiving a recording ending request sent by the user terminal, wherein the recording ending request carries a target application program identifier or a target interface identifier, and the recording ending request is sent after the user terminal receives that the user operates the target button again;
and the data recording stopping module is used for stopping recording the application behavior data of the target application program corresponding to the target application program identifier, or stopping recording the application behavior data of the target interface corresponding to the target interface identifier.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
In a third aspect, an embodiment of the present disclosure provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the test data acquiring method according to the first aspect when executing the program.
According to the technical scheme provided by the embodiment of the disclosure, a recording start request sent by a user terminal is received, wherein the recording start request carries a target application program identifier or a target interface identifier; recording application behavior data of a target application program corresponding to the target application program identifier, or recording application behavior data of a target interface corresponding to the target interface identifier; and sending the recorded application behavior data to a target protocol analysis server, so that the user terminal acquires the application behavior data subjected to protocol analysis from the target protocol analysis server as test data.
Therefore, through the technical scheme provided by the embodiment of the disclosure, the test data required by the tester can be recorded in real time, unlike the related art, which takes a long time to inquire the test data required by the tester from the log file. Moreover, in the related art, the user terminal needs to store the log file to the local, but in the embodiment of the disclosure, only the test data needed by the tester needs to be stored, so that the storage cost is greatly reduced.
In a fourth aspect, the disclosed embodiments provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the test data acquisition method according to the first aspect.
According to the technical scheme provided by the embodiment of the disclosure, a recording start request sent by a user terminal is received, wherein the recording start request carries a target application program identifier or a target interface identifier; recording application behavior data of a target application program corresponding to the target application program identifier, or recording application behavior data of a target interface corresponding to the target interface identifier; and sending the recorded application behavior data to a target protocol analysis server, so that the user terminal acquires the application behavior data subjected to protocol analysis from the target protocol analysis server as test data.
Therefore, through the technical scheme provided by the embodiment of the disclosure, the test data required by the tester can be recorded in real time, unlike the related art, which takes a long time to inquire the test data required by the tester from the log file. Moreover, in the related art, the user terminal needs to store the log file to the local, but in the embodiment of the disclosure, only the test data needed by the tester needs to be stored, so that the storage cost is greatly reduced.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, apparatus, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to the present disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present disclosure have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the disclosure.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above detailed description is given to a test data acquisition method and a test data acquisition apparatus provided by the present disclosure, and specific examples are applied herein to explain the principles and embodiments of the present disclosure, and the descriptions of the above embodiments are only used to help understand the method and the core ideas of the present disclosure; meanwhile, for a person skilled in the art, based on the idea of the present disclosure, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present disclosure should not be construed as a limitation to the present disclosure.

Claims (10)

1. A method for test data acquisition, the method comprising:
receiving a recording start request sent by a user terminal, wherein the recording start request carries a target application program identifier or a target interface identifier;
recording application behavior data of a target application program corresponding to the target application program identifier, or recording application behavior data of a target interface corresponding to the target interface identifier;
and sending the recorded application behavior data to a target protocol analysis server, so that the user terminal acquires the application behavior data subjected to protocol analysis from the target protocol analysis server as test data.
2. The method of claim 1, wherein the recording application behavior data of the target application corresponding to the target application identifier comprises:
embedding a recording script into an application program frame code of the target application program, wherein the recording script is used for recording application behavior data of the target application program corresponding to the target application program identifier;
and executing the recording script to obtain the application behavior data of the target application program.
3. The method of claim 1, wherein the recording of the application behavior data of the target interface corresponding to the target interface identifier comprises:
in an application program frame code of an application program where a target interface is located, starting an application behavior data recording switch corresponding to the target interface, wherein the target interface is an interface with a target interface identifier;
and recording the application behavior data of the target interface.
4. The method according to any one of claims 1 to 3, wherein the recording request is sent after the user terminal receives a user operation on a target button of a target page, and the target button has a recording start identifier.
5. The method of claim 4, further comprising:
receiving a recording ending request sent by a user terminal, wherein the recording ending request carries a target application program identifier or a target interface identifier, and the recording ending request is sent after the user terminal receives that the user operates the target button again;
and stopping recording the application behavior data of the target application program corresponding to the target application program identifier, or stopping recording the application behavior data of the target interface corresponding to the target interface identifier.
6. A test data acquisition apparatus, characterized in that the apparatus comprises:
the first request receiving module is used for receiving a recording starting request sent by a user terminal, wherein the recording starting request carries a target application program identifier or a target interface identifier;
the data recording module is used for recording application behavior data of a target application program corresponding to the target application program identifier, or recording application behavior data of a target interface corresponding to the target interface identifier;
and the data sending module is used for sending the recorded application behavior data to a target protocol analysis server so that the user terminal can obtain the application behavior data after protocol analysis from the target protocol analysis server as test data.
7. The apparatus of claim 6, wherein the data recording module is specifically configured to:
embedding a recording script into an application program frame code of the target application program, wherein the recording script is used for recording application behavior data of the target application program corresponding to the target application program identifier;
and executing the recording script to obtain the application behavior data of the target application program.
8. The apparatus of claim 6, wherein the data recording module is specifically configured to:
in an application program frame code of an application program where a target interface is located, starting an application behavior data recording switch corresponding to the target interface, wherein the target interface is an interface with a target interface identifier;
and recording the application behavior data of the target interface.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the test data acquisition method according to any one of claims 1 to 5 are implemented by the processor when executing the program.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the test data acquisition method according to one of claims 1 to 5.
CN202010167773.4A 2020-03-11 2020-03-11 Test data acquisition method and device, electronic equipment and storage medium Withdrawn CN111506496A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010167773.4A CN111506496A (en) 2020-03-11 2020-03-11 Test data acquisition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010167773.4A CN111506496A (en) 2020-03-11 2020-03-11 Test data acquisition method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111506496A true CN111506496A (en) 2020-08-07

Family

ID=71875752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010167773.4A Withdrawn CN111506496A (en) 2020-03-11 2020-03-11 Test data acquisition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111506496A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148163A (en) * 2020-09-25 2020-12-29 维沃移动通信有限公司 Screen recording method and device and electronic equipment
CN112416798A (en) * 2020-12-04 2021-02-26 深圳前海微众银行股份有限公司 Data processing method, device, equipment and storage medium
CN112988580A (en) * 2021-03-11 2021-06-18 挂号网(杭州)科技有限公司 Test process reproduction method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014169565A1 (en) * 2013-08-21 2014-10-23 中兴通讯股份有限公司 Terminal testing method and device
CN105095062A (en) * 2014-05-09 2015-11-25 腾讯科技(深圳)有限公司 Application testing method and system
CN106776323A (en) * 2016-12-17 2017-05-31 广州酷狗计算机科技有限公司 Application testing method and device
CN108717393A (en) * 2018-05-16 2018-10-30 平安科技(深圳)有限公司 A kind of applied program testing method and mobile terminal
CN109726105A (en) * 2018-05-15 2019-05-07 平安普惠企业管理有限公司 Test data building method, device, equipment and storage medium
CN110716853A (en) * 2018-07-13 2020-01-21 中移信息技术有限公司 Test script recording method, application program testing method and related device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014169565A1 (en) * 2013-08-21 2014-10-23 中兴通讯股份有限公司 Terminal testing method and device
CN105095062A (en) * 2014-05-09 2015-11-25 腾讯科技(深圳)有限公司 Application testing method and system
CN106776323A (en) * 2016-12-17 2017-05-31 广州酷狗计算机科技有限公司 Application testing method and device
CN109726105A (en) * 2018-05-15 2019-05-07 平安普惠企业管理有限公司 Test data building method, device, equipment and storage medium
CN108717393A (en) * 2018-05-16 2018-10-30 平安科技(深圳)有限公司 A kind of applied program testing method and mobile terminal
CN110716853A (en) * 2018-07-13 2020-01-21 中移信息技术有限公司 Test script recording method, application program testing method and related device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148163A (en) * 2020-09-25 2020-12-29 维沃移动通信有限公司 Screen recording method and device and electronic equipment
CN112148163B (en) * 2020-09-25 2022-07-15 维沃移动通信有限公司 Screen recording method and device and electronic equipment
CN112416798A (en) * 2020-12-04 2021-02-26 深圳前海微众银行股份有限公司 Data processing method, device, equipment and storage medium
CN112416798B (en) * 2020-12-04 2024-04-09 深圳前海微众银行股份有限公司 Data processing method, device, equipment and storage medium
CN112988580A (en) * 2021-03-11 2021-06-18 挂号网(杭州)科技有限公司 Test process reproduction method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US11233819B2 (en) Method and apparatus for analyzing cyberattack
CN111045952B (en) Software testing method, flow playback device, terminal equipment and readable storage medium
CN111506496A (en) Test data acquisition method and device, electronic equipment and storage medium
JP2020523654A5 (en)
KR20190044101A (en) User location determination method, information push method, and related device
CN111382008B (en) Virtual machine data backup method, device and system
CN111309632B (en) Application program testing method and device, computer equipment and storage medium
CN109451078B (en) Transaction processing method and device under distributed architecture
CN105357041A (en) Edge node server, and log file uploading method and system
CN111190827A (en) Interface automation test method and device, storage medium and electronic equipment
CN111897978A (en) Live broadcast state monitoring method and device, electronic equipment and storage medium
US20120315931A1 (en) Short message processing method and apparatus
CN111666193B (en) Method and system for monitoring and testing terminal function based on real-time log analysis
CN106789277B (en) User behavior determination method and device based on state machine model
CN107483294B (en) Method and device for monitoring network request
CN114500348B (en) CDN gateway testing method and system
CN111143650B (en) Method, device, medium and electronic equipment for acquiring page data
CN112995648B (en) Internet television full-flow fault diagnosis method and device and computing equipment
CN109039770B (en) Server CMC refreshing method and device and related equipment
CN108228829B (en) Method and apparatus for generating information
CN112200555A (en) Electronic resource transfer method, device and storage medium
CN112542166A (en) Voice interaction method and device
CN114531345A (en) Method, device and equipment for storing flow comparison result and storage medium
CN112015652A (en) Buried point testing method, device, equipment and storage medium
CN110647474A (en) Anti-interference method and device for automatic regression test, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20200807

WW01 Invention patent application withdrawn after publication