CN111309576A - Pressure testing method and device - Google Patents

Pressure testing method and device Download PDF

Info

Publication number
CN111309576A
CN111309576A CN202010100232.XA CN202010100232A CN111309576A CN 111309576 A CN111309576 A CN 111309576A CN 202010100232 A CN202010100232 A CN 202010100232A CN 111309576 A CN111309576 A CN 111309576A
Authority
CN
China
Prior art keywords
access request
test
copy
pressure
request
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
CN202010100232.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.)
Reach Best Technology Co Ltd
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Reach Best 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 Reach Best Technology Co Ltd filed Critical Reach Best Technology Co Ltd
Priority to CN202010100232.XA priority Critical patent/CN111309576A/en
Publication of CN111309576A publication Critical patent/CN111309576A/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/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3414Workload generation, e.g. scripts, playback

Abstract

The utility model provides a pressure test method, a pressure test device, an electronic device and a storage medium, which receive a copy request copied by a system to be tested according to a real user request and add a copy identifier for the copy request when meeting a pressure test condition; performing multiple replication on the replication request according to a predefined replication multiple, wherein the predefined replication multiple is calculated according to the target processing pressure set by the current pressure test; and finally, sending the test request set obtained after the copying is finished back to the system to be tested for pressure test. The test flow used by the present disclosure can be regarded as the real flow of the user, and the accuracy and the authenticity of the pressure test are higher.

Description

Pressure testing method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a pressure testing method and apparatus, an electronic device, and a storage medium.
Background
The pressure test is an important link in the product research and development process and aims to check the peak flow rate which can be borne by the product. The current pressure testing method is to use a script to construct a batch of testing flow rates, and then use the batch of testing flow rates to pressurize the system to be tested to check the bearing capacity of the system to be tested.
The conventional pressure test method has problems in that: the flow constructed by the script cannot reflect the real flow situation of the online user. For example, the data repetition rate of the flow constructed by using the script is much higher than the real flow, the constructed flow is easy to generate local data buffering in the system to be tested, the processing speed of the system is increased, and in the result of the pressure test, the pressure data which can be borne by the system is higher than the real scene, and the test result is inaccurate.
Disclosure of Invention
In view of the above technical problems, an embodiment of the present disclosure provides a pressure testing method, which includes the following steps:
according to a first aspect of the embodiments of the present disclosure, there is provided a pressure testing method, including:
after a system to be tested receives a real access request, if the real access request meets the current pressure test condition, copying the real access request to generate a corresponding copy access request, and sending the copy access request to the pressure test system;
the pressure test system adds a copy identifier for the copy access request, and performs multiple copy on the copy access request according to a predetermined copy multiple to obtain a test request set, wherein the copy multiple is calculated according to a target processing pressure set by the current pressure test;
and the system to be tested receives and processes the test request set to perform pressure test.
According to a second aspect of the embodiments of the present disclosure, there is provided a pressure testing method, including:
receiving a copy access request copied by a system to be tested according to a real access request, and adding a copy identifier for the copy access request;
performing multiple replication on the replica access request according to a predetermined replication multiple to obtain a test request set, wherein the replication multiple is calculated according to a target processing pressure set by a current pressure test;
and sending the test request set back to the system to be tested for stress testing.
According to a third aspect of the embodiments of the present disclosure, there is provided a pressure testing method, including:
after a system to be tested receives a real access request, if the real access request accords with the current pressure test condition, copying the real access request to generate a corresponding copy access request;
sending the copy access request to a stress test system;
and receiving and processing a generated test traffic set which is generated after the pressure test system copies the copy access request by multiple times to perform pressure test.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a pressure testing apparatus including:
a copy identifier adding module: the system comprises a server, a server and a server, wherein the server is configured to receive a copy access request copied by a system to be tested according to a real access request and add a copy identifier for the copy access request;
a test request generation module: the system is configured to perform multiple replication on the replica access request according to a predetermined replication multiple to obtain a test request set, wherein the replication multiple is calculated according to a target processing pressure set by a current pressure test;
a test request sending module: configured to send a set of test requests back to the system under test for stress testing.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a pressure testing apparatus including:
a copy identifier adding module: the system comprises a server, a server and a server, wherein the server is configured to receive a copy access request copied by a system to be tested according to a real access request and add a copy identifier for the copy access request;
a test request generation module: the system is configured to perform multiple replication on the replica access request according to a predetermined replication multiple to obtain a test request set, wherein the replication multiple is calculated according to a target processing pressure set by a current pressure test;
a test request sending module: configured to send a set of test requests back to the system under test for stress testing.
The embodiment of the disclosure provides a pressure testing method and device, electronic equipment and a storage medium. When the pressure test condition is met, receiving a copy request copied by a system to be tested according to a real user request, and adding a copy identifier for the copy request; performing multiple replication on the replication request according to a predefined replication multiple, wherein the predefined replication multiple is calculated according to the target processing pressure set by the current pressure test; and finally, sending the test request set obtained after the copying is finished back to the system to be tested for pressure test. The test flow used by the present disclosure can be regarded as the real flow of the user, and the accuracy and the authenticity of the pressure test are higher.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of embodiments of the disclosure.
Moreover, any one of the embodiments of the present disclosure need not achieve all of the effects described above.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram illustrating a pressure testing method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating a pressure testing method applied to a pressure testing system in accordance with an exemplary embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a copy multiple determination method according to an exemplary embodiment of the present disclosure;
FIG. 4 is a flow chart illustrating a pressure testing method applied to a system under test in accordance with an exemplary embodiment of the present disclosure;
FIG. 5 is another schematic diagram of a pressure testing method shown in an exemplary embodiment of the present disclosure;
FIG. 6 is a schematic view of a pressure testing device shown in an exemplary embodiment of the present disclosure;
FIG. 7 is another schematic view of a pressure testing device shown in an exemplary embodiment of the present disclosure;
fig. 8 is a schematic diagram of an electronic device shown in an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The present disclosure provides a pressure testing method and a pressure testing apparatus using the same, which will be described in its entirety. Referring to fig. 1, the method includes the following steps S101 to S107:
in step S101, after receiving a real access request, a system to be tested determines whether the real access request meets a current stress test condition; if the real access request meets the current pressure test condition, executing the step S102, otherwise, not operating;
in step S102, the system to be tested copies the real access request to generate a corresponding copy access request;
in step S103, the system to be tested sends the copy access request to the stress test system;
in step S104, the stress test system adds a copy identifier to the copy access request;
in step S105, the pressure test system performs multiple replication on the replica access request according to a predetermined replication multiple to obtain a test request set, where the replication multiple is calculated according to a target processing pressure set in the current pressure test;
in step S106, the pressure testing system sends a testing request set to the system to be tested;
in step S107, the system to be tested receives and processes the set of test requests to perform a stress test.
The above steps S101 to S107 are the whole implementation process of the pressure testing method of the present disclosure.
The pressure test is an important link in the product research and development process and aims to check the peak flow rate which can be borne by the product. The current pressure testing method is to use a script to construct a batch of testing flow rates, and then use the batch of testing flow rates to pressurize the system to be tested to check the bearing capacity of the system to be tested.
The conventional pressure test method has problems in that: the flow constructed by the script cannot reflect the real flow situation of the online user. For example, the data repetition rate of the flow constructed by using the script is much higher than the real flow, the constructed flow is easy to generate local data buffering in the system to be tested, the processing speed of the system is increased, and in the result of the pressure test, the pressure data which can be borne by the system is higher than the real scene, and the test result is inaccurate.
The present embodiment provides a pressure test to solve the above problem, wherein the system to be tested involved in the pressure test method is a system with flow processing requirement. The wind control system is used for illustrating, when a user publishes contents such as comments and the like on a public platform, the contents need to be processed by the wind control system of the public platform before being published, and normal publishing, partial shielding, total shielding and other operations are performed according to processing results, so that the content on the public platform is guaranteed to be in a healthy and compliant state. If a large amount of content is released during the user-intensive time period, the wind-controlled platform may receive a large amount of traffic during the time period, possibly exceeding the processing pressure limit of the wind-controlled platform. Therefore, the wind control platform must be pre-stressed to cope with possible incoming traffic peaks (e.g., holidays, etc.).
Compared with the prior art that the test traffic is constructed by directly using the script, the pressure test scene constructed by the pressure test method of the embodiment is closer to the real scene, and the accuracy and the reality of the pressure test are higher.
The pressure testing method provided by the present disclosure is specifically described below from the above mentioned pressure testing system end and the system end to be tested, respectively. Referring first to fig. 2, a pressure testing method applied to a pressure testing system end is described, which includes the following steps S201 to S203:
in step S201, a copy access request copied by the system to be tested according to the real access request is received, and a copy identifier is added to the copy access request;
in an embodiment of the present disclosure, when step S201 is executed, the following manners may be adopted, but are not limited to:
(1-1) receiving a copy access request copied by a system to be tested according to a real access request;
(1-2) acquiring a specified parameter contained in the copy access request;
(1-3) modifying a specified parameter in the replica access request so that the replica request is not recognized as a real access request.
In one embodiment of the present disclosure, in step (1-2), the specified parameters may include an account ID in the copy access request, or some specified tag in the copy access request, and the like.
In particular, it may be possible to determine whether one or several specified parameters of the access request are specified test values, in order to avoid that the duplicate access request is identified as a real access request. For example, the following steps are carried out: and modifying the user ID in the copy access request into a test user ID, and/or modifying the label in the copy access request into a test label.
In the subsequent steps, the copy access request after multiple copying needs to form a test flow, and the test flow is sent back to the system to be tested again for pressure test, when the system to be tested processes the access request, whether the access request carries a copy identifier or not is checked, that is, whether one or more specified parameters of the access request are specified test values or not is checked, if the access request is the test values, the copy access request cannot be repeatedly generated and sent to the pressure test system, so that the flow is copied and amplified for infinite times. .
In step S202, multiple replication is performed on the replica access request according to a predetermined replication multiple to obtain a test request set, where the replication multiple is calculated according to a target processing pressure set by a current pressure test;
it should be noted that in this embodiment, a copy identifier needs to be added to the copy access request, and then multiple-time copy is performed on the copy access request carrying the copy identifier. Namely, after the multiple replication is performed on the replica access request, each test request in the obtained test request set carries a replica identifier.
In an embodiment of the present disclosure, in step S202, the method for determining the copy multiple may include the following steps:
(2-1) acquiring the current processing pressure of the system to be tested, and testing the set target processing pressure according to the current pressure;
(2-2) determining a difference pressure between the current processing pressure and the target processing pressure;
(2-3) determining a copy multiple of the copy access request according to the gap pressure.
The specific implementation processes of (2-1) to (2-3) can be seen in detail in the embodiment shown in fig. 3.
In step S203, the set of test requests is sent back to the system to be tested for stress testing.
Specifically, the test request set may be regarded as a test flow constructed according to the on-line real flow in this embodiment, and the test flow received by the system to be tested and the real flow received by the system to be tested together constitute the processing pressure of the system to be tested.
In an embodiment of the present disclosure, a dynamic pressure control mechanism may be set, that is, the copy multiple of the copy request is dynamically adjusted based on the current real access request condition, so as to dynamically control the size of the test traffic. When the real flow rate is larger, the copying multiple is automatically adjusted to be smaller, and when the real flow rate is larger, the copying multiple is automatically adjusted to be larger.
Fig. 3 is a flow chart illustrating another pressure testing method according to an exemplary embodiment, which may be used on a platform capable of performing pressure testing and is based on the method shown in fig. 2, and as shown in fig. 3, may include the following steps S301-S303:
in step S301, a current processing pressure of the system to be tested is obtained, and a set target processing pressure is tested according to the current pressure;
in step S302, a difference pressure between the current processing pressure and the target processing pressure is determined;
in step S303, a copy multiple of the copy access request is determined according to the gap pressure.
Specifically, determining a target pressure set by a current pressure test, namely determining the target pressure as a target flow value which can be processed by a system to be tested within a specified time; determining a difference flow value reaching a target flow value according to a processed real flow value of a system to be tested in a set time; and finally, determining the copy multiple of the copy request according to the difference flow value.
In one embodiment of the present disclosure, the processing pressure experienced by a system is generally referred to as QPS (query per second), which is a measure of how much traffic a particular system processes within a specified time.
Assuming that the system under test predicts the highest processing pressure capable of withstanding 10wQPS, the target processing pressure for the system under test is set to 10 wQPS. However, at this time, the processing pressure caused by the request amount of the system user can only reach 2wQPS, and if it is required to verify whether the system to be tested can really bear the processing pressure of 10wQPS, the request amount needs to be increased to 10 wQPS.
The missing flow of 8wQPS at this time is the gap pressure between the current process pressure and the target process pressure. In this embodiment, the copy multiple of the copy access request may be determined according to the gap pressure. All the copied requests can be regarded as test access requests, and the test access requests are sent back to the system to be tested. The test access request and the real access request jointly form the current processing pressure of the system to be tested.
If the system to be tested is under the target pressure of the current real pressure 2wQPS + test pressure 8wQPS which is 10wQPS, all indexes of the system are still stable and normal, which indicates that the system can bear the target pressure of 10 wQPS.
With continuing reference to fig. 4, the pressure testing method applied to the system end to be tested is described, which includes the following steps S401 to S403:
in step S401, a real access request is received;
in step S402, determining whether the real access request meets the current pressure test condition, if yes, executing step S403, and if not, not operating;
in step S403, the real access request is copied to generate a corresponding copy access request;
in step S404, sending the copy access request to a stress test system;
in step S405, a generated test traffic set in which the stress test system copies the replica access request multiple times is received and processed, and a stress test is performed.
In an embodiment of the present disclosure, after receiving the access request, the system to be tested first identifies whether the access request is a real access request, and as described above, the access request received by the system to be tested may originate from a test traffic sent by the stress test system in addition to the real user traffic on the line. When a system to be tested processes an access request, whether the access request carries a copy identifier needs to be checked, that is, whether one or more specified parameters of the access request are specified test values, if the access request is a test value, the access request is a test access request, and subsequent steps of the embodiment are not executed on the access request, so that the problem that traffic is copied and amplified for an unlimited number of times due to repeated generation of copy access requests is avoided.
In an embodiment of the disclosure, a pressure test start/stop valve may be further set to control the start and the close of the pressure test, and when the pressure test start/stop valve is in an open state, the system to be tested starts to identify a real access request in addition to processing the access request according to an original processing manner, and generates a replica access request based on the real access request; when the pressure test start-stop valve is closed, the system to be tested only processes the access request according to the original processing mode without additional operation.
And judging whether the real access request meets the current pressure test condition or not, wherein the judgment comprises the step of judging whether the request type of the real access request meets the test type of the current pressure test or not. And if the test type of the current stress test is not met, copying the real access request to generate a corresponding copy access request.
In particular, in the actual pressure test, it may be necessary to test the pressure-bearing capacity of different services of the system to be tested separately. Still taking the wind control system as an example, the monitoring processing of the wind control system on the page comments is one of the services, and the monitoring processing of the real-time barrage is the other service. Different processing modes and different processing efficiencies are achieved for different services. The pressure bearing capacity of different services can be obtained by respectively testing different services, and further, the improvement can be pertinently carried out.
For example, the following steps are carried out: if the current stress test needs to test the limit processing capacity of the wind control system for the user comment type flow. After recognizing that the current access request is a real user request, continuing to judge the type of the access request, and when the type of the access request is a user comment type, continuing to execute step S403, and copying the real access request to generate a corresponding copy access request. Therefore, test access requests subsequently returned to the system to be tested are all user comment access requests, and the pressure bearing capacity of the system to the user comment traffic can be evaluated more emphatically through the pressure test.
In the present embodiment, the system to be tested is a wind control system, as shown in fig. 5, the overall process includes steps S501 to S508, where step S501 is performed by a KAFKA system, step S501 to step S504 are performed by the wind control system, step S505 to step S508 are performed by the pressure testing system, and the specific execution manner of each step is as follows:
in step S501, the KAFKA system sends an access request to the wind control system;
in step S502, the wind control system receives and processes the access request;
in step S503, the wind control system determines whether the access request satisfies a specific condition? If the condition is satisfied, the processing result is output and step S504 is executed, and if the condition is not satisfied, only the processing result is output.
The conditions to be satisfied here may be: the pressure test start/stop valve is in an open state, the access request is an access request according with the current pressure test type, the access request is a real access request and does not carry a copy identifier, and the like.
In step S504, the wind control system sends a copy access request to the KAFKA system;
in step S505, the stress test system consumes the copy access request into the KAFKA system;
the KAFKA system can store access requests of users, the wind control system can asynchronously acquire the access requests through the KAFKA system, and in an actual application scene, the current pressure of the wind control system and the difference pressure between the current pressure and the target pressure can be determined according to the statistical condition of the KAFKA system on the access requests, so that the copy multiple of the copy access requests is determined.
In step S506, the stress test system modifies the specified parameters in the copy access request;
in step S507, the stress test system multiply copies the replica access request;
in step S508, the stress test system sends back the replication result to the KAFKA system.
It can be seen that the present disclosure provides a pressure testing method. When the pressure test condition is met, receiving a copy request copied by a system to be tested according to a real user request, and adding a copy identifier for the copy request; performing multiple replication on the replication request according to a predefined replication multiple, wherein the predefined replication multiple is calculated according to the target processing pressure set by the current pressure test; and finally, sending the test request set obtained after the copying is finished back to the system to be tested for pressure test. The test flow used by the present disclosure can be regarded as the real flow of the user, and the accuracy and the authenticity of the pressure test are higher.
Corresponding to the above method embodiment, an embodiment of the present disclosure further provides a pressure testing apparatus, as shown in fig. 6, the apparatus may include: the copy identification adding module 610, the test request generating module 620 and the test request sending module 630.
The copy identification adding module 610: the system comprises a server, a server and a server, wherein the server is configured to receive a copy access request copied by a system to be tested according to a real access request and add a copy identifier for the copy access request;
the test request generation module 620: the system is configured to perform multiple replication on the replica access request according to a predetermined replication multiple to obtain a test request set, wherein the replication multiple is calculated according to a target processing pressure set by a current pressure test;
the test request sending module 630: configured to send a set of test requests back to the system under test for stress testing.
Optionally, the copy identifier adding module, when adding a copy identifier to the copy request, is configured to:
modifying specified parameters in the replica access request so that the replica request is not recognized as a true access request.
Optionally, the copy identifier adding module, when modifying the specified parameter in the copy access request, is configured to:
and modifying the user ID in the copy access request into a test user ID, and/or modifying the label in the copy access request into a test label.
Optionally, the pressure testing apparatus further includes:
a duplication multiple calculation module: the pressure measurement device is configured to obtain the current processing pressure of a system to be tested, and determine the difference pressure between the current processing pressure and the target processing pressure according to the target processing pressure set by the current pressure test; and determining the copy multiple of the copy access request according to the gap pressure.
Corresponding to the above method embodiment, an embodiment of the present disclosure further provides a pressure testing apparatus, as shown in fig. 7, the apparatus may include: a copy request generation module 710, a copy request transmission module 720 and a test request processing module 730.
The copy request generation module 710: after a system to be tested receives a real access request, if the real access request meets the current pressure test condition, copying the real access request to generate a corresponding copy access request;
the copy request sending module 720: sending the copy access request to a stress test system;
the test request processing module 730: and the system is configured to receive and process the generated test request set after the pressure test system copies the copy access request by multiple times to perform pressure test.
Optionally, the copy request generating module, when determining that the real access request meets the current stress test condition and copying the real access request to generate a corresponding copy access request, is configured to:
and if the request type of the real access request accords with the test type of the current stress test, copying the real access request to generate a corresponding copy access request.
Optionally, the pressure testing apparatus further includes:
the access request recognition module 740: and the system is configured to detect whether the access request has a copy identifier after receiving the access request so as to identify whether the access request is a real access request.
The disclosed embodiment also provides an electronic device, which at least includes a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the foregoing pressure testing method when executing the program, and the method includes:
receiving a copy access request copied by a system to be tested according to a real access request, and adding a copy identifier for the copy access request;
performing multiple replication on the replica access request according to a predetermined replication multiple to obtain a test request set, wherein the replication multiple is calculated according to a target processing pressure set by a current pressure test;
and sending the test request set back to the system to be tested for stress testing.
The disclosed embodiment also provides an electronic device, which at least includes a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the foregoing pressure testing method when executing the program, and the method includes:
after a system to be tested receives a real access request, if the real access request accords with the current pressure test condition, copying the real access request to generate a corresponding copy access request;
sending the copy access request to a stress test system;
and receiving and processing a generated test traffic set which is generated after the pressure test system copies the copy access request by multiple times to perform pressure test.
Fig. 8 shows a schematic block diagram of a master-based-side electronic device according to an exemplary embodiment of the present disclosure. Referring to fig. 8, at the hardware level, the electronic device includes a processor 802, an internal bus 804, a network interface 806, a memory 804, and a non-volatile memory 810, but may also include hardware required for other services. The processor 802 reads the corresponding computer program from the non-volatile memory 810 into the memory 802 and runs it, forming a means for performing the stress testing method on a logical level. Of course, besides the software implementation, the present disclosure does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
The disclosed embodiments also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the aforementioned pressure testing method, the method including:
receiving a copy access request copied by a system to be tested according to a real access request, and adding a copy identifier for the copy access request;
performing multiple replication on the replica access request according to a predetermined replication multiple to obtain a test request set, wherein the replication multiple is calculated according to a target processing pressure set by a current pressure test;
and sending the test request set back to the system to be tested for stress testing.
The disclosed embodiments also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the aforementioned pressure testing method, the method including:
after a system to be tested receives a real access request, if the real access request accords with the current pressure test condition, copying the real access request to generate a corresponding copy access request;
sending the copy access request to a stress test system;
and receiving and processing a generated test traffic set which is generated after the pressure test system copies the copy access request by multiple times to perform pressure test.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. One of ordinary skill in the art can understand and implement it without inventive effort.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The foregoing is merely a detailed description of the embodiments of the disclosure, and it should be noted that modifications and decorations can be made by those skilled in the art without departing from the principle of the embodiments of the disclosure, and these modifications and decorations should also be regarded as the scope of protection of the embodiments of the disclosure.

Claims (10)

1. A pressure testing method, comprising:
after a system to be tested receives a real access request, if the real access request meets the current pressure test condition, copying the real access request to generate a corresponding copy access request, and sending the copy access request to the pressure test system;
the pressure test system adds a copy identifier for the copy access request, and performs multiple copy on the copy access request according to a predetermined copy multiple to obtain a test request set, wherein the copy multiple is calculated according to a target processing pressure set by the current pressure test;
and the system to be tested receives and processes the test request set to perform pressure test.
2. A pressure testing method, comprising:
receiving a copy access request copied by a system to be tested according to a real access request, and adding a copy identifier for the copy access request;
performing multiple replication on the replica access request according to a predetermined replication multiple to obtain a test request set, wherein the replication multiple is calculated according to a target processing pressure set by a current pressure test;
and sending the test request set back to the system to be tested for stress testing.
3. The method of claim 2, wherein said adding a replica identification for said replica request comprises:
modifying specified parameters in the replica access request so that the replica request is not recognized as a true access request.
4. The method of claim 3, wherein said modifying specified parameters in said replica access request comprises:
and modifying the user ID in the copy access request into a test user ID, and/or modifying the label in the copy access request into a test label.
5. The method of claim 2, wherein the determining of the duplication multiple comprises:
acquiring the current processing pressure of a system to be tested, and determining the difference pressure between the current processing pressure and the target processing pressure according to the target processing pressure set by the current pressure test;
and determining the copy multiple of the copy access request according to the gap pressure.
6. A pressure testing method, comprising:
after a system to be tested receives a real access request, if the real access request accords with the current pressure test condition, copying the real access request to generate a corresponding copy access request;
sending the copy access request to a stress test system;
and receiving and processing a generated test traffic set which is generated after the pressure test system copies the copy access request by multiple times to perform pressure test.
7. A pressure testing device, comprising:
a copy identifier adding module: the system comprises a server, a server and a server, wherein the server is configured to receive a copy access request copied by a system to be tested according to a real access request and add a copy identifier for the copy access request;
a test request generation module: the system is configured to perform multiple replication on the replica access request according to a predetermined replication multiple to obtain a test request set, wherein the replication multiple is calculated according to a target processing pressure set by a current pressure test;
a test request sending module: configured to send a set of test requests back to the system under test for stress testing.
8. A pressure testing device, comprising:
a copy request generation module: after a system to be tested receives a real access request, if the real access request meets the current pressure test condition, copying the real access request to generate a corresponding copy access request;
a copy request sending module: sending the copy access request to a stress test system;
the test request processing module: and the system is configured to receive and process the generated test request set after the pressure test system copies the copy access request by multiple times to perform pressure test.
9. An electronic device, comprising: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of any one of claims 2 to 5 or to implement the method of claim 6.
10. A storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any of claims 2 to 5, or to implement the method of claim 6.
CN202010100232.XA 2020-02-18 2020-02-18 Pressure testing method and device Pending CN111309576A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010100232.XA CN111309576A (en) 2020-02-18 2020-02-18 Pressure testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010100232.XA CN111309576A (en) 2020-02-18 2020-02-18 Pressure testing method and device

Publications (1)

Publication Number Publication Date
CN111309576A true CN111309576A (en) 2020-06-19

Family

ID=71158313

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010100232.XA Pending CN111309576A (en) 2020-02-18 2020-02-18 Pressure testing method and device

Country Status (1)

Country Link
CN (1) CN111309576A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094272A (en) * 2021-04-14 2021-07-09 北京京东振世信息技术有限公司 Application testing method and device, electronic equipment and computer readable medium
CN113807909A (en) * 2021-01-13 2021-12-17 北京沃东天骏信息技术有限公司 Order pressure measuring method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729361A (en) * 2012-10-12 2014-04-16 百度在线网络技术(北京)有限公司 Method and device for testing performance of database
US20140298101A1 (en) * 2013-03-29 2014-10-02 Inventec Corporation Distributed pressure testing system and method
CN109002385A (en) * 2017-06-06 2018-12-14 北京京东尚科信息技术有限公司 Method for testing pressure and device for data flow system
CN109165168A (en) * 2018-09-14 2019-01-08 杭州云创共享网络科技有限公司 A kind of method for testing pressure, device, equipment and medium
CN110245089A (en) * 2019-06-21 2019-09-17 深圳前海微众银行股份有限公司 Method for testing pressure, device, equipment and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729361A (en) * 2012-10-12 2014-04-16 百度在线网络技术(北京)有限公司 Method and device for testing performance of database
US20140298101A1 (en) * 2013-03-29 2014-10-02 Inventec Corporation Distributed pressure testing system and method
CN109002385A (en) * 2017-06-06 2018-12-14 北京京东尚科信息技术有限公司 Method for testing pressure and device for data flow system
CN109165168A (en) * 2018-09-14 2019-01-08 杭州云创共享网络科技有限公司 A kind of method for testing pressure, device, equipment and medium
CN110245089A (en) * 2019-06-21 2019-09-17 深圳前海微众银行股份有限公司 Method for testing pressure, device, equipment and computer readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113807909A (en) * 2021-01-13 2021-12-17 北京沃东天骏信息技术有限公司 Order pressure measuring method and device, electronic equipment and storage medium
CN113094272A (en) * 2021-04-14 2021-07-09 北京京东振世信息技术有限公司 Application testing method and device, electronic equipment and computer readable medium
CN113094272B (en) * 2021-04-14 2023-11-03 北京京东振世信息技术有限公司 Application testing method, device, electronic equipment and computer readable medium

Similar Documents

Publication Publication Date Title
KR101805383B1 (en) Launching a client application based on a message
CN107391359B (en) Service testing method and device
WO2021133253A1 (en) Method and apparatus for predicting energy consumption, and device and storage medium thereof
CN104811344A (en) Network dynamic service monitoring method and apparatus
CN111309576A (en) Pressure testing method and device
US20230259959A1 (en) Multi-target prediction method and apparatus, device, storage medium and program product
CN110245684B (en) Data processing method, electronic device, and medium
CN110743169B (en) Anti-cheating method and system based on block chain
CN109598478B (en) Wind measurement result description document generation method and device and electronic equipment
CN116225958A (en) Fault prediction method and device, storage medium and electronic equipment
CN107369093B (en) Service determination method and device
CN112822113B (en) Method and device for acquiring routing address, electronic equipment and readable storage medium
CN115187364A (en) Method and device for monitoring deposit risk under bank distributed scene
CN114490402A (en) Method and device for checking validity of message field
CN110888811B (en) Code coverage rate information processing method and device, electronic equipment and medium
CN114513469A (en) Traffic shaping method and device for distributed system and storage medium
CN114170007A (en) Orthogonal easy return message assembly method, program product, medium, and electronic device
CN111143644B (en) Identification method and device of Internet of things equipment
CN113553379A (en) Data acquisition method and device
CN111967767A (en) Business risk identification method, device, equipment and medium
CN111506486A (en) Data processing method and system
CN110532516A (en) Account checking method that digital asset transfers, apparatus and system
CN111984519A (en) Test method and device for service system
CN114697203B (en) Network fault pre-judging method and device, electronic equipment and storage medium
CN117787995A (en) Suspicious group partner identification method and device and electronic equipment

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