CN113282473A - Server performance testing method and device, computer equipment and storage medium - Google Patents

Server performance testing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113282473A
CN113282473A CN202110595156.9A CN202110595156A CN113282473A CN 113282473 A CN113282473 A CN 113282473A CN 202110595156 A CN202110595156 A CN 202110595156A CN 113282473 A CN113282473 A CN 113282473A
Authority
CN
China
Prior art keywords
test
server
script
jmx
file
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.)
Pending
Application number
CN202110595156.9A
Other languages
Chinese (zh)
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.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City 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 Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202110595156.9A priority Critical patent/CN113282473A/en
Publication of CN113282473A publication Critical patent/CN113282473A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3409Recording 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 for performance assessment
    • G06F11/3414Workload generation, e.g. scripts, playback
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for testing the performance of a server, computer equipment and a storage medium, wherein the method comprises the following steps: if a test configuration instruction input by a user is received, updating jmx script files called by the test scripts according to the test configuration instruction to obtain updated jmx script files; when the updated jmx script file is executed to test the server, remotely calling a data acquisition server based on the test script to acquire data in the test process, and acquiring the running data of the server and a jmeter test report file; and obtaining a performance trend graph based on the operation data and the jmeter test report file, and obtaining a server performance test result. The improved server performance testing method can automatically and circularly call jmx script files for the concurrency of different users, and monitors the server while executing the testing script, so that manual intervention and operation are reduced, the application range is wide, and the performance testing efficiency is greatly improved.

Description

Server performance testing method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of software testing technologies, and in particular, to a server performance testing method, a server performance testing apparatus, a computer device, and a storage medium.
Background
With the continuous development of web pages and software products and the proliferation of users, the performance requirements for servers are increasing. When a server or a server cluster with good performance can handle user requests of tens of thousands of levels, in order to ensure that the operating software on the server can bear huge pressure, the performance test needs to be carried out on the server or the server cluster before the server or the server cluster is on line, and the simulation user can pressurize the interface of the server or the server cluster so as to evaluate whether the bottleneck of the system meets the requirement or not.
In the existing performance test scheme, on one hand, the current mainstream performance test tool such as Loadrunner has perfect functions in the aspects of script recording, script execution and result analysis, but mainly focuses on single execution of scripts, and has low automation degree and needs a large amount of manual execution to reduce the test efficiency in the process of pressure testing of large projects requiring multi-script execution. On the other hand, the existing server resource monitoring tool mainly monitors a single server resource, and similarly, in the process of pressure testing of a large project requiring monitoring of a plurality of servers, a unified server resource monitoring tool does not exist, and the testing efficiency is low. In the existing test scheme, the test script can only be suitable for specific requirements or specific scenes, and in a large project, various test scripts can be replaced for different test requirements, so that the problem of small application range exists in the existing server performance test scheme.
Disclosure of Invention
Therefore, it is necessary to provide a method, an apparatus, a device and a storage medium for server performance testing to solve the problems of low testing efficiency and small application range of the existing industry server performance testing scheme.
A first aspect of an embodiment of the present application provides a server performance testing method, including:
if a test configuration instruction input by a user is received, updating jmx script files called by the test scripts according to the test configuration instruction to obtain updated jmx script files; when the updated jmx script file is executed to test a server, remotely calling a data acquisition server based on the test script to acquire data in a test process, and acquiring running data of the server and a jmeter test report file; and obtaining a performance trend graph based on the operation data and the jmeter test report file, and obtaining a server performance test result.
A second aspect of the embodiments of the present application provides a server performance testing apparatus, including:
an update module: the test script updating module is used for updating jmx script files called by the test scripts according to the test configuration instructions to obtain updated jmx script files if the test configuration instructions input by a user are received;
a test data acquisition module: when the updated jmx script file is executed to test a server, remotely calling a data acquisition server based on the test script to acquire data in a test process, and acquiring running data of the server and a jmeter test report file;
a test result acquisition module: and the performance trend graph is obtained based on the operation data and the jmeter test report file, and a server performance test result is obtained.
A third aspect of the embodiments of the present application provides a computer device, which includes a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, and the processor executes the computer readable instructions to implement the steps of the server performance testing method.
A fourth aspect of embodiments of the present application provides one or more readable storage media storing computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the server performance testing method as described above.
According to the server performance testing method provided by the embodiment of the application, jmx script files called by testing scripts are updated by receiving testing configuration instructions input by a user, updated jmx script files are obtained, the testing configuration instructions input by the user are used for describing the requirements for testing the server, the updated jmx script files can be executed to obtain corresponding jmeter testing report files and the running data information of the server according to the requirements for testing the server, and the server performance testing results are obtained based on the jmeter testing report files and the running data information of the server. For different user test requirements, various scripts do not need to be written manually, and only the jmx script file which is called is updated based on one written test script, the updated script file is executed, the performance test result is obtained, and the efficiency of the performance test and the application range of the server performance test scheme are greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a schematic diagram of an application environment of a server performance testing method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of an implementation of a server performance testing method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of another implementation of the server performance testing method according to the embodiment of the present invention;
FIG. 4 is a flow chart illustrating an implementation of a server performance testing method according to another embodiment of the present invention;
FIG. 5 is a schematic flow chart of a server performance testing method according to another embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a server performance testing apparatus according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of another structure of a server performance testing apparatus according to an embodiment of the present invention;
fig. 8 is a block diagram of a computer device in an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. 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 server performance testing method provided by the embodiment can be applied to the application environment shown in fig. 1 and executed by the monitoring end. Wherein, the client communicates with the server. The client includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of a plurality of servers.
In an embodiment, as shown in fig. 2, a server performance testing method is provided, which is described by taking an example that the method is applied to the monitoring end in fig. 1 to perform a performance test on a server at a server side, and includes the following steps:
s11: and if a test configuration instruction input by a user is received, updating jmx script files called by the test scripts according to the test configuration instruction to obtain updated jmx script files.
In this embodiment, the test script refers to a preset test script file for performing a server performance test on the target application program. In actual use, the test script is written by using a shell language, and in other embodiments, the test script may also be written by using other programming languages, which is not limited herein. When the test script file is executed, the performance of the server of the target application program is tested by calling and executing the jmx script file in the meter tool. The test configuration command input by the user refers to a test configuration command with specified operation parameter configuration and transmitted according to the test requirement of the user, and the jmx script file called by the test script is updated based on the operation parameter configuration in the test configuration command. Specifically, updating the jmx script file called by the test script means replacing the corresponding operating parameters in the called jmx script file with the operating parameters configured according to the test requirements of the user, so as to obtain an updated jmx script file.
Referring to fig. 3, fig. 3 is a flowchart illustrating another implementation of a method for testing server performance according to an embodiment of the present disclosure. With respect to the embodiment corresponding to fig. 2, the server performance testing method provided in this embodiment is further described in step S11, and includes steps S111 to S112. The details are as follows:
s111: and if a test configuration instruction input by a user is received, transmitting a specified test suite directory into the test script, and reading the running parameter configuration under the specified test suite directory.
In this embodiment, the test configuration command input by the user is used to transmit a specified test suite directory into the test script, and the operating parameters in the specified test suite directory are configured based on the test requirement of the user and stored in the operating parameter configuration file in the test suite directory. And when a test configuration instruction input by a user is received, transmitting parameters such as a test suite directory with specified operation parameters or a test case name into the test script, and reading an operation parameter configuration file under the specified test suite directory, wherein the operation parameters in the operation parameter configuration file comprise operation parameters such as the number of concurrent threads (user concurrency), script operation time and the like.
S112: and updating the running parameter values in the jmx script file called under the specified test suite directory based on the running parameter configuration to obtain an updated jmx script file.
In this embodiment, since the running parameter values in the invoked mx script file are all default configuration parameters, based on user requirements, according to the running parameter configuration values specified in the imported specified test suite directory, including the number of threads (user concurrency), the script running time, and other running parameter values, the corresponding running parameter values in the jmx script file are replaced, so as to obtain an updated jmx script file. For example, a specified test suite directory is introduced, the thread number of which is 50, that is, a stress performance test is performed on 50 users accessing the target application program at the same time. The updating of the jmx script file called by the test script according to the test configuration command refers to dynamically updating corresponding parameter values, such as thread number, running time and the like, in the called jmx script file according to running parameter values in a specified test suite directory. And the called jmx script file is located under the test suite directory, a user inputs a test configuration command, namely, the running parameter configuration under the test suite directory is updated, and the corresponding running parameter value under the jmx script file is dynamically updated based on the updated running parameter.
As a possible implementation manner, the test configuration instruction input by the user may be one or more input instructions, which may be one or more input instructions, that is, one or more specified test suite directories may be input, for example, the specified test suite directory may be input, where the user concurrency amount in the operation parameter is 50, an jmx script file under the specified test suite directory is read, and the pressure performance test is performed on the target application program, or a set of specified test suite directories is input, where the user concurrency amounts are 50,100, and 200, respectively, and for the set of user concurrency amounts, the jmx script file under the set of test suite directory is automatically read in a loop, and the pressure performance test is performed on the target application program. If a group of test configuration commands are input, the test script automatically and circularly calls jmx script files, and dynamically updates the jmx script files according to the test configuration commands, if the above example is still referred, namely the user concurrency parameters in the jmx script files are sequentially updated to 50,100 and 200.
That is, the updated jmx script file contains the running parameter values configured according to the user test requirements, and the running of the updated jmx test script is to perform pressure test on the server of the target application program or the large project with the server cluster according to the user-specific test requirements. The above processes are all automatic updating and replacing, and preparation is made for executing the jmx script file later, so as to realize the performance test of the server.
S12: and when the updated jmx script file is executed to test the server, remotely calling a data acquisition server based on the test script to acquire data in the test process, and acquiring the running data of the server and a jmeter test report file.
In this embodiment, the updated jmx script file is a jmx script file updated based on the incoming running parameters in the specified test suite directory according to the specific needs of the user, and a dynamically generated jmeter script command is executed based on the updated jmx script file. The dynamically generated jmeter test command is a dynamically generated jmeter test command based on the updated jmx script file. And running an updated jmx script file based on the dynamically generated jmeter script command to obtain a jmeter test report file, wherein the jmeter test report file comprises parameter test data such as response time, concurrent request number, error rate, throughput and the like.
In practical application, an updated jmx test script is executed and an http request is sent to a server side, a monitoring server IP under a test suite directory is read, a server _ collect command is called based on the monitoring server IP, a server resource collection command is started remotely, and sar, free and iostat commands are sequentially executed to collect server resource information, such as running data information of CPU load, network IO, memory occupation percentage, disk IO and the like.
S13: and obtaining a performance trend graph based on the operation data and the jmeter test report file, and obtaining a server performance test result.
In this embodiment, the operation data includes data information such as resource occupation of a server CPU, a memory, a network, and a disk, and the meter test report file includes parameter test data such as response time, concurrent request number, error rate, throughput, and the like. According to different user test requirements, for example, different user concurrency amounts are set, the test script file is executed for multiple times to obtain different test data, a server performance trend graph is obtained based on the test data, abnormal data in the test data can be analyzed according to the performance trend graph, and then a server performance test result is obtained.
As an embodiment of the present application, step S13 further includes:
remotely transmitting the operating data to a local test script; and summarizing the running data in the test script to obtain a running data statistical file.
In this embodiment, an SCP (remote file copy) command is called to remotely transmit the acquired running data information of the server to a local test script, and the local test script sorts and summarizes the running data information to obtain a server resource statistical file, where the server resource statistical file includes data information such as resource occupancy of an output CPU, a memory, a network, and a disk. The CPU information comprises CPU occupation percentage and CPUload, the memory information comprises memory occupation percentage, the network information comprises packet size received and sent by the network card, and the disk information comprises read speed, write speed and disk utilization rate. The above process is a process of executing a script once, when a plurality of scripts need to be executed for concurrent volumes of different users, the script file is circularly called jmx, and a server resource statistical file and a jmeter test report file are correspondingly obtained by executing the script file each time.
In this embodiment, the server resource statistics file and the jmeter test report file are both generated in the test suite directory and stored according to dates, so that the jmeter test report file and the server resource statistics file at a certain time can be checked at any time, comparison and analysis of performance test results after the server is tuned are facilitated, and comparison of different server performance test results obtained by executing a plurality of scripts can be performed.
The server performance testing method provided by the embodiment of the application calls jmx script files in a jmeter tool by compiling a testing script, inputs a testing configuration command according to the requirement of a user, and updates jmx script files called by the testing script based on the testing configuration command; and then executing the updated jmx script file to obtain a jmeter test report file, remotely acquiring the operation data information of the server, and obtaining a server performance test result based on the jmeter test report file and the operation data information of the server. For different user test requirements, various scripts do not need to be written manually, and only the jmx script file which is called is updated based on one written test script, the updated script file is executed, the performance test result is obtained, and the efficiency of the performance test and the application range of the server performance test scheme are greatly improved. And the improved server performance test method can record the performance test result data of each time, store the data according to the date, can quickly search, and is convenient for comparing the pressure test results after program tuning. The improved server performance testing method is compiled based on Shell language, is simple and easy to understand, is convenient to use, has a light frame weight, is independent of environment, and is convenient for team popularization and use.
Referring to fig. 4, fig. 4 is a schematic flow chart illustrating a method for testing server performance according to another embodiment of the present application. On the basis of the embodiment shown in fig. 2, the present embodiment further includes step S14 before step S12. Here, step S14 is parallel to step S11 in bits, so there is no need to consider the sequential execution order of S11 and S14. And when step S11 is executed, step S14 is not executed again; when step S14 is executed, step S11 is not executed. Specifically, the method comprises the following steps:
s14: and if the test configuration instruction input by the user is not received, updating jmx script files called under the test suite directory according to the running parameters under all the test suite directories configured by default in the test scripts to obtain updated jmx script files.
In this embodiment, if no test configuration instruction input by a user is received, that is, no parameter is transmitted into the test script, the running parameter configurations under all test suite catalogues configured by default in the test script are read; the test suite directory of the default configuration in the test script is that the default configuration running parameter values are provided in the test suite directory, and the running parameters include the number of concurrent threads (user concurrency), running time, and the like. And updating the running parameter values in the jmx script file called under each test suite directory in the test scripts based on the running parameter configuration, namely replacing the running parameter values in the jmx script file with the default running parameter configuration under the test suite directory where the running parameter values are located. In particular, the above processes are all based on automatically updating jmx script files based on the test script, so as to prepare for executing the updated jmx script files in the subsequent step S12, thereby improving the efficiency of the server performance test.
Referring to fig. 5, fig. 5 is a flowchart illustrating a refinement of S14 in a server performance testing method according to another embodiment of the present application. With respect to the embodiment corresponding to fig. 4, the server performance testing method provided in this embodiment is further described in step S14, and includes steps S141 to S142. The details are as follows:
and S141, reading the running parameter configuration under all the test suite catalogues of the default configuration in the test script.
In this embodiment, the test suite directory of the default configuration in the test script, that is, the default configuration running parameter values are in the test suite directory, and the running parameters include the number of concurrent threads (user concurrency amount), running time, and the like.
And S142, updating the running parameter values in the jmx script file called under the test suite directory based on the running parameter configuration to obtain an updated jmx script file.
In the embodiment, jmx script files under all test suite directories of the default configuration in the test script are read circularly. Based on the operation parameter configuration under each test suite in the test script read in step S141, the operation parameter value in the jmx script file called under the test suite is updated correspondingly, that is, the operation parameter value in the jmx script file is replaced by the operation parameter of the default configuration under the test suite where the operation parameter value is located, so as to obtain the updated jmx script files under all test catalogs.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, a server performance testing method apparatus 600 is provided, and the server performance testing method apparatus corresponds to the server performance testing methods in the foregoing embodiments one to one. As shown in fig. 6, the server performance testing method apparatus includes an updating module, a test data obtaining module, and a test result obtaining module. The functional modules are explained in detail as follows:
the updating module 601: the test script updating module is used for updating jmx script files called by the test scripts according to the test configuration instructions to obtain updated jmx script files if the test configuration instructions input by a user are received;
the test data acquisition module 602: when the updated jmx script file is executed to test a server, remotely calling a data acquisition server based on the test script to acquire data in a test process, and acquiring running data of the server and a jmeter test report file;
the test result obtaining module 603: and the performance trend graph is obtained based on the operation data and the jmeter test report file, and a server performance test result is obtained.
As shown in fig. 7, the update module includes an operation parameter reading sub-module and an jmx script file update sub-module, and the detailed description of each functional sub-module is as follows:
the operating parameter reading sub-module 701: the test script input device is used for transmitting a specified test suite directory into the test script and reading the running parameter configuration under the specified test suite directory if a test configuration instruction input by a user is received;
jmx script file update submodule 702: the test script configuration module is used for updating the running parameter values in the jmx script file called under the specified test suite directory based on the running parameter configuration to obtain an updated jmx script file;
wherein the test configuration command input by the user points to a specified test suite directory transmitted in the test script.
For specific limitations of the server performance testing method apparatus, reference may be made to the above limitations of the server performance testing method, which are not described herein again. All or part of the modules in the server performance testing method device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a readable storage medium and an internal memory. The readable storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operating system and execution of computer-readable instructions in the readable storage medium. The database of the computer device is used for storing data related to the server performance testing method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer readable instructions, when executed by a processor, implement a server performance testing method. The readable storage media provided by the present embodiment include nonvolatile readable storage media and volatile readable storage media.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a readable storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer readable instructions. The internal memory provides an environment for the operating system and execution of computer-readable instructions in the readable storage medium. The network interface of the computer device is used for communicating with an external server through a network connection. The computer readable instructions, when executed by a processor, implement a server performance testing method. The readable storage media provided by the present embodiment include nonvolatile readable storage media and volatile readable storage media.
In one embodiment, a computer device is provided, comprising a memory, a processor, and computer readable instructions stored on the memory and executable on the processor, the processor when executing the computer readable instructions implementing the steps of:
if a test configuration instruction input by a user is received, updating jmx script files called by the test scripts according to the test configuration instruction to obtain updated jmx script files;
when the updated jmx script file is executed to test a server, remotely calling a data acquisition server based on the test script to acquire data in a test process, and acquiring running data of the server and a jmeter test report file;
and obtaining a performance trend graph based on the operation data and the jmeter test report file, and obtaining a server performance test result.
In one embodiment, one or more computer-readable storage media storing computer-readable instructions are provided, the readable storage media provided by the embodiments including non-volatile readable storage media and volatile readable storage media. The readable storage medium has stored thereon computer readable instructions which, when executed by one or more processors, perform the steps of:
if a test configuration instruction input by a user is received, updating jmx script files called by the test scripts according to the test configuration instruction to obtain updated jmx script files;
when the updated jmx script file is executed to test a server, remotely calling a data acquisition server based on the test script to acquire data in a test process, and acquiring running data of the server and a jmeter test report file;
and obtaining a performance trend graph based on the operation data and the jmeter test report file, and obtaining a server performance test result.
It will be understood by those of ordinary skill in the art that all or part of the processes of the methods of the above embodiments may be implemented by hardware related to computer readable instructions, which may be stored in a non-volatile readable storage medium or a volatile readable storage medium, and when executed, the computer readable instructions may include processes of the above embodiments of the methods. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A method for testing the performance of a server is characterized by comprising the following steps:
if a test configuration instruction input by a user is received, updating jmx script files called by the test scripts according to the test configuration instruction to obtain updated jmx script files;
when the updated jmx script file is executed to test a server, remotely calling a data acquisition server based on the test script to acquire data in a test process, and acquiring running data of the server and a jmeter test report file;
and obtaining a performance trend graph based on the operation data and the jmeter test report file, and obtaining a server performance test result.
2. The server performance testing method of claim 1, wherein the user-entered test configuration command is used to input a specified test suite catalog into the test script;
if a test configuration instruction input by a user is received, updating jmx script files called by the test scripts according to the test configuration instruction to obtain updated jmx script files, wherein the method comprises the following steps:
if a test configuration instruction input by a user is received, transmitting a specified test suite directory into the test script, and reading the running parameter configuration under the specified test suite directory;
and updating the running parameter values in the jmx script file called under the specified test suite directory based on the running parameter configuration to obtain an updated jmx script file.
3. The server performance testing method of claim 1, wherein the server performance testing method further comprises:
and if the test configuration instruction input by the user is not received, updating jmx script files called under the test suite directory according to the running parameters under all the test suite directories configured by default in the test scripts to obtain updated jmx script files.
4. The method for testing the performance of the server according to claim 3, wherein if no test configuration command input by the user is received, updating jmx script files called under the test suite directory according to the running parameters under all test suite directories configured by default in the test script, so as to obtain updated jmx script files, including:
reading the running parameter configuration under all test suite catalogues of the default configuration in the test script;
and updating the running parameter values in the jmx script file called under the test suite directory based on the running parameter configuration to obtain an updated jmx script file.
5. The method for testing the performance of the server according to claim 1, wherein when the updated jmx script file is executed to perform a test operation on the server, the remote data collection server is called based on the test script to collect data of a test process, so as to obtain the running data and a jmeter test report file of the server, the method comprising:
responding to a dynamically generated jmeter script command, executing an updated jmx script file, and obtaining a jmeter test report file;
and remotely starting a server resource collection command, and remotely calling a data collection server to collect data in the test process to obtain the operating data of the server.
6. The method for server performance testing according to claim 1, wherein the updating the running parameter value in the jmx script file called under the specified test suite directory based on the running parameter configuration to obtain an updated jmx script file, further comprises:
receiving the operation data sent by the data acquisition server;
and summarizing the operation data to obtain an operation data statistical file.
7. A server performance testing apparatus, comprising:
an update module: the test script updating module is used for updating jmx script files called by the test scripts according to the test configuration instructions to obtain updated jmx script files if the test configuration instructions input by a user are received;
a test data acquisition module: when the updated jmx script file is executed to test a server, remotely calling a data acquisition server based on the test script to acquire data in a test process, and acquiring running data of the server and a jmeter test report file;
a test result acquisition module: and the performance trend graph is obtained based on the operation data and the jmeter test report file, and a server performance test result is obtained.
8. The server performance testing apparatus of claim 7, wherein the update module comprises:
an operating parameter reading submodule: the test script input device is used for transmitting a specified test suite directory into the test script and reading the running parameter configuration under the specified test suite directory if a test configuration instruction input by a user is received;
jmx script file update submodule: the test script configuration module is used for updating the running parameter values in the jmx script file called under the specified test suite directory based on the running parameter configuration to obtain an updated jmx script file;
wherein the test configuration command input by the user points to a specified test suite directory transmitted in the test script.
9. A computer device comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, wherein the computer readable instructions are readable instructions generated by the engine of any one of claims 1 to 6.
10. One or more readable storage media storing code related to the engine of any of claims 1-6.
CN202110595156.9A 2021-05-28 2021-05-28 Server performance testing method and device, computer equipment and storage medium Pending CN113282473A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110595156.9A CN113282473A (en) 2021-05-28 2021-05-28 Server performance testing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110595156.9A CN113282473A (en) 2021-05-28 2021-05-28 Server performance testing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113282473A true CN113282473A (en) 2021-08-20

Family

ID=77282670

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110595156.9A Pending CN113282473A (en) 2021-05-28 2021-05-28 Server performance testing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113282473A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080133210A1 (en) * 2006-11-30 2008-06-05 Bryan Christopher Chagoly Method and implementation for automating processes using data driven pre-recorded transactions
CN108536571A (en) * 2018-04-13 2018-09-14 平安普惠企业管理有限公司 Performance test methods, device, equipment and computer readable storage medium
CN110502435A (en) * 2019-07-26 2019-11-26 广东睿江云计算股份有限公司 Automated performance testing method and its system based on Jmeter
CN111124370A (en) * 2019-12-24 2020-05-08 深圳我家云网络科技有限公司 Data processing method and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080133210A1 (en) * 2006-11-30 2008-06-05 Bryan Christopher Chagoly Method and implementation for automating processes using data driven pre-recorded transactions
CN108536571A (en) * 2018-04-13 2018-09-14 平安普惠企业管理有限公司 Performance test methods, device, equipment and computer readable storage medium
CN110502435A (en) * 2019-07-26 2019-11-26 广东睿江云计算股份有限公司 Automated performance testing method and its system based on Jmeter
CN111124370A (en) * 2019-12-24 2020-05-08 深圳我家云网络科技有限公司 Data processing method and related equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
雷建胜等: "一种分布式可持续集成自动化测试平台", 《计算机与现代化》 *

Similar Documents

Publication Publication Date Title
KR102541295B1 (en) Operating system customization in an on-demand networked code execution system
US9356966B2 (en) System and method to provide management of test data at various lifecycle stages
CN112910945A (en) Request link tracking method and service request processing method
CN110309109B (en) Data monitoring method, device, computer equipment and storage medium
CN109597618B (en) Program development method, program development device, computer device, and storage medium
CN111240976A (en) Software testing method and device, computer equipment and storage medium
CN110750443A (en) Webpage testing method and device, computer equipment and storage medium
CN111177113A (en) Data migration method and device, computer equipment and storage medium
CN112380130A (en) Application testing method and device based on call dependency relationship
CN114661580A (en) Flow recording playback method and device, computer equipment and storage medium
CN113835921A (en) Method, device, equipment and storage medium for processing interface service exception
CN113986733A (en) Jar package based performance test method, device, equipment and storage medium
CN112306533A (en) Front-end framework automatic conversion method and device, computer equipment and storage medium
CN112181423A (en) Project construction method and device based on configuration file, computer equipment and medium
CN111813758A (en) Distributed analysis method and device for database files, server and storage medium
CN111488323A (en) Data processing method and device and electronic equipment
Goel et al. Jawa: Web Archival in the Era of {JavaScript}
CN111309341B (en) Android application installation flow optimization method based on time-consuming prediction
CN113282473A (en) Server performance testing method and device, computer equipment and storage medium
CN111611479A (en) Data processing method and related device for network resource recommendation
US8676943B1 (en) Document based fleet management
CN115686904A (en) Webpage diagnosis method, equipment and system
CN114371884A (en) Method, device, equipment and storage medium for processing Flink calculation task
CN113342806A (en) Big data processing method and device, storage medium and processor
US20210357366A1 (en) File system metadata

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210820