Cloud Native-based Performance Stress Testing Method, Device, Computer Equipment and Storage Medium

By using cloud-native methods in software performance stress testing, performance stress testing examples are dynamically determined and created, and the complex expansion operation in the existing technology is solved, and fast and convenient performance stress testing is achieved.

CN114138647BActive Publication Date: 2025-06-13CHINA MERCHANTS FINANCE HLDG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111447011.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-06-13
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

The capacity expansion operation during the performance pressure measurement of existing software is complicated, and it is difficult to quickly adjust the number of performance pressure measurement equipment.

Method used

The cloud-native performance pressure measurement method is adopted, by obtaining performance pressure measurement requests, querying the container image warehouse to obtain target software images, and dynamically determine the number of target instances based on the expected values ​​of the mirror and pressure measurement parameters. A corresponding number of target pressure measurement instances are created in the cloud-native container cluster to achieve dynamic capacity expansion.

Benefits of technology

It improves the convenience and efficiency of dynamic capacity expansion, can quickly respond to performance pressure measurement requirements, and ensures the accuracy and efficiency of pressure measurement results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114138647B_ABST
    Figure CN114138647B_ABST
Patent Text Reader

Abstract

The present invention discloses a performance stress testing method, device, computer device and storage medium based on cloud native. The method includes: obtaining a performance stress testing request, where the performance stress testing request includes the software to be tested, the performance stress testing type and the expected value of the stress testing parameter; querying a container image repository based on the performance stress testing type to obtain a target software image corresponding to the performance stress testing type; determining a target instance number based on the target software image and the expected value of the stress testing parameter, and creating a target stress testing instance corresponding to the target instance number in a cloud native-based container cluster; performing performance stress testing on the software to be tested based on the target stress testing instance to obtain a performance stress testing result. This method can ensure the convenience of dynamic scaling operations during the performance stress testing process and help ensure the efficiency of performance stress testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software performance testing, and in particular, to a performance testing method, device, computer device and storage medium based on cloud native. Background Art

[0002] The existing software performance testing process includes the following steps: obtaining the expected value of the performance testing parameters and the single-machine testing parameters corresponding to each performance testing device, and determining the target quantity according to the target testing parameters and the single-machine testing parameters, so as to deploy performance testing devices matching the target quantity for stress testing. Generally speaking, the existing software performance testing process is based on performance testing devices with a target quantity. When capacity expansion is required during the performance testing process, for example, when starting to deploy 10 performance testing devices and expanding to 20 performance testing devices during the testing process, it is necessary to redeploy and call the newly added performance testing devices for performance testing, and its capacity expansion operation process is relatively complex. Summary of the Invention

[0003] Embodiments of the present invention provide a performance testing method, device, computer device and storage medium based on cloud native to solve the problem that the capacity expansion operation process is relatively complex in the existing performance testing process.

[0004] A performance testing method based on cloud native includes:

[0005] Obtaining a performance testing request, where the performance testing request includes the software to be tested, the performance testing type and the expected value of the testing parameters;

[0006] Querying a container image repository based on the performance testing type to obtain a target software image corresponding to the performance testing type;

[0007] Determining a target instance quantity based on the target software image and the expected value of the testing parameters, and creating a target testing instance corresponding to the target instance quantity in a cloud-native container cluster;

[0008] Performing performance testing on the software to be tested based on the target testing instance to obtain a performance testing result.

[0009] A performance testing device based on cloud native includes:

[0010] A performance testing request acquisition module, configured to obtain a performance testing request, where the performance testing request includes the software to be tested, the performance testing type and the expected value of the testing parameters;

[0011] A target software image acquisition module, configured to query a container image repository based on the performance testing type to obtain a target software image corresponding to the performance testing type;

[0012] A target software image creation module, configured to determine a target instance number based on the target software image and the expected value of the stress test parameters, and create target stress test instances corresponding to the target instance number in a cloud-native container cluster.

[0013] A performance stress test result acquisition module, configured to perform a performance stress test on the software under test based on the target stress test instances, and acquire performance stress test results.

[0014] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-described cloud-native-based performance stress test method is implemented.

[0015] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the above-described cloud-native-based performance stress test method is implemented.

[0016] The above-described cloud-native-based performance stress test method, apparatus, computer device, and storage medium can quickly determine the corresponding target software image according to the performance stress test type in the performance stress test request, ensuring the acquisition efficiency of the target software image; according to the target software image and the expected value of the stress test parameters, dynamically determine the required target instance number, and dynamically create target stress test instances corresponding to the target instance number in a cloud-native container cluster to achieve dynamic expansion and improve the convenience of dynamic expansion; moreover, when performing a performance stress test on the software under test based on the target stress test instances, since the target stress test instances are created on a container cluster based on cloud-native technology, network traffic pressure can be quickly formed based on cloud-native technology to ensure the efficiency of performing a performance stress test on the software under test. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0018] Figure 1 is an environmental schematic diagram of a cloud-native-based performance stress test method in an embodiment of the present invention;

[0019] Figure 2 is a flowchart of a cloud-native-based performance stress test method in an embodiment of the present invention;

[0020] Figure 3 is another flowchart of a cloud-native-based performance stress test method in an embodiment of the present invention;

[0021] Figure 4 It is another flowchart of the cloud-native based performance stress testing method in an embodiment of the present invention;

[0022] Figure 5 It is another flowchart of the cloud-native based performance stress testing method in an embodiment of the present invention;

[0023] Figure 6 It is another flowchart of the cloud-native based performance stress testing method in an embodiment of the present invention;

[0024] Figure 7 It is another flowchart of the cloud-native based performance stress testing method in an embodiment of the present invention;

[0025] Figure 8 It is another flowchart of the cloud-native based performance stress testing method in an embodiment of the present invention;

[0026] Figure 9 It is a schematic diagram of a cloud-native based performance stress testing device in an embodiment of the present invention;

[0027] Figure 10 It is a schematic diagram of a computer device in an embodiment of the present invention. Detailed implementation manners

[0028] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0029] The cloud-native based performance stress testing method provided by the embodiments of the present invention can be applied to the application environment as Figure 1 shown. Specifically, the cloud-native based performance stress testing method is applied in a cloud-native based performance stress testing system, and the cloud-native based performance stress testing system includes a management platform, a container image repository connected to the management platform, and a container cluster as Figure 1 shown, which is used to realize dynamic expansion during the performance stress testing process, and helps to improve the convenience of the expansion operation.

[0030] In one embodiment, as Figure 2 shown, a cloud-native based performance stress testing method is provided. Taking the management platform in Figure 1 as an example for description, the method includes the following steps:

[0031] S201: Obtain a performance stress test request, where the performance stress test request includes the software to be tested, the performance stress test type, and the expected value of the stress test parameters;

[0032] S202: Query the container image repository based on the performance stress test type to obtain the target software image corresponding to the performance stress test type;

[0033] S203: Determine the number of target instances based on the target software image and the expected value of the stress test parameters, and create target stress test instances corresponding to the number of target instances in the container cluster based on cloud native;

[0034] S204: Perform a performance stress test on the software to be tested based on the target stress test instances to obtain the performance stress test results.

[0035] Among them, the software to be tested refers to the software that needs to be subjected to a performance stress test this time. The performance stress test type refers to the type of test required for this performance stress test, including the cluster stress test type and the single-machine stress test type. The expected value of the stress test parameter is the index value corresponding to the target stress test parameter that needs to be tested this time. The target stress test parameter refers to the performance that needs to be tested in this performance stress test, and the target stress test parameter can be performance such as system throughput or user concurrency.

[0036] As an example, in step S201, the management platform can receive a performance stress test request sent by the user operation client. The performance stress test request carries the software to be tested, the performance stress test type, and the expected value of the stress test parameters, etc., which are used to indicate the object targeted by this performance stress test (i.e., the software to be tested), the type targeted by this performance stress test (i.e., the performance stress test type), and the specific performance and its index value targeted by this performance stress test. For example, the management platform can obtain a performance stress test corresponding to the cluster stress test type for the software to be tested A, and needs to test the software performance of the software to be tested A under the expected value of the stress test parameter of 1,000,000 TPS for user concurrency, and can form a corresponding performance stress test request, and perform a performance stress test based on this performance stress test request, so as to adjust the software to be tested A according to the performance stress test results, thereby ensuring the overall performance of the software to be tested A.

[0037] Among them, the container image repository is a repository for storing image files. In this example, the container image repository stores multiple stress test software images, and each stress test software image corresponds to a different performance stress test type. For example, the container image repository stores stress test software images corresponding to two performance stress test software, jmeter and wrk. The stress test software image of jmeter can support cluster performance stress testing, and its corresponding performance stress test type is the cluster stress test type; the stress test software image of wrk only supports single-machine performance stress testing. The performance stress test software here is software used to implement performance stress testing, and each performance stress test software corresponds to a unique stress test software identifier. The stress test software image refers to the image file corresponding to the performance stress test software, and this stress test software image is associated with the stress test software identifier.

[0038] As an example, in step S202, based on the performance stress test type in the performance stress test request triggered by the user, the management platform can query the container image repository, obtain the stress test software image corresponding to the performance stress test type from the container image repository, and determine it as the target software image corresponding to the performance stress test type, so as to subsequently load the target software image and run the target stress test software corresponding to the target software image to perform a performance stress test on the software to be tested.

[0039] Among them, the target instance quantity refers to the quantity of stress test instances that need to be created during this performance stress test process. The target stress test instance refers to the stress test instance that needs to be created during this performance stress test process.

[0040] As an example, in step S203, after the management platform determines the target software image, it needs to determine the single-machine load capacity corresponding to the target stress test instance created when the target stress test software corresponding to the target software image is subsequently loaded and run; then, based on the expected value of the stress test parameters and the single-machine load capacity in the performance stress test request, dynamically determine the target instance quantity that needs to be created this time; then, generate a create instance request and send the create instance request to the container cluster to create the target stress test instances corresponding to the target instance quantity in the container cluster based on cloud native, so as to subsequently use the target stress test instances corresponding to the target instance quantity to perform a performance stress test on the software to be tested to evaluate whether the overall performance of the software to be tested meets the standard.

[0041] As an example, in step S204, after the management platform creates the target stress test instances corresponding to the target instance quantity in the container cluster based on cloud native, it can also send a request to the user target cluster or the user shared cluster based on the single-instance load capacity corresponding to the target stress test instance and the expected value of the stress test parameters to create the corresponding stress test software instances; then, based on all the target stress test instances and the stress test software instances, it can simulate and initiate a concurrent test request, call the target stress test instances corresponding to the target instance quantity to perform a performance stress test on the software to be tested A to obtain the performance stress test result. In this example, after creating the target stress test instances (such as slave stress test instances) corresponding to the target instance quantity and the stress test software instances, a concurrent test request can be formed to perform a performance stress test on the software to be tested, obtain the single stress test result corresponding to each target stress test instance, and then summarize all the single stress test results to obtain the performance stress test result. The user target cluster refers to the container cluster independently selected by the user. The portal shared cluster is the container cluster shared by all users.

[0042] For example, when the software A to be tested undergoes performance stress testing corresponding to the cluster stress testing type, and it is necessary to test the software to be tested when the expected value of the stress testing parameter is a user concurrency of 1,000,000 TPS, and when the target software image is determined to be the jmeter software image, if the single-machine load capacity corresponding to each target stress testing instance (i.e., the slave stress testing instance) in the jmeter stress testing software corresponding to the jmeter software image is 100,000 TPS, then 10 target stress testing instances need to be pulled and created. Cloud-native technology can be used to dynamically adjust the number of Pods recorded in the Deployment file in the container cluster, and 10 target stress testing instances and stress testing software instances for implementing stress testing on stress testing parameters are dynamically created in the cloud-native-based container cluster. Next, the management platform can form a concurrent test request, call 10 target stress testing instances, and perform performance stress testing on the software A to be tested to obtain performance stress testing results. It can be understood that based on cloud-native technology, the management platform can dynamically create target stress testing instances corresponding to the number of target instances in the cloud-native-based container cluster, perform performance stress testing on the software to be tested, use cloud-native technology to quickly form network traffic pressure to ensure the efficiency of performance stress testing, and through cloud-native resource control technology, use small-scale resources to verify the service stability of the software to be tested in the case of extreme resources, so as to achieve the performance stress testing goal.

[0043] In the cloud-native-based performance stress testing method provided in this embodiment, the target software image corresponding to the performance stress testing type can be quickly determined according to the performance stress testing type in the performance stress testing request, ensuring the acquisition efficiency of the target software image; according to the target software image and the expected value of the stress testing parameter, the required number of target instances is dynamically determined, and in the cloud-native-based container cluster, target stress testing instances corresponding to the number of target instances are dynamically created to achieve dynamic expansion and improve the convenience of dynamic expansion. Performance stress testing is performed on the software to be tested based on the target stress testing instances. Since the target stress testing instances are created on the cloud-native-based container cluster, network traffic pressure can be quickly formed based on cloud-native technology to ensure the efficiency of performing performance stress testing on the software to be tested.

[0044] In one embodiment, as Figure 3 shown, step S202, that is, querying the stress testing software information table based on the performance stress testing type to obtain the target software image corresponding to the performance stress testing type, includes:

[0045] S301: Query the stress testing software information table based on the performance stress testing type to obtain the target software identifier corresponding to the performance stress testing type;

[0046] S302: Query the container image repository based on the target software identifier, and determine the stress testing software image corresponding to the target software identifier as the target software image corresponding to the performance stress testing type.

[0047] Among them, the software information table for stress testing records and stores the software information corresponding to different stress testing software in a cloud-native container cluster. The software information includes, but is not limited to, the software identifier corresponding to the stress testing software and the performance stress testing type.

[0048] As an example, in step S301, the management platform can query the stress testing software information table based on the performance stress testing type in the performance stress testing request triggered by the user, obtain the candidate software information corresponding to all candidate stress testing software that matches the performance stress testing type; control the client to display the candidate software information corresponding to all candidate stress testing software, and receive the target software information determined by the user based on the candidate software information. Here, the target software information is used to record the software information corresponding to the target stress testing software, and the target software information includes the target software identifier corresponding to the target stress testing software and the performance stress testing type.

[0049] In this example, the management platform queries the stress testing software information table based on the performance stress testing type to obtain the target software identifier corresponding to the performance stress testing type, including: querying the stress testing software information table based on the performance stress testing type to obtain at least one stress testing software identifier corresponding to the performance stress testing type; obtaining the target software identifier corresponding to the performance stress testing type from at least one stress testing software identifier. Among them, the stress testing software identifier is used to uniquely identify a certain performance stress testing software, and is also the unique identifier corresponding to all stress testing software images stored in the container image repository, so as to obtain the corresponding target software image from the container image repository based on the stress testing software identifier, ensuring the acquisition efficiency of the target software image.

[0050] For example, after receiving the performance stress testing request, the management platform can query the pre-stored stress testing software information table in the local memory according to the performance stress testing type in the performance stress testing request, obtain at least one stress testing software identifier that matches the performance stress testing type in the stress testing software information table, and control the client to display at least one stress testing software identifier that matches the performance stress testing type, so that the user can select the target software identifier corresponding to the performance stress testing type from the displayed at least one stress testing software identifier. The target software identifier can be understood as the stress testing software identifier selected by the user independently and matching the performance stress testing type.

[0051] As an example, in step S302, after obtaining the target software identifier, the management platform can query and access the container image repository based on the target software identifier, obtain the stress testing software image corresponding to the target software identifier from the container image repository, and determine it as the target software image corresponding to the performance stress testing type, so as to subsequently load the target software image and run the target stress testing software corresponding to the target software image to perform performance stress testing on the software to be tested.

[0052] Understandably, the stress testing software information table is used to uniformly manage all stress testing software images stored in the container image repository, so as to quickly determine the required target software identifier based on the performance stress testing type, and based on the target software identifier, the corresponding target software image can be quickly obtained from the container image repository.

[0053] In one embodiment, as Figure 4 shown, step S203, that is, based on the target software image and the expected value of the stress testing parameters, determine the number of target instances, and create target stress testing instances corresponding to the number of target instances, including:

[0054] S401: Load the target software image, determine the target stress testing instance corresponding to the target software image, and obtain the maximum single-machine load corresponding to the target stress testing instance;

[0055] S402: Determine the number of target instances according to the expected value of the stress testing parameters and the maximum single-machine load;

[0056] S403: In the container cluster based on cloud native, create target stress testing instances corresponding to the number of target instances.

[0057] As an example, in step S401, when the target software image is loaded in the management platform and the target stress testing software corresponding to the target software image is determined to be running, the maximum single-machine load corresponding to each target stress testing instance, which can be understood as the maximum load that each target stress testing instance runs on a container node, that is, the maximum load it can withstand.

[0058] For example, when the management platform determines that the target software image is the jmeter software image, it can start the slave stress testing instance corresponding to jmeter to perform performance stress testing on the software under test A to determine the single-machine load capacity corresponding to the slave stress testing instance, that is, its maximum single-machine load, so as to determine the number of slave stress testing instances that finally need to be created according to the maximum single-machine load.

[0059] As an example, in step S402, the management platform can calculate the quotient of the expected value of the stress testing parameters in the performance stress testing request and the maximum single-machine load corresponding to the target stress testing software to determine the required number of instances for this performance stress testing, and then determine whether there are existing stress testing instances according to the required number of instances to determine the final number of target instances, so as to realize the dynamic adjustment of the number of target instances.

[0060] For example, when the target software image is the jmeter software image and it is necessary to test the software performance of the to-be-tested software A under the expected value of the stress test parameter of 1,000,000 TPS of the user concurrency, it is necessary to calculate the number of slave stress test instances to be pulled according to the expected value of the stress test parameter of 1,000,000 TPS of the user concurrency and the maximum single-machine load of each slave stress test instance, determine it as the required instance number, and then determine the final target instance number according to whether there are existing stress test instances in the cloud-native system and the corresponding existing instance number of the existing stress test instances, so as to realize the dynamic adjustment of the target instance number.

[0061] As an example, in step S403, when the management platform dynamically determines the target instance number, it can generate a create instance request and send the create instance request to the container cluster, so as to create target stress test instances corresponding to the target instance number according to the create instance request. In this example, the container cluster includes at least one container node built based on cloud-native technology.

[0062] It can be understood that the target instance number can be dynamically determined according to the maximum single-machine load of the target stress test instance corresponding to the target software image and the expected value of the stress test parameter, so as to dynamically create target stress test instances corresponding to the target instance number based on cloud-native technology, enabling the performance stress test process to achieve dynamic scaling and ensuring the convenience of dynamic scaling.

[0063] In one embodiment, as Figure 5 shown, in step S401, when loading the target software image, determining the target stress test instance corresponding to the target software image, and obtaining the maximum single-machine load corresponding to the target stress test instance, it includes:

[0064] S501: Load the target stress test software corresponding to the target software image and create a target stress test instance corresponding to the target stress test software;

[0065] S502: Based on the target stress test instance, perform a stress test on the to-be-tested software and obtain the maximum single-machine load corresponding to the target stress test instance.

[0066] As an example, in step S501, after the management platform determines the target software image, it needs to load the target stress test software corresponding to the target software image and create a single target stress test instance corresponding to the target stress test software. For example, when the target software image is the jmeter software image, it is necessary to load and start the target stress test software corresponding to the jmeter software image (i.e., the jmeter stress test software); create a single target stress test instance corresponding to the target stress test software (such as the slave stress test instance in jmeter), so as to test the single-machine load capacity of the target stress test instance (such as the slave stress test instance in jmeter).

[0067] As an example, in step S502, after the management platform creates a target stress test instance corresponding to a single target stress test software, it is necessary to perform a stress test on the software under test based on the target stress test instance, that is, call any container node in the container cluster to execute the target stress test instance, perform a stress test on the software under test, and determine the single-machine load capacity corresponding to the target stress test instance, so as to obtain the maximum single-machine load corresponding to the target stress test instance. This maximum single-machine load can be understood as the maximum value that the target stress test instance can withstand, providing reliable data support for subsequent dynamic expansion, helping to ensure the accuracy of dynamic expansion, and improving the resource utilization rate during the stress test process.

[0068] In one embodiment, as Figure 6 shown, in step S402, according to the expected value of the stress test parameter and the maximum single-machine load, determining the target instance number includes:

[0069] S601: Determine the required instance number according to the expected value of the stress test parameter and the maximum single-machine load;

[0070] S602: If the performance stress test request is a new stress test request, then determine the required instance number as the target instance number;

[0071] S603: If the performance stress test request is an expansion stress test request, then determine the target instance number based on the required instance number and the existing instance number.

[0072] As an example, in step S601, the management platform can determine the required instance number according to the quotient of the expected value of the stress test parameter and the maximum single-machine load. In this example, the quotient of the expected value of the stress test parameter and the maximum single-machine load can be rounded up, and the rounded-up value is determined as the required instance number, so as to ensure that the required instance number is the minimum value based on the performance stress test requirements that meet the expected value of the stress test parameter, ensuring both the flexibility of dynamic expansion and the resource utilization rate during the performance stress test process. For example, the management platform can calculate the number of slave stress test instances that need to be started for this performance stress test according to the single-machine load capacity (i.e., the maximum single-machine load) of the slave stress test instances in the jmeter stress test software and the expected value of the stress test parameter of 1,000,000 TPS for the user concurrency in the performance stress test request, and determine it as the required instance number.

[0073] Among them, a new stress test request refers to a newly created stress test request, that is, within a pre-set time period before the current time of the system, there is no performance stress test request with the same software under test, performance stress test type, and expected value of the stress test parameter.

[0074] As an example, in step S602, when the performance stress testing request is a new stress testing request, the management platform indicates that there is no existing stress testing instance before the current time of the system. At this time, the number of required instances calculated based on the expected value of the stress testing parameters and the single-machine load capacity value is the target number of instances corresponding to this performance stress testing request, so that the target stress testing instance corresponding to the target number of instances can be created subsequently for performance stress testing.

[0075] The capacity expansion stress test request refers to a stress test request used to implement the capacity expansion operation, that is, within a predetermined time period before the current system time, there is a performance stress test request with the same software to be tested, performance stress test type, and expected values ​​of stress test parameters.

[0076] As an example, in step S603, when the performance stress test request is a capacity expansion stress test request, the management platform indicates that there is an existing stress test instance before the current time of the system, and the number of existing instances corresponding to the existing stress test instance needs to be obtained; then, the difference between the required number of instances and the number of existing instances is determined as the target number of instances required for this capacity expansion, so as to subsequently create a target stress test instance corresponding to the target number of instances for performance stress testing. The existing stress test instance refers to the stress test instance created before the current time of the system. The number of existing stress tests refers to the number of existing stress test instances created before the current time of the system.

[0077] For example, when the management platform is performing performance stress testing on a software A to be tested, it needs to independently determine whether capacity expansion is needed based on actual conditions. If capacity expansion is needed, a capacity expansion stress testing request can be generated. The target number of instances required for dynamic capacity expansion can be determined based on the number of required instances and the number of existing instances. Dynamic capacity expansion and contraction can be achieved by dynamically adjusting the number of Pods recorded in the Deployment file in the container cluster, which helps to ensure the convenience of dynamic capacity expansion.

[0078] In one embodiment, if Figure 7 As shown, step S204, i.e., based on the target stress test instance, a performance stress test is performed on the software to be tested to obtain a performance stress test result, includes:

[0079] S701: Based on the target stress test instance, the software under test is subjected to performance stress test, and the measured values ​​of key indicators are dynamically obtained;

[0080] S702: Obtain performance stress test results based on the measured values ​​of key indicators.

[0081] Among them, the key indicator measured value refers to the actual measured value corresponding to the key indicator that needs to be collected during the performance stress test of the software under test. Key indicators refer to indicators that need to be tested during the performance stress test, such as CPU or memory indicators.

[0082] As an example, in step S701, after the management platform creates target stress test instances corresponding to the target instance quantity in the cloud-native container cluster, it can simulate and initiate concurrent test requests, call the target stress test instances corresponding to the target instance quantity, perform performance stress testing on the software under test A, and use a pre-set key metric monitoring tool for dynamic monitoring to dynamically obtain the measured values of key metrics such as CPU or memory, so as to determine whether it is necessary to dynamically adjust the concurrent test count according to the measured value of the key metric. For example, when using the slave stress test instances corresponding to the target instance quantity to perform performance stress testing on the software under test, the Prometheus monitoring tool can be used to dynamically obtain the measured values of key metrics such as CPU and memory during the operation of the slave stress test instances, so as to determine whether dynamic expansion adjustment is required according to the measured values of the key metrics.

[0083] As an example, in step S702, after the management platform calls the target stress test instances corresponding to the target instance quantity to perform performance stress testing on the software under test and determines the measured value of its key metric, it is necessary to evaluate whether the measured value of its key metric meets the dynamic adjustment condition; if the measured value of the key metric meets the dynamic adjustment condition, it is necessary to dynamically adjust the concurrent request count for performing performance stress testing on the software under test, perform performance stress testing based on the adjusted concurrent request count, and obtain the performance stress test result; if the measured value of the key metric does not meet the dynamic adjustment condition, there is no need to adjust its concurrent request count, and the performance stress test result can be directly obtained according to the measured value of the key metric.

[0084] In one embodiment, as Figure 8 shown, step S702, that is, obtaining the performance stress test result according to the measured value of the key metric, includes:

[0085] S801: Compare the measured value of the key metric with the key metric threshold;

[0086] S802: If the measured value of the key metric is greater than the key metric threshold, dynamically adjust the concurrent request count, create new stress test instances corresponding to the concurrent request count in the cloud-native container cluster, perform performance stress testing on the software under test based on the target stress test instances and the new stress test instances, and obtain the performance stress test result;

[0087] S803: If the key metric threshold is not greater than the key metric threshold, obtain the performance stress test result based on the measured value of the key metric.

[0088] Among them, the key metric threshold is a threshold pre-set by the system for evaluating whether the measured value of the key metric reaches a larger standard that requires dynamic expansion.

[0089] As an example, in step S801, after the management platform dynamically obtains the measured value of the key indicator, it can compare the measured value of the key indicator with the key indicator threshold preset by the system to evaluate whether the key indicator threshold reaches the larger standard that requires dynamic expansion, so as to determine whether dynamic expansion is needed.

[0090] As an example, in step S802, when the measured value of the key indicator is greater than the key indicator threshold preset in advance, the management platform determines that the measured value of the key indicator reaches the larger standard that requires dynamic expansion. At this time, the number of concurrent requests can be dynamically adjusted, that is, a certain number is added based on the number of target instances to obtain the updated number of concurrent requests; then, based on the number of concurrent requests, in the container cluster based on cloud native, new stress test instances corresponding to the number of concurrent requests are created; based on the target stress test instances and the new stress test instances, performance stress testing is performed on the software under test to obtain the performance stress test results, so as to ensure the accuracy of the performance stress test results. The new stress test instance is a stress test instance created after dynamic expansion according to the measured value of the key indicator.

[0091] As an example, in step S803, when the measured value of the key indicator is not greater than the key indicator threshold preset in advance, the management platform determines that the measured value of the key indicator does not reach the larger standard that requires dynamic expansion. At this time, the performance stress test result can be directly determined based on the measured value of the key indicator.

[0092] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0093] In one embodiment, a cloud-native based performance stress testing device is provided, and the cloud-native based performance stress testing device corresponds one-to-one with the cloud-native based performance stress testing method in the above embodiment. As Figure 9 shown, the cloud-native based performance stress testing device includes a performance stress testing request acquisition module 901, a target software image acquisition module 902, a target software image creation module 903, and a performance stress testing result acquisition module 904. The detailed descriptions of each functional module are as follows:

[0094] The performance stress testing request acquisition module 901 is used to acquire a performance stress testing request, and the performance stress testing request includes the software under test, the performance stress testing type, and the expected value of the stress testing parameter;

[0095] The target software image acquisition module 902 is used to query the container image repository based on the performance stress testing type and acquire the target software image corresponding to the performance stress testing type;

[0096] The target software image creation module 903 is used to determine the target instance quantity based on the target software image and the expected value of the stress test parameters, and create target stress test instances corresponding to the target instance quantity in the container cluster based on cloud native;

[0097] The performance stress test result acquisition module 904 is used to perform performance stress testing on the software under test based on the target stress test instances and obtain the performance stress test results.

[0098] In one embodiment, the target software image acquisition module 902 includes:

[0099] The target software identifier acquisition unit is used to query the stress test software information table based on the performance stress test type and obtain the target software identifier corresponding to the performance stress test type;

[0100] The target software image determination unit is used to query the container image repository based on the target software identifier and determine the stress test software image corresponding to the target software identifier as the target software image corresponding to the performance stress test type.

[0101] In one embodiment, the target software image creation module 903 includes:

[0102] The single - machine load maximum value acquisition unit is used to load the target software image, determine the target stress test instances corresponding to the target software image, and obtain the maximum single - machine load value corresponding to the target stress test instances;

[0103] The target instance quantity acquisition unit is used to determine the target instance quantity according to the expected value of the stress test parameters and the maximum single - machine load value;

[0104] The target stress test instance creation unit is used to create target stress test instances corresponding to the target instance quantity in the container cluster based on cloud native.

[0105] In one embodiment, the single - machine load maximum value acquisition unit includes:

[0106] The stress test instance creation subunit is used to load the target stress test software corresponding to the target software image and create the target stress test instances corresponding to the target stress test software;

[0107] The load maximum value acquisition subunit is used to perform stress testing on the software under test based on the target stress test instances and obtain the maximum single - machine load value corresponding to the target stress test instances.

[0108] In one embodiment, the target instance quantity acquisition unit includes:

[0109] The required instance quantity determination subunit is used to determine the required instance quantity according to the expected value of the stress test parameters and the maximum single - machine load value;

[0110] The first target quantity determination subunit is configured to determine the demand instance quantity as the target instance quantity if the performance stress test request is a new stress test request;

[0111] The second target quantity determination subunit is configured to determine the target instance quantity based on the demand instance quantity and the existing instance quantity if the performance stress test request is an expansion stress test request.

[0112] In one embodiment, the performance stress test result acquisition module 904 includes:

[0113] The measured value acquisition unit for key indicators is configured to perform a performance stress test on the software under test based on the target stress test instances and dynamically acquire the measured values of key indicators;

[0114] The performance stress test result acquisition unit is configured to acquire the performance stress test result according to the measured values of key indicators.

[0115] In one embodiment, the performance stress test result acquisition unit includes:

[0116] The key indicator comparison subunit is configured to compare the measured values of key indicators with the key indicator thresholds;

[0117] The first stress test result acquisition subunit is configured to, if the measured value of the key indicator is greater than the key indicator threshold, dynamically adjust the number of concurrent requests, create new stress test instances corresponding to the number of concurrent requests in the container cluster based on cloud native, perform a performance stress test on the software under test based on the target stress test instances and the new stress test instances, and acquire the performance stress test result;

[0118] The second stress test result acquisition subunit is configured to, if the key indicator threshold is not greater than the key indicator threshold, acquire the performance stress test result based on the measured value of the key indicator.

[0119] For the specific limitations of the performance stress test device based on cloud native, reference can be made to the limitations of the performance stress test method based on cloud native in the above text, which will not be elaborated here. Each module in the above performance stress test device based on cloud native can be implemented in whole or in part by software, hardware, and their combinations. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0120] In one embodiment, a computer device is provided. This computer device can be a management platform in a performance stress test system based on cloud native, and its internal structure diagram can be as Figure 10As shown in the figure. The computer device includes a processor, a memory, a network interface, and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the data adopted or generated during the execution of the cloud-native-based performance stress testing method. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a cloud-native-based performance stress testing method.

[0121] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the cloud-native-based performance stress testing method in the above embodiment, for example Figure 2 S201 - S204 shown in the figure, or Figures 3 to 8 as shown in the figure. To avoid repetition, it will not be elaborated here. Or, when the processor executes the computer program, it implements the functions of each module / unit in the embodiment of the cloud-native-based performance stress testing device, for example Figure 9 the functions of the performance stress testing request acquisition module 901, the target software image acquisition module 902, the target software image creation module 903, and the performance stress testing result acquisition module 904 shown in the figure. To avoid repetition, it will not be elaborated here.

[0122] In one embodiment, a computer-readable storage medium is provided. A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor, it implements the cloud-native-based performance stress testing method in the above embodiment, for example Figure 2 S201 - S204 shown in the figure, or Figures 3 to 8 as shown in the figure. To avoid repetition, it will not be elaborated here. Or, when the computer program is executed by the processor, it implements the functions of each module / unit in the above embodiment of the cloud-native-based performance stress testing device, for example Figure 9 the functions of the performance stress testing request acquisition module 901, the target software image acquisition module 902, the target software image creation module 903, and the performance stress testing result acquisition module 904 shown in the figure. To avoid repetition, it will not be elaborated here.

[0123] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. This computer program can be stored in a non-volatile computer-readable storage medium. When this computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in this application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0124] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0125] The above embodiments are only used to illustrate the technical solutions of the present invention, not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A performance stress testing method based on cloud native, characterized in that, it includes: Obtain a performance stress testing request, where the performance stress testing request includes the software to be tested, the performance stress testing type, and the expected value of the stress testing parameters; The performance stress testing type includes a cluster stress testing type and a single-machine stress testing type; Query the container image repository based on the performance stress testing type, and obtain the target software image corresponding to the performance stress testing type; Load the target software image, determine the target stress testing instance corresponding to the target software image, and obtain the maximum single-machine load corresponding to the target stress testing instance; Round up the quotient of the expected value of the stress testing parameters and the maximum single-machine load, and determine the number of required instances as the rounded-up value; If the performance stress testing request is a new stress testing request, then determine the number of required instances as the number of target instances; If the performance stress testing request is an expansion stress testing request, then determine the number of target instances based on the number of required instances and the number of existing instances; In a cloud native-based container cluster, create target stress testing instances corresponding to the number of target instances; Based on the target stress testing instances, perform performance stress testing on the software to be tested, and obtain performance stress testing results.

2. The performance stress testing method based on cloud native according to claim 1, characterized in that, The querying the container image repository based on the performance stress testing type and obtaining the target software image corresponding to the performance stress testing type includes: Query the stress testing software information table based on the performance stress testing type, and obtain the target software identifier corresponding to the performance stress testing type; Query the container image repository based on the target software identifier, and determine the stress testing software image corresponding to the target software identifier as the target software image corresponding to the performance stress testing type.

3. The performance stress testing method based on cloud native according to claim 1, characterized in that, The loading the target software image, determining the target stress testing instance corresponding to the target software image, and obtaining the maximum single-machine load corresponding to the target stress testing instance includes: Load the target stress testing software corresponding to the target software image, and create a target stress testing instance corresponding to the target stress testing software; Based on the target stress testing instance, perform a stress test on the software to be tested, and obtain the maximum single-machine load corresponding to the target stress testing instance.

4. The performance stress testing method based on cloud native according to claim 1, characterized in that, The performing performance stress testing on the software to be tested based on the target stress testing instance and obtaining performance stress testing results includes: Based on the target stress testing instance, perform performance stress testing on the software to be tested, and dynamically obtain the measured values of key indicators; Obtain performance stress testing results according to the measured values of the key indicators.

5. The performance stress testing method based on cloud native according to claim 4, characterized in that, The obtaining performance stress testing results according to the measured values of the key indicators includes: Compare the measured values of the key indicators with the key indicator thresholds; If the measured value of the key indicator is greater than the key indicator threshold, dynamically adjust the number of concurrent requests, create new load testing instances corresponding to the number of concurrent requests in the container cluster based on cloud native, and perform performance load testing on the software under test based on the target load testing instances and the new load testing instances to obtain performance load testing results; If the measured value of the key indicator is not greater than the key indicator threshold, obtain the performance load testing results based on the measured value of the key indicator.

6. A performance load testing device based on cloud native, characterized in that, it includes: A performance load testing request acquisition module for acquiring a performance load testing request, where the performance load testing request includes the software under test, the performance load testing type, and the expected value of the load testing parameters; The performance load testing type includes a cluster load testing type and a single machine load testing type; A target software image acquisition module for querying a container image repository based on the performance load testing type to obtain a target software image corresponding to the performance load testing type; A target software image creation module for loading the target software image, determining the target load testing instances corresponding to the target software image, and obtaining the maximum single machine load corresponding to the target load testing instances; rounding up the quotient of the expected value of the load testing parameters and the maximum single machine load, and determining the rounded up value as the required number of instances; if the performance load testing request is a new load testing request, determining the required number of instances as the target number of instances; if the performance load testing request is an expansion load testing request, determining the target number of instances based on the required number of instances and the existing number of instances; Create target load testing instances corresponding to the target number of instances in the container cluster based on cloud native; A performance load testing result acquisition module for performing performance load testing on the software under test based on the target load testing instances to obtain performance load testing results.

7. A computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the cloud native-based performance load testing method according to any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, it implements the cloud native-based performance load testing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and apparatus for elastically scheduling resources, server and storage medium

    CN109660421A

  • Pressure testing method and device

    CN109726094A