CN111404769B - Performance test method, device, server and storage medium - Google Patents

Performance test method, device, server and storage medium Download PDF

Info

Publication number
CN111404769B
CN111404769B CN202010131629.5A CN202010131629A CN111404769B CN 111404769 B CN111404769 B CN 111404769B CN 202010131629 A CN202010131629 A CN 202010131629A CN 111404769 B CN111404769 B CN 111404769B
Authority
CN
China
Prior art keywords
server
slave node
node server
program
pressure application
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
Application number
CN202010131629.5A
Other languages
Chinese (zh)
Other versions
CN111404769A (en
Inventor
田欧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010131629.5A priority Critical patent/CN111404769B/en
Publication of CN111404769A publication Critical patent/CN111404769A/en
Application granted granted Critical
Publication of CN111404769B publication Critical patent/CN111404769B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/14Arrangements for monitoring or testing data switching networks using software, i.e. software packages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The disclosure relates to a performance testing method, a performance testing device, a server and a storage medium, wherein the method comprises the following steps: selecting a plurality of slave node servers from all the candidate servers; respectively sending a pressure application program to each slave node server; under the condition that the pressure application program is successfully deployed on each slave node server, sending a pressure application program execution instruction to each slave node server respectively; and under the condition that the execution of the pressure application program on each slave node server is completed, generating performance test report information of the server program based on the query request processing condition information. The method and the system realize any one-time performance test of any one server program, and the master node server can select the slave node server, and control the distribution of the pressure application program, the deployment of the pressure application program on the slave node server, the distribution of the pressure application program on the slave node server and the other processes, so that the distributed performance test of any one server program can be performed.

Description

Performance test method, device, server and storage medium
Technical Field
The disclosure relates to the field of operation and maintenance, in particular to a performance testing method, a performance testing device, a server and a storage medium.
Background
Testing the performance of the server-side program, i.e., the capability of the server-side program to process the query request, is a necessary step before the server-side program provides the corresponding service. When testing the performance of the server-side program, it is necessary to deploy the server-side program on a corresponding server and send a pressure application program for sending a query request for testing the performance of the server-side program on the corresponding server.
Under the condition that performance test needs to be performed on a large number of server programs, the performance test process of each server program involves the distribution of a pressure application program, the deployment of the pressure application program, the execution of the pressure application program and other processes, and how to control the distribution of the pressure application program, the deployment of the pressure application program, the execution of the pressure application program and other processes in the performance test process of each server program so as to complete the performance test of the server programs becomes an urgent problem to be solved.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure issues a performance testing method, apparatus, server, and storage medium.
According to a first aspect of the embodiments of the present disclosure, a method for issuing a performance test, applied to a master node server, includes:
selecting a plurality of slave node servers for performing performance test on the server programs to be tested from all the candidate servers;
respectively sending a pressure application program to each slave node server;
under the condition that the received deployment state information sent by each slave node server indicates that the pressure application program is successfully deployed on the slave node server, sending a pressure application program execution instruction to each slave node server respectively, wherein the pressure application program sends a query request for performance test to the server-side program to be tested in the execution process;
and under the condition that the received execution state information sent by each slave node server indicates that the execution of the pressurizing program is completed, acquiring query request processing condition information from a server where the to-be-tested server-side program is deployed, and generating performance test report information of the to-be-tested server-side program based on the query request processing condition information.
In some embodiments, selecting a plurality of slave node servers from all the candidate servers for performing the performance test on the server program to be tested comprises:
selecting a plurality of slave node servers for performing performance test on the server program to be tested from all candidate servers based on a target query number per second of the server program to be tested and the query number per second of each candidate server, wherein the query number per second of the candidate servers is the number of query requests for the performance test, which are sent by the pressure application program at most per second by using the resources, which can be currently used for the performance test, of the candidate servers, and the target query number per second is a test target when the query requests for the performance test, which can be processed by the server program to be tested per second, are tested.
In some embodiments, further comprising:
and in the case of receiving deployment state information which is sent by at least one slave node server and indicates that the pressure application program fails to be deployed on the slave node server, sending a pressure application program deleting instruction to each slave node server respectively to trigger each slave node server to delete the pressure application program on the slave node server.
In some embodiments, further comprising:
and in the case of receiving execution state information which is sent by at least one slave node server and indicates that an abnormal condition occurs in the execution process of the pressure application program, sending a pressure application program stop execution instruction and a pressure application program deletion instruction to each slave node server to trigger each slave node server to stop executing the pressure application program deployed on the slave node server and delete the pressure application program deployed on the slave node server.
In some embodiments, the master node server interacts with each slave node server through a persistent integration tool jenkins.
According to a second aspect of embodiments of the present disclosure, a performance testing apparatus is issued, the apparatus being installed on a master node server, comprising:
the selection module is configured to select a plurality of slave node servers for performing performance test on the server programs to be tested from all the candidate servers;
an applicator transmitting module configured to transmit an applicator to each of the slave node servers, respectively;
the instruction sending module is configured to respectively send an pressurizing program execution instruction to each slave node server under the condition that the received deployment state information sent by each slave node server indicates that the pressurizing program is successfully deployed on the slave node server, wherein the pressurizing program sends a query request for performance test to the server-side program to be tested in the execution process;
the generating module is configured to, in the case that the received execution state information sent by each slave node server indicates that the execution of the program to be tested is completed, obtain query request processing condition information from a server where the server-side program to be tested is deployed, and generate performance test report information of the server-side program to be tested based on the query request processing condition information.
In some embodiments, the selection module is further configured to: selecting a plurality of slave node servers for performing performance test on the server program to be tested from all candidate servers based on a target query number per second of the server program to be tested and the query number per second of each candidate server, wherein the query number per second of the candidate servers is the number of query requests for the performance test, which are sent by the pressure application program at most per second by using the resources, which can be currently used for the performance test, of the candidate servers, and the target query number per second is a test target when the query requests for the performance test, which can be processed by the server program to be tested per second, are tested.
In some embodiments, the apparatus further comprises:
and the deployment exception processing module is configured to respectively send an pressurizing program deleting instruction to each slave node server to trigger each slave node server to delete the pressurizing program located on the slave node server under the condition of receiving at least one piece of deployment state information which is sent by the slave node server and indicates that the pressurizing program fails to be deployed on the slave node server.
In some embodiments, the apparatus further comprises:
and the program execution exception handling module is configured to send an pressure application program stop execution instruction and a pressure application program deletion instruction to each slave node server to trigger each slave node server to stop executing the pressure application program deployed on the slave node server and delete the pressure application program deployed on the slave node server under the condition of receiving execution state information which is sent by at least one slave node server and indicates that an exception condition occurs in the execution process of the pressure application program.
In some embodiments, the master node server interacts with each slave node server through a persistence integration tool jenkins.
The technical scheme issued by the embodiment of the disclosure can have the following beneficial effects:
in any performance test for any server program to be tested, the master node server can select a slave node server for the server program to be tested, and the master node server controls the distribution of the pressurizing program, the deployment of the pressurizing program on the slave node server, the execution of the pressurizing program on the slave node server and other processes to complete any performance test for any server program to be tested, so that the distributed performance test can be performed for any server program to be tested, and the method is suitable for performing performance tests on a large number of server programs.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating one embodiment of a performance testing method in accordance with an exemplary embodiment;
FIG. 2 is a diagram illustrating an effect of performance testing on a server program;
FIG. 3 is a block diagram illustrating the structure of a performance testing apparatus according to an exemplary embodiment;
fig. 4 is a block diagram illustrating a server according to an example embodiment.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 is a flow diagram illustrating one embodiment of a performance testing method in accordance with an exemplary embodiment. The method comprises the following steps:
step 101, the master node server selects a plurality of slave node servers for performing performance test on the server programs to be tested from all the candidate servers.
In the present disclosure, for each performance test of each server program to be tested, the performance test can be performed by performing steps 101-104.
In the present disclosure, the performance of each server program to be tested can be tested simultaneously by performing steps 101-104. Therefore, steps 101-104 are only exemplary to illustrate the process of performing a performance test on one server program to be tested.
The master node server may run a master node control program, and specifically, the master node control program may perform steps 101 to 104.
It should be understood that the slave node server does not specifically refer to a certain candidate server, and the slave node server is not specifically used for testing a certain specific server program to be tested. And in each performance test of each server program to be tested, selecting a corresponding candidate server from all the candidate servers as a slave node server.
In this disclosure, the candidate server may be a server that is not currently participating in the performance test in the server cluster for performing the performance test on the server program to be tested, or a server that is currently having resources available for the performance test in the server cluster for performing the performance test on the server program to be tested.
In the present disclosure, the master node server is a server for controlling the slave node server selected in each performance test in a server cluster for performing the performance test on the server program to be tested.
In the present disclosure, the master node server may select a plurality of slave node servers from all the candidate servers according to a test purpose of the server program to be tested.
For example, the test objectives are: testing whether the server program to be tested can successfully process the preset number of query requests within the preset time length, wherein the plurality of slave node servers should meet the following conditions: within the preset time length, the sum of the number of query requests sent by each pressure application program deployed on the slave node server by using the resources which can be currently used for performance testing on the slave node server reaches the preset number. The master node server may select a plurality of candidate servers satisfying the above condition from all the candidate servers according to the test purpose, and use the plurality of candidate servers satisfying the above condition as a plurality of slave node servers for performing a performance test on the server program to be tested.
For example, the test is directed to whether a preset number of query requests can be successfully processed per unit time until the cumulative test duration reaches the preset duration. For example, the unit time is one minute. The plurality of slave node servers should satisfy the following condition: each pressure application program deployed on the slave node server reaches the preset number by the sum of the number of query requests sent by the resource currently available for performance testing on the slave node server in each unit time in the performance testing process. The master node server may select a plurality of candidate servers satisfying the condition from all the candidate servers according to the test purpose, and use the plurality of candidate servers satisfying the condition as a plurality of slave node servers for performing a performance test on the server program to be tested.
In some embodiments, selecting a plurality of slave node servers from all the candidate servers for performing the performance test on the server program to be tested comprises: selecting a plurality of slave node servers for performing performance test on the server program to be tested from all candidate servers based on a target Query Per Second (QPS) of the server program to be tested and the query Per Second of each candidate server, wherein the query Per Second of the candidate servers is the number of query requests for the performance test, which are sent by the pressure application program at most Per Second by using the resources of the candidate servers currently available for the performance test, and the target query Per Second is a test target when the query requests for the performance test can be processed by the server program to be tested Per Second.
The target number of queries per second for the server-side program to be tested may be the sum of the number of queries per second for the plurality of slave node servers used to perform the performance test on the server-side program to be tested.
The test purpose of the server program to be tested can be as follows: and testing whether the server program to be tested can inquire a plurality of inquiry requests per second at the processing target per second or not until the accumulated test time reaches the preset time.
For example, it is necessary to test whether a server program to be tested can process 6 ten thousand query requests per second, and the target number of queries per second of the server program to be tested is 6 ten thousand. The master node server may select 3 candidate servers satisfying the following conditions from all the candidate servers as the slave node servers: the resources currently available for performance testing on the candidate server may be such that the pressure applicator deployed on the candidate server may send 2 ten thousand query requests per second when sending query requests using the resources currently available for performance testing. The number of queries per second for each of the 3 slave node servers that the master node server selects to satisfy the above conditions is 2 ten thousand.
In some embodiments, the master node server interacts with each slave node server through a persistence integration tool jenkins.
jenkins is an open-source, Continuous Integration (CI) tool that provides a friendly operation interface, with which continuous integration, delivery, deployment (compilation, packaging, deployment of software/code) can be performed.
In the disclosure, the master node server and each slave node server may interact, that is, transmit data, through jenkins, the master node server may send a pressure application program and a related instruction to each slave node server by using jenkins, and each slave node server may deploy the pressure application program and send the related instruction to the master node server by using jenkins.
The master node server may be referred to as a jenkins master node server. The slave node server may be referred to as a jenkins slave node server.
Step 102, the master node server sends a pressure application program to each slave node server.
In the present disclosure, after the master node server selects a plurality of slave node servers that perform a performance test on a server-side program to be tested from all the candidate servers, the master node server may transmit a pressure application program to each of the slave node servers, respectively.
For example, 3 slave node servers are selected from all the candidate servers, and the master node server may transmit the pressure application program to each of the 3 slave node servers, respectively.
And 103, the master node server sends a pressure application program execution instruction to each slave node server respectively under the condition that the received deployment state information sent by each slave node server indicates that the pressure application program is deployed successfully.
In the present disclosure, each deployment state information indicates that the deployment of the pressure applicator on the slave node server is successful or that the deployment of the pressure applicator on the slave node server is failed.
In the present disclosure, each of all candidate servers runs a program for receiving the pressure applicator sent by the master node server and deploying the pressure applicator.
For each slave node server, the program on the slave node server for receiving the pressure program and deploying the pressure program deploys the pressure program after receiving the pressure program sent by the master node server.
For each slave node server, if the pressure application program is successfully deployed on the slave node server, generating deployment state information indicating that the pressure application program is successfully deployed on the slave node server, and the slave node server transmitting the deployment state information indicating that the pressure application program is successfully deployed on the slave node server to the master node server. And if the pressure application program fails to be deployed on the slave node server, indicating that the pressure application program fails to be deployed on the slave node server, and the slave node server transmits deployment state information indicating that the pressure application program fails to be deployed on the slave node server to the master node server.
In the present disclosure, the master node server sends an applicator execution instruction to each slave node server, respectively, in a case where the received deployment state information sent by each slave node server indicates that the applicator deployment on the slave node server is successful.
In the present disclosure, for each slave node server, the slave node server executes an pressure application program deployed on the slave node server in response to a pressure application program execution instruction.
For example, the test purpose for the server program to be tested may be: and testing whether the server program to be tested can process 6 ten thousand query requests per second or not until the accumulated testing time reaches the preset time. Selecting 3 slave node servers from all candidate servers that satisfy the following condition: the resources currently available for performance testing on the slave node server may be such that the pressure application program deployed on the slave node server may send 2 ten thousand query requests per second to the server-side program to be tested when sending the query request using the resources currently available for performance testing.
The master node server sends an pressure application to each of the 3 slave node servers. The master node server transmits an applicator execution instruction to each of the 3 slave node servers, respectively, in the case of the received deployment state information transmitted by each slave node server indicating that the applicator was successfully deployed on the slave node server. During testing of a server program to be tested, each pressure application program on each of the 3 slave node servers sends 2 ten thousand query requests to the server program to be tested every second until the accumulated test duration reaches the preset duration, and at the moment when the accumulated test duration reaches the preset duration, the pressure application program on each of the 3 slave node servers is executed completely, so that one performance test of the server program to be tested is completed.
In the present disclosure, a Gatling tool may be run on the slave node server. The Gatling tool is a high-performance server performance testing tool developed based on Scala, and can be used for carrying out load test on the server and analyzing and measuring various performance indexes of the server. The pressure application program deployed on the slave node server can send a query request to the server program to be tested by using a Gatling tool.
In some embodiments, further comprising: and in the case of receiving deployment state information which is sent by at least one slave node server and indicates that the pressure application program fails to be deployed on the slave node server, sending a pressure application program deleting instruction to each slave node server respectively to trigger each slave node server to delete the pressure application program on the slave node server.
For each slave node server, the slave node server generates deployment state information indicating failure to deploy the pressurizing program on the slave node server in a case where the deployment of the pressurizing program fails, and the slave node server transmits the deployment state information indicating failure to deploy the pressurizing program on the slave node server to the master node server. The master node server may determine that deployment of the pressure application program on the at least one slave node server failed in a case where the deployment state information indicating that deployment of the pressure application program on the slave node server failed, which is transmitted from the at least one slave node server, is received, and the master node server may transmit a pressure application program deletion instruction to each slave node server. For each slave node server, after receiving the pressure application program deletion instruction, the slave node server may delete the pressure application program located on the slave node server in response to the pressure application program deletion instruction.
And 104, the master node server generates performance test report information based on the query request processing condition information under the condition that the execution state information sent by each slave node server indicates that the execution of the pressure application program is completed.
In the present disclosure, for each slave node server, the execution state information sent by the slave node server and received by the master node server indicates that the execution of the pressure application program deployed on the slave node server is completed or an abnormal situation occurs during the execution of the pressure application program deployed on the slave node server.
For each slave node server, if no abnormal condition occurs in the execution process of the pressure application program deployed on the slave node server, the execution of the pressure application program deployed on the slave node server is completed, and the execution process of the pressure application program deployed on the slave node server is normally ended. Meanwhile, execution state information indicating completion of execution of the pressure application program is generated on the slave node server, and the slave node server transmits the execution state information indicating completion of execution of the pressure application program to the master node server.
The slave node server may have a program running thereon for detecting whether an abnormal situation occurs during the execution of the pressure application program or the pressure application program may include instructions for detecting whether an abnormal situation occurs during the execution of the pressure application program. For each slave node server, if an abnormal condition occurs in the execution process of the pressure application program deployed on the slave node server, the pressure application program deployed on the slave node server cannot be completely executed. Meanwhile, execution state information indicating that an abnormal condition occurs during the execution of the pressure application program is generated on the slave node server, and the slave node server transmits the execution state information indicating that an abnormal condition occurs during the execution of the pressure application program to the master node server.
For example, the master node server is a master node server, and the slave node server is a slave node server. The test purpose of the server program to be tested can be as follows: and testing whether the server program to be tested can process 6 ten thousand query requests per second or not until the accumulated testing time reaches the preset time. Selecting 3 slave node servers from all candidate servers that satisfy the following condition: the resources currently available for performance testing on the slave node server may be such that the pressure application program deployed on the slave node server may send 2 ten thousand query requests per second to the server-side program to be tested when sending the query request using the resources currently available for performance testing.
During the test of the server program to be tested, each pressure application program on the slave node server sends 2 ten thousand query requests to the server program to be tested every second.
If the pressure application program on at least one slave node server has an abnormal condition in the execution process, each slave node server in the at least one slave node server sends execution state information indicating that the abnormal condition occurs in the execution process of the pressure application program to the master node server.
If the accumulated test time length reaches the preset time length, the pressure application program on each slave node server has no abnormal condition in the execution process, the total time length of the execution process of the pressure application program on each slave node server is the preset time length, the performance test of the server-side program to be tested is completed once, the pressure application program on each slave node server is completely executed, and each slave node server sends execution state information indicating the completion of the execution of the pressure application program to the master node server.
In this disclosure, the master node server may obtain the query request processing condition information from the server where the server-side program to be tested is deployed, when the received execution state information sent by each slave node server indicates that the execution of the pressurizing program is completed. And generating performance test report information of the server program to be tested based on the query request processing condition information.
The master node server may send a request for acquiring query request processing condition information to a server where the server-side program to be tested is deployed, and receive the query request processing condition information sent by the server where the server-side program to be tested is deployed.
In this disclosure, the query request processing condition information indicates a processing condition of the query request for the performance test by the server-side program to be tested in the process of performing the performance test on the server-side program to be tested.
The query request processing case information may include, but is not limited to: the total number of the successfully processed query requests in the process of performing the performance test on the server program to be tested, and the processing time length of each successfully processed query request in the process of performing the performance test on the server program to be tested.
In some embodiments, further comprising: and in the case of receiving execution state information which is sent by at least one slave node server and indicates that an abnormal condition occurs in the execution process of the pressure application program, sending a pressure application program stop execution instruction and a pressure application program deletion instruction to each slave node server to trigger each slave node server to stop executing the pressure application program deployed on the slave node server and delete the pressure application program deployed on the slave node server.
In the present disclosure, the master node server may transmit an applicator stop execution instruction and an applicator delete instruction to each slave node server upon receiving execution state information transmitted from at least one slave node server indicating that an abnormal condition occurs during execution of an applicator. For each slave node server, in response to the pressure application program stop execution instruction, execution of the pressure application program deployed on the slave node server is stopped, and then, in response to the pressure application program deletion instruction, the slave node server deletes the pressure application program deployed on the slave node server.
Please refer to fig. 2, which shows an effect diagram of performing a performance test on a server program.
A jenkins master node control program runs on the jenkins master node server, and the pressure application program deployed on the jenkins slave node server can be called a jenkins slave node pressure application program.
The jenkins master node control program can distribute the pressure application program by using a jenkins tool, send a pressure application program execution instruction, receive execution state information which is sent by jenkins slave node servers and indicates the completion of execution or the execution state information of abnormal conditions in the execution process.
The jenkins master node control program sends a jenkins slave node pressure application program to each of the 3 jenkins slave node servers.
Each jenkins slave node server sends deployment state information indicating that the deployment of jenkins slave node pressure application programs on the slave node servers is successful or deployment state information indicating that the deployment of jenkins slave node pressure application programs on the slave node servers is failed to the jenkins master node server.
The jenkins master node control program can write deployment state information which is sent by each jenkins slave node server and indicates that the jenkins slave node pressure application program is deployed successfully on the slave node server or deployment state information which indicates that the jenkins slave node pressure application program is deployed unsuccessfully on the slave node server into a storage medium which is used for storing state information and is arranged on the jenkins master node server.
When the deployment state information sent by each jenkins slave node in the read storage medium used for storing the state information on the master node server by the jenkins master node control program indicates that the pressure application program is successfully deployed on the slave node server, a pressure application program execution instruction can be sent to each jenkins slave node server respectively.
For each jenkins slave node server, the jenkins slave node server executes a jenkins slave node pressure application program deployed on the jenkins slave node server in response to the pressure application program execution instruction.
Each of the pressuring programs on the jenkins slave node servers may send a query request to the server-side program to be tested in the execution process by using a preset query number per second, that is, QPS.
Each jenkins slave node server can send execution state information indicating that execution of the jenkins slave node pressure application program is completed or execution state information indicating that an abnormal condition occurs in the execution process of the jenkins slave node pressure application program to the jenkins master node control program. And the jenkins master node control program writes all the received execution state information into a storage medium which is used for storing the state information and arranged on the jenkins master node server.
FIG. 3 is a block diagram illustrating a performance testing apparatus according to an exemplary embodiment. The performance testing device is installed on the main node server. Referring to fig. 3, the apparatus includes: a selection module 301, a pressure application program sending module 302, an instruction sending module 303 and a generation module 304.
The selection module 301 is configured to select a plurality of slave node servers for performing performance testing on the server programs to be tested from all the candidate servers;
the pressure applicator sending module 302 is configured to send a pressure applicator to each slave node server, respectively;
the instruction sending module 303 is configured to send an applicator program execution instruction to each slave node server respectively in a case that the received deployment state information sent by each slave node server indicates that the applicator program is successfully deployed on the slave node server, where the applicator program sends a query request for performance testing to the server-side program to be tested in the execution process;
the generating module 304 is configured to, in a case that the received execution state information sent by each slave node server indicates that the execution of the program to be tested is completed, obtain query request processing condition information from the server where the server-side program to be tested is deployed, and generate performance test report information of the server-side program to be tested based on the query request processing condition information.
In some embodiments, the selection module is further configured to: selecting a plurality of slave node servers for performing performance test on the server program to be tested from all candidate servers based on a target query number per second of the server program to be tested and the query number per second of each candidate server, wherein the query number per second of the candidate servers is the number of query requests for the performance test, which are sent by the pressure application program at most per second by using the resources, which can be currently used for the performance test, of the candidate servers, and the target query number per second is a test target when the query requests for the performance test, which can be processed by the server program to be tested per second, are tested.
In some embodiments, the apparatus further comprises:
and the deployment exception processing module is configured to respectively send an pressure application program deleting instruction to each slave node server to trigger each slave node server to delete the pressure application program on the slave node server in the case of receiving deployment state information which is sent by at least one slave node server and indicates that the pressure application program fails to be deployed on the slave node server.
In some embodiments, the apparatus further comprises:
and the program execution exception handling module is configured to send an pressure application program stop execution instruction and a pressure application program deletion instruction to each slave node server to trigger each slave node server to stop executing the pressure application program deployed on the slave node server and delete the pressure application program deployed on the slave node server under the condition of receiving execution state information which is sent by at least one slave node server and indicates that an exception condition occurs in the execution process of the pressure application program.
In some embodiments, the master node server interacts with each slave node server through a persistent integration tool jenkins.
Fig. 4 is a block diagram illustrating a server according to an example embodiment. Referring to fig. 4, server 400 includes a processing component 422, which further includes one or more processors, and memory resources, represented by memory 432, for storing instructions, such as applications, that are executable by processing component 422. The application programs stored in memory 432 may include one or more modules that each correspond to a set of instructions. Further, the processing component 422 is configured to execute instructions to perform the above-described methods.
The server 400 may also include a power component 426 configured to perform power control of the server 400, a wired or wireless network interface 450 configured to connect the server 400 to a network, and an input/output (I/O) interface 458. The server 400 may operate based on an operating system stored in memory 432, such as Windows Server, MacOS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a storage medium comprising instructions, such as a memory comprising instructions, executable by a server to perform the above method is also disclosed. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The present application also discloses a computer program comprising the operational steps as shown in fig. 1.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A performance test method is applied to a main node server, and is characterized by comprising the following steps:
selecting a plurality of slave node servers for performing performance test on the server program to be tested from all the candidate servers based on the target query number per second of the server program to be tested and the query number per second of each candidate server;
respectively sending a pressure application program to each slave node server;
under the condition that the received deployment state information sent by each slave node server indicates that the pressure application program is successfully deployed on the slave node server, sending a pressure application program execution instruction to each slave node server respectively, wherein the pressure application program sends a query request for performance test to the server-side program to be tested in the execution process;
under the condition that the received execution state information sent by each slave node server indicates that the execution of the pressurizing program is completed, acquiring query request processing condition information from a server where the to-be-tested server-side program is deployed, and generating performance test report information of the to-be-tested server-side program based on the query request processing condition information; and the server where the server program to be tested is deployed is used for processing the query request sent by the pressure application program, and counting the number of the query requests processed in unit time to obtain the query request processing condition information.
2. The method of claim 1, wherein the query number per second of the candidate server is the maximum number of query requests for performance test sent by the pressure application program per second by using the current available resources of the candidate server for performance test, and the target query number per second is a test target when testing the query requests for performance test that can be processed by the to-be-tested server program per second.
3. The method of claim 1, further comprising:
and in the case of receiving deployment state information which is sent by at least one slave node server and indicates that the pressure application program fails to be deployed on the slave node server, respectively sending a pressure application program deleting instruction to each slave node server to trigger each slave node server to delete the pressure application program on the slave node server.
4. The method of claim 1, further comprising:
and in the case of receiving execution state information which is sent by at least one slave node server and indicates that an abnormal condition occurs in the execution process of the pressure application program, sending a pressure application program stop execution instruction and a pressure application program deletion instruction to each slave node server to trigger each slave node server to stop executing the pressure application program deployed on the slave node server and delete the pressure application program deployed on the slave node server.
5. The method according to any of claims 1 to 4, wherein the master node server interacts with each slave node server via a persistent integration tool jenkins.
6. A performance testing apparatus, the apparatus being installed on a master node server, the apparatus comprising:
the selection module is configured to select a plurality of slave node servers for performing performance test on the server program to be tested from all the candidate servers based on the target query number per second of the server program to be tested and the query number per second of each candidate server;
an applicator transmitting module configured to transmit an applicator to each of the slave node servers, respectively;
the instruction sending module is configured to send an pressurizing program execution instruction to each slave node server respectively under the condition that the received deployment state information sent by each slave node server indicates that the pressurizing program is successfully deployed on the slave node server, wherein the pressurizing program sends a query request for performance testing to the server-side program to be tested in the execution process;
the generating module is configured to acquire query request processing condition information from a server where the server-side program to be tested is deployed under the condition that the received execution state information sent by each slave node server indicates that the execution of the pressurizing program is completed, and generate performance test report information of the server-side program to be tested based on the query request processing condition information; and the server where the server program to be tested is deployed is used for processing the query request sent by the pressure application program, and counting the number of the query requests processed in unit time to obtain the query request processing condition information.
7. The apparatus of claim 6, wherein the query number per second of the candidate server is a maximum number of query requests for performance test sent by the pressure application program per second by using the resources of the candidate server currently available for performance test, and the target query number per second is a test target when testing the query requests for performance test that can be processed by the server program to be tested per second.
8. The apparatus of claim 7, further comprising:
and the program execution exception handling module is configured to send an pressure application program stop execution instruction and a pressure application program deletion instruction to each slave node server to trigger each slave node server to stop executing the pressure application program deployed on the slave node server and delete the pressure application program deployed on the slave node server under the condition of receiving execution state information which is sent by at least one slave node server and indicates that an exception condition occurs in the execution process of the pressure application program.
9. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 5.
10. A storage medium in which instructions, when executed by a processor of a server, enable the server to perform the method of any one of claims 1 to 5.
CN202010131629.5A 2020-02-28 2020-02-28 Performance test method, device, server and storage medium Active CN111404769B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010131629.5A CN111404769B (en) 2020-02-28 2020-02-28 Performance test method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010131629.5A CN111404769B (en) 2020-02-28 2020-02-28 Performance test method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN111404769A CN111404769A (en) 2020-07-10
CN111404769B true CN111404769B (en) 2022-07-08

Family

ID=71413896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010131629.5A Active CN111404769B (en) 2020-02-28 2020-02-28 Performance test method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111404769B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506255A (en) * 2016-09-21 2017-03-15 微梦创科网络科技(中国)有限公司 A kind of method of pressure test, apparatus and system
CN107688526A (en) * 2017-08-25 2018-02-13 上海壹账通金融科技有限公司 Performance test methods, device, computer equipment and the storage medium of application program
CN108733545A (en) * 2017-04-25 2018-11-02 北京微影时代科技有限公司 A kind of method for testing pressure and device
CN108845954A (en) * 2018-08-31 2018-11-20 中国联合网络通信集团有限公司 Method for testing pressure, system and storage medium
CN108959000A (en) * 2018-06-20 2018-12-07 深圳市腾讯网络信息技术有限公司 A kind of server stress test method, system and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506255A (en) * 2016-09-21 2017-03-15 微梦创科网络科技(中国)有限公司 A kind of method of pressure test, apparatus and system
CN108733545A (en) * 2017-04-25 2018-11-02 北京微影时代科技有限公司 A kind of method for testing pressure and device
CN107688526A (en) * 2017-08-25 2018-02-13 上海壹账通金融科技有限公司 Performance test methods, device, computer equipment and the storage medium of application program
CN108959000A (en) * 2018-06-20 2018-12-07 深圳市腾讯网络信息技术有限公司 A kind of server stress test method, system and terminal
CN108845954A (en) * 2018-08-31 2018-11-20 中国联合网络通信集团有限公司 Method for testing pressure, system and storage medium

Also Published As

Publication number Publication date
CN111404769A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
US10146524B1 (en) Preemptive deployment in software deployment pipelines
CN107590075B (en) Software testing method and device
CN108845954B (en) Pressure testing method, system and storage medium
EP3489825A1 (en) Method, apparatus and computer readable storage medium for processing service
CN104834602B (en) A kind of program dissemination method, device and program delivery system
CN104765678A (en) Method and device for testing applications on mobile terminal
CN104067234B (en) In-situ treatment thinks highly of the new method and system characterized
CN105404580B (en) Distributed pressure testing system and method
CN107045475B (en) Test method and device
US20150100831A1 (en) Method and system for selecting and executing test scripts
CN109977012B (en) Joint debugging test method, device, equipment and computer readable storage medium of system
CN107038120B (en) Software testing method and device
CN106549795B (en) System for monitoring a plurality of distributed devices
CN109828830B (en) Method and apparatus for managing containers
CN111404769B (en) Performance test method, device, server and storage medium
US10826764B2 (en) Dynamic server allocation for automated server builds
KR20150030297A (en) Verification apparatus, terminal device, system, method and computer-readable medium for verifying application
CN112463574A (en) Software testing method, device, system, equipment and storage medium
CN114461957A (en) Method, device and equipment for issuing road tools and storage medium
CN111309627B (en) Method and system for preventing test conflict in software test
CN111324668B (en) Database data synchronous processing method, device and storage medium
CN113032188B (en) Method, device, server and storage medium for determining main server
CN114189439A (en) Automatic capacity expansion method and device
CN111090575B (en) Test method
CN111400192A (en) Service program performance testing method and device, electronic equipment and storage medium

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