Method for generating full-link production pressure test script and related device and storage medium
By collecting and analyzing server transaction request information, a full-link production stress test script is generated, which solves the problems of low generation efficiency and inaccurate testing in existing technologies, and achieves efficient and accurate system performance testing.
Patent Information
- Application Number
- CN202210197280.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-01
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-03-01
AI Technical Summary
Existing production load testing scripts are inefficient in generating and cannot accurately test system performance, nor can they fully reflect the system's impact in multiple aspects.
By collecting transaction request information and request messages from each server within a target time period, calculating the transaction percentage and request message variables, a full-link production load testing script is generated.
It improves script generation efficiency, ensures the accuracy of test results, and can comprehensively simulate actual stress testing.
Smart Images

Figure CN114579402B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of system performance testing technology, and in particular to a method for generating end-to-end production stress test scripts and related devices and storage media. Background Technology
[0002] To understand a system's performance under high traffic load, production stress testing is typically required. This testing is automated by editing appropriate production stress test scripts.
[0003] Currently, when production load testing is required, testers mainly compile corresponding production load testing scripts for a single request source and transaction. These scripts can then be used to test the system's performance in processing that request source and transaction.
[0004] However, the existing method is relatively slow because it relies on testers to edit the scripts. Furthermore, system performance is affected by many factors, such as the availability of test environment resources and the hardware configuration of each link. Compiling production load test scripts only for a single request source and transaction cannot accurately test the system's performance. Summary of the Invention
[0005] In view of the shortcomings of the prior art, this application provides a method for generating end-to-end production load testing scripts and related devices and storage media to solve the problems of low efficiency and inability to guarantee the accuracy of test results in the existing methods.
[0006] To achieve the above objectives, this application provides the following technical solution:
[0007] The first aspect of this application provides a method for generating end-to-end production load testing scripts, including:
[0008] Collect information on the number of transaction requests received by each target server in the system under test within a target time period, as well as the transaction request message of each transaction request; wherein, the target servers include each front-end server and each back-end server in the system under test.
[0009] Based on the number of transaction requests received by each of the target servers, the transaction percentage corresponding to each of the target servers is calculated.
[0010] By comparing the various transaction request messages belonging to the same transaction, the request message variables of each transaction are determined;
[0011] Based on the transaction percentage of each target server and the request message variables of each transaction, a full-link production load test script for the system under test is generated.
[0012] Optionally, in the above-described method for generating end-to-end production load testing scripts, the collection of information on the number of transaction requests received by each target server in the system under test within a target time period, as well as the transaction request messages, includes:
[0013] Real-time monitoring of transaction requests received by each target server in the system under test within the target time period;
[0014] The system acquires the transaction request messages of each monitored transaction request in real time, and counts the number of transaction requests received by each target server within the target time period to obtain the number of transaction requests received by each target server.
[0015] Optionally, in the above-described method for generating end-to-end production load testing scripts, the step of calculating the transaction percentage corresponding to each target server based on the number of transaction requests received by each target server includes:
[0016] Calculate the sum of the number of transaction requests received by each of the aforementioned front-end servers to obtain the total number of transaction requests;
[0017] For each target server, the number of transaction requests processed by each transaction on the target server is divided by the total number of transaction requests to obtain the transaction percentage corresponding to the target server.
[0018] Optionally, in the above-described method for generating end-to-end production load testing scripts, the step of determining the request message variables of each transaction by comparing the various transaction request messages belonging to the same transaction includes:
[0019] For each transaction, the transaction request messages belonging to the transaction are compared, and the different contents in each transaction request message are extracted.
[0020] The different contents extracted from each of the transaction request messages are determined as the transaction request message variables.
[0021] Optionally, in the above-described method for generating the full-link production load testing script, generating the full-link production load testing script for the system under test based on the transaction percentage corresponding to each of the target servers and the request message variables of each of the transactions includes:
[0022] The request message variables for each of the transactions are parameterized;
[0023] The transaction percentage corresponding to each target server and the parameterized request message variables of each transaction are filled into a preset template to obtain the full-link production stress test script of the system to be tested.
[0024] The second aspect of this application provides an apparatus for generating end-to-end production load testing scripts, including:
[0025] The collection unit is used to collect information on the number of transaction requests received by each target server in the system under test within a target time period, as well as the transaction request message of each transaction request; wherein, the target server includes each front-end server and each back-end server in the system under test.
[0026] The calculation unit is used to calculate the transaction percentage corresponding to each of the target servers based on the number of transaction requests received by each target server.
[0027] The determining unit is used to determine the request message variables of each transaction by comparing the various transaction request messages belonging to the same transaction;
[0028] The generation unit is used to generate a full-link production load test script for the system under test based on the transaction ratio corresponding to each of the target servers and the request message variables of each transaction.
[0029] Optionally, in the above-described end-to-end production load testing script generation device, the collection unit includes:
[0030] The monitoring unit is used to monitor in real time the transaction requests received by each of the target servers in the system under test within the target time period;
[0031] The acquisition unit is used to acquire the transaction request messages of each of the monitored transaction requests in real time.
[0032] The statistics unit is used to count the number of transaction requests received by each of the target servers within the target time period, and to obtain the number of transaction requests received by each of the target servers.
[0033] Optionally, in the above-mentioned end-to-end production load testing script generation device, the computing unit includes:
[0034] The quantity calculation unit is used to calculate the sum of the number of transaction requests received by each of the front-end servers to obtain the total number of transaction requests;
[0035] The percentage calculation unit is used to divide the number of transaction requests for each transaction processed by the target server by the total number of transaction requests for each target server to obtain the transaction percentage corresponding to the target server.
[0036] Optionally, in the above-mentioned end-to-end production load testing script generation device, the determining unit includes:
[0037] The extraction unit is used to compare each transaction request message belonging to the transaction for each transaction and extract the different content in each transaction request message.
[0038] The variable determination unit is used to determine the different contents in each of the extracted transaction request messages as the transaction request message variables.
[0039] Optionally, in the above-mentioned end-to-end production load testing script generation device, the generation unit includes:
[0040] The processing unit is used to parameterize the request message variables of each of the transactions;
[0041] A sub-unit is generated to fill the transaction proportions corresponding to each of the target servers and the parameterized request message variables of each of the transactions into a preset template to obtain the full-link production load test script of the system to be tested.
[0042] A third aspect of this application provides an electronic device, comprising:
[0043] Memory and processor;
[0044] The memory is used to store programs;
[0045] The processor is used to execute the program, which, when executed, is specifically used to implement the method for generating end-to-end production load testing scripts as described in any of the above.
[0046] The fourth aspect of this application provides a computer storage medium for storing a computer program, which, when executed, implements the method for generating end-to-end production load testing scripts as described in any of the preceding claims.
[0047] The method for generating end-to-end production load testing scripts provided in this application collects information on the number of transaction requests received by each target server in the system under test within a target time period, as well as the transaction request messages of each transaction request. The target servers include each front-end server and each back-end server in the system under test, thereby obtaining information characterizing the actual situation of the entire system under test. Then, based on the number of transaction requests received by each target server, the transaction proportion corresponding to each target server is calculated to ensure that the process of each target server is consistent with the actual cleanup when generating the script, thus guaranteeing the accuracy of the test results. Furthermore, by comparing the transaction request messages belonging to the same transaction, the request message variables of each transaction are determined, enabling the simulation of request messages that conform to the actual situation during the test. Finally, based on the transaction proportions corresponding to each target server and the request message variables of each transaction, the end-to-end production load testing script of the system under test is generated. This achieves an automatic generation of end-to-end production load testing scripts, enabling stress testing of the entire system, thereby not only improving the script generation efficiency but also effectively ensuring the accuracy of the results. Attached Figure Description
[0048] 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 only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0049] Figure 1 A flowchart illustrating a method for generating end-to-end production load testing scripts, provided in an embodiment of this application;
[0050] Figure 2 A flowchart illustrating a method for determining request message variables for each transaction, provided in an embodiment of this application;
[0051] Figure 3 A flowchart illustrating a method for generating a full-link production load testing script for a system under test based on transaction proportion and request message variables, provided in this application embodiment;
[0052] Figure 4 A flowchart illustrating another method for generating a link production stress test script, provided in another embodiment of this application;
[0053] Figure 5 A schematic diagram of a device for generating end-to-end production stress testing scripts, provided for another embodiment of this application;
[0054] Figure 6This is a schematic diagram of the structure of an electronic device provided in another embodiment of this application. Detailed Implementation
[0055] 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, and 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.
[0056] In this application, relational terms such as "first" and "second" are used merely 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 limitation, 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.
[0057] This application provides a method for generating end-to-end production load testing scripts, such as... Figure 1 As shown, it includes the following steps:
[0058] S101. Collect information on the number of transaction requests received by each target server in the system under test within the target time period, as well as the transaction request message of each transaction request.
[0059] The target servers include the various front-end servers and the various back-end servers in the system under test.
[0060] It should be noted that the system is usually composed of a front-end server and a back-end server. Although all transaction requests in the system are received by the front-end server, not all transaction requests are processed by the front-end server. Some transaction requests are processed by the back-end server, or are processed jointly by the front-end server and the back-end server. Therefore, in this case, the front-end server will send transaction requests to the back-end server. Thus, in this embodiment of the application, it is necessary to collect the number of transactions and transaction request messages processed by the front-end server and the back-end server in order to generate a targeted end-to-end production load testing script.
[0061] Furthermore, in order to comprehensively and accurately collect transaction request data from the front-end and back-end servers of the entire system for subsequent processing, this embodiment of the application requires collecting transaction request data within a target time period. Optionally, the target time period can be set according to requirements.
[0062] Optionally, the quantity information of transaction requests may include the total number of transaction requests, the number of transaction requests per transaction, etc. The transaction request message can be obtained from the transaction request.
[0063] It should also be noted that in the embodiments of this application, a transaction does not refer to a single transaction request, but rather to a transaction type corresponding to a class of transaction requests. Transaction requests for the same transaction require the same processing method from the system.
[0064] Specifically, by enabling the monitoring module in the system, the transactions of all request sources from the front-end server and the transaction processing back-end server can be monitored until the target time length is reached. Then, the monitoring module can be disabled to obtain information on the number of transaction requests received by each target server in the system under test within the target time length, as well as the transaction request message of each transaction request.
[0065] S102. Based on the number of transaction requests received by each target server, calculate the transaction percentage corresponding to each target server.
[0066] It should be noted that, in order to ensure that the traffic of each target server during the test is more in line with the actual situation and thus obtain more accurate performance test results, it is necessary to calculate the transaction ratio of each target server based on the number of transaction requests received by each target server. This will allow us to set the traffic ratio of each target server and the ratio of each type of transaction based on the transaction ratio of each target server.
[0067] Therefore, the transaction percentage corresponding to each target server can include the percentage of the total number of transaction requests processed by the target server, as well as the percentage of the number of transaction requests processed for each type of transaction.
[0068] S103. By comparing the request messages of each transaction belonging to the same transaction, the request message variables of each transaction are determined.
[0069] It should be noted that during the testing process, it is necessary to simulate sending multiple different transaction requests to the target server. Since the transaction request messages of the same transaction are usually only different in terms of variables, by comparing the various transaction request messages belonging to the same transaction, the request message variables of each transaction can be determined, and then the transaction request can be simulated based on the request message variables.
[0070] Optionally, such as Figure 2 As shown, one specific implementation of step S103 includes:
[0071] S201. For each transaction, compare the various transaction request messages belonging to that transaction and extract the different contents in each transaction request message.
[0072] Specifically, the contents of each transaction request message belonging to the transaction are compared to identify and extract any inconsistencies. It should be noted that it is possible to extract only the inconsistencies from one of the transaction request messages.
[0073] S202. The different contents extracted from each transaction request message are determined as the request message variables of the transaction.
[0074] S104. Based on the transaction ratio of each target server and the request message variables of each transaction, generate the full-link production load test script for the system to be tested.
[0075] Specifically, based on the transaction share of each target server, the traffic share of each target server can be set when generating the script. Based on the request message variables of each transaction, the transaction requests sent to each target server can be simulated. Therefore, based on the transaction share of each target server and the request message variables of each transaction, a full-link production load testing script that conforms to the actual situation can be generated.
[0076] Optionally, in another embodiment of this application, one specific implementation of step S104 is as follows: Figure 3 As shown, it includes:
[0077] S301. Parameterize the request message variables for each transaction.
[0078] Since the extracted request message variables for each transaction are extracted from a specific request message variable, meaning they are specific to a particular transaction request, they need to be parameterized.
[0079] S302. Fill the preset template with the transaction ratio corresponding to each target server and the parameterized request message variables of each transaction to obtain the full-link production load test script of the system to be tested.
[0080] It should be noted that, in this embodiment of the application, the full-link production load testing script of the system to be tested is generated by using a preset script template, thereby making the script generation more flexible and convenient.
[0081] The method for generating a full-link production load testing script provided in this application collects information on the number of transaction requests received by each target server in the system under test within a target time period, as well as the transaction request messages of each transaction request. The target servers include each front-end server and each back-end server in the system under test, thereby obtaining information characterizing the actual situation of the entire system under test. Then, based on the number of transaction requests received by each target server, the transaction proportion corresponding to each target server is calculated to ensure that the process of each target server is consistent with the actual cleanup when generating the script, thus guaranteeing the accuracy of the test results. Furthermore, by comparing the transaction request messages belonging to the same transaction, the request message variables of each transaction are determined, enabling the simulation of request messages that conform to the actual situation during the test. Finally, based on the transaction proportions corresponding to each target server and the request message variables of each transaction, a full-link production load testing script for the system under test is generated. This achieves an automatic generation of a full-link production load testing script, which can perform load testing on the entire system, thereby not only improving the script generation efficiency but also effectively ensuring the accuracy of the results.
[0082] Alternatively, another embodiment of this application provides a different method for generating end-to-end production load testing scripts, such as... Figure 4 As shown, it includes the following steps:
[0083] S401. Monitor in real time the transaction requests received by each target server in the system under test within the target time period.
[0084] The target servers include the various front-end servers and the various back-end servers in the system under test.
[0085] Specifically, the system monitors all transaction requests received by each front-end server from all request sources, as well as the transaction requests sent by each front-end server to each back-end server.
[0086] S402. Real-time acquisition of transaction request messages of each monitored transaction request, and counting of the number of transaction requests received by each target server for each transaction within the target time period, to obtain the number of transaction requests received by each target server.
[0087] Specifically, for each detected transaction request, the transaction request message is obtained.
[0088] Optionally, the statistics on the number of transaction requests can be accumulated continuously in real time, or they can be performed all at once after a target time period.
[0089] S403. Calculate the total number of transaction requests received by each front-end server to obtain the total number of transaction requests.
[0090] Optionally, since the transaction requests sent externally are first received by the front-end servers, the total number of requests from each front-end server can be determined first, and then summed to obtain the total number of transaction requests. Alternatively, the total number of transaction requests can also be obtained by summing the number of transaction requests processed by each target server.
[0091] S404. For each target server, divide the number of transaction requests processed by that target server by the total number of transaction requests to obtain the transaction percentage corresponding to that target server.
[0092] Optionally, since the transaction requests sent externally are first received by the front-end servers, the total number of requests received by each front-end server can be determined first, i.e., the number of transaction requests received by each front-end server. Then, the number of transaction requests sent by each front-end server to each back-end server can be determined, i.e., the number of individual transaction requests received by each back-end server. Based on the total number of requests received by the front-end servers and the number of transaction requests sent to each back-end server, the number of transaction requests processed by each front-end server can be obtained.
[0093] Then, in this embodiment of the application, the proportion of the number of transaction requests processed by each target server for each transaction is specifically calculated, so that during the test, not only the total traffic proportion of each target server can be controlled, but also the proportion of each transaction can be controlled more accurately, making the transaction results more accurate.
[0094] For example, suppose there are two front-end servers, F1 and F2, and a back-end server, B. Let t be one front-end transaction and T1 and T2 be two back-end transactions. F1 t and F2 t This represents the number of requests for front-end transaction t received by the two front-end servers. (F1) T1 F2 T1 F1 T2 F2 T2 These represent the number of requests received by the frontend server for the two backend transactions. Therefore, the total number of transaction requests within the target time period is:
[0095] R = F1 t +F2 t +F1 T1 +F2 T1 +F1 T2 +F2 T2
[0096] Therefore, the transaction percentage for each target server is: F1 t / R、F2 t / R、F1 T1 / R、F2 T1 / R、F1 T2 / R、F2 T2 / R.
[0097] S405. For each transaction, compare the various transaction request messages belonging to the transaction and extract the different contents in each transaction request message.
[0098] It should be noted that the specific implementation of step S405 can be referred to step S201 of the above two methods, and will not be repeated here.
[0099] S406. The different contents extracted from each transaction request message are determined as transaction request message variables.
[0100] It should be noted that the specific implementation of step S406 can be referred to step S202 of the above two methods, and will not be repeated here.
[0101] S407. Parameterize the request message variables for each transaction.
[0102] It should be noted that the specific implementation of step S407 can be referred to step S301 of the above two methods, and will not be repeated here.
[0103] S408, the transaction percentage corresponding to each target server, and the parameterized request message variables of each transaction are filled into the preset template to obtain the full-link production load test script of the system to be tested.
[0104] It should be noted that the specific implementation of step S408 can be referred to step S302 of the above two methods, and will not be repeated here.
[0105] Another embodiment of this application provides a device for generating end-to-end production load testing scripts, such as... Figure 5 As shown, it includes:
[0106] The collection unit 501 is used to collect information on the number of transaction requests received by each target server in the system under test within the target time period, as well as the transaction request message of each transaction request.
[0107] The target servers include the various front-end servers and the various back-end servers in the system under test.
[0108] The calculation unit 502 is used to calculate the transaction ratio corresponding to each target server based on the number of transaction requests received by each target server.
[0109] The determining unit 503 is used to determine the request message variables of each transaction by comparing the various transaction request messages belonging to the same transaction.
[0110] Generation unit 504 is used to generate a full-link production load test script for the system under test based on the transaction ratio of each target server and the request message variables of each transaction.
[0111] Optionally, in another embodiment of the present application, the apparatus for generating end-to-end production load testing scripts includes a collection unit comprising:
[0112] The monitoring unit is used to monitor in real time the transaction requests received by each target server in the system under test within the target time period.
[0113] The acquisition unit is used to acquire the transaction request messages of each monitored transaction request in real time.
[0114] The statistics unit is used to count the number of transaction requests received by each target server within the target time period, and to obtain information on the number of transaction requests received by each target server.
[0115] Optionally, in another embodiment of the present application, the apparatus for generating end-to-end production load testing scripts includes a computing unit comprising:
[0116] The quantity calculation unit is used to calculate the sum of the number of transaction requests received by each front-end server to obtain the total number of transaction requests.
[0117] The percentage calculation unit is used to divide the number of transaction requests processed by each transaction on each target server by the total number of transaction requests to obtain the transaction percentage of the target server.
[0118] Optionally, in another embodiment of the apparatus for generating end-to-end production load testing scripts provided in this application, the determining unit includes:
[0119] The extraction unit is used to compare the various transaction request messages belonging to each transaction for each transaction and extract the different contents in each transaction request message.
[0120] The variable determination unit is used to determine the different contents in each extracted transaction request message as transaction request message variables.
[0121] Optionally, in another embodiment of the present application, the apparatus for generating end-to-end production load testing scripts includes a generation unit comprising:
[0122] The processing unit is used to parameterize the request message variables for each transaction.
[0123] The generation sub-unit is used to fill the preset template with the transaction proportion corresponding to each target server and the parameterized request message variables of each transaction to obtain the full-link production load test script of the system to be tested.
[0124] It should be noted that the specific working process of each unit provided in the above embodiments of this application can be referred to the corresponding steps in the above method embodiments, and will not be repeated here.
[0125] Another embodiment of this application provides an electronic device, such as... Figure 6 As shown, it includes:
[0126] Memory 601 and processor 602.
[0127] The memory 601 is used to store the program.
[0128] The processor 602 is used to execute the program stored in the memory 601. When the program is executed, it is specifically used to implement the method for generating end-to-end production stress testing scripts as provided in any of the above embodiments.
[0129] Another embodiment of this application provides a computer storage medium for storing a computer program, which, when executed, implements the method for generating end-to-end production load testing scripts as provided in any of the above embodiments.
[0130] Computer storage media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0131] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[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.
Claims
1. A method for generating end-to-end production load testing scripts, characterized in that, include: Collect information on the number of transaction requests received by each target server in the system under test within a target time period, as well as the transaction request message of each transaction request; wherein, the target servers include each front-end server and each back-end server in the system under test. Based on the number of transaction requests received by each of the target servers, the transaction percentage corresponding to each of the target servers is calculated. By comparing the various transaction request messages belonging to the same transaction, the request message variables of each transaction are determined; Based on the transaction percentage of each target server and the request message variables of each transaction, a full-link production stress test script for the system under test is generated. The step of determining the request message variables for each transaction by comparing the various transaction request messages belonging to the same transaction includes: For each transaction, the transaction request messages belonging to the transaction are compared, and the different contents in each transaction request message are extracted. The different contents extracted from each of the transaction request messages are determined as the transaction request message variables.
2. The method according to claim 1, characterized in that, The collection of transaction request quantity information and transaction request messages received by each target server in the system under test within the target time period includes: Real-time monitoring of transaction requests received by each target server in the system under test within the target time period; The system acquires the transaction request messages of each monitored transaction request in real time, and counts the number of transaction requests received by each target server within the target time period to obtain the number of transaction requests received by each target server.
3. The method according to claim 2, characterized in that, The step of calculating the transaction percentage corresponding to each target server based on the number of transaction requests received by each target server includes: Calculate the sum of the number of transaction requests received by each of the aforementioned front-end servers to obtain the total number of transaction requests; For each target server, the number of transaction requests processed by each transaction on the target server is divided by the total number of transaction requests to obtain the transaction percentage corresponding to the target server.
4. The method according to claim 1, characterized in that, The step of generating a full-link production load test script for the system under test based on the transaction percentage corresponding to each of the target servers and the request message variables of each transaction includes: The request message variables for each of the transactions are parameterized; The transaction percentage corresponding to each target server and the parameterized request message variables of each transaction are filled into a preset template to obtain the full-link production stress test script of the system to be tested.
5. A device for generating end-to-end production load testing scripts, characterized in that, include: The collection unit is used to collect information on the number of transaction requests received by each target server in the system under test within a target time period, as well as the transaction request message of each transaction request; wherein, the target server includes each front-end server and each back-end server in the system under test. The calculation unit is used to calculate the transaction percentage corresponding to each of the target servers based on the number of transaction requests received by each target server. The determining unit is used to determine the request message variables of each transaction by comparing the various transaction request messages belonging to the same transaction; The generation unit is used to generate a full-link production stress test script for the system under test based on the transaction ratio corresponding to each of the target servers and the request message variables of each transaction. The determining unit includes: The extraction unit is used to compare the various transaction request messages belonging to each transaction for each transaction and extract the different contents in each transaction request message. The variable determination unit is used to determine the different contents in each extracted transaction request message as transaction request message variables.
6. The apparatus according to claim 5, characterized in that, The collection unit includes: The monitoring unit is used to monitor in real time the transaction requests received by each of the target servers in the system under test within the target time period; The acquisition unit is used to acquire the transaction request messages of each of the monitored transaction requests in real time. The statistics unit is used to count the number of transaction requests received by each of the target servers within the target time period, and to obtain the number of transaction requests received by each of the target servers.
7. The apparatus according to claim 5, characterized in that, The computing unit includes: The quantity calculation unit is used to calculate the sum of the number of transaction requests received by each of the front-end servers to obtain the total number of transaction requests; The percentage calculation unit is used to divide the number of transaction requests for each transaction processed by the target server by the total number of transaction requests for each target server to obtain the transaction percentage corresponding to the target server.
8. An electronic device, characterized in that, include: Memory and processor; The memory is used to store programs; The processor is used to execute the program, which, when executed, is specifically used to implement the method for generating end-to-end production load testing scripts as described in any one of claims 1 to 4.
9. A computer storage medium, characterized in that, Used to store computer programs, which, when executed, are used to implement the method for generating end-to-end production load testing scripts as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Container cloud-based pressure testing method and system
CN110162471A
Pressure test method, terminal equipment and computer storage medium
CN110968468A