CN111294257B - Method, device and system for automatic pressure test of application server - Google Patents

Method, device and system for automatic pressure test of application server Download PDF

Info

Publication number
CN111294257B
CN111294257B CN202010158428.4A CN202010158428A CN111294257B CN 111294257 B CN111294257 B CN 111294257B CN 202010158428 A CN202010158428 A CN 202010158428A CN 111294257 B CN111294257 B CN 111294257B
Authority
CN
China
Prior art keywords
flow
target server
server
testing
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
Application number
CN202010158428.4A
Other languages
Chinese (zh)
Other versions
CN111294257A (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 Jiuzhou Yundong Technology Co ltd
Original Assignee
Beijing Jiuzhou Yundong 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 Jiuzhou Yundong Technology Co ltd filed Critical Beijing Jiuzhou Yundong Technology Co ltd
Priority to CN202010158428.4A priority Critical patent/CN111294257B/en
Publication of CN111294257A publication Critical patent/CN111294257A/en
Application granted granted Critical
Publication of CN111294257B publication Critical patent/CN111294257B/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
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level

Abstract

The invention relates to the technical field of computer networks, in particular to a method, a device and a system for automatically testing pressure of a server. A method of server automatic stress testing and performance testing, comprising: receiving pressure test parameter data input by a user; and testing the target server according to the pressure test parameter data. By the method, the target application server can be tested.

Description

Method, device and system for automatic pressure test of application server
Technical Field
The embodiment of the invention relates to the technical field of computer networks, in particular to a method, a device and a system for automatically testing pressure of a server.
Background
The application server is oriented to access of thousands of users, and if the number of users requesting access to the application server at the same moment is too large, the application server is halted. In the prior art, no method for automatically testing a target server exists. If the performance of the server does not reach the standard and the server is operated online, loss is brought to software developers.
Disclosure of Invention
Therefore, embodiments of the present invention provide a method, an apparatus, and a system for automatic pressure testing of a server, so as to solve the above problems.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
according to a first aspect of an embodiment of the present invention, a method for automatic stress testing and performance detection of a server includes:
receiving pressure test parameter data input by a user;
and testing the target server according to the pressure test parameter data.
Further, the testing the target server according to the pressure testing parameter data includes: and sending the data packet traffic to a target server, wherein the target server is used for receiving the data packet traffic to perform traffic pressure test.
Further, the pressure test parameter data comprises one or more of the following: the address of the target server, the concurrency number of the simultaneous access target server, and the address of the website accessed by the target server.
Further, the testing the target server according to the pressure testing parameter data includes: testing by adopting pre-recorded flow; or real-time traffic is used for testing.
Further, the testing is performed by adopting the pre-recorded flow, and the testing method comprises the following steps:
pre-storing files with preset sizes for flow testing; wherein the file comprises a plurality of data packets;
the header of each data packet is provided with a pressure test mark;
when the flow pressure test is carried out, the file is sent to a target server; and monitoring the target server.
Further, still include: monitoring traffic and performance on the target server; the properties include one or more of the following: QPS, response time RT, and HTTP status code.
According to a second aspect of the embodiments of the present invention, an apparatus for automatic stress testing and performance testing of a server includes:
the receiving module is used for receiving pressure test parameter data input by a user;
and the test module is used for testing the target server according to the pressure test parameter data.
Further, the stress test parameter data comprises the address of the target server, the number of concurrent accesses to the target server, the query rate per second QPS of the target server, and the number of received requests.
Further, still include: monitoring traffic and performance on the target server; the properties include one or more of the following: query per second rate QPS, response time RT, and HTTP status code.
According to a third aspect of the embodiments of the present invention, a system for automatic stress testing and performance detection of a server at least includes: a test server; a target server;
the test server is used for receiving pressure test parameter data input by a user;
sending data packet flow to a target server according to the pressure test parameter data;
the target server is used for receiving the data packet flow sent by the test server to carry out testing.
The embodiment of the invention has the following advantages: the method for automatic pressure test and performance detection of the server comprises the steps of receiving pressure test parameter data input by a user; and testing the target server according to the pressure test parameter data. By the method, the pressure server applies pressure to the tested application server; monitoring the performance parameters of the tested server, and judging that the performance of the tested server can be input and set by a user on the application server through the performance parameters; and the application server performs pressure test on the target server.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
The structures, ratios, sizes, and the like shown in the present specification are only used for matching with the contents disclosed in the specification, so that those skilled in the art can understand and read the present invention, and do not limit the conditions for implementing the present invention, so that the present invention has no technical significance, and any structural modifications, changes in the ratio relationship, or adjustments of the sizes, without affecting the functions and purposes of the present invention, should still fall within the scope of the present invention.
Fig. 1 is a flowchart of a method for automatic stress testing and performance testing of a server according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus for automatic pressure testing and performance testing of a server according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a system for server automatic stress testing and performance detection according to an embodiment of the present invention.
Detailed Description
The present invention is described in terms of particular embodiments, other advantages and features of the invention will become apparent to those skilled in the art from the following disclosure, and it is to be understood that the described embodiments are merely exemplary of the invention and that it is not intended to limit the invention to the particular embodiments disclosed. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The application provides a method for automatic pressure test and performance detection of a server, which is shown in fig. 1 and includes:
step S101, receiving pressure test parameter data input by a user;
wherein, the pressure test parameter data comprises one or more of the following:
the address of the target server, the concurrency number of simultaneous access to the target server, the address of the website accessed by the target server, and the address of the specific website.
The website address of a specific website is used for determining the condition of the target server for accessing a certain website;
the target server refers to a server which is pressed, namely a tested server; because of the large number of servers, the server that is stressed must determine the server that is stressed before the stress test can be performed.
The concurrency number is the number of users who send access requests to the target application server at the same time. The server under pressure may simulate multiple users sending access requests to the target server.
And S102, testing the target server according to the pressure test parameter data.
According to the method, the pressure test is carried out on the target application server needing to be tested, so that the detection of the application server can be realized, and the performance of the application server can be obtained.
In one embodiment, in order to implement the performance monitoring, a monitoring server may be provided, which is connected to a target server and monitors the traffic and the performance on the target server; the properties include one or more of the following: response time RT, HTTP status code. The monitoring server sends a request for acquiring test data to a target server; and after receiving the request, the target server sends the performance parameters to the monitoring server. Wherein the HTTP status code includes 200 or not 200. 200 indicates the response was successful; a non-200 indicates a response failure. The status code includes:
200-request success;
301-resources (web pages, etc.) are permanently transferred to other URLs;
404-the requested resource (web page, etc.) does not exist;
500-internal server error.
In one embodiment, the testing the target server according to the stress test parameter data comprises: and sending the data packet traffic to a target server, wherein the target server is used for receiving the data packet traffic to perform traffic pressure test.
In one embodiment, the testing the target server according to the stress test parameter data comprises: testing by adopting pre-recorded flow; or real-time traffic is used for testing.
Further, the testing is performed by adopting the pre-recorded flow, and the testing method comprises the following steps:
pre-storing files with preset sizes for flow testing; wherein the file comprises a plurality of data packets;
the header of each data packet is provided with a pressure test mark;
in order to avoid interference and pollution to a system, the method sets an identifier for the tested flow, and sets a special field in the packet header of each data packet; therefore, final statistics can be facilitated, and confusion with normal data traffic can be avoided.
When the flow pressure test is carried out, the file is sent to a target server; and monitoring the target server.
It is emphasized that the traffic mentioned above is pre-recorded traffic, not real-time traffic. And the monitoring of the application server can be better realized by adopting the pre-recorded flow.
Another method for server automatic stress testing and performance testing is provided below in general terms, the method comprising:
the application server receives parameters input by a user; based on the parameters, generating a recording flow request and sending the request to a program for recording the flow;
receiving an application server request by a recording flow program; and obtaining the request content; generating a corresponding task according to the request content to start recording the flow;
in specific implementation, two modes can be selected, one mode is a real-time flow mode, and the other mode is a flow recording mode.
The real-time flow testing mode is used for directly testing pressure and distributing real-time flow to a target server; monitoring the flow and the performance of the target server;
real-time traffic can be distributed according to a preset weight proportion, for example, in the traffic of the application server group accessed by the user, the weight of the target application server is 0.1; i.e. one tenth of the traffic is directed to the application server; the performance parameter may also be the CPU usage of the application server; throughput, disk read-write speed, etc.;
a flow recording mode, which is to adopt a pre-generated flow file and upload the flow file to a target server; thereby monitoring the performance of the target server; the data packets in the traffic file are provided with specific identifiers for distinguishing the traditional traffic. Generating a specific identifier in header HTTPHEADER; formal services are not influenced; and generating corresponding pressure measurement monitoring data in the monitoring server according to the identification.
And the application server starts real-time flow test or acquires recorded and broadcast flow test data according to the parameters input by the user.
Based on the same inventive concept, the application also provides a device for automatic pressure test and performance detection of the server, which is shown in the structural schematic diagram of the device for automatic pressure test and performance detection of the server shown in fig. 2; the device comprises:
the receiving module 21 is used for receiving pressure test parameter data input by a user;
and the test module 22 is used for testing the target server according to the pressure test parameter data.
The pressure test parameter data comprises one or more of the following: the address of the target server, the concurrency number of the simultaneous access target server, and the address of the website accessed by the target server.
The test module 22 is further configured to monitor traffic and performance on the target server; the properties include one or more of the following: QPS, response time RT, and HTTP status code.
The testing module 22 is further configured to test the target server according to the pressure testing parameter data, including: testing by adopting pre-recorded flow; or real-time traffic is used for testing.
The testing module 22 is further configured to perform testing using pre-recorded traffic, including:
pre-storing files with preset sizes for flow testing; wherein the file comprises a plurality of data packets;
the header of each data packet is provided with a pressure test mark;
when the flow pressure test is carried out, the file is sent to a target server; and monitoring the target server.
The application also provides a system for automatic pressure test and performance detection of the server, which at least comprises: a test server; a target server;
the test server is used for receiving pressure test parameter data input by a user;
sending data packet flow to a target server according to the pressure test parameter data;
the target server is used for receiving the data packet flow sent by the test server to carry out testing.
The pressure test parameter data comprises one or more of the following: the address of the target server, the concurrency number of the simultaneous access target server and the address of the website accessed by the target server.
The test server is also used for monitoring the flow and the performance of the target server; the properties include one or more of the following: QPS, response time RT, and HTTP status code.
The test server is further configured to test the target server according to the pressure test parameter data, including: testing by adopting pre-recorded flow; or real-time traffic is used for testing.
The test server is further configured to perform a test using the pre-recorded traffic, including:
pre-storing files with preset sizes for flow testing; wherein the file comprises a plurality of data packets;
the header of each data packet is provided with a pressure test mark;
when the flow pressure test is carried out, the file is sent to a target server; and monitoring the target server.
Another system for server automatic stress testing and performance testing is described below, and is shown in fig. 3, and includes:
an application server 100, an application server 300, a replication traffic server 200; wherein, a program for copying the flow is installed on the flow copying server; a file storage server 400, a pressure measurement target server 500, and a real-time performance monitoring server 600;
the application server 100 is used for receiving pressure test parameter data input by a user; respectively sending the received pressure test parameter data to the replication flow server 200 and the pressure application server 300;
a replication traffic server 200 installed with a replication traffic program; the program may produce a traffic file; and transmits the traffic file to the pressurizing server 300; and to the file storage server 400;
a pressure application server 300 for applying pressure to the pressure test target server 500 according to the received pressure test parameter data; specifically, a data packet is sent to the pressure measurement target server 500;
a file storage server 400 for storing a traffic file;
a real-time performance monitoring server 600 for monitoring the performance of the pressure measurement target server 500 in real time;
specifically, performance parameter data of the pressure measurement target server 500 is received; and generating a graph and a report of the pressure test.
Although the invention has been described in detail above with reference to a general description and specific examples, it will be apparent to one skilled in the art that modifications or improvements may be made thereto based on the invention. Accordingly, such modifications and improvements are intended to be within the scope of the invention as claimed.

Claims (5)

1. A method for automatic stress testing and performance detection of a server is characterized by comprising the following steps:
receiving pressure test parameter data input by a user;
sending the data packet flow to a target server, wherein the target server is used for receiving the data packet flow to perform flow pressure test; the flow pressure test mode comprises the steps of adopting pre-recorded flow to test or adopting real-time flow to test;
the testing by adopting the pre-recorded flow comprises the following steps: pre-storing files with preset sizes for flow testing; wherein the file comprises a plurality of data packets; the header of each data packet is provided with a pressure test mark; when the flow pressure test is carried out, the file is sent to a target server; monitoring the target server;
the real-time flow testing mode is used for directly carrying out pressure testing and distributing real-time flow to the target server; and monitoring the flow and performance parameters of the target server, wherein the performance parameters comprise one or more of the following: and distributing real-time flow by numerical values of a query rate QPS per second, a response time RT and an HTTP status code, the CPU utilization rate and the throughput of the target server and the disk reading and writing speed, wherein the weight of the target server in the flow of the target server group accessed by a user is 0.1 according to a preset weight proportion, namely one tenth of the flow is guided to the target server.
2. The method of claim 1, wherein the stress test parameter data comprises one or more of: the address of the target server, the concurrency number of the simultaneous access target server and the address of the website accessed by the target server.
3. An apparatus for automatic stress testing and performance testing of a server, comprising:
the receiving module is used for receiving pressure test parameter data input by a user;
the system comprises a test module, a target server and a data processing module, wherein the test module is used for sending data packet flow to the target server, and the target server is used for receiving the data packet flow to perform flow pressure test; the flow pressure test mode comprises the steps of adopting pre-recorded flow to test or adopting real-time flow to test;
the testing by adopting the pre-recorded flow comprises the following steps: pre-storing a file with a preset size for flow test; wherein the file comprises a plurality of data packets; the header of each data packet is provided with a pressure test mark; when the flow pressure test is carried out, the file is sent to a target server; monitoring the target server;
the real-time flow testing mode is used for directly carrying out pressure testing and distributing real-time flow to the target server; and monitoring the flow and performance parameters of the target server, wherein the performance parameters comprise one or more of the following: and distributing real-time flow by numerical values of a query rate QPS per second, a response time RT and an HTTP status code, the CPU utilization rate and the throughput of the target server and the disk reading and writing speed, wherein the weight of the target server in the flow of the target server group accessed by a user is 0.1 according to a preset weight proportion, namely one tenth of the flow is guided to the target server.
4. The apparatus for server automated stress testing and performance testing according to claim 3, wherein the stress test parameter data comprises an address of the target server, a number of concurrent accesses to the target server, a query rate per second QPS of the target server, a number of requests received.
5. A system for automatic stress testing and performance testing of a server, comprising at least: a test server, a target server;
the test server is used for receiving pressure test parameter data input by a user;
sending data packet flow to a target server according to the pressure test parameter data;
the target server is used for receiving the data packet flow sent by the test server to perform flow pressure test; the flow pressure test mode comprises the steps of adopting pre-recorded flow to test or adopting real-time flow to test;
the testing by adopting the pre-recorded flow comprises the following steps: pre-storing files with preset sizes for flow testing; wherein the file comprises a plurality of data packets; a header of each data packet is provided with a pressure test identifier; when the flow pressure test is carried out, the file is sent to a target server; monitoring the target server;
the real-time flow testing mode is used for directly carrying out pressure testing and distributing real-time flow to the target server; and monitoring the flow and performance parameters of the target server, wherein the performance parameters comprise one or more of the following: and distributing real-time flow by numerical values of a query rate QPS per second, a response time RT and an HTTP status code, the CPU utilization rate and the throughput of the target server and the disk reading and writing speed, wherein the weight of the target server in the flow of the target server group accessed by a user is 0.1 according to a preset weight proportion, namely one tenth of the flow is guided to the target server.
CN202010158428.4A 2020-03-09 2020-03-09 Method, device and system for automatic pressure test of application server Active CN111294257B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010158428.4A CN111294257B (en) 2020-03-09 2020-03-09 Method, device and system for automatic pressure test of application server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010158428.4A CN111294257B (en) 2020-03-09 2020-03-09 Method, device and system for automatic pressure test of application server

Publications (2)

Publication Number Publication Date
CN111294257A CN111294257A (en) 2020-06-16
CN111294257B true CN111294257B (en) 2022-05-27

Family

ID=71023731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010158428.4A Active CN111294257B (en) 2020-03-09 2020-03-09 Method, device and system for automatic pressure test of application server

Country Status (1)

Country Link
CN (1) CN111294257B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113900915B (en) * 2021-09-28 2024-03-08 盐城天眼察微科技有限公司 Method and device for determining service performance state, storage medium and electronic equipment
CN114124747B (en) * 2021-10-15 2024-04-30 微梦创科网络科技(中国)有限公司 Flow pressure measurement system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099811A (en) * 2015-06-03 2015-11-25 北京金山安全软件有限公司 Interface testing method and device
CN108376112A (en) * 2018-02-09 2018-08-07 腾讯科技(深圳)有限公司 Method for testing pressure, device and readable medium
CN109348499A (en) * 2018-11-30 2019-02-15 北京奇安信科技有限公司 Pressure testing system and method
CN109981805A (en) * 2017-12-28 2019-07-05 中国移动通信集团山东有限公司 A kind of method and device of domain name mapping
CN110727564A (en) * 2019-10-22 2020-01-24 上海游族信息技术有限公司 Real-time monitoring method for test data of server performance pressure test

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7342897B1 (en) * 1999-08-07 2008-03-11 Cisco Technology, Inc. Network verification tool
CN108512710B (en) * 2017-02-24 2022-05-24 腾讯科技(深圳)有限公司 Test method based on test tool and test tool
CN109726102A (en) * 2018-05-14 2019-05-07 网联清算有限公司 Flow pressure test method and device
CN108845954B (en) * 2018-08-31 2022-04-15 中国联合网络通信集团有限公司 Pressure testing method, system and storage medium
CN110245078B (en) * 2019-05-24 2020-11-13 平安国际智慧城市科技股份有限公司 Software pressure testing method and device, storage medium and server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099811A (en) * 2015-06-03 2015-11-25 北京金山安全软件有限公司 Interface testing method and device
CN109981805A (en) * 2017-12-28 2019-07-05 中国移动通信集团山东有限公司 A kind of method and device of domain name mapping
CN108376112A (en) * 2018-02-09 2018-08-07 腾讯科技(深圳)有限公司 Method for testing pressure, device and readable medium
CN109348499A (en) * 2018-11-30 2019-02-15 北京奇安信科技有限公司 Pressure testing system and method
CN110727564A (en) * 2019-10-22 2020-01-24 上海游族信息技术有限公司 Real-time monitoring method for test data of server performance pressure test

Also Published As

Publication number Publication date
CN111294257A (en) 2020-06-16

Similar Documents

Publication Publication Date Title
US9075914B2 (en) Analytics driven development
US8028200B2 (en) Tracing operations in multiple computer systems
CN111294257B (en) Method, device and system for automatic pressure test of application server
CN103428042B (en) Server is carried out the method and system of stress test
US20020161553A1 (en) Adaptive load generation
US7171464B1 (en) Method of tracing data traffic on a network
IL123154A (en) Method and apparatus for identifying data communication patterns in multi-component computer systems
US20150195181A1 (en) Testing of dynamic web content applications
CN105207832B (en) A kind of server stress test method and device
CN109194749B (en) Method for monitoring network request and storage medium
KR100545794B1 (en) Network usage monitoring device and method for terminal system user
JP2015527674A (en) Method, apparatus, computer program product, and computer program for managing a data cache for a computer system (managing a data cache for a computer system)
CN111711533A (en) Fault diagnosis method, fault diagnosis device, electronic equipment and storage medium
CN111147310A (en) Log tracking processing method, device, server and medium
CN110430070B (en) Service state analysis method, device, server, data analysis equipment and medium
CN109474484B (en) CDN (content delivery network) checking method, device and system
CN115694699A (en) Time delay parameter acquisition method and device, electronic equipment and storage medium
CN112256984B (en) Method and device for acquiring interface background screenshot corresponding to webpage
CN113127356A (en) Pressure measurement method and device, electronic equipment and storage medium
CN105471674A (en) Method and system for testing performance of server
US20120158911A1 (en) Automatic wsdl download of client emulation for a testing tool
Li et al. NetStorage: A synchronized trace-driven replayer for network-storage system evaluation
US9258203B1 (en) Monitoring computer performance metrics utilizing baseline performance metric filtering
JP4208493B2 (en) Load test system for network server
CN111651330B (en) Data acquisition method, data acquisition device, electronic equipment and computer readable 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