CN115102874B - Gateway system performance testing method and device and electronic equipment - Google Patents
Gateway system performance testing method and device and electronic equipment Download PDFInfo
- Publication number
- CN115102874B CN115102874B CN202210738241.0A CN202210738241A CN115102874B CN 115102874 B CN115102874 B CN 115102874B CN 202210738241 A CN202210738241 A CN 202210738241A CN 115102874 B CN115102874 B CN 115102874B
- Authority
- CN
- China
- Prior art keywords
- preset
- performance
- gateway
- script
- test
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 173
- 238000013515 script Methods 0.000 claims abstract description 184
- 238000011056 performance test Methods 0.000 claims abstract description 68
- 238000000034 method Methods 0.000 claims abstract description 38
- 238000004458 analytical method Methods 0.000 claims abstract description 11
- 238000009530 blood pressure measurement Methods 0.000 claims description 105
- 238000005259 measurement Methods 0.000 claims description 18
- 238000012669 compression test Methods 0.000 claims description 16
- 238000012544 monitoring process Methods 0.000 claims description 16
- 230000004044 response Effects 0.000 claims description 13
- 238000010998 test method Methods 0.000 claims description 9
- 238000012512 characterization method Methods 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 abstract description 7
- 238000004519 manufacturing process Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000002360 preparation method Methods 0.000 description 3
- 238000003825 pressing Methods 0.000 description 3
- 230000001105 regulatory effect Effects 0.000 description 3
- 238000003860 storage Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3452—Performance evaluation by statistical analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3495—Performance evaluation by tracing or monitoring for systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0817—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention discloses a method and a device for testing gateway system performance, and electronic equipment, and relates to the field of financial science and technology or other related fields, wherein the method comprises the following steps: receiving a performance test request of a target gateway system, under the condition that a preset baffle script is started, simulating a pressure test on a gateway container corresponding to a gateway tool, under the condition that the obtained test result indicates that the gateway tool meets the requirement of a preset system, closing the preset baffle script, executing an execution script corresponding to each pressure test value in a pressure test task script, analyzing whether a plurality of index values are in a preset index threshold range corresponding to each performance index based on the obtained execution result, and under the condition that the plurality of index values are in the preset index threshold range corresponding to each performance index, determining that the target gateway system passes the performance test. The invention solves the technical problem that the running performance analysis of the gateway system is inaccurate because the performance of the gateway tool cannot be tested in the related technology.
Description
Technical Field
The invention relates to the field of financial science and technology, in particular to a gateway system performance testing method and device and electronic equipment.
Background
In the service architecture, different micro services have different network protocols, an external client may need to call a plurality of micro service interfaces to complete a service requirement, if the client directly communicates with each micro service, multiple requests of different micro services increase the complexity of the client, and there are problems of cross-domain and complex authentication. The gateway is used as a middle layer between the client and the server, so that the front-end application system and each server in the background can be connected with each other, and the mutual conversion of different network messages among the services is completed. At present, a gateway system needs to process a large number of concurrent requests, the performance requirement is high, and if the performance is in a bottleneck, the service capacity of the whole system is seriously affected, so that the performance test of the gateway system is very important.
In the related art, the existing testing method mainly starts a plurality of micro services at the same time, then accesses the micro service interfaces respectively through the client, and monitors the whole system by using the server performance evaluation tool. However, the testing method adopts a direct access mode, so that the workload is increased, the working efficiency is reduced, the testing method can only test the performance condition of the whole system, the performance of the gateway cannot be evaluated, namely whether the gateway tool adopted by the system meets the requirement or not cannot be judged, the running performance of the gateway system cannot be accurately analyzed, and therefore the gateway system cannot be adjusted in a targeted manner.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for testing the performance of a gateway system and electronic equipment, and aims to at least solve the technical problem that the performance of a gateway tool cannot be tested in the related technology, so that the operation performance analysis of the gateway system is inaccurate.
According to an aspect of the embodiment of the present invention, there is provided a method for testing performance of a gateway system, including: receiving a performance test request of a target gateway system, wherein the performance test request at least comprises: the press measurement task script at least comprises: the system comprises a plurality of pressure measurement values, a plurality of execution scripts and a plurality of control units, wherein the pressure measurement values and the execution scripts establish an association relation in advance; under the condition of starting a preset baffle script, simulating a pressure test on a gateway container corresponding to a gateway tool to obtain a test result, wherein the test result at least comprises: request a value per second, transaction success rate; closing the preset baffle script and executing the execution script corresponding to each pressure measurement value in the pressure measurement task script to obtain an execution result under the condition that the test result indicates that the gateway tool meets the preset system requirement, wherein the gateway tool is used for testing, the obtained per second request value is larger than a preset request threshold, the obtained transaction success rate is larger than a preset transaction threshold, and the execution result at least comprises: a plurality of index values; based on the execution result, analyzing whether the index values are in a preset index threshold range corresponding to each performance index, and determining that the target gateway system passes the performance test under the condition that the index values are in the preset index threshold range corresponding to each performance index.
Optionally, the step of simulating the pressure test on the gateway container corresponding to the gateway tool includes: acquiring a gateway pressure measurement value corresponding to the gateway tool in the pressure measurement task script; and performing a preset number of times of compression test on a gateway interface of the gateway tool, wherein the preset number of times is the number of times of characterization of the gateway compression test value, and the compression test is a test for executing an execution script corresponding to the gateway compression test value.
Optionally, before receiving the performance test request of the target gateway system, the method further includes: acquiring service information in the target gateway system, wherein the service information comprises: a plurality of micro services, the micro services comprising: different request types, the micro-services are deployed on a micro-service container; creating a corresponding execution script based on the request type of each micro service, wherein the execution script at least comprises: and presetting a return result.
Optionally, before receiving the performance test request of the target gateway system, the method further includes: and installing a preset baffle on each micro-service container by adopting a preset pile inserting strategy, and creating a preset baffle script, wherein after the preset baffle script is started, the preset baffle is opened, and after the preset baffle script is closed, the preset baffle is closed.
Optionally, before receiving the performance test request of the target gateway system, the method further includes: based on the parameter information of each micro service, configuring a corresponding pressure measurement value; and creating the pressure measurement task script based on a plurality of pressure measurement values.
Optionally, before receiving the performance test request of the target gateway system, the method further includes: acquiring historical transaction data in a preset historical time period and the number of containers in a current test environment; determining a performance indicator of a performance test based on the historical transaction data and the number of containers, wherein the type of performance indicator includes at least one of: requests per second, transaction average response time, transaction success rate, network throughput, CPU utilization, memory utilization.
Optionally, executing the execution script corresponding to each pressure measurement value in the pressure measurement task script to obtain an execution result, including: sequentially calling the corresponding execution scripts based on the pressure measurement values in the pressure measurement task scripts; monitoring the performance index of each micro service by adopting a monitoring tool which is deployed in advance on each micro service container; and under the condition that the execution of the pressure measurement task script is completed, counting index values corresponding to the performance indexes by adopting a counting tool carried in the pressure measurement task script to obtain the execution result.
Optionally, after analyzing whether the multiple index values are within a preset index threshold range corresponding to each performance index based on the execution result, the method further includes: and adjusting each micro service under the condition that any index value in the plurality of index values is not in the corresponding preset index threshold range.
According to another aspect of the embodiment of the present invention, there is also provided a device for testing performance of a gateway system, including: the receiving unit is configured to receive a performance test request of a target gateway system, where the performance test request at least includes: the press measurement task script at least comprises: the system comprises a plurality of pressure measurement values, a plurality of execution scripts and a plurality of control units, wherein the pressure measurement values and the execution scripts establish an association relation in advance; the testing unit is used for simulating a pressure test on a gateway container corresponding to the gateway tool under the condition of starting a preset baffle script to obtain a testing result, wherein the testing result at least comprises: request a value per second, transaction success rate; the execution unit is configured to close the preset baffle script and execute the execution script corresponding to each pressure measurement value in the pressure measurement task script to obtain an execution result when the test result indicates that the gateway tool meets a preset system requirement, where the gateway tool is used for testing, the obtained request value per second is greater than a preset request threshold, the obtained transaction success rate is greater than a preset transaction threshold, and the execution result at least includes: a plurality of index values; and the analysis unit is used for analyzing whether the index values are in a preset index threshold range corresponding to each performance index based on the execution result, and determining that the target gateway system passes the performance test under the condition that the index values are in the preset index threshold range corresponding to each performance index.
Optionally, the test unit includes: the first acquisition module is used for acquiring a gateway pressure measurement value corresponding to the gateway tool in the pressure measurement task script; the first test module is used for carrying out a preset number of times of pressure sending test on the gateway interface of the gateway tool, wherein the preset number of times is the number of times of characterization of the gateway pressure measurement value, and the pressure sending test is a test for executing an execution script corresponding to the gateway pressure measurement value.
Optionally, the test device further comprises: the second obtaining module is configured to obtain service information in a target gateway system before receiving a performance test request of the target gateway system, where the service information includes: a plurality of micro services, the micro services comprising: different request types, the micro-services are deployed on a micro-service container; the first creating module is configured to create a corresponding execution script based on a request type of each micro service, where the execution script at least includes: and presetting a return result.
Optionally, the test device further comprises: the second creating module is configured to install a preset baffle on each micro service container by adopting a preset pile inserting strategy before receiving a performance test request of the target gateway system, and create the preset baffle script, where after the preset baffle script is started, the preset baffle is opened, and after the preset baffle script is closed, the preset baffle is closed.
Optionally, the test device further comprises: the first configuration module is used for configuring corresponding pressure measurement values based on the parameter information of each micro service before receiving the performance test request of the target gateway system; and the third creating module is used for creating the pressure measurement task script based on the pressure measurement values.
Optionally, the test device further comprises: the third acquisition module is used for acquiring historical transaction data in a preset historical time period and the number of containers in the current test environment before receiving the performance test request of the target gateway system; a first determining module, configured to determine a performance index of a performance test based on the historical transaction data and the number of containers, where a type of the performance index includes at least one of: requests per second, transaction average response time, transaction success rate, network throughput, CPU utilization, memory utilization.
Optionally, the execution unit includes: the first calling module is used for calling the corresponding execution scripts in sequence based on the pressure measurement values in the pressure measurement task scripts; the first monitoring module is used for monitoring the performance index of each micro service by adopting a monitoring tool which is deployed in advance on each micro service container; and the first statistics module is used for counting index values corresponding to the performance indexes by adopting a statistics tool carried in the pressure measurement task script under the condition that the execution of the pressure measurement task script is completed, so as to obtain the execution result.
Optionally, the test device further comprises: the first adjusting module is used for adjusting each micro service under the condition that any index value in the plurality of index values is not in the corresponding preset index threshold range.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device, including one or more processors and a memory, where the memory is configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method for testing performance of a gateway system described above.
In the disclosure, a performance test request of a target gateway system is received, under the condition that a preset baffle script is started, a pressure test is simulated on a gateway container corresponding to a gateway tool to obtain a test result, under the condition that the test result indicates that the gateway tool meets the requirement of a preset system, the preset baffle script is closed, an execution script corresponding to each pressure test value in a pressure test task script is executed to obtain an execution result, whether a plurality of index values are in a preset index threshold range corresponding to each performance index is analyzed based on the execution result, and under the condition that the plurality of index values are all in the preset index threshold range corresponding to each performance index, the target gateway system is determined to pass the performance test. In this application, can start the baffle script of predetermineeing, open the baffle, focus on whether the performance of test gateway instrument self satisfies the system demand of predetermineeing, close the baffle under the condition that satisfies, test the running performance of whole gateway system, can effectively evaluate the performance of gateway system, realized accurately adjusting the performance of gateway system and excellent, and then solved unable to test gateway instrument self performance among the correlation technique, lead to the inaccurate technical problem of running performance analysis to gateway system.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flow chart of an alternative method of testing gateway system performance according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an alternative gateway system architecture according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an alternative gateway system performance test framework in accordance with an embodiment of the present invention;
FIG. 4 is a schematic diagram of an alternative gateway system performance testing apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of a hardware configuration of an electronic device (or mobile device) for a method of testing performance of a gateway system according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, the method and the device for testing the performance of the gateway system in the present disclosure may be used in the financial and technological field under the condition of testing the performance of the gateway system, and may also be used in any field other than the financial and technological field under the condition of testing the performance of the gateway system, and the application field of the method and the device for testing the performance of the gateway system in the present disclosure is not limited.
It should be noted that, related information (including, but not limited to, user equipment information, user personal information, etc.) and data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by a user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
The following embodiments of the present invention are applicable to various systems/applications/devices for testing the performance of a gateway system. The invention can improve the test efficiency by simultaneously transmitting and pressing a plurality of different micro service scripts, can shield the back-end service by using the baffle plate, is focused on verifying the performance of the gateway tool, judges whether the gateway tool meets the requirement, then removes the baffle plate, simulates a production scene, verifies the running performance of the whole system, and then carries out tracking analysis on the test results before and after the baffle plate to confirm the performance condition of the whole gateway system, thereby effectively evaluating the performance of the gateway system and pointedly optimizing the performance of the gateway system.
The present invention will be described in detail with reference to the following examples.
Example 1
According to an embodiment of the present invention, there is provided an embodiment of a method for testing the performance of a gateway system, it being noted that the steps shown in the flowchart of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical sequence is shown in the flowchart, in some cases the steps shown or described may be performed in a different order than what is shown or described herein.
Fig. 1 is a flowchart of an alternative method for testing the performance of a gateway system according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S101, receiving a performance test request of the target gateway system, where the performance test request at least includes: the press-testing task script at least comprises: and the plurality of pressure measurement values are in pre-association with the execution script.
Step S102, under the condition that a preset baffle script is started, simulating a pressure test on a gateway container corresponding to a gateway tool to obtain a test result, wherein the test result at least comprises: a value is requested per second and a success rate of the transaction.
Step S103, closing a preset baffle script and executing an execution script corresponding to each pressure measurement value in a pressure measurement task script to obtain an execution result when the test result indicates that the gateway tool meets the preset system requirement, wherein the gateway tool is used for testing, the obtained per second request value is greater than a preset request threshold, the obtained transaction success rate is greater than the preset transaction threshold, and the execution result at least comprises: a plurality of index values.
Step S104, based on the execution result, analyzing whether the plurality of index values are within the preset index threshold range corresponding to each performance index, and determining that the target gateway system passes the performance test under the condition that the plurality of index values are within the preset index threshold range corresponding to each performance index.
Through the steps, the performance test request of the target gateway system can be received, under the condition that the preset baffle script is started, the pressure test is simulated on the gateway container corresponding to the gateway tool to obtain a test result, under the condition that the test result indicates that the gateway tool meets the requirement of the preset system, the preset baffle script is closed, the execution script corresponding to each pressure test value in the pressure test task script is executed to obtain an execution result, whether a plurality of index values are in the preset index threshold range corresponding to each performance index is analyzed based on the execution result, and under the condition that the plurality of index values are all in the preset index threshold range corresponding to each performance index, the target gateway system is determined to pass the performance test. In the embodiment of the invention, the preset baffle script can be started, the baffle is started, whether the performance of the gateway tool per se meets the requirement of a preset system is tested, the baffle is closed under the condition that the performance of the whole gateway system is tested, the performance of the gateway system can be effectively evaluated, the performance of the gateway system is accurately regulated, and the technical problem that the performance analysis of the gateway system is inaccurate due to the fact that the performance of the gateway tool per se cannot be tested in the related technology is solved.
Embodiments of the present invention will be described in detail with reference to the following steps.
In an embodiment of the present invention, optionally, before receiving the performance test request of the target gateway system, the method further includes: acquiring service information in a target gateway system, wherein the service information comprises: a plurality of micro services, the micro services comprising: different request types, the micro-services are deployed on the micro-service container; based on the request type of each micro-service, creating a corresponding execution script, wherein the execution script at least comprises: and presetting a return result.
In the embodiment of the invention, the execution scripts of different micro services can be created first, and the execution scripts can be written from the actual background service of the gateway system to cover all the micro services in a full scale, specifically: the service in the target gateway system may be acquired first, and the service information may include: a plurality of micro-services, the micro-services may include: different request types (e.g., different request types such as GET and POST), each micro-service being deployed on a respective micro-service container and the functional interfaces of each micro-service being different, then a corresponding execution script may be created based on the request type of each micro-service (i.e., at least one interface request is in the execution script for each request type of each micro-service), and the execution script may include: and the return result is preset, so that the follow-up matching with the actual return result is facilitated.
In this embodiment, fig. 2 is a schematic diagram of an alternative gateway system architecture according to an embodiment of the present invention, and as shown in fig. 2, the gateway system architecture may be divided into: client, gateway, micro service, running environment, wherein the client comprises: PC, cell phone, pad, etc., the gateway includes: gateway (a gateway type) or other type of gateway, micro services may include: service a (including: get, post, etc. requests), service B (including: get, post, etc. requests), etc., the runtime environment may include: container a (i.e., the run container corresponding to service a), container B (i.e., the run container corresponding to service B), and the client may initiate a request to the gateway, which may respond to the client initiated request; the gateway can initiate a request to the micro-service, and the micro-service can respond to the request initiated by the gateway; the micro-service may initiate a request to the runtime environment, which may respond to the micro-service initiated request. As shown in fig. 2, the micro service layer in the gateway system architecture may involve a plurality of different services, each of which is deployed on a respective container, the functional interface of each of which is different, and each of which may include different request types such as GET and POST, so this embodiment needs to cover different request types of different services when writing scripts. For example, a background management system of a certain financial institution may involve services such as rights management, user management, workflow management, advertisement management, column management and page management, where each service includes different request types such as GET and POST, so at least one interface request of each request type of each service needs to be embodied in an execution script, and the execution script may include expected return results of different microservice requests, so that subsequent matching with actual return results is facilitated.
Optionally, before receiving the performance test request of the target gateway system, the method further includes: and installing a preset baffle on each micro-service container by adopting a preset pile inserting strategy, and creating a preset baffle script, wherein after the preset baffle script is started, the preset baffle is opened, and after the preset baffle script is closed, the preset baffle is closed.
In the embodiment of the present invention, a preset stake-inserting strategy may be adopted, and a preset baffle is installed on each micro-service container (for example, the baffle may be installed on the container in a stake-inserting manner, i.e. the running environment layer in fig. 2, the baffle in this embodiment may simulate the function of the back-end service and shield the actual processing capability of the back-end service), a preset baffle script is created, after the preset baffle script is started, the preset baffle is opened, and after the preset baffle script is closed, the preset baffle is closed (i.e. whether the baffle is started or not may be controlled by a switch configuration), so that the processing capability of the back-end service may be shielded after the baffle is opened, and the performance test of the gateway tool itself is focused.
Optionally, before receiving the performance test request of the target gateway system, the method further includes: based on the parameter information of each micro service, configuring a corresponding pressure measurement value; based on the plurality of crush measurements, a crush measurement task script is created.
In the embodiment of the invention, a press measurement task script can be created first, a corresponding press measurement value can be configured in the press measurement task script according to the parameter information of each micro service, then a corresponding execution script can be called based on the press measurement value, in this embodiment, the press measurement value can be configured by adopting a parameterization function (namely, the press measurement value can be configured according to the parameter information of each micro service, and the number of times of performing press measurement on the corresponding micro service can be understood), so that the expansibility of the script can be enhanced, the change amount of codes after the press measurement value changes can be reduced, and the press measurement value needs to be configured according to the actual transaction condition of production.
Optionally, before receiving the performance test request of the target gateway system, the method further includes: acquiring historical transaction data in a preset historical time period and the number of containers in a current test environment; determining a performance indicator of the performance test based on the historical transaction data and the number of containers, wherein the type of performance indicator includes at least one of: requests per second, transaction average response time, transaction success rate, network throughput, CPU utilization, memory utilization.
In the embodiment of the invention, the actual transaction condition of production can be evaluated, then the performance capacity index of the pressure test (namely, the performance index of the performance test can be determined based on the obtained historical transaction data in the preset historical time period and the number of containers in the current test environment) is determined by combining the number of containers in the test environment, and the types of the performance indexes can include: TPS per second request, transaction average response time, transaction success rate, network throughput, CPU usage and memory usage, etc. For example, if the TPS requirement of the system is 500 pens/second, the number of requests per second of the pressure measurement task may be set to 500 when the pressure measurement task is created, and in addition, the pressure measurement task script will match and count the actual returned result of the request with its expected value, count the average response time of the request, and finally calculate TPS according to the actual response situation.
Step S101, receiving a performance test request of the target gateway system, where the performance test request at least includes: the press-testing task script at least comprises: and the plurality of pressure measurement values are in pre-association with the execution script.
In the embodiment of the present invention, a performance test request of the target gateway system may be received, where the performance test request may include a pre-created press test task script, and the press test task script at least includes: and the plurality of pressure measurement values are in pre-association with the execution script.
Step S102, under the condition that a preset baffle script is started, simulating a pressure test on a gateway container corresponding to a gateway tool to obtain a test result, wherein the test result at least comprises: a value is requested per second and a success rate of the transaction.
Optionally, the step of simulating the pressure test on the gateway container corresponding to the gateway tool includes: acquiring a gateway pressure measurement value corresponding to a gateway tool in a pressure measurement task script; and performing a preset number of times of pressure sending test on the gateway interface of the gateway tool, wherein the preset number of times is the number of times of characterization of the gateway pressure measurement value, and the pressure sending test is a test for executing an execution script corresponding to the gateway pressure measurement value.
In embodiments of the present invention, after the baffle is installed in the container, the switch configuration may be used to control whether the baffle is activated. After the baffle switch is opened (i.e. under the condition of starting a preset baffle script), the processing capacity of the back-end service can be shielded, the performance of the gateway tool is focused, the simulation of the pressure test is performed on the gateway container corresponding to the gateway tool, and then whether the selected gateway tool meets the system requirement can be verified according to the test result (i.e. whether the request value per second and the transaction success rate in the test result obtained by verification are larger than the corresponding preset threshold value, and the preset threshold value can be set according to the actual situation). The specific simulation test method comprises the following steps: the method comprises the steps that a gateway pressure measurement value corresponding to a gateway tool in a pressure measurement task script can be obtained first, then the corresponding execution script is executed by the pressure measurement task according to the gateway pressure measurement value, a preset number of clients are simulated on a gateway container to perform pressure test on a gateway interface, wherein the pressure test can be performed on the gateway interface of the gateway tool for a preset number of times, the preset number of times is the number of times represented by the gateway pressure measurement value, and the pressure test is the test of the execution script corresponding to the execution gateway pressure measurement value.
Step S103, closing a preset baffle script and executing an execution script corresponding to each pressure measurement value in a pressure measurement task script to obtain an execution result when the test result indicates that the gateway tool meets the preset system requirement, wherein the gateway tool is used for testing, the obtained per second request value is greater than a preset request threshold, the obtained transaction success rate is greater than the preset transaction threshold, and the execution result at least comprises: a plurality of index values.
Optionally, executing an execution script corresponding to each pressure measurement value in the pressure measurement task script to obtain an execution result, including: sequentially calling corresponding execution scripts based on the pressure measurement values in the pressure measurement task scripts; monitoring performance indexes of each micro service by adopting a monitoring tool which is deployed in advance on each micro service container; under the condition that the execution of the pressure measurement task script is completed, a statistical tool carried in the pressure measurement task script is adopted to count index values corresponding to the performance indexes, and an execution result is obtained.
In the embodiment of the invention, when the test result indicates that the gateway tool meets the requirement of the preset system (namely, meets the performance required by the normal operation of the gateway system, namely, when the gateway tool is adopted for testing, the obtained per-second request value is larger than the preset request threshold value, and the obtained transaction success rate is larger than the preset transaction threshold value), the preset baffle script is closed (namely, the baffle is closed), and then the system performance test of the whole link is carried out for referring to the production scene, so that the performance condition of the whole gateway system is tested. Specifically, the corresponding execution scripts can be sequentially called based on the pressure measurement values in the pressure measurement task scripts, a large number of clients are simulated on the respective micro service containers to perform pressure measurement (namely, the execution scripts corresponding to the pressure measurement values in the pressure measurement task scripts) on the interfaces to be measured (namely, the interfaces corresponding to the micro services) respectively, monitoring tools which are deployed in advance on each micro service container can be adopted to check the process resources of the current container in real time, monitor the conditions such as network throughput, CPU utilization rate and memory utilization rate (namely, monitor the performance indexes of each micro service) and statistics tools carried in the pressure measurement task scripts after the pressure measurement tasks are finished (namely, the performance conditions of the system including the index values corresponding to the performance indexes such as TPS, average response time and transaction success rate can be counted, so that the execution results are obtained.
Step S104, based on the execution result, analyzing whether the plurality of index values are within the preset index threshold range corresponding to each performance index, and determining that the target gateway system passes the performance test under the condition that the plurality of index values are within the preset index threshold range corresponding to each performance index.
Optionally, after analyzing whether the multiple index values are within the preset index threshold range corresponding to each performance index based on the execution result, the method further includes: and adjusting each micro service under the condition that any index value in the plurality of index values is not in the corresponding preset index threshold range.
In the embodiment of the invention, an execution result (the execution result includes an index value corresponding to each performance index actually returned by the system) and a preset return result (the preset return result includes a preset index threshold value of each performance index preset) can be compared to obtain a comparison result, and under the condition that each index value in the comparison result indicates that each index value in the execution result meets the corresponding preset index threshold value (i.e., each index value is in the corresponding preset index threshold range), the running performance of the target gateway system is determined to meet the preset requirement (i.e., the performance required by the gateway system to be able to run normally is met), and the target gateway system is determined to pass the performance test. Under the condition that any index value in the plurality of index values is not in the corresponding preset index threshold range, each micro service is adjusted, for example, if the required TPS is 500 strokes/second, the TPS does not meet the performance requirement if the required TPS is less than 500 strokes/second, and the TPS meets the performance requirement if the TPS is greater than or equal to 500 strokes/second; if the transaction success rate is 100%, the performance requirement is not met if the transaction success rate is less than 100%, and the performance requirement is met if the transaction success rate is equal to 100%.
Alternatively, in this embodiment, if the test result of the gateway tool itself does not meet the system requirement of the production transaction, it is indicated that the gateway tool is not suitable for the system, and it is necessary to replace the gateway tool with another gateway tool for test comparison, and the gateway tool most suitable for the system is selected; if the gateway tool meets the system requirement, then tracking and analyzing the test result after the baffle switch is closed, and if the test result does not meet the system requirement of the production transaction, performing performance optimization on a background service program or performing transverse capacity expansion on the operation container according to the number of requests until the test result meets the system requirement.
The following detailed description is directed to alternative embodiments.
FIG. 3 is a schematic diagram of an alternative gateway system performance test framework, as shown in FIG. 3, including: test preparation, test execution and test result analysis, wherein the test preparation can write request scripts of different micro services, set a baffle plate and create a pressing task; the test execution can judge whether to start the baffle plate or not, if yes, the pressure generating task is started after the baffle plate is started to monitor the performance, otherwise, the pressure generating task is started after the baffle plate is closed to monitor the performance; and then, analyzing the test result, tracking the result of the performance monitoring of opening and closing the baffle, and comprehensively judging the performance after the result is obtained.
The following is a detailed description with reference to fig. 3, and the specific procedure is as follows:
(1) The test preparation section includes: writing request scripts of different micro services, setting a baffle plate and creating a compression task.
1) The writing of the request script starts from the actual background service of the system, and the coverage is complete. The micro service layer in the gateway system architecture in this embodiment involves a plurality of different services, each of which is deployed on a respective container, the functional interface of each of which is different, and each of which includes different request types such as GET and POST, so that different request types of different services need to be covered when writing a script. For example, a background management system of a certain financial institution may involve services such as rights management, user management, workflow management, advertisement management, columns, page management, etc., where each service includes different request types such as GET and POST, at least one interface request of each request type of each service is embodied in a request script, and in addition, the script includes expected returned results of different microservice requests, so that the later matching with the actual returned results is facilitated.
2) The baffle is arranged, so that the processing capacity of the rear-end service can be shielded, and then the baffle is installed on the container in a pile inserting mode by writing a baffle script.
3) Creating a compression-sending task, writing a compression-testing task script, configuring a corresponding compression-testing value in the script, and calling a corresponding execution script. The called execution script is the request script of different micro-services written in 1); the pressure measurement value can be configured by adopting a parameterization function, so that the expansibility of a script can be enhanced, the change amount of codes after the pressure measurement value changes is reduced, and the pressure measurement value needs to be configured according to actual transaction conditions of production. In addition, the actual trade condition of production can be evaluated, and then the performance capacity index of the pressure measurement is determined by combining the existing container number of the test environment, wherein the performance capacity index comprises but is not limited to: TPS, average response time, transaction success rate, network throughput, CPU usage, memory usage, etc. For example, if the TPS requirement of the system is 500 pens/second, then the number of requests per second for the pressure measurement task is set to 500 when the pressure measurement task is created. In addition, the press measurement task script is to count the actual returned result of the request and the expected value thereof in a matching way, count the average response time of the request, and finally calculate TPS according to the actual response condition.
(2) The test execution section includes: whether to start a baffle, start a pressing task and monitor performance.
1) Whether the baffle is started or not, and whether the baffle is started or not is controlled by the switch configuration after the baffle is installed on the container. After the baffle switch is opened, the processing capacity of the back-end service can be shielded, the performance of the gateway is focused, and whether the selected gateway tool meets the system requirement is verified in a targeted manner; after the baffle switch is closed, the system performance test of the whole link can be carried out for reference production scenes, and the performance condition of the whole gateway system is tested.
2) And starting a compression test task, wherein the compression test task executes a corresponding script according to the configured compression test value, and simulates a large number of clients on a container to perform compression test on the interface to be tested.
3) Performance monitoring, the monitoring tool may employ a console on the vessel itself. The control console of the container can check the process resources of the current container in real time, and monitor the conditions of network throughput, CPU utilization rate, memory utilization rate and the like. And after the press measurement task is finished, the press measurement task script can count the performance condition of the system, including index values such as TPS, average response time, transaction success rate and the like.
(3) The test result analysis section includes: result tracking and performance determination.
1) And (3) tracking results, namely tracking and analyzing the two test results of opening and closing the baffle switch, and effectively evaluating the test effect.
2) And the performance of the whole gateway system meets the standard only if the test results obtained by the two conditions of opening and closing the baffle switch are required to meet the production requirement. For example, if the required TPS is 500 pens/second, TPS less than 500 pens/second does not meet the performance requirement, and if greater than or equal to 500 pens/second meets the performance requirement; if the transaction success rate is 100%, the transaction success rate is less than 100% and does not meet the performance requirement, and if the transaction success rate is equal to 100%, the performance requirement is met. If the test result of the gateway tool does not meet the system requirement of the production transaction, the gateway tool is possibly unsuitable for the system, other gateway tools are required to be replaced for test comparison, and the gateway tool most suitable for the system is preferably used; if the gateway tool meets the system requirement, then tracking and analyzing the test result after the baffle switch is closed, and if the test result does not meet the system requirement of the production transaction, performing performance optimization on a background service program or performing transverse expansion on the operation container according to the number of requests until the test result meets the system requirement.
In the embodiment of the invention, the test efficiency can be improved by simultaneously transmitting a plurality of different micro-service scripts, the performance of the gateway tool and the performance of the whole system can be tested and analyzed by utilizing the baffle plate, the performance of the gateway tool and the whole gateway system can be respectively verified, the performance condition of the gateway system can be effectively evaluated, the performance of the gateway system can be purposefully optimized, and the following beneficial effects can be achieved: (1) Different micro-service scripts and pressure measurement tasks are compiled, parameterized management can be carried out on pressure measurement values when the scripts are compiled, and then pressure is sent out simultaneously, so that the performance test efficiency can be improved; (2) By using the baffle switch, the performance condition of the gateway tool can be focused and verified, whether the gateway tool meets the system requirement or not can be evaluated, production can be simulated, and the performance of the whole gateway system can be verified through a full link, so that the performance of the gateway system can be pertinently regulated; (3) Through the complete test framework, the method can be suitable for verifying the performance indexes of all gateway systems.
Example two
The device for testing the performance of the gateway system provided in this embodiment includes a plurality of implementation units, each implementation unit corresponding to each implementation step in the first embodiment.
Fig. 4 is a schematic diagram of an alternative testing apparatus for gateway system performance according to an embodiment of the present invention, as shown in fig. 4, the testing apparatus may include: a receiving unit 40, a testing unit 41, an executing unit 42, an analyzing unit 43, wherein,
a receiving unit 40, configured to receive a performance test request of the target gateway system, where the performance test request at least includes: the press-testing task script at least comprises: the method comprises the steps of establishing an association relation between a plurality of pressure measurement values and an execution script in advance;
the test unit 41 is configured to simulate a pressure test on a gateway container corresponding to the gateway tool under the condition that the preset baffle script is started, so as to obtain a test result, where the test result at least includes: request a value per second, transaction success rate;
the execution unit 42 is configured to close the preset baffle script and execute an execution script corresponding to each pressure measurement value in the pressure measurement task script to obtain an execution result when the test result indicates that the gateway tool meets a preset system requirement, where the gateway tool is used to perform the test, the obtained request value per second is greater than the preset request threshold, the obtained transaction success rate is greater than the preset transaction threshold, and the execution result at least includes: a plurality of index values;
The analysis unit 43 is configured to analyze whether the multiple index values are within a preset index threshold range corresponding to each performance index based on the execution result, and determine that the target gateway system passes the performance test if the multiple index values are within the preset index threshold range corresponding to each performance index.
In the above test device, the receiving unit 40 may receive a performance test request of the target gateway system, the test unit 41 may simulate a pressure test on a gateway container corresponding to the gateway tool under the condition that the preset baffle script is started, to obtain a test result, the executing unit 42 may close the preset baffle script and execute an execution script corresponding to each pressure measurement value in the pressure measurement task script under the condition that the test result indicates that the gateway tool meets the preset system requirement, to obtain an execution result, and the analyzing unit 43 may analyze whether the multiple index values are within a preset index threshold range corresponding to each performance index based on the execution result, and determine that the target gateway system passes the performance test under the condition that the multiple index values are within the preset index threshold range corresponding to each performance index. In the embodiment of the invention, the preset baffle script can be started, the baffle is started, whether the performance of the gateway tool per se meets the requirement of a preset system is tested, the baffle is closed under the condition that the performance of the whole gateway system is tested, the performance of the gateway system can be effectively evaluated, the performance of the gateway system is accurately regulated, and the technical problem that the performance analysis of the gateway system is inaccurate due to the fact that the performance of the gateway tool per se cannot be tested in the related technology is solved.
Optionally, the test unit includes: the first acquisition module is used for acquiring a gateway pressure measurement value corresponding to a gateway tool in the pressure measurement task script; the first test module is used for carrying out the preset times of the compression test on the gateway interface of the gateway tool, wherein the preset times are the times of the representation of the gateway compression test value, and the compression test is the test of the execution script corresponding to the execution gateway compression test value.
Optionally, the test device further includes: the second obtaining module is configured to obtain service information in the target gateway system before receiving the performance test request of the target gateway system, where the service information includes: a plurality of micro services, the micro services comprising: different request types, the micro-services are deployed on the micro-service container; the first creating module is configured to create a corresponding execution script based on a request type of each micro service, where the execution script at least includes: and presetting a return result.
Optionally, the test device further includes: the second creating module is used for installing a preset baffle on each micro-service container by adopting a preset pile inserting strategy before receiving the performance test request of the target gateway system, and creating a preset baffle script, wherein after the preset baffle script is started, the preset baffle is opened, and after the preset baffle script is closed, the preset baffle is closed.
Optionally, the test device further includes: the first configuration module is used for configuring corresponding pressure measurement values based on the parameter information of each micro service before receiving the performance test request of the target gateway system; and the third creating module is used for creating a pressure measurement task script based on the pressure measurement values.
Optionally, the test device further includes: the third acquisition module is used for acquiring historical transaction data in a preset historical time period and the number of containers in the current test environment before receiving the performance test request of the target gateway system; a first determining module, configured to determine a performance index of the performance test based on the historical transaction data and the number of containers, where a type of the performance index includes at least one of: requests per second, transaction average response time, transaction success rate, network throughput, CPU utilization, memory utilization.
Optionally, the execution unit includes: the first calling module is used for calling corresponding execution scripts in sequence based on the pressure measurement value in the pressure measurement task script; the first monitoring module is used for monitoring performance indexes of each micro service by adopting a monitoring tool which is deployed in advance on each micro service container; the first statistics module is used for counting index values corresponding to performance indexes by adopting a statistics tool carried in the pressure measurement task script under the condition that the execution of the pressure measurement task script is completed, so as to obtain an execution result.
Optionally, the test device further includes: the first adjusting module is used for adjusting each micro service under the condition that any index value in the plurality of index values is not in the corresponding preset index threshold value range.
The test device may further include a processor and a memory, and the receiving unit 40, the test unit 41, the executing unit 42, the analyzing unit 43, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches a corresponding program unit from the memory. The kernel may set one or more kernel parameters, analyze whether the multiple index values are within a preset index threshold range corresponding to each performance index based on the execution result by adjusting the kernel parameters, and determine that the target gateway system passes the performance test when the multiple index values are within the preset index threshold range corresponding to each performance index.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), which includes at least one memory chip.
The present application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of: receiving a performance test request of a target gateway system, under the condition that a preset baffle script is started, simulating a pressure test on a gateway container corresponding to a gateway tool to obtain a test result, under the condition that the test result indicates that the gateway tool meets the requirement of a preset system, closing the preset baffle script, executing an execution script corresponding to each pressure test value in a pressure test task script to obtain an execution result, analyzing whether a plurality of index values are in a preset index threshold range corresponding to each performance index based on the execution result, and under the condition that the plurality of index values are all in the preset index threshold range corresponding to each performance index, determining that the target gateway system passes the performance test.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device, including one or more processors and a memory, where the memory is configured to store one or more programs, and the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for testing performance of a gateway system described above.
Fig. 5 is a block diagram of a hardware configuration of an electronic device (or mobile device) for a method of testing performance of a gateway system according to an embodiment of the present invention. As shown in fig. 5, the electronic device may include one or more (shown as 502a, 502b, … …,502 n) processors 502 (the processors 502 may include, but are not limited to, a microprocessor MCU, a programmable logic device FPGA, etc. processing means), a memory 504 for storing data. In addition, the method may further include: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a keyboard, a power supply, and/or a camera. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 5 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the electronic device may also include more or fewer components than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.
Claims (10)
1. The method for testing the performance of the gateway system is characterized by comprising the following steps of:
receiving a performance test request of a target gateway system, wherein the performance test request at least comprises: the press measurement task script at least comprises: the system comprises a plurality of pressure measurement values, a plurality of execution scripts and a plurality of control units, wherein the pressure measurement values and the execution scripts establish an association relation in advance;
under the condition of starting a preset baffle script, simulating a pressure test on a gateway container corresponding to a gateway tool to obtain a test result, wherein the test result at least comprises: request a value per second, transaction success rate;
closing the preset baffle script and executing the execution script corresponding to each pressure measurement value in the pressure measurement task script to obtain an execution result under the condition that the test result indicates that the gateway tool meets the preset system requirement, wherein the gateway tool is used for testing, the obtained per second request value is larger than a preset request threshold, the obtained transaction success rate is larger than a preset transaction threshold, and the execution result at least comprises: a plurality of index values;
based on the execution result, analyzing whether the index values are in a preset index threshold range corresponding to each performance index, and determining that the target gateway system passes the performance test under the condition that the index values are in the preset index threshold range corresponding to each performance index.
2. The method of testing according to claim 1, wherein the step of simulating the hair pressure test on the gateway container corresponding to the gateway tool comprises:
acquiring a gateway pressure measurement value corresponding to the gateway tool in the pressure measurement task script;
and performing a preset number of times of compression test on a gateway interface of the gateway tool, wherein the preset number of times is the number of times of characterization of the gateway compression test value, and the compression test is a test for executing an execution script corresponding to the gateway compression test value.
3. The method of testing according to claim 1, further comprising, prior to receiving the performance test request of the target gateway system:
acquiring service information in the target gateway system, wherein the service information comprises: a plurality of micro services, the micro services comprising: different request types, the micro-services are deployed on a micro-service container;
creating a corresponding execution script based on the request type of each micro service, wherein the execution script at least comprises: and presetting a return result.
4. A testing method according to claim 3, further comprising, prior to receiving the performance test request of the target gateway system:
And installing a preset baffle on each micro-service container by adopting a preset pile inserting strategy, and creating a preset baffle script, wherein after the preset baffle script is started, the preset baffle is opened, and after the preset baffle script is closed, the preset baffle is closed.
5. A testing method according to claim 3, further comprising, prior to receiving the performance test request of the target gateway system:
based on the parameter information of each micro service, configuring a corresponding pressure measurement value;
and creating the pressure measurement task script based on a plurality of pressure measurement values.
6. The method of testing according to claim 5, further comprising, prior to receiving the performance test request of the target gateway system:
acquiring historical transaction data in a preset historical time period and the number of containers in a current test environment;
determining a performance indicator of a performance test based on the historical transaction data and the number of containers, wherein the type of performance indicator includes at least one of: requests per second, transaction average response time, transaction success rate, network throughput, CPU utilization, memory utilization.
7. The method according to claim 6, wherein the step of executing the execution script corresponding to each of the pressure measurement values in the pressure measurement task script to obtain an execution result includes:
Sequentially calling the corresponding execution scripts based on the pressure measurement values in the pressure measurement task scripts;
monitoring the performance index of each micro service by adopting a monitoring tool which is deployed in advance on each micro service container;
and under the condition that the execution of the pressure measurement task script is completed, counting index values corresponding to the performance indexes by adopting a counting tool carried in the pressure measurement task script to obtain the execution result.
8. The test method according to claim 7, further comprising, after analyzing whether the plurality of index values are within a preset index threshold range corresponding to each performance index based on the execution result:
and adjusting each micro service under the condition that any index value in the plurality of index values is not in the corresponding preset index threshold range.
9. A device for testing performance of a gateway system, comprising:
the receiving unit is configured to receive a performance test request of a target gateway system, where the performance test request at least includes: the press measurement task script at least comprises: the system comprises a plurality of pressure measurement values, a plurality of execution scripts and a plurality of control units, wherein the pressure measurement values and the execution scripts establish an association relation in advance;
The testing unit is used for simulating a pressure test on a gateway container corresponding to the gateway tool under the condition of starting a preset baffle script to obtain a testing result, wherein the testing result at least comprises: request a value per second, transaction success rate;
the execution unit is configured to close the preset baffle script and execute the execution script corresponding to each pressure measurement value in the pressure measurement task script to obtain an execution result when the test result indicates that the gateway tool meets a preset system requirement, where the gateway tool is used for testing, the obtained request value per second is greater than a preset request threshold, the obtained transaction success rate is greater than a preset transaction threshold, and the execution result at least includes: a plurality of index values;
and the analysis unit is used for analyzing whether the index values are in a preset index threshold range corresponding to each performance index based on the execution result, and determining that the target gateway system passes the performance test under the condition that the index values are in the preset index threshold range corresponding to each performance index.
10. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of testing gateway system performance of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210738241.0A CN115102874B (en) | 2022-06-27 | 2022-06-27 | Gateway system performance testing method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210738241.0A CN115102874B (en) | 2022-06-27 | 2022-06-27 | Gateway system performance testing method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115102874A CN115102874A (en) | 2022-09-23 |
CN115102874B true CN115102874B (en) | 2024-03-08 |
Family
ID=83294199
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210738241.0A Active CN115102874B (en) | 2022-06-27 | 2022-06-27 | Gateway system performance testing method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115102874B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015006137A1 (en) * | 2013-07-09 | 2015-01-15 | Oracle International Corporation | Cloud services load testing and analysis |
CN108345535A (en) * | 2017-12-26 | 2018-07-31 | 阿里巴巴集团控股有限公司 | Mock test methods, device and equipment |
CN110430096A (en) * | 2019-08-06 | 2019-11-08 | 深圳市同维通信技术有限公司 | A kind of gateway test method and equipment |
CN113535538A (en) * | 2020-04-21 | 2021-10-22 | 网联清算有限公司 | Application full-link automatic testing method and device, electronic equipment and storage medium |
-
2022
- 2022-06-27 CN CN202210738241.0A patent/CN115102874B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015006137A1 (en) * | 2013-07-09 | 2015-01-15 | Oracle International Corporation | Cloud services load testing and analysis |
CN108345535A (en) * | 2017-12-26 | 2018-07-31 | 阿里巴巴集团控股有限公司 | Mock test methods, device and equipment |
CN110430096A (en) * | 2019-08-06 | 2019-11-08 | 深圳市同维通信技术有限公司 | A kind of gateway test method and equipment |
CN113535538A (en) * | 2020-04-21 | 2021-10-22 | 网联清算有限公司 | Application full-link automatic testing method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN115102874A (en) | 2022-09-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8756586B2 (en) | System and method for automated performance testing in a dynamic production environment | |
US5303166A (en) | Method and system for automated network benchmark performance analysis | |
CN112884092B (en) | AI model generation method, electronic device, and storage medium | |
CN109241343B (en) | System, method and device for identifying brush amount user | |
CN109165153B (en) | Performance test method of high-simulation securities trade system | |
CN107040535B (en) | Method, device and system for monitoring login of mobile application channel and storage medium | |
CN108717393A (en) | A kind of applied program testing method and mobile terminal | |
CN107145440A (en) | Applied program testing method, device and computer equipment | |
US6691259B1 (en) | Terminal server data file extraction and analysis application | |
CN110659870A (en) | Business audit test method, device, equipment and storage medium | |
CN113254323A (en) | Online full link voltage measurement method and device and computer equipment | |
CN115409290A (en) | Business data risk model verification method and device, electronic equipment and medium | |
US6477487B1 (en) | Remote terminal emulator | |
CN115102874B (en) | Gateway system performance testing method and device and electronic equipment | |
CN112948262A (en) | System test method, device, computer equipment and storage medium | |
CN117493188A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN105405220A (en) | Method and device for automated test | |
CN115269415A (en) | Interface test system and method based on simulation scene use case | |
CN113656314A (en) | Pressure test processing method and device | |
CN113360397A (en) | Regression testing method, device, equipment and storage medium of system function | |
CN113656313A (en) | Automatic test processing method and device | |
CN106855840B (en) | System CPU analysis method and device | |
CN112631943B (en) | Recognition method and device for computing software | |
CN113610644B (en) | System transaction screening method and device | |
CN117331846B (en) | Internet-based software development, operation, test and management system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |