CN114661580A - Flow recording playback method and device, computer equipment and storage medium - Google Patents

Flow recording playback method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114661580A
CN114661580A CN202210193341.XA CN202210193341A CN114661580A CN 114661580 A CN114661580 A CN 114661580A CN 202210193341 A CN202210193341 A CN 202210193341A CN 114661580 A CN114661580 A CN 114661580A
Authority
CN
China
Prior art keywords
request
recording
flow
traffic
result
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
CN202210193341.XA
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.)
Shanghai Fu Shen Lan Software Co ltd
Original Assignee
Shanghai Fu Shen Lan Software 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 Shanghai Fu Shen Lan Software Co ltd filed Critical Shanghai Fu Shen Lan Software Co ltd
Priority to CN202210193341.XA priority Critical patent/CN114661580A/en
Publication of CN114661580A publication Critical patent/CN114661580A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • 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
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

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

Abstract

The invention relates to the field of software testing, and discloses a flow recording playback method, a device, computer equipment and a storage medium, wherein the method comprises the following steps: receiving a flow request sent by a client through a server-side component to judge whether the flow request meets a preset recording requirement or not; when the flow request meets the preset recording requirement, adding a recording identifier for the flow request to generate a flow identifier request; receiving the flow identification request through the enhanced proxy component to record the request data associated with the flow identification request, and generating recorded data. The method provided by the embodiment can be applied to an application system based on a micro-service architecture, realizes the recording and the method of the flow request, and greatly improves the test efficiency of the application system.

Description

Flow recording playback method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of software testing, and in particular, to a method and an apparatus for recording and playing back traffic, a computer device, and a storage medium.
Background
Web services have gradually become a mainstream trend in the day-to-day Java application system. However, the difficulty and cost of testing web services is often much more complex than a monolithic application. In this case, it becomes very difficult to perform a comprehensive and effective test. For example, a system operating in a production environment suddenly experiences an unexpected fault that is difficult to reproduce in a test environment. The reason is that the data of the production environment and the data of the test environment are different in volume and quality. Still alternatively, the code in the test environment has been updated, and it is uncertain whether the problem has been resolved. There are many problems such as this. These factors will cause problems in the production environment that cannot be easily verified in the test environment. These problems are prone to test problems such as missing tests, difficulty in testing, and large workload.
Therefore, a new method for recording and playing back traffic needs to be found to solve the problem of testing web services.
Disclosure of Invention
Therefore, it is necessary to provide a method, an apparatus, a computer device and a storage medium for recording and playing back traffic to reduce the testing difficulty of web services and improve the testing efficiency.
A traffic recording method comprises the following steps:
receiving a flow request sent by a client through a server-side component to judge whether the flow request meets a preset recording requirement;
when the flow request meets the preset recording requirement, adding a recording identifier for the flow request to generate a flow identifier request;
and receiving the flow identification request through an enhanced agent component so as to record the request data associated with the flow identification request and generate recorded data.
A traffic playback method, comprising:
loading recording data in a preset test environment, wherein the recording data is generated by any one of the flow recording methods;
receiving a playback instruction, executing a test step corresponding to the recorded data according to the playback instruction, and acquiring a test result of the test step;
and generating a playback result according to the recording result of the recorded data and the test result.
A traffic recording apparatus comprising:
the receiving request module is used for receiving a flow request sent by a client through a server end component so as to judge whether the flow request meets the preset recording requirement;
the recording adding identification module is used for adding a recording identification to the flow request and generating a flow identification request when the flow request meets the preset recording requirement;
and the recording module is used for receiving the flow identification request through the enhanced proxy component so as to record the request data associated with the flow identification request and generate recorded data.
A traffic playback device, comprising:
the loading module is used for loading recording data in a preset test environment, wherein the recording data is generated by any one of the flow recording methods;
the test module is used for receiving a playback instruction, executing a test step corresponding to the recorded data according to the playback instruction, and acquiring a test result of the test step;
and the playback result generation module is used for generating a playback result according to the recording result of the recorded data and the test result.
A computer device comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor implementing any of the above methods of recording traffic or any of the above methods of replaying traffic when executing the computer readable instructions.
One or more readable storage media storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform any of the traffic recording methods described above, or any of the traffic playback methods described above.
According to the traffic recording method, the traffic playback device, the computer equipment and the storage medium, whether the traffic request meets the preset recording requirement is detected through the server end component, then the recording identifier is added to the traffic request meeting the preset recording requirement, and finally the recording and the playback of the traffic request are realized through the enhanced proxy component. The method provided by the embodiment can be applied to an application system constructed based on a plurality of web services, realizes the recording and the method of the flow request, and greatly improves the test efficiency of the application system.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic diagram of an application environment of a traffic recording method according to an embodiment of the present invention;
fig. 2 is a schematic flow diagram of a traffic recording method according to an embodiment of the present invention;
FIG. 3 is a playback result in one embodiment of the invention;
fig. 4 is a schematic structural diagram of a flow recording apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The traffic recording method provided in this embodiment may be applied to the application environment shown in fig. 1, where a client communicates with a server. The client includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server side can be implemented by an independent server or a server cluster formed by a plurality of servers.
In an embodiment, as shown in fig. 2, a traffic recording method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps S10-S30.
And S10, receiving the flow request sent by the client through the service end component to judge whether the flow request meets the preset recording requirement.
Understandably, the server-side component can be a component disposed at the front-end server for interacting with the client (such as a server-side application program developed based on Java), or a component disposed at the client for interacting with the server.
The client is provided with a terminal program for interacting with the server, such as a mobile phone APP, a browser and the like. The user operates an interaction action with the server on the terminal program, and a remote call request is generated, namely the flow request.
The preset recording requirement comprises a plurality of recording conditions and is used for judging whether to record the flow request submitted by the user. When the traffic request meets one or more recording conditions, it may be determined that the traffic request meets a preset recording. The preset recording requirements can be set according to actual needs.
And if the flow request does not meet the preset recording requirement, not recording the flow request.
And S20, when the flow request meets the preset recording requirement, adding a recording identifier for the flow request to generate a flow identifier request.
Understandably, when the preset recording requirement meets the preset recording requirement, adding a recording identifier for the flow request to generate the flow identifier request. If the traffic identification request is used to request internal data, a recording identification (i.e., a flag bit) is added to the thread context where the traffic identification request is located, so that requested data (network interaction data) obtained by the traffic identification request can be recorded.
If the traffic identifier request is used for requesting external data, in order to inform the downstream enhanced proxy component whether the request needs to be recorded or not during external communication, a recording identifier needs to be added to the forwarded traffic identifier request. The adding mode of the recording identifier can be set according to actual needs. For example, if there is a "recording required" recording identifier in the thread context where the traffic identifier request is located, an "recording required" recording identifier needs to be additionally added to the header of the forwarded traffic identifier request. Correspondingly, in the downstream enhanced proxy component, if it is detected that the header of the traffic identification request contains a recording identification of "recording required", the recording identification of "recording required" needs to be added in the corresponding thread context.
And S30, receiving the flow identification request through the enhanced proxy component to record the request data associated with the flow identification request, and generating recorded data.
Understandably, the enhanced agent component can be a Java program agent component (probe) developed based on Java agent technology, and can be mounted when the application program of the server side is started. The enhanced proxy component may enable the recording and playback of traffic requests without modifying the original application code.
In Java programs, there are common frameworks, for example, a container (tomcat, jetty, etc.) of a servlet protocol that can support remote HTTP requests, a protocol "JDBC" for accessing a database, etc., and corresponding enhanced proxy components may be designed based on these Java protocols or frameworks implementing the protocols, so as to implement recording and playback of traffic.
In this embodiment, whether the traffic request meets the preset recording requirement is detected by the server side component, then a recording identifier is added to the traffic request meeting the preset recording requirement, and finally, recording and playback of the traffic request are realized by the enhanced proxy component.
In one example, recording may be performed based on the latest online version to obtain recorded data, and then verification of the simulation environment is performed before the next version release, and inconsistent link nodes are quickly located to obtain a playback result. The traffic recording method provided by the embodiment can be applied to an application system constructed by a plurality of web services, realizes the recording and the method of the traffic request, and greatly improves the test efficiency of the application system.
Optionally, step S10, before the receiving, by the server side component, the traffic request sent by the client to determine whether the traffic request meets the preset recording requirement, further includes:
s11, receiving mounting parameter information;
and S12, loading an enhancement package for recording the request data in the enhancement agent component according to the mounting parameter information.
Understandably, the JAVA running mechanism is based on a JVM virtual machine, and a code written by a user is compiled by the JVM, changed into a class file, stored in a compiling directory, and then (usually) packed into a jar file for running. If a JAVA program is to be run, the boot JAR program also needs to be executed by executing JAVA-JAR [ JAR file address path ].
When Java starts jar, there is a step to load a class file, which contains user-written code and also contains Java-owned code, and these codes are loaded by JVM in the form of classes and then reside in the memory of a Java process.
The mounting parameter information may be used to mount a class file (enhancement package) in the enhancement agent component. In some examples, the mounting parameter information is mounted using a class loader. The class loader comprises a system class loader, an extended class loader and a boot class loader.
When the java program of the enhanced Agent component (Agent) is mounted, some commands for mounting the Agent can be added after the java start command, such as: java-jar [ jar file address path ]
-java agent: x:/samples/agent-example-master/agent-demo/target/java-agent. The command may mount an enhanced proxy component into the corresponding java program.
When the java program is mounted with the agent of the enhanced agent component, the agent starts to execute the corresponding life cycle. The functions of these enhanced proxy components belong to one of the functions of a JVM (Java virtual Machine), and conform to the JVM specification.
Optionally, the preset recording requirement includes a preset recording list and a preset recording time range;
step S10, namely, the receiving, by the server end component, a traffic request sent by the client to determine whether the traffic request meets a preset recording requirement includes:
s101, judging whether a request path of the flow request exists in the preset recording list or not, and whether the request time of the flow request is within the preset recording time range or not;
s102, if the request path of the flow request exists in the preset recording list and the request time of the flow request is within the preset recording time range, judging that the flow request meets the preset recording requirement.
Understandably, the server-side component may periodically query the recording list set by the web console, and update the local routing cache, that is, the preset recording list. Here, the pre-set recording list includes a number of access paths to be recorded. And if the request path of the flow request exists in the preset recording list and the request time of the flow request is within the preset recording time range, judging that the flow request meets the preset recording requirement. The preset recording time range can be set according to actual needs, such as day 8: 00-18:00.
On the contrary, if the request path of the traffic request does not exist in the preset recording list, or the request time of the traffic request is not within the preset recording time range, it is determined that the traffic request does not meet the preset recording requirement.
Optionally, in step S30, the receiving, by the enhanced proxy component, the traffic identification request to record the request data associated with the traffic identification request, and generating recorded data includes:
s301, loading a recording request thread corresponding to the flow identification request;
s302, executing the recording request thread to obtain the request data, sending the request data to the client, sending the request data to a preset recording interface to record the request data, and generating recorded data.
Understandably, a record request thread corresponding to the traffic identification request may be loaded. The context of the recording request thread has a recording identification of "recording needed". Therefore, the execution result of the current recording request thread, that is, the request data, sends the request data to the client, and sends the request data to the preset recording interface, so as to record the request data and generate the recorded data.
The recording essentially stores the execution result of the recording request thread, and also records the response result returned to the server by the external application.
The sequence number of each step in the foregoing embodiments does not mean the execution sequence, and the execution sequence of each process should be determined by the function and the internal logic of the process, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
The embodiment of the invention also provides a flow playback method, which comprises the following steps:
s100, loading recording data in a preset test environment, wherein the recording data is generated by any one of the flow recording methods;
s200, receiving a playback instruction, executing a test step corresponding to the recorded data according to the playback instruction, and acquiring a test result of the test step;
s300, generating a playback result according to the recording result of the recorded data and the test result.
Understandably, the playback essentially plays back the recorded number once again in the preset test environment, then stores the test result obtained by the playback, and compares the recorded result with the test result to generate a playback result.
In the playback process, a playback instruction can add a request marked as "playback" to the entry of the playback link, and meanwhile, the head of the "request for playback" carries link information such as playback TraceId and the like to inform an enhanced Agent component (Agent) which piece of data during recording should be used for playback. Since there are many remote services, the system will mark the testing steps in the link transmission process by using the link calculation algorithm. Therefore, each link in communication defines the steps under one Trace, and relevant data in the playback process can be obtained through the information. At the time of playback, any interactive data other than the current program will be replaced with the data at the time of initial recording. Thus, if a program changes logic (not just code), inconsistent logic will result in inconsistent test results. These test results will also be stored again in the database. In some examples, the recorded results and the test results may be compared to generate playback results.
Optionally, in step S300, the generating a playback result according to the recording result of the recorded data and the test result includes:
s3001, comparing the recording result and the test result of each test step to generate the same result and a different result;
s3002, generating the playback result according to the same result and the difference result.
Understandably, the recording result and the test result of each test step can be compared, if the recording result and the test result of a certain test step are the same, the recording result and the test result are marked as the same result, and if the recording result and the test result of a certain test step are different, the recording result and the test result are marked as the different result. Playback results are then generated from the same results and the difference results.
In one example, as shown in FIG. 3, FIG. 3 is an example playback result. Here, the same result is represented as "request (agreement)" and the different result is represented as "response (disagreement)". By replaying the result, a tester can focus on the difference result, and determines corresponding processing measures aiming at the difference result, so that the testing efficiency of the software is greatly improved.
The sequence number of each step in the foregoing embodiments does not mean the execution sequence, and the execution sequence of each process should be determined by the function and the internal logic of the process, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
In an embodiment, a traffic recording apparatus is provided, where the traffic recording apparatus corresponds to the traffic recording methods in the above embodiments one to one. As shown in fig. 4, the traffic recording apparatus includes a request receiving module 10, an identification adding module 20, and a recording module 30. The functional modules are explained in detail as follows:
a receiving request module 10, configured to receive, through a server component, a traffic request sent by a client, so as to determine whether the traffic request meets a preset recording requirement;
an add-record identifier module 20, configured to add a record identifier to the traffic request when the traffic request meets the preset record requirement, and generate a traffic identifier request;
and the recording module 30 is configured to receive the traffic identification request through the enhanced proxy component, so as to record request data associated with the traffic identification request, and generate recorded data.
Optionally, the flow recording apparatus further includes:
the mounting information receiving module is used for receiving mounting parameter information;
and the loading module is used for loading the enhancement package for recording the request data in the enhancement agent component according to the mounting parameter information.
Optionally, the preset recording requirement includes a preset recording list and a preset recording time range;
the request receiving module 10 includes:
a request judging unit, configured to judge whether a request path of the traffic request exists in the preset recording list, and whether a request time of the traffic request is within the preset recording time range;
and the recording requirement conforming unit is used for judging that the flow request conforms to the preset recording requirement if the request path of the flow request exists in the preset recording list and the request time of the flow request is within the preset recording time range.
Optionally, the recording module 30 includes:
a loading recording thread unit, configured to load a recording request thread corresponding to the traffic identification request;
and the record data generating unit is used for executing the record request thread to acquire the request data, sending the request data to the client, sending the request data to a preset record interface to record the request data, and generating record data.
For the specific limitations of the flow recording device, reference may be made to the above limitations of the flow recording method, which are not described herein again. All or part of the modules in the flow recording device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a traffic playback device is provided, and the traffic playback device corresponds to the traffic playback method in the foregoing embodiment one to one. As shown in fig. 4, the traffic playback apparatus includes a loading module, a testing module, and a playback result generation module. The functional modules are explained in detail as follows:
the loading module is used for loading recording data in a preset test environment, wherein the recording data is generated by any one of the flow recording methods;
the test module is used for receiving a playback instruction, executing a test step corresponding to the recorded data according to the playback instruction and acquiring a test result of the test step;
and the playback result generation module is used for generating a playback result according to the recording result of the recorded data and the test result.
Optionally, the module for generating a playback result includes:
the comparison unit is used for comparing the recording result and the test result of each test step to generate the same result and a different result;
and a playback result generation unit for generating the playback result according to the same result and the difference result.
For specific limitations of the flow playback device, reference may be made to the above limitations of the flow playback method, which will not be described herein again. The modules in the traffic playback apparatus can be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a readable storage medium and an internal memory. The readable storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operating system and execution of computer-readable instructions in the readable storage medium. The database of the computer device is used for storing data related to the flow recording method and/or the flow playback method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer readable instructions, when executed by a processor, implement a traffic recording method and/or a traffic playback method. The readable storage media provided by the present embodiment include nonvolatile readable storage media and volatile readable storage media.
In one embodiment, a computer device is provided, comprising a memory, a processor, and computer readable instructions stored on the memory and executable on the processor, the processor when executing the computer readable instructions implementing the steps of:
receiving a flow request sent by a client through a server-side component to judge whether the flow request meets a preset recording requirement;
when the flow request meets the preset recording requirement, adding a recording identifier for the flow request to generate a flow identifier request;
receiving, by the enhanced proxy component, the traffic identification request to record request data associated with the traffic identification request, generate recorded data, or,
loading recorded data in a preset test environment;
receiving a playback instruction, executing a test step corresponding to the recorded data according to the playback instruction, and acquiring a test result of the test step;
and generating a playback result according to the recording result of the recorded data and the test result.
In one embodiment, one or more computer-readable storage media storing computer-readable instructions are provided, the readable storage media provided by the embodiments including non-volatile readable storage media and volatile readable storage media. The readable storage medium has stored thereon computer readable instructions which, when executed by one or more processors, perform the steps of:
receiving a flow request sent by a client through a server-side component to judge whether the flow request meets a preset recording requirement;
when the flow request meets the preset recording requirement, adding a recording identifier for the flow request to generate a flow identifier request;
receiving the flow identification request through an enhanced proxy component so as to record request data associated with the flow identification request and generate recorded data; or the like, or, alternatively,
loading recorded data in a preset test environment;
receiving a playback instruction, executing a test step corresponding to the recorded data according to the playback instruction, and acquiring a test result of the test step;
and generating a playback result according to the recording result of the recorded data and the test result.
It will be understood by those of ordinary skill in the art that all or part of the processes of the methods of the above embodiments may be implemented by hardware related to computer readable instructions, which may be stored in a non-volatile readable storage medium or a volatile readable storage medium, and when executed, the computer readable instructions may include processes of the above embodiments of the methods. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A traffic recording method is characterized by comprising the following steps:
receiving a flow request sent by a client through a server-side component to judge whether the flow request meets a preset recording requirement or not;
when the flow request meets the preset recording requirement, adding a recording identifier for the flow request to generate a flow identifier request;
and receiving the flow identification request through an enhanced agent component so as to record the request data associated with the flow identification request and generate recorded data.
2. The traffic recording method according to claim 1, wherein before receiving, by the server side component, the traffic request sent by the client to determine whether the traffic request meets a preset recording requirement, the method further comprises:
receiving mounting parameter information;
and loading an enhancement package for recording the request data in the enhancement agent component according to the mounting parameter information.
3. The traffic recording method according to claim 1, wherein the preset recording requirement includes a preset recording list and a preset recording time range;
the receiving, by the server side component, a traffic request sent by a client to determine whether the traffic request meets a preset recording requirement includes:
judging whether a request path of the flow request exists in the preset recording list or not, and whether the request time of the flow request is within the preset recording time range or not;
and if the request path of the flow request exists in the preset recording list and the request time of the flow request is within the preset recording time range, judging that the flow request meets the preset recording requirement.
4. The traffic recording method according to claim 1, wherein receiving the traffic identification request through an enhanced proxy component to record request data associated with the traffic identification request, generating recorded data, comprises:
loading a recording request thread corresponding to the flow identification request;
and executing the recording request thread to acquire the request data, sending the request data to the client, sending the request data to a preset recording interface to record the request data, and generating recorded data.
5. A method for playback of traffic, comprising:
loading recording data in a preset test environment, wherein the recording data is generated according to the flow recording method of any one of claims 1 to 4;
receiving a playback instruction, executing a test step corresponding to the recorded data according to the playback instruction, and acquiring a test result of the test step;
and generating a playback result according to the recording result of the recorded data and the test result.
6. The traffic playback method of claim 5, wherein the generating a playback result according to the recording result of the recorded data and the test result comprises:
comparing the recording result and the test result of each test step to generate the same result and a different result;
and generating the playback result according to the same result and the difference result.
7. A flow recording device, comprising:
the receiving request module is used for receiving a flow request sent by a client through a server end component so as to judge whether the flow request meets the preset recording requirement;
the recording adding identification module is used for adding a recording identification to the flow request and generating a flow identification request when the flow request meets the preset recording requirement;
and the recording module is used for receiving the flow identification request through the enhanced proxy component so as to record the request data associated with the flow identification request and generate recorded data.
8. A traffic playback apparatus, comprising:
a loading module, configured to load recording data in a preset test environment, where the recording data is generated according to the traffic recording method according to any one of claims 1 to 4;
the test module is used for receiving a playback instruction, executing a test step corresponding to the recorded data according to the playback instruction, and acquiring a test result of the test step;
and the playback result generation module is used for generating a playback result according to the recording result of the recorded data and the test result.
9. A computer device comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, wherein the processor when executing the computer readable instructions implements the traffic recording method according to any one of claims 1 to 4 or the traffic playback method according to any one of claims 5 to 6.
10. One or more readable storage media storing computer readable instructions, wherein the computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the traffic recording method of any of claims 1 to 4 or the traffic playback method of any of claims 5 to 6.
CN202210193341.XA 2022-03-01 2022-03-01 Flow recording playback method and device, computer equipment and storage medium Pending CN114661580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210193341.XA CN114661580A (en) 2022-03-01 2022-03-01 Flow recording playback method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210193341.XA CN114661580A (en) 2022-03-01 2022-03-01 Flow recording playback method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114661580A true CN114661580A (en) 2022-06-24

Family

ID=82027251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210193341.XA Pending CN114661580A (en) 2022-03-01 2022-03-01 Flow recording playback method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114661580A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115529250A (en) * 2022-08-17 2022-12-27 上海哔哩哔哩科技有限公司 Flow playback method and device, electronic equipment and storage medium
CN115987844A (en) * 2022-12-28 2023-04-18 航天信息股份有限公司 Process monitoring method, system, electronic device and medium in exploratory test
CN116719750A (en) * 2023-08-11 2023-09-08 海马云(天津)信息技术有限公司 Software testing method and device, server equipment and storage medium
CN117729253A (en) * 2024-02-18 2024-03-19 上海任意门科技有限公司 Chat scene reproduction method, system, storage medium and electronic equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115529250A (en) * 2022-08-17 2022-12-27 上海哔哩哔哩科技有限公司 Flow playback method and device, electronic equipment and storage medium
CN115987844A (en) * 2022-12-28 2023-04-18 航天信息股份有限公司 Process monitoring method, system, electronic device and medium in exploratory test
CN116719750A (en) * 2023-08-11 2023-09-08 海马云(天津)信息技术有限公司 Software testing method and device, server equipment and storage medium
CN116719750B (en) * 2023-08-11 2023-12-22 海马云(天津)信息技术有限公司 Software testing method and device, server equipment and storage medium
CN117729253A (en) * 2024-02-18 2024-03-19 上海任意门科技有限公司 Chat scene reproduction method, system, storage medium and electronic equipment
CN117729253B (en) * 2024-02-18 2024-05-03 上海任意门科技有限公司 Chat scene reproduction method, system, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN114661580A (en) Flow recording playback method and device, computer equipment and storage medium
CN107181779B (en) Method, device and system for processing access request
CN110180177B (en) Maintenance method, device and medium of online game and electronic equipment
CN110955448A (en) Intelligent contract separation method, contract processing method, apparatus, device and medium
CN111343236A (en) Method, device and communication system for communication between server and client
US20190149571A1 (en) Method and device for repairing page vulnerability
CN113569285A (en) Identity authentication and authorization method, device, system, equipment and storage medium
CN111930472A (en) Code debugging method and device, electronic equipment and storage medium
CN113835921A (en) Method, device, equipment and storage medium for processing interface service exception
CN113722114A (en) Data service processing method and device, computing equipment and storage medium
CN112699034B (en) Virtual login user construction method, device, equipment and storage medium
CN110311978A (en) Browser information processing method, device, equipment and storage medium
CN112860507B (en) Control method and device for sampling rate of distributed link tracking system
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN111314454A (en) Application access method and device, electronic equipment and storage medium
CN112734349A (en) Interface generation method, data calling method, device and electronic equipment
CN114077458A (en) Method, device, equipment and storage medium for starting service module in application program
CN113360809A (en) Page data updating method and device, computer equipment and storage medium
CN111552551A (en) User management method and device based on master-slave system, computer equipment and medium
WO2009019146A1 (en) System and method for managing processing ressources
CN117762601B (en) Method, system, terminal and storage medium for invoking hydra service
Alberola et al. Magentix: a multiagent platform integrated in linux
CN113901377B (en) Service calling method, device, storage medium and equipment of legacy system
CN113204477B (en) Application testing method and device, electronic equipment and storage medium
CN111666165B (en) Method, device, equipment and storage medium for calling functions between applications

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