Pressure testing system

By using externally rented test node clusters to handle high concurrent testing tasks, the problem of high equipment costs in traditional stress testing systems is solved, and the effect of reducing costs and improving configuration flexibility is achieved.

CN119718802APending Publication Date: 2025-03-28BEIJING DP TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411795674.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Traditional stress testing systems require high-performance equipment, resulting in high equipment costs and maintenance costs. Especially for organizations that do not conduct stress testing all year round, building their own stress testing system will bring huge cost pressure.

Method used

By using externally rented test node clusters to handle large-scale, high-frequency and high-concurrency test tasks, reduce the cost of execution-side equipment, and improve the configuration flexibility of the pressure testing system by dynamically adjusting the scale of the test node cluster.

Benefits of technology

It greatly reduces the equipment cost on the execution side and the system cost of the entire pressure measurement system, while improving the configuration flexibility of the pressure measurement system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718802A_ABST
    Figure CN119718802A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a pressure test system. The system comprises a test deployment and monitoring end, a test database, a test execution end and a test node cluster, the test deployment and monitoring end is respectively connected with the test database and the test execution end; the test database is connected with the test execution end; the test execution end is connected with the test node cluster; and the test node cluster is connected with a test target outside the system. The pressure measurement system provided by the invention not only can greatly reduce the equipment cost of the execution end and the system cost of the whole pressure measurement system, but also can improve the configuration flexibility of the pressure measurement system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a pressure testing system. Background Art

[0002] Traditional stress testing systems usually consist of a management end, a script / report database, and an execution end. After receiving a stress test (abbreviated as stress testing) plan, the conventional management end will configure tasks based on the current plan requirements and the test scripts preset in the script / report database and distribute the configured stress testing tasks to each execution end. The conventional execution end performs a long-term, large-volume, high-concurrency test on the specified service interface of the test target (such as the target server, target system, target platform, or target cloud) based on the stress testing task, and continuously generates a single test log during the test. At the end of the test, the performance indicators of the test target are analyzed based on all the test logs generated by the stress test, and the corresponding performance indicator numerator report is stored in the script / report database. Through testing practice, we found that this traditional stress testing system has the problem of high system cost. The reason is that each execution end in the traditional stress testing system needs to have the system processing capability to handle large-volume, high-frequency, and high-concurrency test tasks, and the devices with this capability are all data center-level network devices (such as data center servers), and their purchase and maintenance costs are often high. For some organizations that do not need to perform stress testing all year round, building their own stress testing system according to traditional solutions will undoubtedly bring great cost pressure to their normal operation and maintenance.

[0003] With the development and popularization of cloud computing services, we have also found that many third-party cloud computing platforms have begun to provide a large number of computing node clusters that can be used for testing for users to rent. In this case, if the externally rented test node cluster can be used to handle large-volume + high-frequency + high-concurrency test tasks, it can not only greatly reduce the equipment cost of the execution end and the system cost of the entire stress testing system, but also improve the configuration flexibility of the stress testing system. This is exactly the system technical solution provided by the present invention. Summary of the invention

[0004] The purpose of the present invention is to provide a stress testing system for the defects of the prior art, which includes: a test deployment and monitoring end, a test database, a test execution end and a test node cluster; wherein the test deployment and monitoring end is used to configure the stress testing task according to the stress testing plan and the test database input by the administrator to obtain the corresponding first stress testing task and send it to the test execution end; the test database is used to store multiple first script sub-libraries and multiple first log sub-libraries; the test execution end is used to perform a round of cluster node deployment on the test node cluster according to each first cluster task of the first stress testing task to obtain the corresponding first cluster, and the test nodes of each first cluster complete this round of cluster testing. In this way, the test execution end of the system of the present invention can be implemented based on an ordinary network computer, server or microservice, and the cluster size of the test node cluster can be dynamically adjusted according to the actual stress testing requirements. The stress testing system solution provided by the present invention can not only greatly reduce the equipment cost of the execution end and the system cost of the entire stress testing system, but also improve the configuration flexibility of the stress testing system.

[0005] To achieve the above-mentioned purpose, an embodiment of the present invention provides a stress testing system, the system comprising: a test deployment and monitoring terminal, a test database, a test execution terminal and a test node cluster;

[0006] The test deployment and monitoring end are connected to the test database and the test execution end respectively; the test database is connected to the test execution end; the test execution end is connected to the test node cluster; the test node cluster is connected to a test target outside the system; the test target is a target server, a target system, a target platform or a target cloud; each of the test targets corresponds to a target identifier;

[0007] The test deployment and monitoring end is used to receive the first stress testing plan input by the administrator; and based on the first stress testing plan and the test database, the stress testing task configuration is performed to obtain the corresponding first stress testing task and send it to the test execution end; and a monitoring data table is initialized locally; wherein, the first stress testing plan corresponds to the test target one-to-one; the first stress testing plan includes a test service identification set, a maximum number of concurrent connections and a total test duration; the test service identification set includes one or more test service identifications; each of the test service identifications corresponds to a service interface of the current test target; the first stress testing task includes one or more first cluster tasks; the first cluster task corresponds to the test service identification one-to-one; the first cluster task includes a first stress testing service identification, a first number of nodes, a first sending frequency, a first test duration, a first test message and a first test expected feedback;

[0008] The test deployment and monitoring end is further configured to, upon receiving the first sub-library name sent by the test execution end, use the first log sub-library corresponding to the first sub-library name in the test database as the corresponding current log sub-library; and update the monitoring data table based on the current log sub-library;

[0009] The test deployment and monitoring end is also used to construct a visual monitoring page according to the monitoring data table to obtain a corresponding first monitoring page when receiving a monitoring page query instruction input by an administrator or sent by the test execution end; and feedback the first monitoring page to the administrator or the test execution end corresponding to the current monitoring page query instruction;

[0010] The test database is used to store a plurality of first script sub-libraries and a plurality of first log sub-libraries; the first script sub-libraries correspond to the test targets one by one; the first log sub-libraries correspond to the first cluster tasks one by one;

[0011] The test execution end is used to sequentially traverse all the first cluster tasks of the first stress testing task; and during the traversal process, the first cluster task currently traversed is used as the corresponding current cluster task; and a first log sub-library corresponding to the current cluster task is created on the test database as the current log sub-library; and a round of cluster node deployment is performed based on the current cluster task and the test node cluster to obtain a corresponding first cluster; and a corresponding log storage directory is created locally on the execution end for the current first cluster and recorded as the first cluster directory; and during the test process of the current first cluster, the first node test log sent by any test node in the first cluster is received and stored in the first cluster directory; and at the end of the test of the current first cluster, the current log sub-library is updated according to all the first node test logs in the first cluster directory; and at the end of the update of the current log sub-library, the sub-library name of the current log sub-library is sent to the test deployment and monitoring end as the corresponding first sub-library name, and the first cluster directory is deleted, and the next first cluster task is used as the new current cluster task to continue traversing until the traversal of the last first cluster task is completed;

[0012] The test node cluster includes a plurality of the test nodes;

[0013] Each of the test nodes is used to store a set of test configuration parameters locally at the node; the test configuration parameters include a service identification parameter, a service request parameter, a request expected feedback parameter, a test timeout parameter, a sending frequency parameter, a test start time parameter, and a test end time parameter;

[0014] Each of the test nodes is also used to perform a service interface test regularly according to the service identification parameter, the service request parameter, the request expected feedback parameter and the test timeout parameter according to the sending frequency parameter when the current node time meets the test time period composed of the test start time parameter and the test end time parameter, to obtain a corresponding first node test log and send it to the test execution end; each of the test nodes is also used to stop the test when the current node time does not meet the test time period.

[0015] Preferably, the monitoring data table includes one or more monitoring data records; the monitoring data records correspond to the test service identifiers one by one; the monitoring data records include a first monitoring service identifier and a first performance indicator set; the first performance indicator set consists of one or more first performance indicators;

[0016] The first script sub-library is used to store one or more first test script records; each of the first test script records corresponds to a service interface of the current test target; the first test script record includes a first service identifier, a first test request and expected feedback of the first request; the first service identifier is a unique identifier of the current service interface; the first test request is a service request message of the current service interface; the expected feedback of the first request is the expected feedback information of the current first test request;

[0017] The first log sub-database is used to store one or more first test log records when it is not empty; the first test log record includes a second service identifier, a first request initiation time, a first request feedback time, a first request total number of bytes, and a first test status; the first test status includes success, timeout, and exception;

[0018] The first node test log includes a third service identifier, a second request initiation time, a second request feedback time, a second request total number of bytes, and a second test status; the second test status includes success, timeout, and exception.

[0019] Preferably, the test deployment and monitoring end is specifically used for, when the stress testing task configuration based on the first stress testing plan and the test database is performed to obtain a corresponding first stress testing task and sending it to the test execution end,

[0020] The test service identification set, the maximum number of concurrent connections, and the total test duration of the first stress testing plan are used as the corresponding current test service identification set, the current maximum number of concurrent connections, and the current total test duration; and the first script sub-library corresponding to the test target corresponding to the current first stress testing plan in the test database is used as the corresponding current script sub-library;

[0021] And identify whether the maximum concurrent number exceeds the preset maximum number of nodes; if not, set the corresponding first number of nodes to the maximum concurrent number, and set the corresponding first sending frequency to the first preset frequency; if so, set the corresponding first number of nodes to the maximum number of nodes, and calculate the corresponding first equivalent frequency = maximum concurrent number / (maximum number of nodes×first unit time length) based on the maximum concurrent number, the maximum number of nodes and the preset first unit time length, and identify whether the first equivalent frequency exceeds the first preset frequency, if so, set the corresponding first sending frequency to the first equivalent frequency, if not, set the corresponding first sending frequency to the first preset frequency;

[0022] and taking the total duration of the current test as the corresponding duration of the first test;

[0023] And perform a round of traversal on all the test service identifiers in the test service identifier set; and in this round of traversal, use the currently traversed test service identifier as the corresponding current service identifier; and use the first test script record corresponding to the first service identifier and the current service identifier in the current script sub-library as the corresponding current script record; and extract the first test request and the first request expected feedback of the current script record as the corresponding first test message and the first test expected feedback; and use the current service identifier as the corresponding first stress testing service identifier; and the first stress testing service identifier, the first test message and the first test expected feedback obtained this time, as well as the first number of nodes, the first sending frequency and the first test duration form a corresponding first cluster task;

[0024] After traversing all the test service identifiers of the test service identifier set, the first stress testing task corresponding to all the first cluster tasks is formed and sent to the test execution end.

[0025] Preferably, the number of the test execution terminals is not required to be unique;

[0026] When the number of the test execution terminals is not unique, the test deployment and monitoring terminal is further used to, upon receiving the first sub-database name sent by each of the test execution terminals, use the test service identifier corresponding to the first log sub-database corresponding to the current first sub-database name as the current service identifier; and temporarily merge all the first log sub-databases corresponding to the current service identifier in the test database to obtain a corresponding temporary merged library; and use the temporary merged library as the corresponding current log sub-database; and update the monitoring data table based on the current log sub-database.

[0027] Preferably, the test deployment and monitoring end is specifically used to extract the second service identifier of any first test log record in the current log sub-library as the corresponding first monitoring service identifier when the monitoring data table is updated based on the current log sub-library; and based on the performance indicator statistical rules corresponding to each of the first performance indicators, perform corresponding performance indicator statistical calculations according to all the first test log records in the current log sub-library to obtain a corresponding first performance indicator; and form a corresponding first performance indicator set from all the first performance indicators obtained this time; and form a corresponding monitoring data record from the first monitoring service identifier and the first performance indicator set obtained this time to add to the monitoring data table.

[0028] Preferably, the test deployment and monitoring end are specifically used for substituting each of the monitoring data records in the monitoring data table into a preset sub-page visualization graphic template for sub-page assembly to obtain the corresponding first sub-page when the visual monitoring page is constructed according to the monitoring data table to obtain the corresponding first monitoring page; and bringing all the first sub-pages obtained into the preset monitoring page visualization graphic template for monitoring page assembly to obtain the corresponding first monitoring page.

[0029] Preferably, the test execution end is specifically used for, when a corresponding first cluster is obtained by performing a round of cluster node deployment based on the current cluster task and the test node cluster,

[0030] The first stress testing service identifier, the first number of nodes, the first sending frequency, the first test duration, the first test message, and the first test expected feedback of the current cluster task are used as the corresponding current service identifier, the current number of nodes N, the current sending frequency, the current test duration, the current test message, and the current test expected feedback;

[0031] The preset first timeout duration is used as the corresponding current timeout duration; a future time point is used as the corresponding start time of the current centralized test; and another future time point obtained by adding the current centralized test start time and the current test duration is used as the corresponding end time of the current centralized test;

[0032] And select N test nodes that are not in the test state from the test node cluster to form the corresponding first cluster; and set the service identification parameter, the service request parameter, the request expected feedback parameter, the test timeout parameter, the sending frequency parameter, the test start time parameter and the test end time parameter of each test node of the first cluster to the corresponding current service identification, the current test message, the current test expected feedback, the current timeout duration, the current sending frequency, the current collective test start time and the current collective test end time.

[0033] Preferably, the test execution end is specifically used to traverse all the first-node test logs of the first cluster directory one by one in chronological order when the current log sub-library is updated according to all the first-node test logs of the first cluster directory; and during the traversal process, the first-node test log currently traversed is used as the corresponding current test log; and the third service identifier of the current test log, the second request initiation time, the second request feedback time, the second request total number of bytes and the second test status are used as the corresponding second service identifier, the first request initiation time, the first request feedback time, the first request total number of bytes and the first test status to form a corresponding first test log record and add it to the current log sub-library.

[0034] Preferably, each of the test nodes is specifically used for performing a service interface test according to the service identification parameter, the service request parameter, the request expected feedback parameter and the test timeout parameter regularly according to the sending frequency parameter to obtain a corresponding first node test log and sending it to the test execution end,

[0035] Regularly assembling a service request message based on the service request parameter according to the sending frequency parameter to obtain a corresponding test message for the current time and sending it to the test target;

[0036] When the test message is sent, the service identifier parameter is used as a corresponding third service identifier; the total number of bytes of the test message is counted and the statistical result is used as a corresponding total number of bytes of the second request; and the sending time of the test message is used as a corresponding initiation time of the second request;

[0037] After the test message is sent, whether a timeout error occurs to the test target is identified based on the test timeout parameter; if the test target fails to return any information within the waiting period specified by the test timeout parameter, a corresponding second request feedback time is set to empty, and a corresponding second test status is set to timeout; if the test target returns information within the waiting period specified by the test timeout parameter, the sending time of the information returned by the test target is used as the corresponding second request feedback time, and the correctness comparison of the returned information of the test target is performed based on the request expected feedback parameter to obtain the corresponding comparison result, and whether the comparison result is a successful comparison is identified, if so, a corresponding second test status is set to success, if not, a corresponding second test status is set to abnormal; and the second request feedback time, the second test status, the corresponding third service identifier, the second request initiation time, and the total number of bytes of the second request are used to form a corresponding first node test log and send it to the test execution end.

[0038] The embodiment of the present invention provides a stress testing system, which includes: a test deployment and monitoring end, a test database, a test execution end and a test node cluster; wherein the test deployment and monitoring end is used to configure the stress testing task according to the stress testing plan input by the administrator and the test database to obtain the corresponding first stress testing task and send it to the test execution end; the test database is used to store multiple first script sub-libraries and multiple first log sub-libraries; the test execution end is used to perform a round of cluster node deployment on the test node cluster according to each first cluster task of the first stress testing task to obtain the corresponding first cluster, and the test nodes of each first cluster complete this round of cluster testing. In this way, the test execution end of the system of the embodiment of the present invention can be implemented based on an ordinary network computer, server or microservice, and the cluster scale of the test node cluster can be dynamically adjusted according to the actual stress testing needs. The stress testing system solution provided by the embodiment of the present invention not only greatly reduces the equipment cost of the execution end and the system cost of the entire stress testing system, but also improves the configuration flexibility of the stress testing system. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A module structure diagram of a pressure testing system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] like Figure 1 As shown in the module structure diagram of a stress testing system provided by an embodiment of the present invention, a stress testing system 1 provided by an embodiment of the present invention mainly includes: a test deployment and monitoring terminal 11, a test database 12, a test execution terminal 13 and a test node cluster 14.

[0042] The connection relationship between the various components of the system of the embodiment of the present invention is: the test deployment and monitoring end 11 is connected to the test database 12 and the test execution end 13 respectively; the test database 12 is connected to the test execution end 13; the test execution end 13 is connected to the test node cluster 14; the test node cluster 14 is connected to the test target 2 outside the system; the test target 2 is a target server, target system, target platform or target cloud; each test target 2 corresponds to a target identifier.

[0043] (I) Test deployment and monitoring terminal 11:

[0044] The test deployment and monitoring terminal 11 of the embodiment of the present invention is used to receive the first stress testing plan input by the administrator; and configure the stress testing task based on the first stress testing plan and the test database 12 to obtain the corresponding first stress testing task and send it to the test execution terminal 13; and initialize a monitoring data table locally.

[0045] Here, the first stress testing plan of the embodiment of the present invention corresponds one-to-one to the test target 2; the first stress testing plan includes a test service identification set, a maximum number of concurrencies and a total test duration; wherein the test service identification set includes one or more test service identifications; each test service identification corresponds to a service interface of the current test target 2.

[0046] The first stress testing task of the embodiment of the present invention includes one or more first cluster tasks; the first cluster task corresponds one-to-one to the test service identifier; the first cluster task includes the first stress testing service identifier, the first number of nodes, the first sending frequency, the first test duration, the first test message and the first test expected feedback.

[0047] The monitoring data table of an embodiment of the present invention includes one or more monitoring data records; the monitoring data records correspond one-to-one to the test service identifier; the monitoring data records include a first monitoring service identifier and a first performance indicator set; the first performance indicator set consists of one or more first performance indicators, and the first performance indicators mentioned here can be customized based on application requirements, and conventional ones include concurrency, throughput, error rate, accuracy, latency and other indicators.

[0048] The test deployment and monitoring end 11 of the embodiment of the present invention is also used to, when receiving the first sub-library name sent by the test execution end 13, use the first log sub-library corresponding to the first sub-library name in the test database 12 as the corresponding current log sub-library; and update the monitoring data table based on the current log sub-library.

[0049] It should be noted that the number of test execution terminals 13 in the embodiment of the present invention is not required to be unique. When the number of test execution terminals 13 is not unique, the test deployment and monitoring terminal 11 is also used to, upon receiving the first sub-library name sent by each test execution terminal 13, use the test service identifier corresponding to the first log sub-library corresponding to the current first sub-library name as the current service identifier; and temporarily merge all first log sub-libraries corresponding to the current service identifier in the test database 12 to obtain the corresponding temporary merged library; and use the temporary merged library as the corresponding current log sub-library; and update the monitoring data table based on the current log sub-library.

[0050] The test deployment and monitoring terminal 11 is also used to construct a visual monitoring page according to the monitoring data table to obtain the corresponding first monitoring page when receiving a monitoring page query instruction input by the administrator or sent by the test execution terminal 13; and feedback the first monitoring page to the administrator or test execution terminal 13 corresponding to the current monitoring page query instruction.

[0051] In a specific implementation of the embodiment of the present invention, the test deployment and monitoring end 11 is specifically used for performing a stress testing task configuration based on the first stress testing plan and the test database 12 to obtain a corresponding first stress testing task and sending it to the test execution end 13:

[0052] Step A1, taking the test service identification set, maximum concurrency number and total test duration of the first stress testing plan as the corresponding current test service identification set, current maximum concurrency number and current total test duration; and taking the first script sub-library corresponding to the test target 2 corresponding to the current first stress testing plan in the test database 12 as the corresponding current script sub-library;

[0053] Step A2, and identify whether the maximum concurrent number exceeds the preset maximum number of nodes; if not, set the corresponding first number of nodes as the maximum concurrent number, and set the corresponding first sending frequency as the first preset frequency; if so, set the corresponding first number of nodes as the maximum number of nodes, and calculate the corresponding first equivalent frequency = maximum concurrent number / (maximum number of nodes×first unit time length) based on the maximum concurrent number, the maximum number of nodes and the preset first unit time length, and identify whether the first equivalent frequency exceeds the first preset frequency, if so, set the corresponding first sending frequency as the first equivalent frequency, if not, set the corresponding first sending frequency as the first preset frequency;

[0054] Here, the maximum number of nodes is a preset positive integer; the first preset frequency is a preset time frequency parameter; the first unit duration is a preset time length parameter;

[0055] Step A3, and taking the current total test duration as the corresponding first test duration;

[0056] Step A4, and perform a round of traversal for all test service identifiers in the test service identifier set; and in this round of traversal, use the currently traversed test service identifier as the corresponding current service identifier; and use the first test script record corresponding to the first service identifier and the current service identifier in the current script sub-library as the corresponding current script record; and extract the first test request and the first request expected feedback of the current script record as the corresponding first test message and the first test expected feedback; and use the current service identifier as a corresponding first stress testing service identifier; and form a corresponding first cluster task with the first stress testing service identifier, the first test message and the first test expected feedback obtained this time, as well as the first number of nodes, the first sending frequency and the first test duration;

[0057] In step A5 , after the traversal of all the test service identifiers in the test service identifier set is completed, a corresponding first stress testing task is formed by all the obtained first cluster tasks and sent to the test execution end 13 .

[0058] In another specific implementation of the embodiment of the present invention, the test deployment and monitoring end 11 is specifically used to extract the second service identifier of any first test log record in the current log sub-library as the corresponding first monitoring service identifier when updating the monitoring data table based on the current log sub-library; and based on the performance indicator statistical rules corresponding to each first performance indicator, perform corresponding performance indicator statistical calculations according to all first test log records of the current log sub-library to obtain a corresponding first performance indicator; and form a corresponding first performance indicator set from all the first performance indicators obtained this time; and form a corresponding monitoring data record from the first monitoring service identifier and the first performance indicator set obtained this time to add to the monitoring data table.

[0059] In another specific implementation method of an embodiment of the present invention, the test deployment and monitoring terminal 11 is specifically used to construct a visual monitoring page according to the monitoring data table to obtain a corresponding first monitoring page, and substitute each monitoring data record in the monitoring data table into a preset sub-page visualization graphic template to assemble the sub-page to obtain the corresponding first sub-page; and bring all the obtained first sub-pages into the preset monitoring page visualization graphic template to assemble the monitoring page to obtain the corresponding first monitoring page.

[0060] Here, the sub-page visualization graphic template and the monitoring page visualization graphic template are two preset visualization graphic templates.

[0061] (II) Test database 12:

[0062] The test database 12 of the embodiment of the present invention is used to store multiple first script sub-libraries and multiple first log sub-libraries. Here, the first script sub-libraries correspond one-to-one to the test targets 2; the first log sub-libraries correspond one-to-one to the first cluster tasks.

[0063] The first script sub-library of the embodiment of the present invention is used to store one or more first test script records; each first test script record corresponds to a service interface of the current test target 2; the first test script record includes a first service identifier, a first test request and expected feedback of the first request; the first service identifier is a unique identifier of the current service interface; the first test request is a service request message of the current service interface; the expected feedback of the first request is the expected feedback information of the current first test request.

[0064] When the first log sub-library in an embodiment of the present invention is not empty, it is used to store one or more first test log records; the first test log record includes a second service identifier, a first request initiation time, a first request feedback time, a first request total number of bytes, and a first test status; the first test status includes success, timeout, and exception.

[0065] (III) Test execution terminal 13:

[0066] The test execution end 13 of the embodiment of the present invention is used to traverse all the first cluster tasks of the first stress testing task in sequence; and during the traversal process, the first cluster task currently traversed is used as the corresponding current cluster task; and a first log sub-library corresponding to the current cluster task is created on the test database 12 as the current log sub-library; and a round of cluster node deployment is performed based on the current cluster task and the test node cluster 14 to obtain a corresponding first cluster; and a corresponding log storage directory is created locally on the execution end for the current first cluster and recorded as the first cluster directory; and during the test process of the current first cluster, the first node test log sent by any test node 141 in the first cluster is received and stored in the first cluster directory; and at the end of the test of the current first cluster, the current log sub-library is updated according to all the first node test logs in the first cluster directory; and at the end of the update of the current log sub-library, the sub-library name of the current log sub-library is sent as the corresponding first sub-library name to the test deployment and monitoring end 11, and the first cluster directory is deleted, and the next first cluster task is used as the new current cluster task to continue traversing until the traversal of the last first cluster task is completed.

[0067] In another specific implementation of the embodiment of the present invention, the test execution end 13 is specifically used for performing a round of cluster node deployment based on the current cluster task and the test node cluster 14 to obtain a corresponding first cluster:

[0068] Step B1, taking the first stress testing service identifier, the first number of nodes, the first sending frequency, the first test duration, the first test message and the first test expected feedback of the current cluster task as the corresponding current service identifier, the current number of nodes N, the current sending frequency, the current test duration, the current test message and the current test expected feedback;

[0069] Step B2, and use the preset first timeout duration as the corresponding current timeout duration; and use a future time point as the corresponding start time of the current centralized test; and use another future time point obtained by adding the current centralized test start time and the current test duration as the corresponding end time of the current centralized test;

[0070] Here, the first timeout duration is a preset time length parameter;

[0071] Step B3, and select N test nodes 141 that are not in the test state from the test node cluster 14 to form a corresponding first cluster; and set the service identification parameters, service request parameters, request expected feedback parameters, test timeout parameters, sending frequency parameters, test start time parameters and test end time parameters of each test node 141 of the first cluster to the corresponding current service identification, current test message, current test expected feedback, current timeout duration, current sending frequency, current centralized test start time and current centralized test end time.

[0072] In another specific implementation of the embodiment of the present invention, the test execution end 13 is specifically used to traverse all the first node test logs of the first cluster directory one by one in chronological order when the current log sub-library is updated according to all the first node test logs of the first cluster directory; and in the traversal process, the currently traversed first node test log is used as the corresponding current test log; and the third service identifier, second request initiation time, second request feedback time, second request total number of bytes and second test status of the current test log are used as the corresponding second service identifier, first request initiation time, first request feedback time, first request total number of bytes and first test status to form a corresponding first test log record and add it to the current log sub-library.

[0073] (IV) Test node cluster 14:

[0074] The test node cluster 14 of the embodiment of the present invention includes a plurality of test nodes 141 .

[0075] Here, the test node cluster 14 of the embodiment of the present invention may be a computing node cluster provided by a cloud computing service provider, a collection of multiple computing node clusters provided by a cloud computing service provider, or a collection of multiple computing node clusters provided by multiple cloud computing service providers.

[0076] Each test node 141 is used to store a set of test configuration parameters locally, including service identification parameters, service request parameters, request expected feedback parameters, test timeout parameters, transmission frequency parameters, test start time parameters and test end time parameters.

[0077] Each test node 141 is also used to perform a service interface test regularly according to the service identification parameter, service request parameter, request expected feedback parameter and test timeout parameter according to the sending frequency parameter when the current node time meets the test time period composed of the test start time parameter and the test end time parameter to obtain a corresponding first node test log and send it to the test execution terminal 13.

[0078] Here, the first node test log of the embodiment of the present invention includes the third service identifier, the second request initiation time, the second request feedback time, the second request total number of bytes and the second test status; the second test status includes success, timeout and exception.

[0079] Each test node 141 is also used to stop the test when the current node time does not meet the test time period.

[0080] In another specific implementation of the embodiment of the present invention, each test node 141 is specifically used to perform a service interface test according to the service identification parameter, the service request parameter, the request expected feedback parameter and the test timeout parameter regularly according to the sending frequency parameter to obtain a corresponding first node test log and send it to the test execution terminal 13:

[0081] Step C1, assembling a service request message based on the service request parameter regularly according to the sending frequency parameter to obtain the corresponding test message of the current time and sending it to the test target 2;

[0082] Step C2, when the test message is sent, the service identification parameter is used as a corresponding third service identification; the total number of bytes of the test message is counted and the statistical result is used as a corresponding total number of bytes of the second request; and the sending time of the test message is used as a corresponding second request initiation time;

[0083] Step C3, after the test message is sent, identify whether a timeout error occurs in the test target 2 based on the test timeout parameter; if the test target 2 fails to return any information within the waiting period specified by the test timeout parameter, set a corresponding second request feedback time to empty, and set a corresponding second test status to timeout; if the test target 2 returns information within the waiting period specified by the test timeout parameter, use the sending time of the returned information of the test target 2 as the corresponding second request feedback time, and compare the correctness of the returned information of the test target 2 based on the request expected feedback parameter to obtain the corresponding comparison result, and identify whether the comparison result is successful, if so, set a corresponding second test status to success, if not, set a corresponding second test status to abnormal; and the second request feedback time, second test status, corresponding third service identifier, second request initiation time, and total number of second request bytes obtained this time form a corresponding first node test log and send it to the test execution terminal 13.

[0084] It should be noted that it should be understood that the division of the various modules of the above system is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the test execution end can be a separately established processing element, or it can be integrated in a chip of the above-mentioned device. In addition, it can also be stored in the memory of the above-mentioned device in the form of program code, and called and executed by a processing element of the above-mentioned system. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each method step of the aforementioned method or each module processing step of the aforementioned system can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0085] For example, the modules of the above system may be one or more integrated circuits configured to implement the aforementioned method, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module of the above system is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0086] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the above method embodiments are generated. The above computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The above-mentioned computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the above-mentioned computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, Bluetooth, microwave, etc.) methods. The above-mentioned computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The above-mentioned available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.

[0087] The embodiment of the present invention provides a stress testing system, which includes: a test deployment and monitoring end, a test database, a test execution end and a test node cluster; wherein the test deployment and monitoring end is used to configure the stress testing task according to the stress testing plan input by the administrator and the test database to obtain the corresponding first stress testing task and send it to the test execution end; the test database is used to store multiple first script sub-libraries and multiple first log sub-libraries; the test execution end is used to perform a round of cluster node deployment on the test node cluster according to each first cluster task of the first stress testing task to obtain the corresponding first cluster, and the test nodes of each first cluster complete this round of cluster testing. In this way, the test execution end of the system of the embodiment of the present invention can be implemented based on an ordinary network computer, server or microservice, and the cluster scale of the test node cluster can be dynamically adjusted according to the actual stress testing needs. The stress testing system solution provided by the embodiment of the present invention not only greatly reduces the equipment cost of the execution end and the system cost of the entire stress testing system, but also improves the configuration flexibility of the stress testing system.

[0088] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0089] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0090] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A pressure testing system, characterized in that: The system includes: a test deployment and monitoring terminal, a test database, a test execution terminal and a test node cluster; The test deployment and monitoring end are connected to the test database and the test execution end respectively; the test database is connected to the test execution end; the test execution end is connected to the test node cluster; the test node cluster is connected to a test target outside the system; the test target is a target server, a target system, a target platform or a target cloud; each of the test targets corresponds to a target identifier; The test deployment and monitoring end is used to receive the first stress testing plan input by the administrator; and based on the first stress testing plan and the test database, the stress testing task configuration is performed to obtain the corresponding first stress testing task and send it to the test execution end; and a monitoring data table is initialized locally; wherein, the first stress testing plan corresponds to the test target one-to-one; the first stress testing plan includes a test service identification set, a maximum number of concurrent connections and a total test duration; the test service identification set includes one or more test service identifications; each of the test service identifications corresponds to a service interface of the current test target; the first stress testing task includes one or more first cluster tasks; the first cluster task corresponds to the test service identification one-to-one; the first cluster task includes a first stress testing service identification, a first number of nodes, a first sending frequency, a first test duration, a first test message and a first test expected feedback; The test deployment and monitoring end is further configured to, upon receiving the first sub-library name sent by the test execution end, use the first log sub-library corresponding to the first sub-library name in the test database as the corresponding current log sub-library; and update the monitoring data table based on the current log sub-library; The test deployment and monitoring end is also used to construct a visual monitoring page according to the monitoring data table to obtain a corresponding first monitoring page when receiving a monitoring page query instruction input by an administrator or sent by the test execution end; and feedback the first monitoring page to the administrator or the test execution end corresponding to the current monitoring page query instruction; The test database is used to store a plurality of first script sub-libraries and a plurality of first log sub-libraries; the first script sub-libraries correspond to the test targets one by one; the first log sub-libraries correspond to the first cluster tasks one by one; The test execution end is used to sequentially traverse all the first cluster tasks of the first stress testing task; and during the traversal process, the first cluster task currently traversed is used as the corresponding current cluster task; and a first log sub-library corresponding to the current cluster task is created on the test database as the current log sub-library; and a round of cluster node deployment is performed based on the current cluster task and the test node cluster to obtain a corresponding first cluster; and a corresponding log storage directory is created locally on the execution end for the current first cluster and recorded as the first cluster directory; and during the test process of the current first cluster, the first node test log sent by any test node in the first cluster is received and stored in the first cluster directory; and at the end of the test of the current first cluster, the current log sub-library is updated according to all the first node test logs in the first cluster directory; and at the end of the update of the current log sub-library, the sub-library name of the current log sub-library is sent to the test deployment and monitoring end as the corresponding first sub-library name, and the first cluster directory is deleted, and the next first cluster task is used as the new current cluster task to continue traversing until the traversal of the last first cluster task is completed; The test node cluster includes a plurality of the test nodes; Each of the test nodes is used to store a set of test configuration parameters locally at the node; the test configuration parameters include a service identification parameter, a service request parameter, a request expected feedback parameter, a test timeout parameter, a sending frequency parameter, a test start time parameter, and a test end time parameter; Each of the test nodes is also used to perform a service interface test regularly according to the service identification parameter, the service request parameter, the request expected feedback parameter and the test timeout parameter according to the sending frequency parameter when the current node time meets the test time period composed of the test start time parameter and the test end time parameter, to obtain a corresponding first node test log and send it to the test execution end; each of the test nodes is also used to stop the test when the current node time does not meet the test time period.

2. The pressure testing system according to claim 1, characterized in that: The monitoring data table includes one or more monitoring data records; the monitoring data records correspond to the test service identifiers one by one; the monitoring data records include a first monitoring service identifier and a first performance indicator set; the first performance indicator set consists of one or more first performance indicators; The first script sub-library is used to store one or more first test script records; each of the first test script records corresponds to a service interface of the current test target; the first test script record includes a first service identifier, a first test request and expected feedback of the first request; The first service identifier is a unique identifier of the current service interface; the first test request is a service request message of the current service interface; The expected feedback of the first request is the expected feedback information of the current first test request; The first log sub-database is used to store one or more first test log records when it is not empty; the first test log record includes a second service identifier, a first request initiation time, a first request feedback time, a first request total number of bytes, and a first test status; the first test status includes success, timeout, and exception; The first node test log includes a third service identifier, a second request initiation time, a second request feedback time, a second request total number of bytes, and a second test status; the second test status includes success, timeout, and exception.

3. The pressure testing system according to claim 2, characterized in that: The test deployment and monitoring end is specifically used for sending the corresponding first stress testing task to the test execution end when the stress testing task configuration is performed based on the first stress testing plan and the test database. The test service identification set, the maximum number of concurrent connections, and the total test duration of the first stress testing plan are used as the corresponding current test service identification set, the current maximum number of concurrent connections, and the current total test duration; and taking the first script sub-library corresponding to the test target corresponding to the current first stress testing plan in the test database as the corresponding current script sub-library; And identify whether the maximum concurrent number exceeds the preset maximum number of nodes; if not, set the corresponding first number of nodes to the maximum concurrent number, and set the corresponding first sending frequency to the first preset frequency; if so, set the corresponding first number of nodes to the maximum number of nodes, and calculate the corresponding first equivalent frequency = maximum concurrent number / (maximum number of nodes×first unit time length) based on the maximum concurrent number, the maximum number of nodes and the preset first unit time length, and identify whether the first equivalent frequency exceeds the first preset frequency, if so, set the corresponding first sending frequency to the first equivalent frequency, if not, set the corresponding first sending frequency to the first preset frequency; and taking the total duration of the current test as the corresponding duration of the first test; and performing a round of traversal on all the test service identifiers in the test service identifier set; And in this round of traversal, the test service identifier currently traversed is used as the corresponding current service identifier; and taking the first test script record corresponding to the first service identifier and the current service identifier in the current script sub-library as the corresponding current script record; and extracting the first test request and the first request expected feedback recorded in the current script as the corresponding first test message and the first test expected feedback; and using the current service identifier as a corresponding first stress testing service identifier; and forming a corresponding first cluster task with the first stress testing service identifier, the first test message, the first test expected feedback, the first number of nodes, the first sending frequency, and the first test duration obtained this time; After traversing all the test service identifiers of the test service identifier set, the first stress testing task corresponding to all the first cluster tasks is formed and sent to the test execution end.

4. The pressure testing system according to claim 2, characterized in that: The number of the test execution terminals is not required to be unique; When the number of the test execution terminals is not unique, the test deployment and monitoring terminal is further used to, upon receiving the first sub-database name sent by each of the test execution terminals, use the test service identifier corresponding to the first log sub-database corresponding to the current first sub-database name as the current service identifier; and temporarily merge all the first log sub-databases corresponding to the current service identifier in the test database to obtain a corresponding temporary merged database; The temporary merged library is used as the corresponding current log sub-library; and the monitoring data table is updated based on the current log sub-library.

5. The pressure testing system according to claim 4, characterized in that: The test deployment and monitoring end is specifically configured to extract the second service identifier of any first test log record in the current log sub-library as the corresponding first monitoring service identifier when the monitoring data table is updated based on the current log sub-library; and based on the performance indicator statistical rule corresponding to each first performance indicator, perform corresponding performance indicator statistical calculation according to all the first test log records of the current log sub-library to obtain a corresponding first performance indicator; All the first performance indicators obtained this time form a corresponding first performance indicator set; The first monitoring service identifier and the first performance indicator set obtained this time form a corresponding monitoring data record and add it to the monitoring data table.

6. The pressure testing system according to claim 2, characterized in that: The test deployment and monitoring end is specifically used for substituting each monitoring data record in the monitoring data table into a preset sub-page visual graphic template to assemble the sub-pages to obtain the corresponding first sub-page when the visual monitoring page is constructed according to the monitoring data table to obtain the corresponding first monitoring page; And all the first sub-pages obtained are brought into a preset monitoring page visualization graphic template to assemble the monitoring page to obtain the corresponding first monitoring page.

7. The pressure testing system according to claim 2, characterized in that: The test execution end is specifically used for, when a corresponding first cluster is obtained by performing a round of cluster node deployment based on the current cluster task and the test node cluster, The first stress testing service identifier, the first number of nodes, the first sending frequency, the first test duration, the first test message, and the first test expected feedback of the current cluster task are used as the corresponding current service identifier, the current number of nodes N, the current sending frequency, the current test duration, the current test message, and the current test expected feedback; And use the preset first timeout duration as the corresponding current timeout duration; And a future time point is used as the corresponding start time of the current centralized test; and taking another future time point obtained by adding the current test start time to the current test duration as the corresponding current test end time; And select N test nodes that are not in the test state from the test node cluster to form the corresponding first cluster; and set the service identification parameter, the service request parameter, the request expected feedback parameter, the test timeout parameter, the sending frequency parameter, the test start time parameter and the test end time parameter of each test node of the first cluster to the corresponding current service identification, the current test message, the current test expected feedback, the current timeout duration, the current sending frequency, the current collective test start time and the current collective test end time.

8. The pressure testing system according to claim 2, characterized in that: The test execution end is specifically configured to traverse all the first node test logs in the first cluster directory one by one in chronological order when the current log sub-library is updated according to all the first node test logs in the first cluster directory; During the traversal process, the first node test log currently traversed is used as the corresponding current test log; and the third service identifier, the second request initiation time, the second request feedback time, the second request total number of bytes and the second test status of the current test log are used as the corresponding second service identifier, the first request initiation time, the first request feedback time, the first request total number of bytes and the first test status to form a corresponding first test log record which is added to the current log sub-library.

9. The pressure testing system according to claim 2, characterized in that: Each of the test nodes is specifically configured to, when performing a service interface test according to the service identification parameter, the service request parameter, the request expected feedback parameter and the test timeout parameter regularly according to the sending frequency parameter to obtain a corresponding first node test log and send it to the test execution end, Regularly assembling a service request message based on the service request parameter according to the sending frequency parameter to obtain a corresponding test message for the current time and sending it to the test target; When the test message is sent, the service identifier parameter is used as a corresponding third service identifier; the total number of bytes of the test message is counted and the statistical result is used as a corresponding total number of bytes of the second request; and the sending time of the test message is used as a corresponding initiation time of the second request; After the test message is sent, identifying whether a timeout error occurs to the test target based on the test timeout parameter; If the test target fails to return any information within the waiting time specified by the test timeout parameter, then a corresponding second request feedback time is set to be empty, and a corresponding second test state is set to be timeout; If the test target returns information within the waiting time specified by the test timeout parameter, the sending time of the information returned by the test target is used as the corresponding second request feedback time, and the correctness comparison of the information returned by the test target is performed based on the request expected feedback parameter to obtain the corresponding current comparison result, and whether the current comparison result is a successful comparison is identified, if so, a corresponding second test state is set to success, if not, a corresponding second test state is set to abnormal; The second request feedback time, the second test status, the corresponding third service identifier, the second request initiation time, and the total number of bytes of the second request obtained this time form a corresponding first node test log and send it to the test execution end.