A pressure measurement method and device

By installing a packet capture tool on the server and writing a load testing script, and utilizing the custom script mode of the packet capture tool for multi-threaded load testing, the problems of high labor costs and poor flexibility in existing technologies are solved, and an automated and flexible load testing process is achieved.

CN116303011BActive Publication Date: 2026-02-27HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310247847.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-14
Publication Date
2026-02-27
Estimated Expiration
2043-03-14

AI Technical Summary

Technical Problem

In existing technologies, when load testing APP interfaces that require identity verification, developers and operations personnel need to perform special processing on the original load testing code, resulting in high labor costs and poor load testing flexibility.

Method used

By installing a packet capture tool on the server and writing a preset load testing script, the custom script mode of the packet capture tool can be used to achieve multi-threaded requests and result acquisition, reducing the need for special processing of the load testing script.

Benefits of technology

It enables multi-threaded automatic load testing without requiring special processing of the load testing script, reducing labor costs and improving the flexibility of load testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116303011B_ABST
    Figure CN116303011B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a pressure testing method and a pressure testing device. The method comprises receiving a pressure testing request, the pressure testing request comprising a to-be-tested object, the pressure testing request being sent by a terminal after connecting a server through a packet capturing agent, the server being a server installed with a packet capturing tool and starting the packet capturing agent, the packet capturing tool being written with a preset pressure testing script, the pressure testing script comprising a request method, the request method being used for multi-threaded request of the to-be-tested object, and the packet capturing agent being used for enabling the packet capturing tool to receive the to-be-tested object; and the to-be-tested object is pressure tested through the packet capturing tool. Through the scheme of the embodiment of the application, automatic pressure testing of multiple threads can be performed, special processing of the pressure testing script is not required, pressure testing difficulty and labor cost are reduced, and the flexibility of pressure testing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet testing, and particularly relates to a stress testing method and device. BACKGROUND

[0002] Stress testing refers to pressure testing, which is a test method for determining system stability, and is usually performed outside the normal operation range of a system to examine its functional limits and hidden dangers. An application (APP) usually has many interfaces, and if the APP interfaces are to be stress tested, the current common method is for developers and operation and maintenance personnel to coordinate and cooperate to perform stress testing. However, if some APP interfaces need to be authenticated, the developers and operation and maintenance personnel need to specially process the original stress testing code. The special processing is to modify the original stress testing code to directly skip the authentication step. In this way, the human cost of stress testing the APP interfaces is very high. SUMMARY

[0003] Therefore, the present application aims to provide a stress testing method and device to reduce the human cost of stress testing and improve the flexibility of stress testing. The specific technical solutions are as follows.

[0004] In a first aspect, the present application provides a stress testing method, which comprises the following steps.

[0005] receiving a stress testing request, wherein the stress testing request comprises a to-be-stress-tested object, the stress testing request is sent by a terminal after connecting a server through a packet capturing agent, the server is a server on which a packet capturing tool is installed and a packet capturing agent is started, the packet capturing tool is written with a preset stress testing script, the stress testing script comprises a request method, and the request method is used to request the to-be-stress-tested object in multiple threads; and

[0006] stress testing the to-be-stress-tested object through the packet capturing tool.

[0007] In a possible implementation manner, before the stress testing request is received, the method further comprises the following steps.

[0008] installing the packet capturing tool on the server;

[0009] writing a preset stress testing script into the packet capturing tool;

[0010] executing a start command on the server to start the packet capturing agent.

[0011] In a possible implementation manner, the stress testing the to-be-stress-tested object through the packet capturing tool comprises the following steps.

[0012] The defrequest() method in the pressure testing script is used to obtain parameter information of the object to be pressure tested.

[0013] According to the parameter information of the object to be pressure tested, the defthread_run() method in the pressure testing script is used to request the object to be pressure tested in multiple threads.

[0014] In a possible implementation, after the object to be pressure tested is requested in multiple threads, the pressure testing of the object to be pressure tested by the packet capturing tool further includes:

[0015] The defresponse() method in the pressure testing script is used to obtain pressure testing results of the object to be pressure tested.

[0016] In a possible implementation, the pressure testing request further includes a number of thread requirements, and the pressure testing of the object to be pressure tested by the packet capturing tool includes:

[0017] According to the number of thread requirements, the defthread_run() method in the pressure testing script is modified;

[0018] The defrequest() method in the pressure testing script is used to obtain parameter information of the object to be pressure tested.

[0019] According to the parameter information of the object to be pressure tested, the modified defthread_run() method is used to request the object to be pressure tested in multiple threads.

[0020] In a second aspect, the present application further provides a pressure testing device, which includes:

[0021] A receiving module is configured to receive a pressure testing request, the pressure testing request including an object to be pressure tested, the pressure testing request being sent by a terminal after connecting to a server through a packet capturing agent, the server being a server on which a packet capturing tool is installed and a packet capturing agent is started, the packet capturing tool being written with a preset pressure testing script, the pressure testing script including a request method, the request method being used to request the object to be pressure tested in multiple threads, and the packet capturing agent being used to enable the packet capturing tool to receive the object to be pressure tested.

[0022] A pressure testing module is configured to perform pressure testing on the object to be pressure tested by the packet capturing tool.

[0023] In a possible implementation, the device further includes:

[0024] A installing module is configured to install the packet capturing tool on the server.

[0025] A writing module is configured to write a preset stress testing script into the packet capturing tool.

[0026] An executing module is configured to execute a starting command on the server to start the packet capturing agent.

[0027] In a possible implementation, the stress testing module comprises:

[0028] A parameter obtaining unit is configured to obtain parameter information of the object to be stress tested by using a defrequest() method in the stress testing script.

[0029] A requesting unit is configured to request the object to be stress tested by using a defthread_run() method in the stress testing script in a multi-threaded manner according to the parameter information of the object to be stress tested.

[0030] In a possible implementation, the stress testing module further comprises:

[0031] A result obtaining unit is configured to obtain a stress testing result of the object to be stress tested by using a defresponse() method in the stress testing script.

[0032] In a possible implementation, the stress testing request further comprises a number of thread requirements, and the stress testing module comprises:

[0033] A modifying unit is configured to modify the defthread_run() method in the stress testing script according to the number of thread requirements.

[0034] The parameter obtaining unit is further configured to obtain the parameter information of the object to be stress tested by using the defrequest() method in the stress testing script.

[0035] The requesting unit is further configured to request the object to be stress tested by using the modified defthread_run() method in a multi-threaded manner according to the parameter information of the object to be stress tested.

[0036] In the embodiments of the present application, a stress testing request is received, the stress testing request comprises an object to be stress tested, the stress testing request is sent by a terminal after connecting a server through a packet capturing agent, the server is a server on which a packet capturing tool is installed and on which a packet capturing agent is started, the packet capturing tool is written with a preset stress testing script, the stress testing script comprises a request method, the request method is used to request the object to be stress tested in a multi-threaded manner, and the packet capturing agent is used to enable the packet capturing tool to receive the object to be stress tested. The object to be stress tested is stress tested through the packet capturing tool. Through the scheme of the embodiments of the present application, multi-threaded automatic stress testing can be performed, special processing of the stress testing script is not required, stress testing difficulty and labor cost are reduced, and the flexibility of stress testing is improved. BRIEF DESCRIPTION OF DRAWINGS

[0037] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 A flowchart of an embodiment of a pressure testing method provided in this application is shown;

[0039] Figure 2 This illustration shows a schematic diagram of a terminal connecting to a server according to an embodiment of this application;

[0040] Figure 3 This illustration shows a process code diagram of an embodiment of the present application when three processes are started.

[0041] Figure 4 A schematic diagram of a pressure testing device provided in an embodiment of this application is shown. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0043] First, some terms that may appear in the embodiments of this application will be explained.

[0044] mitmproxy is a packet capture tool that supports Hypertext Transfer Protocol (HTTP) and Hypertext Transfer Protocol Secure (HTTPS). It can perform mocking via command line or script. mitmproxy provides a console interface for dynamically intercepting and editing HTTP packets. Unlike similar tools such as Fiddler2 and Burp Suite, mitmproxy runs in the terminal. Developed in Python, mitmproxy is a tool that assists in web development and testing, mobile debugging, and penetration testing. mitmdump is the command-line interface for mitmproxy, similar in function to tcpdump in HTTP. mitmproxy not only captures packets like Charles, but also allows for further customization of request data.

[0045] Please see Figure 1 The flowchart illustrates an embodiment of a stress testing method provided in this application. This embodiment includes at least the following steps:

[0046] S1, Install a packet capture tool on the server.

[0047] In this embodiment of the application, a packet capture tool, the Python third-party library requests, and the Python third-party library threading are installed on the server so that the object to be tested can be stress tested on the server with the packet capture tool installed.

[0048] The packet capture tool in this embodiment can be the mitmproxy tool, which has a custom script mode, allowing load testing scripts to be written using this mode. Specifically, the custom script mode of the mitmproxy tool is an addon plugin mode. It should be noted that the packet capture tool can be selected by technical personnel according to the actual needs of the scenario, as long as the packet capture tool can be used to write custom load testing scripts; this embodiment does not impose any limitations.

[0049] S2 writes the preset load testing script into the packet capture tool.

[0050] In this embodiment of the application, after installing a packet capture tool on the server, the preset load testing script addon.py is written into the packet capture tool.

[0051] The default load testing script, addon.py, includes a request method, which is used to make multi-threaded requests to the object to be tested. Within the request method of addon.py, you can also obtain all request parameter information, including the Uniform Resource Locator (URL) parameter, the body parameter, and the header parameter.

[0052] The addon.py file includes:

[0053] #coding=utf8

[0054] import requests

[0055] import threading classXm:

[0056] defthread_run(self,url,method,flow_headers=[],body=b”,thread_num=3):

[0057] ifmethodnotin['GET','POST']:

[0058] returnTrue

[0059] headers = {}

[0060] fork, vinflow_headers:

[0061] headers[k.decode('utf-8')]=v.decode('utf-8')

[0062] target=requests.getifmethod=='GET'elserequests.post

[0063] kwargs = dict(

[0064] url=url,

[0065] headers = headers,

[0066] data = body.decode('utf-8') )

[0068] threads = []

[0069] for_inrange(thread_num):

[0070] t=threading.Thread(target=target,kwargs=kwargs)

[0071] threads.append(t)

[0072] t.setDaemon(True)

[0073] t.start()

[0074] fortinthreads:

[0075] t.join()

[0076] def request(self, flow):

[0077] ifflow.request.url.startswith('https: / / mgecom.api.mgtv.com / '):

[0078] self.thread_run(flow.request.url,flow.request.method,flow.request.headers.fields,flow.request.content,3)

[0079] defresponse(self,flow):

[0080] pass addons = [

[0081] Xm() ]

[0083] The `defrequest(self,flow)` method in the load testing script is a method specified by the mitmproxyaddon plugin mode, which ensures that all load testing requests from the APP pass through this interception method. The `flow.request` property can retrieve all parameter information of the load testing request, including the URL parameter, the Method parameter, the Header parameter, and the Body parameter.

[0084] The `defresponse(self,flow)` method in the load testing script can retrieve the load testing results returned by all load testing requests.

[0085] The `ifflow.request.url.startswith('https: / / mgecom.api.mgtv.com / ')` method in the load testing script can intercept all API calls under the domain `mgecom.api.mgtv.com`. This method can intercept APIs under any domain. This embodiment uses `mgecom.api.mgtv.com` as an example. It should be noted that the domain name can be set by technical personnel according to the actual needs of the scenario, and this embodiment does not impose any limitations.

[0086] The `defthread_run(self, url, method, flow_headers = [], body = b”, thread_num = 3)` method in the load testing script can repeatedly request the intercepted URL using multiple threads. This means it can request the object to be tested multiple times, essentially replicating the app's request traffic to achieve the load testing purpose. For example, the app's homepage might request the product list interface. Using the solution in this embodiment, the packet capture tool can send `thread_num` identical requests simultaneously to achieve the purpose of load testing the interface. It should be noted that `thread_num` can be set by technical personnel according to the actual scenario requirements; this embodiment does not limit this setting.

[0087] S3 executes the startup command on the server to start the packet capture proxy.

[0088] In this embodiment of the application, after installing a packet capture tool with a preset load testing script on the server, a start command is executed on the server to start a packet capture agent. The packet capture agent is used to enable the terminal to connect to the server, so that the packet capture tool on the server can receive the object to be load tested.

[0089] A terminal refers to a device that can install and run an app, such as a smartphone, tablet, laptop, desktop computer, minicomputer, mid-range computer, or mainframe computer. A server refers to a service device that can communicate with the app and provide data support for it.

[0090] The startup command is `mitmdump-saddon.py-p8080`, which starts the `addon.py` script and monitors port 8080. It should be noted that the port can be set by technical personnel according to the actual needs of the scenario; this embodiment does not impose any limitations.

[0091] S4 receives load test requests.

[0092] In this embodiment, after enabling packet capture proxy on the server, the terminal can connect to the server through the packet capture proxy and send a load testing request. The load testing request includes the object to be tested. This load testing request is sent by the terminal after connecting to the server through the packet capture proxy. The server is a server with packet capture tools installed and packet capture proxy enabled. When the user clicks any button in the APP on the terminal, the terminal generates a load testing request for the button to request load testing of the interface corresponding to the button.

[0093] Taking a server with IP address 10.200.20.62 and port 8080 as an example, Figure 2 The diagram illustrates the connection between the terminal and the server. The server IP address must correspond to the IP address of the server with the packet capture tool installed, and the port must correspond to the port specified in the startup command.

[0094] After the terminal connects to the packet capture agent, a certificate needs to be installed. Once the certificate is installed, load testing can be performed on the object to be tested. The certificate can be downloaded from http: / / mitm.it / .

[0095] S5 uses a packet capture tool to perform load testing on the object to be tested.

[0096] After receiving the object to be stress tested, the packet capture tool in this embodiment can perform stress testing on the object.

[0097] The target object to be tested is subjected to load testing using packet capture tools, including:

[0098] S51, use the defrequest() method in the load testing script to obtain the parameter information of the object to be tested;

[0099] S52, based on the parameter information of the object to be tested, use the defthread_run() method in the load testing script to request the object to be tested in multiple threads;

[0100] S53. Use the defresponse() method in the load testing script to obtain the load testing results of the object to be tested.

[0101] In this embodiment of the application, before the load test request actually requests the server, a packet capture tool is used to obtain all parameter information of the load test request using the defrequest() method. After obtaining all parameter information of the load test request, the defthread_run() method is used to double the traffic, thus realizing the load test on the object to be tested.

[0102] In this embodiment of the application, the load testing request may further include the required number of threads. Therefore, load testing of the object to be tested using a packet capture tool includes:

[0103] S54. Modify the defthread_run() method in the load testing script according to the required number of threads;

[0104] S55, use the defrequest() method in the load testing script to obtain the parameter information of the object to be tested;

[0105] S56. Based on the parameter information of the object to be tested, the modified defthread_run() method is used to request the object to be tested in multiple threads.

[0106] S57. Use the defresponse() method in the load testing script to obtain the load testing results of the object to be tested.

[0107] Based on the required number of threads, modify the `defthread_run()` method in the load testing script, specifically modifying `thread_num` in the `defthread_run()` method to the required number of threads.

[0108] This application embodiment can use a preset thread_num for load testing, or the thread_num can be modified according to requirements to perform load testing. The implementation logic of the defthread_run() method is to use multiple threads to request the object to be tested. If 100 concurrent requests are required, 100 processes can be started; if 3 concurrent requests are required, 3 processes can be started. Figure 3 The diagram shows the process code when three processes are started.

[0109] In this embodiment, as long as the packet capture tool and packet capture proxy service are configured in the early stage, testers can connect to the proxy service with the terminal at any time to perform load testing. This allows testers to add interface performance concurrent testing during the APP testing phase without the need for operation and maintenance personnel. Testers can complete the load testing work themselves, thus lowering the threshold for load testing.

[0110] In this embodiment, a load testing request is received. The load testing request includes an object to be tested. The load testing request is sent by the terminal after connecting to the server through a packet capture proxy. The server is a server with a packet capture tool installed and the packet capture proxy enabled. The packet capture tool has a preset load testing script, which includes a request method used for multi-threaded requests to the object to be tested. The packet capture proxy is used to enable the packet capture tool to receive the object to be tested. The packet capture tool then performs load testing on the object to be tested. The solution in this embodiment enables multi-threaded automatic load testing without requiring special processing of the load testing script, reducing the difficulty and labor costs of load testing and improving its flexibility.

[0111] The following section describes a pressure testing device provided in this application. The pressure testing device described below and the pressure testing method described above can be referred to in correspondence.

[0112] Please see Figure 4 The diagram shows a structural schematic of a pressure testing device provided in this application, the device comprising:

[0113] The receiving module 401 is used to receive a load testing request. The load testing request includes an object to be tested. The load testing request is sent by the terminal after connecting to the server through a packet capture proxy. The server is a server with a packet capture tool installed and a packet capture proxy enabled. The packet capture tool has a preset load testing script. The load testing script includes a request method. The request method is used to request the object to be tested in a multi-threaded manner. The packet capture proxy is used to enable the packet capture tool to receive the object to be tested.

[0114] The load testing module 402 is used to perform load testing on the object to be tested using the packet capture tool.

[0115] In this embodiment of the application, the device further includes:

[0116] An installation module is used to install the packet capture tool on the server;

[0117] The write module is used to write the preset load testing script into the packet capture tool;

[0118] The execution module is used to execute the startup command on the server and start the packet capture agent.

[0119] In this embodiment of the application, the pressure testing module 402 includes:

[0120] The parameter acquisition unit is used to obtain the parameter information of the object to be tested by using the defrequest() method in the load testing script.

[0121] The request unit is used to request the object to be tested in multiple threads using the defthread_run() method in the load testing script, based on the parameter information of the object to be tested.

[0122] In this embodiment of the application, the pressure testing module 402 further includes:

[0123] The result acquisition unit is used to obtain the load test results of the object to be tested using the defresponse() method in the load test script.

[0124] In this embodiment of the application, the load testing request further includes the required number of threads, and the load testing module 402 includes:

[0125] The modification unit is used to modify the `def thread_run()` method in the load testing script according to the required number of threads;

[0126] The parameter acquisition unit is also used to obtain the parameter information of the object to be tested by using the defrequest() method in the load testing script;

[0127] The request unit is further configured to request the object to be tested in multiple threads using the modified defthread_run() method based on the parameter information of the object to be tested.

[0128] In this embodiment, a load testing request is received. The load testing request includes an object to be tested. The load testing request is sent by the terminal after connecting to the server through a packet capture proxy. The server is a server with a packet capture tool installed and the packet capture proxy enabled. The packet capture tool has a preset load testing script, which includes a request method used for multi-threaded requests to the object to be tested. The packet capture proxy is used to enable the packet capture tool to receive the object to be tested. The packet capture tool then performs load testing on the object to be tested. The solution in this embodiment enables multi-threaded automatic load testing without requiring special processing of the load testing script, reducing the difficulty and labor costs of load testing and improving its flexibility.

[0129] It should be noted that similar or identical parts between the various embodiments can be referred to interchangeably. For device embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to in the description of the method embodiments.

[0130] For the foregoing embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0131] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0132] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0133] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A pressure measurement method, characterized by, The method comprises: receiving a stress test request, the stress test request comprising an object to be stress tested, the stress test request being sent by a terminal after connecting to a server through a packet capturing agent, the server being a server on which a packet capturing tool is installed and a packet capturing agent is started, the packet capturing tool being provided with a preset stress test script, the stress test script comprising a request method, the request method being used to request the object to be stress tested in multiple threads, and the packet capturing agent being used to enable the packet capturing tool to receive the object to be stress tested; stress testing the object to be stress tested by using the packet capturing tool; the stress testing the object to be stress tested by using the packet capturing tool comprises: obtaining parameter information of the object to be stress tested by using a def request() method in the stress test script, the parameter information comprising a uniform resource locator parameter, a method parameter, a body parameter and a header parameter; requesting the object to be stress tested in multiple threads according to the parameter information of the object to be stress tested by using a def thread_run() method in the stress test script; wherein, before the receiving the stress test request, the method further comprises: installing the packet capturing tool on the server; writing the preset stress test script into the packet capturing tool; and executing a start command on the server to start the packet capturing agent.

2. The method of claim 1, wherein, after the requesting the object to be stress tested in multiple threads, the stress testing the object to be stress tested by using the packet capturing tool further comprises: obtaining a stress test result of the object to be stress tested by using a def response() method in the stress test script.

3. The method of claim 1, wherein, The stress test request further comprises a number of threads required, and the stress testing the object to be stress tested by using the packet capturing tool comprises: modifying the def thread_run() method in the stress test script according to the number of threads required; obtaining the parameter information of the object to be stress tested by using the def request() method in the stress test script; requesting the object to be stress tested in multiple threads according to the parameter information of the object to be stress tested by using the modified def thread_run() method.

4. A pressure measuring device, characterized by The apparatus comprises: a receiving module configured to receive a stress test request, the stress test request comprising an object to be stress tested, the stress test request being sent by a terminal after connecting to a server through a packet capturing agent, the server being a server on which a packet capturing tool is installed and a packet capturing agent is started, the packet capturing tool being provided with a preset stress test script, the stress test script comprising a request method, the request method being used to request the object to be stress tested in multiple threads, and the packet capturing agent being used to enable the packet capturing tool to receive the object to be stress tested; a stress testing module configured to stress test the object to be stress tested by using the packet capturing tool; the stress testing module comprises: a parameter obtaining unit configured to obtain parameter information of the object to be stress tested by using a def request() method in the stress test script, the parameter information comprising a uniform resource locator parameter, a method parameter, a body parameter and a header parameter; The request unit is configured to use a def thread_run() method in the stress testing script to request the to-be-stress-tested object in multiple threads according to parameter information of the to-be-stress-tested object. The device further comprises: The installation module is configured to install the packet capturing tool on the server. The writing module is configured to write a preset stress testing script into the packet capturing tool. The execution module is configured to execute a start command on the server to start the packet capturing agent.

5. The apparatus of claim 4, wherein, The stress testing module further comprises: The result acquisition unit is configured to use a def response() method in the stress testing script to acquire a stress testing result of the to-be-stress-tested object.

6. The apparatus of claim 4, wherein, The stress testing request further comprises a number of thread requirements, and the stress testing module comprises: The modification unit is configured to modify the def thread_run() method in the stress testing script according to the number of thread requirements. The parameter acquisition unit is further configured to use a def request() method in the stress testing script to acquire parameter information of the to-be-stress-tested object. The request unit is further configured to use the modified def thread_run() method to request the to-be-stress-tested object in multiple threads according to the parameter information of the to-be-stress-tested object.

Citation Information

Patent Citations

  • Pressure measurement script generation method and device based on automatic package capture, equipment and medium

    CN114238053A