CN111309570A - Pressure testing method, medium, device and computing equipment - Google Patents
Pressure testing method, medium, device and computing equipment Download PDFInfo
- Publication number
- CN111309570A CN111309570A CN201911137100.8A CN201911137100A CN111309570A CN 111309570 A CN111309570 A CN 111309570A CN 201911137100 A CN201911137100 A CN 201911137100A CN 111309570 A CN111309570 A CN 111309570A
- Authority
- CN
- China
- Prior art keywords
- data
- online
- pressure test
- test data
- tested system
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 198
- 238000000034 method Methods 0.000 claims abstract description 43
- 238000012545 processing Methods 0.000 claims description 47
- 230000008569 process Effects 0.000 claims description 19
- 238000012544 monitoring process Methods 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 4
- 238000004088 simulation Methods 0.000 description 7
- 238000009662 stress testing Methods 0.000 description 4
- 238000009530 blood pressure measurement Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000002411 adverse Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording 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/3409—Recording 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3664—Environments for testing or debugging software
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Measuring Fluid Pressure (AREA)
Abstract
The embodiment of the invention provides a pressure testing method, a medium, a device and computing equipment. The method comprises the following steps: acquiring online data of a tested system; generating pressure test data using the online data; and sending the pressure test data to an online environment of the tested system. The embodiment of the invention can save cost and resources and improve the accuracy of the test result.
Description
Technical Field
The embodiment of the invention relates to the technical field of performance testing, in particular to a pressure testing method, a medium, a device and computing equipment.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
The pressure test is a method for continuously pressurizing the tested system, forcing the tested system to operate under the limit condition, and observing the degree to which the tested system can operate, thereby discovering the performance defects of the tested system.
In the existing pressure test, a tested system is generally deployed in a test environment or an additionally established high-simulation environment, a test program sends expected number of requests within the same time or a certain period of time, and the efficiency conditions of the tested system under different pressure conditions and the pressure conditions that the tested system can bear are recorded. And then, performing targeted analysis by using the recorded information, finding a bottleneck influencing the performance of the tested system, evaluating the performance of the tested system and judging whether optimization processing or structural adjustment needs to be performed on the tested system.
The testing method needs to build a testing environment or a high simulation environment, the demand for resources is high, and the deployment cost is high. Moreover, because partial configuration, network conditions, and the like cannot completely simulate a real online environment, the test result is not accurate enough, and the tested system subjected to the pressure test still has defects after being online.
Disclosure of Invention
The present invention is directed to a pressure testing method and apparatus to solve at least one of the above problems.
In a first aspect of embodiments of the present invention, there is provided a pressure testing method, comprising:
acquiring online data of a tested system;
generating pressure test data using the online data;
and sending the pressure test data to an online environment of the tested system.
In an embodiment of the present invention, before sending the pressure test data to the online environment of the system under test, the method further includes: copying historical data of the tested system in an online environment, and storing the copied historical data into a storage module;
after sending the pressure test data to the online environment of the system under test, the method further includes: and storing data generated in the process of processing the pressure test data by the tested system into the storage module.
In an embodiment of the present invention, the generating pressure test data using the online data includes:
at least one operation of copying and rewriting the online data is performed to obtain the pressure test data; wherein the overwriting comprises: performing at least one of padding, modifying, and replacing a predetermined field in the online data.
In an embodiment of the present invention, the sending the pressure test data to an online environment of a system under test includes:
the pressure test data is contained in a request, and a pressure test mark field is added in the request;
and sending the request to an online environment of the tested system.
In one embodiment of the present invention, further comprising:
and under the condition that the tested system needs to rely on external services when processing the pressure test data, simulating a return value of the external services, and providing the return value to the online environment of the tested system.
In one embodiment of the present invention, further comprising:
monitoring at least one performance indicator of the system under test;
and under the condition that the performance index exceeds a preset condition, stopping sending pressure test data to the online environment of the tested system.
In a second aspect of an embodiment of the present invention, there is provided a pressure testing apparatus including:
the flow recording module is used for acquiring online data of the system to be tested;
the generating module is used for generating pressure test data by adopting the on-line data;
and the pressure test engine module is used for sending the pressure test data to an online environment of the tested system.
In one embodiment of the present invention, further comprising:
and the storage module is used for copying and storing historical data of the tested system in an online environment and also used for storing data generated in the process of processing the pressure test data by the tested system.
In an embodiment of the present invention, the generating module is configured to perform at least one of copying and rewriting on the online data to obtain the pressure test data; wherein the overwriting comprises: performing at least one of padding, modifying, and replacing a predetermined field in the online data.
In an embodiment of the present invention, the stress test engine module is configured to include the stress test data in a request, and add a stress test flag field in the request; and sending the request to an online environment of the tested system.
In one embodiment of the present invention, further comprising: and the virtual external service module is used for simulating a return value of the external service under the condition that the tested system needs to rely on the external service when processing the pressure test data, and providing the return value to the online environment of the tested system.
In one embodiment of the present invention, further comprising: and the monitoring module is used for monitoring at least one performance index of the tested system, and instructing the pressure test engine module to stop sending pressure test data to the online environment of the tested system under the condition that the performance index exceeds a preset condition.
In a third aspect of embodiments of the present invention, a computer-readable medium is provided, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the steps of the above-mentioned stress testing method.
In a fourth aspect of embodiments of the present invention, there is provided a computing device comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the stress testing method when executing the program.
According to the pressure testing method and device provided by the embodiment of the invention, the pressure testing data is generated by utilizing the online data of the tested system, and the pressure testing data is sent to the online environment of the tested system, so that the online environment can be tested. By the mode, a test environment or a high simulation environment is not required to be additionally built, so that the cost and the resource are saved; in addition, because the online environment is directly tested, the adverse effect caused by the fact that the testing environment is not identical to the online environment is avoided, and the accuracy of the testing result is improved.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
FIG. 1 schematically illustrates a flow chart of a pressure testing method implementation according to an embodiment of the invention;
FIG. 2 schematically illustrates a pressure testing system in accordance with an embodiment of the present invention;
FIG. 3 schematically illustrates a flowchart for one implementation of step S13 in a pressure testing method according to an embodiment of the invention;
FIG. 4 schematically illustrates a media schematic for a pressure testing method according to an embodiment of the invention;
FIG. 5 schematically illustrates a pressure testing apparatus according to an embodiment of the present invention;
FIG. 6 schematically shows a structural diagram of a computing device according to an embodiment of the invention.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
The principles and spirit of the present invention will be described with reference to a number of exemplary embodiments. It is understood that these embodiments are given solely for the purpose of enabling those skilled in the art to better understand and to practice the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to the embodiment of the invention, a pressure testing method, a medium, a device and computing equipment are provided.
In this document, any number of elements in the drawings is by way of example and not by way of limitation, and any nomenclature is used solely for differentiation and not by way of limitation.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments of the invention.
Summary of The Invention
The inventor finds that the existing pressure test needs to establish a test environment or a high simulation environment, and has higher requirement on resources; and because the real online environment cannot be completely simulated, the accuracy of the test result is low.
In view of this, the present invention provides a pressure testing method and apparatus, which utilize the online data of the tested system to generate pressure testing data, and directly test the tested system in an online environment, so that it is not necessary to additionally build a testing environment or a high simulation environment, thereby saving cost and resources, and improving the accuracy of the testing result.
Having described the general principles of the invention, various non-limiting embodiments of the invention are described in detail below.
Exemplary method
A pressure test method according to an exemplary embodiment of the present invention is described below with reference to fig. 1.
Fig. 1 schematically shows a flow chart of a pressure testing method according to an embodiment of the present invention, and as shown in fig. 1, the pressure testing method according to the embodiment of the present invention includes the following steps:
s11: acquiring online data of a tested system;
s12: generating pressure test data by using the online data;
s13: and sending the pressure test data to an online environment of the tested system.
Through the process, the pressure test data are generated by adopting the online data of the tested system, and the generated pressure test data are sent to the online environment of the tested system so as to test the tested system in the online environment, so that the tested system does not need to be additionally set up with a test environment or a high simulation environment, and the cost and the resource are saved; in addition, because the deviation between the test environment and the on-line environment does not exist, the accuracy of the test result can be improved.
In a possible implementation manner, as shown in fig. 1, the step S13 may further include: step S14, copying the historical data of the tested system in the online environment, and storing the copied historical data into a storage module;
the step S13 may further include: step S15, storing the data generated during the process of processing the pressure test data by the system under test into the storage module.
In the above, the online data may refer to a user request, or called user traffic; historical data may refer to data generated by the system under test during processing of the online data.
The storage module can be arranged independently, and the storage module is relatively independent from the existing on-line storage. The existing on-line memory is used for storing data generated by the system under test in the process of processing on-line data (namely, data generated in the process of providing on-line service), and the storage module arranged independently in the embodiment of the application is used for separately storing data generated by the system under test in the process of processing pressure test data (namely, data generated in the process of testing). By the arrangement mode, data generated in the test process can be isolated from data generated in the process of providing online service, and the influence of the test process on the online service is avoided.
Fig. 2 schematically shows a structural diagram of a pressure testing system according to an embodiment of the invention. In fig. 2, the solid line represents data and devices involved in the on-line service of the system under test, and the dotted line represents data and devices involved in the pressure test of the system under test. It is emphasized that the system under test is also serviced normally on-line while being pressure tested. The system under test in fig. 2 is a system under test in an online environment, and may be deployed in a Distributed Service Framework (DFS).
As shown in fig. 2, contents related to the online service include: transmitting the online data to an online environment of the tested system, and storing the data generated when the tested system provides online service in an online memory; and under the condition that the external service is required to be relied on, calling an interface of the real external service system, and providing the external service for the tested system by the real external service system.
As shown in fig. 2, the contents related to the stress test include: transmitting the pressure test data to an online environment of the tested system, and storing data generated in the process of processing the pressure test data by the tested system into an independently arranged storage module; and simulating the return value of the external service and providing the return value to the online environment of the tested system under the condition that the tested system needs to rely on the external service when processing the pressure test data. The external service can be simulated by the independently arranged virtual external service module, so that the real external service system is prevented from being called. Since the pressure test data is not the real user request data, if the real external service system provides service to the pressure test data, it will be a waste of resources of the external service system. Therefore, the embodiment of the application adopts a mode of simulating the return value of the external service, thereby avoiding waste or unnecessary pressure on the external service system; in addition, because a real external service system is not used, the adverse effect on the accuracy of the pressure test caused by the fact that the external service system cannot normally provide service is avoided. In addition, the embodiment of the application can also be provided with a monitoring module for monitoring at least one performance index of the tested system; and under the condition that the performance index exceeds the preset condition, stopping sending pressure test data to the online environment of the tested system, namely stopping performing pressure test.
The functions of the various modules for stress testing, as well as the data generation, transmission, and storage mechanisms are summarized above. The following detailed description is made with reference to the accompanying drawings.
In one possible implementation, the step S12 includes: and at least one operation of copying and rewriting is carried out on the data on the line, and pressure test data is obtained.
Wherein, copying may refer to: when the data amount of the on-line data analyzed from the log is not enough, the existing on-line data is copied for multiple times, and sensitive data such as user Identification (ID) and the like in the on-line data are replaced.
The overwriting may include: performing at least one of completion, modification, and replacement of a predetermined field in the on-line data. Specifically, when the coverage scenes of the online data analyzed from the log are not full enough, the fields corresponding to the uncovered scenes are supplemented, modified or replaced,
in some cases, different kinds of online data correspond to different scenes, and different processing logic of the system is required to be adopted for processing. Accordingly, if a certain processing logic of the system under test needs to be tested, the processing logic needs to be triggered with a corresponding kind of pressure test data. In order to obtain a sufficient amount of pressure test data for processing a particular processing logic, embodiments of the present application may employ at least the following three approaches:
firstly, analyzing a sufficient amount of on-line data corresponding to a certain processing logic; and performing sensitive word replacement on the analyzed online data so as to obtain a sufficient amount of pressure test data. For example, for processing logic a, if 100 ten thousand pieces of corresponding pressure test data are needed, 100 ten thousand pieces of online data corresponding to processing logic a are analyzed; and then carrying out sensitive word replacement on the analyzed online data to obtain 100 pieces of pressure test data corresponding to the processing logic A.
Secondly, analyzing a certain amount of on-line data corresponding to a certain processing logic; and copying the online data obtained by analysis, and performing sensitive word replacement and field rewriting to obtain enough pressure test data. For example, for processing logic a, if 100 ten thousand pieces of corresponding pressure test data are needed, 1 ten thousand pieces of online data corresponding to processing logic a may be analyzed; and copying 100 times of the analyzed online data, and rewriting necessary fields (such as fields carrying information such as IP addresses and user names) to obtain 100 pieces of pressure test data corresponding to the processing logic A. The field rewriting can avoid the situation of field collision in different pressure test data caused by copying.
Thirdly, a sufficient amount of other types of online data are analyzed for a certain processing logic; the parsed online data is overwritten to generate a sufficient amount of pressure test data that can trigger the processing logic. For example, it is assumed that in a real online environment, the probability of occurrence of data on an X-type line is small, the probability of occurrence of data on a Y-type line is large, and data on the X-type line is not much different from data on the Y-type line and is regularly repeatable. In order to test the processing logic corresponding to the data on the X-type line, a sufficient amount of data on the Y-type line can be analyzed; and rewriting the specific field of the analyzed Y-type online data so as to obtain a sufficient number of X-type pressure test data.
In the three modes, the latter two modes adopt rewriting operation, so that the transformation of the online data is realized, and the pressure test data for triggering the specific processing logic is obtained. The two modes have better effect on some online data with lower occurrence probability, and the pressure caused by the process of acquiring and analyzing the online data can be relieved because all data required by the pressure test do not need to be analyzed from massive online data.
When rewriting, the on-line data includes the fields available for rewriting: headers (headers), bodies (bodies), parameters (parameters), paths (paths), etc. For example, the path field is specifically a Uniform Resource Locator (URL); when rewriting, the URL of the online data can be generated into a new URL according to a preset rewriting rule or a mapping relation; the new URL is used as the path field of the stress test data. Other fields may adopt the same or the same rewriting mode as the path field, and are not described herein again.
In order to enable the system under test to distinguish the online data from the pressure test data, in step S13, the embodiment of the present application may add a flag to the pressure test data sent to the system under test. Fig. 3 schematically shows a flowchart of an implementation of step S13 in the pressure testing method according to an embodiment of the present invention, including:
s131: the pressure test data is contained in the request, and a pressure test mark field is added in the request;
s132: and sending the request to an online environment of the tested system.
Through the arrangement, after the tested system receives the request, according to whether the request contains the pressure test mark field, the tested system can distinguish which requests contain real online data and which requests contain pressure test data for pressure test. For the pressure test data, the tested system stores the data generated in the processing process into the separately arranged storage module.
In addition, in the above request, test-related parameters such as the number of concurrencies and the duration of pressure measurement may be configured. The role and reasons of the configuration include at least the following:
firstly, the concurrency number can simulate the number of users who are on line at the same time; by configuring different concurrency numbers, pressure tests with different intensities can be realized, such as pressure tests simulating ordinary periods or pressure tests simulating high peak periods.
Second, in some cases, the duration of the system under test in processing the request is short, and the short processing time is not enough to fully represent the operation status of the system under test server. In this case, a loop may be set to process the request and configure the pressure measurement duration in the request. When the tested system receives the request, circularly processing the request within the pressure testing duration; when the pressure measurement duration is over, processing of the request is stopped.
In the testing process, the monitoring module can be used for monitoring the performance indexes of the relevant servers of each module of the tested system in real time, and the specific performance indexes include but are not limited to: CPU utilization, memory utilization, hard disk Input/Output (IO), network IO, interface response time, interface error rate, and the like. When the performance index exceeding the preset condition appears, the pressure test of the tested system can be stopped, so that the response of the tested system to the normal flow is not influenced. The aforementioned preset condition may be set to a specific threshold value related to the importance for the system under test, the importance of the test period, and the like. The specific value of the specific threshold value can be adjusted according to the actual situation in the pressure test. For example, for one system under test, the CPU usage threshold for the M time period is set to 80%, and the CPU usage threshold for the N time period is set to 90%; in contrast, the M period is more important than the N period, and therefore the CPU usage threshold setting for the M period is more stringent. And when the pressure test is carried out, monitoring the CPU utilization rate of the related server of the tested system in real time, and if the CPU utilization rate is more than 80 percent and the current time is in the M time period, stopping carrying out the pressure test. The foregoing is explained by taking the CPU utilization as an example, and in the actual monitoring, a plurality of performance indicators may be monitored at the same time, and when one or more performance indicators exceed a specific threshold, the stress test is stopped.
In a possible implementation manner, the above-mentioned storage module arranged independently may contain a database, a cache, a queue, a log, a file, etc. to isolate the data generated during the stress test from the data generated during the real online service. The server resources required by the storage module can be temporarily applied, the data in the storage module can be deleted after the stress test is finished, and the server resources occupied by the storage module are returned. Since the data generated during the stress test is stored separately, the cleaning logic for the data is also simple and clear.
When the pressure test is carried out, the processing of the pressure test data does not influence the processing of other service models such as statistics and algorithm models.
In summary, the embodiment of the application can directly perform pressure test on the online environment, so that the pressure test result can be guaranteed to be real and effective, and a test environment or a high-simulation environment consistent with the online environment does not need to be additionally built, so that the server resource can be saved. Because the data generated in the pressure test process is stored by adopting the independently arranged storage module, the influence on the on-line service is avoided, and the subsequent data deletion and the server resource release are facilitated.
Exemplary Medium
Having described the method of the exemplary embodiment of the present invention, the medium of the exemplary embodiment of the present invention will be described next with reference to fig. 4.
In some possible embodiments, aspects of the invention may also be implemented as a computer-readable medium, on which a program is stored, which, when being executed by a processor, is adapted to carry out the steps of the method of pressure testing according to various exemplary embodiments of the invention described in the above section "exemplary method" of this specification.
Specifically, the processor is configured to implement the following steps when executing the program: acquiring online data of a tested system; generating pressure test data using the online data; and sending the pressure test data to an online environment of the tested system.
It should be noted that: the above-mentioned medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
As shown in fig. 4, a medium 40 according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include a program, and may be run on a device. However, the invention is not limited in this respect, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take a variety of forms, including, but not limited to: an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN).
Exemplary devices
Having described the media of an exemplary embodiment of the present invention, the apparatus of an exemplary embodiment of the present invention is next described with reference to FIG. 5.
Fig. 5 schematically shows a structural diagram of a pressure testing device according to an embodiment of the invention, including:
a flow recording module 501, configured to obtain online data of a system under test;
a generating module 502 for generating pressure test data using the online data;
and a stress test engine module 503, configured to send the stress test data to the online environment of the system under test.
In a possible embodiment, as shown in fig. 5, the above apparatus further comprises:
the storage module 504 is configured to copy and store historical data of the system under test in an online environment, and also store data generated during processing of the pressure test data by the system under test.
In a possible implementation manner, the generating module 502 is configured to perform at least one of copying and rewriting on the online data to obtain pressure test data; wherein the overwriting comprises: performing at least one of completion, modification, and replacement of a predetermined field in the on-line data.
In one possible implementation, the stress test engine module 503 is configured to include stress test data in the request and add a stress test flag field to the request; the request is sent to an online environment of the system under test.
In a possible embodiment, as shown in fig. 5, the above apparatus further comprises:
and the virtual external service module 505 is used for simulating the return value of the external service and providing the return value to the online environment of the tested system under the condition that the tested system needs to rely on the external service when processing the pressure test data.
In a possible embodiment, as shown in fig. 5, the above apparatus further comprises:
and the monitoring module 506 is configured to monitor at least one performance index of the system under test, and instruct the stress test engine module to stop sending stress test data to the online environment of the system under test when the performance index exceeds a preset condition.
Exemplary computing device
Having described the method, medium, and apparatus of exemplary embodiments of the present invention, a computing device of exemplary embodiments of the present invention is described next with reference to FIG. 6.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible implementations, a computing device according to an embodiment of the invention may include at least one processing unit and at least one memory unit. Wherein the storage unit stores program code which, when executed by the processing unit, causes the processing unit to perform the steps of the stress testing method according to various exemplary embodiments of the present invention described in the above section "exemplary method" of the present specification.
A computing device 60 according to this embodiment of the invention is described below with reference to fig. 6. The computing device 60 shown in FIG. 6 is only one example and should not be taken to limit the scope of use and functionality of embodiments of the present invention.
As shown in fig. 6, computing device 60 is embodied in a general purpose computing device. Components of computing device 60 may include, but are not limited to: the at least one processing unit 601 and the at least one storage unit 602 are connected to a bus 603 that connects various system components (including the processing unit 601 and the storage unit 602).
The bus 603 includes a data bus, a control bus, and an address bus.
The storage unit 602 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)6021 and/or cache memory 6022, and may further include readable media in the form of non-volatile memory, such as Read Only Memory (ROM) 6023.
The memory unit 602 may also include a program/utility 6025 having a set (at least one) of program modules 6024, such program modules 6024 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
It should be noted that although in the above detailed description several units/modules or sub-units/sub-modules of the pressure testing device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
While the spirit and principles of the invention have been described with reference to several particular embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, nor is the division of aspects, which is for convenience only as the features in such aspects may not be combined to benefit. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims (10)
1. A pressure testing method, comprising:
acquiring online data of a tested system;
generating pressure test data using the online data;
and sending the pressure test data to an online environment of the tested system.
2. The method of claim 1, wherein prior to sending the stress test data to an online environment of a system under test, further comprising: copying historical data of the tested system in an online environment, and storing the copied historical data into a storage module;
after sending the pressure test data to the online environment of the system under test, the method further includes: and storing data generated in the process of processing the pressure test data by the tested system into the storage module.
3. The method of claim 1 or 2, wherein said using said inline data to generate stress test data comprises:
at least one operation of copying and rewriting the online data is performed to obtain the pressure test data; wherein the overwriting comprises: performing at least one of padding, modifying, and replacing a predetermined field in the online data.
4. The method of claim 1 or 2, wherein sending the stress test data to an online environment of a system under test comprises:
the pressure test data is contained in a request, and a pressure test mark field is added in the request;
and sending the request to an online environment of the tested system.
5. The method of claim 1 or 2, further comprising:
and under the condition that the tested system needs to rely on external services when processing the pressure test data, simulating a return value of the external services, and providing the return value to the online environment of the tested system.
6. The method of claim 1 or 2, further comprising:
monitoring at least one performance indicator of the system under test;
and under the condition that the performance index exceeds a preset condition, stopping sending pressure test data to the online environment of the tested system.
7. A pressure testing device, comprising:
the flow recording module is used for acquiring online data of the system to be tested;
the generating module is used for generating pressure test data by adopting the on-line data;
and the pressure test engine module is used for sending the pressure test data to an online environment of the tested system.
8. The apparatus of claim 7, further comprising:
and the storage module is used for copying and storing historical data of the tested system in an online environment and also used for storing data generated in the process of processing the pressure test data by the tested system.
9. A medium storing a computer program, characterized in that the program, when being executed by a processor, carries out the method according to any one of claims 1-6.
10. A computing device, comprising:
one or more processors;
storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911137100.8A CN111309570A (en) | 2019-11-19 | 2019-11-19 | Pressure testing method, medium, device and computing equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911137100.8A CN111309570A (en) | 2019-11-19 | 2019-11-19 | Pressure testing method, medium, device and computing equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111309570A true CN111309570A (en) | 2020-06-19 |
Family
ID=71154776
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911137100.8A Pending CN111309570A (en) | 2019-11-19 | 2019-11-19 | Pressure testing method, medium, device and computing equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111309570A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112486838A (en) * | 2020-12-14 | 2021-03-12 | 广州品唯软件有限公司 | Interface testing method and device, computer equipment and storage medium |
CN113448867A (en) * | 2021-07-16 | 2021-09-28 | 谢靖 | Software pressure testing method and device |
CN113672495A (en) * | 2021-07-06 | 2021-11-19 | 微梦创科网络科技(中国)有限公司 | System and method for implementing full link voltage measurement on production environment |
CN113760680A (en) * | 2021-02-25 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Method and device for testing system pressure performance |
CN113807909A (en) * | 2021-01-13 | 2021-12-17 | 北京沃东天骏信息技术有限公司 | Order pressure measuring method and device, electronic equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108304322A (en) * | 2018-01-12 | 2018-07-20 | 深圳壹账通智能科技有限公司 | A kind of method for testing pressure and terminal device |
CN108376112A (en) * | 2018-02-09 | 2018-08-07 | 腾讯科技(深圳)有限公司 | Method for testing pressure, device and readable medium |
CN109165168A (en) * | 2018-09-14 | 2019-01-08 | 杭州云创共享网络科技有限公司 | A kind of method for testing pressure, device, equipment and medium |
CN109684211A (en) * | 2018-12-18 | 2019-04-26 | 北京顺丰同城科技有限公司 | A kind of order dispatch system pressure test method and device based on shop dimension |
CN110134591A (en) * | 2019-04-19 | 2019-08-16 | 平安普惠企业管理有限公司 | A kind of software method for testing pressure and system, electronic equipment |
-
2019
- 2019-11-19 CN CN201911137100.8A patent/CN111309570A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108304322A (en) * | 2018-01-12 | 2018-07-20 | 深圳壹账通智能科技有限公司 | A kind of method for testing pressure and terminal device |
CN108376112A (en) * | 2018-02-09 | 2018-08-07 | 腾讯科技(深圳)有限公司 | Method for testing pressure, device and readable medium |
CN109165168A (en) * | 2018-09-14 | 2019-01-08 | 杭州云创共享网络科技有限公司 | A kind of method for testing pressure, device, equipment and medium |
CN109684211A (en) * | 2018-12-18 | 2019-04-26 | 北京顺丰同城科技有限公司 | A kind of order dispatch system pressure test method and device based on shop dimension |
CN110134591A (en) * | 2019-04-19 | 2019-08-16 | 平安普惠企业管理有限公司 | A kind of software method for testing pressure and system, electronic equipment |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112486838A (en) * | 2020-12-14 | 2021-03-12 | 广州品唯软件有限公司 | Interface testing method and device, computer equipment and storage medium |
CN113807909A (en) * | 2021-01-13 | 2021-12-17 | 北京沃东天骏信息技术有限公司 | Order pressure measuring method and device, electronic equipment and storage medium |
CN113760680A (en) * | 2021-02-25 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | Method and device for testing system pressure performance |
CN113672495A (en) * | 2021-07-06 | 2021-11-19 | 微梦创科网络科技(中国)有限公司 | System and method for implementing full link voltage measurement on production environment |
CN113448867A (en) * | 2021-07-16 | 2021-09-28 | 谢靖 | Software pressure testing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10872034B2 (en) | Method, device and computer program product for executing test cases | |
CN111309570A (en) | Pressure testing method, medium, device and computing equipment | |
CN109271325B (en) | Application testing method, system, electronic device and storage medium | |
US9672137B1 (en) | Shadow test replay service | |
US7340649B2 (en) | System and method for determining fault isolation in an enterprise computing system | |
US20190026216A1 (en) | Debugging in-cloud distributed code in live load environment | |
CN111124850A (en) | MQTT server performance testing method, system, computer equipment and storage medium | |
US7359820B1 (en) | In-cycle system test adaptation | |
US11099974B2 (en) | Cognitive analytics for high-availability application-performance management | |
US20150106791A1 (en) | System and method for automating build deployment and testing processes | |
US9823994B2 (en) | Dynamically identifying performance anti-patterns | |
US20030120980A1 (en) | System trace unit | |
US10489232B1 (en) | Data center diagnostic information | |
CN111522703B (en) | Method, apparatus and computer program product for monitoring access requests | |
Vokolos et al. | Performance testing of software systems | |
US10152367B2 (en) | System dump analysis | |
JP2015505097A (en) | Computer-implemented process, computer program product, and apparatus for repair delivery system | |
CN111290941A (en) | Method and device for testing multiple interfaces, computing equipment and medium | |
CN110851471A (en) | Distributed log data processing method, device and system | |
CN112817869A (en) | Test method, test device, test medium, and electronic apparatus | |
US9354962B1 (en) | Memory dump file collection and analysis using analysis server and cloud knowledge base | |
CN116016123A (en) | Fault processing method, device, equipment and medium | |
Han et al. | Reproducing performance bug reports in server applications: The researchers’ experiences | |
CN102014163B (en) | Cloud storage test method and system based on transaction driving | |
CN114064435A (en) | Database test method, device, medium 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200619 |