CN118012753A - Test method, test equipment and test system - Google Patents

Test method, test equipment and test system Download PDF

Info

Publication number
CN118012753A
CN118012753A CN202410112150.5A CN202410112150A CN118012753A CN 118012753 A CN118012753 A CN 118012753A CN 202410112150 A CN202410112150 A CN 202410112150A CN 118012753 A CN118012753 A CN 118012753A
Authority
CN
China
Prior art keywords
test
target
processes
target test
software
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
CN202410112150.5A
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.)
XFusion Digital Technologies Co Ltd
Original Assignee
XFusion Digital Technologies 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 XFusion Digital Technologies Co Ltd filed Critical XFusion Digital Technologies Co Ltd
Priority to CN202410112150.5A priority Critical patent/CN118012753A/en
Publication of CN118012753A publication Critical patent/CN118012753A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a testing method, testing equipment and a testing system, wherein the method comprises the following steps: determining target test software running on the computing device; determining a target test tool from a plurality of test tools according to the target test software; and testing the target test software through the target test tool. The method can improve the accuracy of the test.

Description

Test method, test equipment and test system
Technical Field
The present application relates to the field of server technologies, and in particular, to a testing method, a testing device, and a testing system.
Background
The test tool may be used to simulate the load of a test object. For example, the test tool may be a pressure test tool (JMeter), an instruction set program (Apache Bench), or the like, and the test object may be an operating system, application software, or the like. When the test equipment runs the test tool, the test object can be tested. For example, the test device may be a server.
Currently, a tester may empirically select a corresponding test tool for a test object to simulate the load of the test object through the selected test tool. However, the tester's knowledge of the test object may be limited, and the test tool selected by the tester may not accurately simulate the load of the test object, resulting in lower accuracy of the test.
Disclosure of Invention
The embodiment of the application provides a testing method, testing equipment and a testing system, which are used for solving the technical problem of low testing accuracy.
In a first aspect, an embodiment of the present application provides a testing method, including:
determining target test software running on the computing device; the target test software is the software to be subjected to pressure test;
Determining a target test tool from a plurality of test tools according to the target test software; the target test tool is used for performing pressure test on the target test software;
and testing the target test software through the target test tool.
According to the scheme, the test equipment can automatically determine the target test tool according to the target test software, a tester is not required to determine the target test tool, and the selection error of the test tool caused by insufficient experience of the tester is avoided. Through the scheme, the selection accuracy of the testing tool can be improved, and the testing accuracy can be improved.
In one possible implementation, determining target test software running on a computing device includes:
Acquiring resource occupation amounts of a plurality of processes running on the computing device;
and determining target test software according to the resource occupation quantity of the processes.
In the scheme, the target test software can be determined according to the resource occupation amount of a plurality of processes running on the computing equipment, so that the aim of automatically determining the target test software is fulfilled.
In one possible implementation, determining the target test software according to the resource occupation amounts of the plurality of processes includes:
determining a plurality of target processes in the plurality of processes according to the resource occupation amounts of the plurality of processes, wherein the resource occupation amounts of the plurality of target processes are larger than or equal to a preset threshold value;
And determining target test software according to the plurality of target processes.
In the scheme, the target test software can be determined according to the target process with larger resource occupation amount, and the aim of automatically determining the target test software is fulfilled.
In one possible implementation, determining target test software according to a plurality of target processes includes:
Determining at least one process set in a plurality of target processes, wherein the target process in each process set is a process initiated by the same test object;
And determining target test software according to at least one process set and the corresponding relation between the process set and the test object.
In the scheme, the process set can be determined according to the target process, and the target test software can be determined according to the process set, so that the aim of automatically determining the target test software is fulfilled.
In one possible implementation, obtaining resource footprints for a plurality of processes running on a computing device comprises:
Resource occupancy amounts of a plurality of processes transmitted by a computing device are received.
In the scheme, the resource occupation quantity of the plurality of processes can be obtained from the computing equipment, and the purpose of obtaining the resource occupation quantity of the plurality of processes is achieved.
In one possible implementation, testing, by a target test tool, target test software includes:
determining an operating parameter of a target test tool;
Acquiring a first parameter value corresponding to an operation parameter in the computing equipment, and generating an operation configuration file of a target test tool according to the first parameter value;
and operating the target test tool according to the operation configuration file so as to test the target test software.
In the above scheme, the first parameter value may be determined according to the operation parameter of the target test tool, the operation configuration file may be generated according to the first parameter value, and the target test tool may be operated according to the operation configuration file, so as to test the target test software.
In a possible implementation manner, obtaining a first parameter value corresponding to an operation parameter in a computing device, and generating an operation configuration file of a target test tool according to the first parameter value, where the method includes:
in a current operation period, acquiring a first parameter value of the computing device in a last operation period;
If the existing running configuration file does not exist, generating the running configuration file according to the first parameter value;
if the existing operation configuration file exists, the existing operation configuration file is updated according to the first parameter value, and the operation configuration file is obtained.
In the above scheme, the operation configuration file may be dynamically updated according to the first parameter value. If the first parameter value changes, the test equipment can timely adjust the operation parameters of the target test tool in the operation configuration file, so that the target test tool can simulate the load of the target test software more accurately, the simulation accuracy of the target test tool is improved, and the test accuracy is further improved.
In a possible implementation manner, the method further includes:
Acquiring installation packages corresponding to a plurality of test tools, wherein the number of the installation packages is smaller than that of the test tools;
According to the installation package, a plurality of test tools are installed in the test equipment.
In the scheme, the test equipment can install more test tools through fewer installation times, so that the installation efficiency of the test tools is higher.
In a second aspect, an embodiment of the present application provides a testing apparatus, including a determining module and a testing module, where,
The determining module is used for determining target test software running on the computing device;
The determining module is further used for determining a target test tool from the plurality of test tools according to the target test software;
the test module is used for testing the target test software through the target test tool.
In the scheme, the determining module can automatically determine the target testing tool according to the target testing software, a tester is not required to determine the target testing tool, and the error in selecting the testing tool caused by insufficient experience of the tester is avoided. Through the scheme, the selection accuracy of the testing tool can be improved, and the testing accuracy can be improved.
In one possible implementation, the determining module is specifically configured to,
Acquiring resource occupation amounts of a plurality of processes running on the computing device;
and determining target test software according to the resource occupation quantity of the processes.
In the scheme, the determining module can determine the target test software according to the resource occupation quantity of a plurality of processes running on the computing equipment, so that the aim of automatically determining the target test software is fulfilled.
In one possible implementation, the determining module is specifically configured to,
Determining a plurality of target processes in the plurality of processes according to the resource occupation amounts of the plurality of processes, wherein the resource occupation amounts of the plurality of target processes are larger than or equal to a preset threshold value;
And determining target test software according to the plurality of target processes.
In the scheme, the determining module can determine the target test software according to the target process with larger resource occupation, so that the aim of automatically determining the target test software is fulfilled.
In one possible implementation, the determining module is specifically configured to,
Determining at least one process set in a plurality of target processes, wherein the target process in each process set is a process initiated by the same test object;
And determining target test software according to at least one process set and the corresponding relation between the process set and the test object.
In the scheme, the determining module can determine the process set according to the target process and determine the target test software according to the process set, so that the aim of automatically determining the target test software is fulfilled.
In one possible implementation, the determining module is specifically configured to,
Resource occupancy amounts of a plurality of processes transmitted by a computing device are received.
In the scheme, the determining module can acquire the resource occupation quantity of the plurality of processes from the computing equipment, so that the purpose of acquiring the resource occupation quantity of the plurality of processes is realized.
In one possible implementation, the test module is specifically configured to,
Determining an operating parameter of a target test tool;
Acquiring a first parameter value corresponding to an operation parameter in the computing equipment, and generating an operation configuration file of a target test tool according to the first parameter value;
and operating the target test tool according to the operation configuration file so as to test the target test software.
In the above scheme, the test module may determine a first parameter value according to an operation parameter of the target test tool, may generate an operation configuration file according to the first parameter value, and may operate the target test tool according to the operation configuration file to test the target test software.
In one possible implementation, the test module is specifically configured to,
In a current operation period, acquiring a first parameter value of the computing device in a last operation period;
If the existing running configuration file does not exist, generating the running configuration file according to the first parameter value;
if the existing operation configuration file exists, the existing operation configuration file is updated according to the first parameter value, and the operation configuration file is obtained.
In the above scheme, the test module may dynamically update the operation configuration file according to the first parameter value. If the first parameter value changes, the test equipment can timely adjust the operation parameters of the target test tool in the operation configuration file, so that the target test tool can simulate the load of the target test software more accurately, the simulation accuracy of the target test tool is improved, and the test accuracy is further improved.
In one possible implementation, the apparatus further comprises a mounting module for,
Acquiring installation packages corresponding to a plurality of test tools, wherein the number of the installation packages is smaller than that of the test tools;
According to the installation package, a plurality of test tools are installed in the test equipment.
In the scheme, the test equipment can install more test tools through fewer installation times, so that the installation efficiency of the test tools is higher.
In a third aspect, an embodiment of the present application provides a test apparatus, including a memory and a processor;
the memory is coupled to the processor;
the memory is used for storing program instructions;
The processor is configured to invoke program instructions to perform the test method steps of any of the first aspects of the claims.
According to the scheme, the test equipment can automatically determine the target test tool according to the target test software, a tester is not required to determine the target test tool, and the selection error of the test tool caused by insufficient experience of the tester is avoided. Through the scheme, the selection accuracy of the testing tool can be improved, and the testing accuracy can be improved.
In a fourth aspect, embodiments of the present application provide a test system comprising a computing device and a test device as in the third aspect, wherein the computing device is communicatively coupled to the test device; the test device is used for carrying out load simulation on the computing device.
According to the scheme, the test equipment can automatically determine the target test tool according to the target test software running in the computing equipment, a tester is not required to determine the target test tool, and the selection error of the test tool caused by insufficient experience of the tester is avoided. Through the scheme, the selection accuracy of the testing tool can be improved, and the testing accuracy can be improved.
According to the test method, the test equipment and the test system provided by the embodiment of the application, the test equipment can determine the target test software running on the computing equipment; determining a target test tool from a plurality of test tools according to target test software; and the target test software can be tested by the target test tool. In the method, the test equipment can automatically determine the target test tool without determining the target test tool by a tester, so that the selection error of the test tool caused by the insufficient experience of the tester is avoided. By the method, the selection accuracy of the test tool can be improved, and the test accuracy can be improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a test system according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a testing method according to an embodiment of the present application;
FIG. 4 is a flow chart of another testing method according to an embodiment of the present application;
FIG. 5 is a flow chart of another testing method according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a testing device according to an embodiment of the present application;
FIG. 7 is a schematic diagram of another test apparatus according to an embodiment of the present application;
Fig. 8 is a schematic hardware structure of a test apparatus according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with embodiments of the application. Rather, they are merely examples of apparatus and methods consistent with aspects of embodiments of the application as detailed in the accompanying claims.
For ease of understanding, technical terms related to the embodiments of the present application will be explained first.
Pressure load: refers to the degree of workload experienced by the system, i.e., the demand and use of system resources. The pressure load includes utilization of a central processing unit (central processing unit, CPU), occupancy of memory, disk and network activities, and the like. The pressure load can reflect the load condition of the system. Knowledge of the pressure load may help system administrators monitor and optimize system performance.
World wide Web (Web) applications: services may be provided via the hypertext transfer protocol (hypertext transfer protocol, HTTP) protocol, or the security-targeted HTTP channel (hypertext transfer protocol over secure socket layer, HTTPs) protocol. Web applications are mainly used for websites, e-commerce platforms, blogs, etc. Web applications typically have user interface, database access, request handling, and response functions.
Database application: the method is mainly used for data storage and management. The database applications may be, for example, relational databases, non-relational databases (not only structured query language, noSQL), and data warehouses. For example, the relational database may be a relational database management system (e.g., mySQL) or a free object-relational database server (e.g., postgreSQL), etc.; the non-relational database may be a distributed document storage database (e.g., mongoDB) or a remote dictionary service (remote dictionary server, redis). The database application program can provide the operations of adding, deleting and modifying data, and support the functions of transaction processing and the like.
Enterprise application: refers to an application that serves the internal operating and management needs of an enterprise. For example, the enterprise application may be an enterprise resource planning (ENTERPRISE RESOURCE PLANNING, ERP) system, a customer relationship management (customer relationship management, CRM) system, or a supply chain management system, among others. Enterprise applications typically involve cross-department collaboration, business process management, data sharing, and rights control functions.
Scientific computing and simulation applications: refers to an application program used in the fields of scientific research, engineering simulation, data analysis and the like. For example, the scientific computing and simulation application may be a weather prediction model, or a molecular dynamics simulation. Scientific computing and simulation applications typically require a large amount of computing resources and memory and run complex computing algorithms.
Big data application: refers to an application for processing large amounts of structured and unstructured data. Such as data analysis, batch processing, real-time streaming data processing, etc. Big data applications are typically based on a distributed computing framework (e.g., hadoop or spark, etc.) or a stream processing platform (e.g., kafka or flink).
In order to facilitate understanding, an application scenario according to an embodiment of the present application is described below with reference to fig. 1.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application. Referring to fig. 1, a test tool may be installed in the test apparatus. For example, the test device may be a computer, a server, or the like, and the test tool may be JMeter, an Apache Bench, a Load tester (Load Runner), or an open source tester (stress-ng), or the like.
It should be noted that the number of test tools in the test apparatus may be one or more. Fig. 1 only illustrates an example of the number of test tools in the test apparatus, and does not limit the technical solution provided by the embodiment of the present application. Wherein the plurality is two or more than two.
The test device can test the test object through a test tool. For example, the test object may be an operating system, or application software, or the like.
In particular, the test tool may be used to simulate the load of a test object. The test device may set an initial load amount of the test tool and may run the test tool after the initial load amount is set to test performance, reliability, stability, or the like of the test object.
It should be appreciated that the load types simulated by different test tools may be different. Any test tool may have an unmovable load.
By way of example, stress-ng may be used to simulate various types of loads such as CPU, memory, disk, and network, but stress-ng cannot simulate the load of Web applications, and the load of databases, etc. LoadRunner can be used to simulate the load of a database, the load of a Web application, the load of a system application and product (system applications and products, SPA), etc., but LoadRunner cannot simulate the load of a CPU, memory, disk, network card, etc. JMeter can be used to simulate the load of Web applications, database, etc., but JMeter cannot simulate the load of a large number of user concurrencies, etc.
Currently, a tester can select a corresponding test tool for a test object according to experience, and can run the test tool through test equipment to test the test object. However, the tester's knowledge of the test object may be limited, and the test tool selected by the tester may not accurately simulate the load of the test object, resulting in lower accuracy of the test.
In view of the above, the embodiment of the application provides a testing method to solve the technical problem of lower testing accuracy.
In the test method provided by the embodiment of the application, a plurality of test tools can be installed on the test equipment. The test apparatus may select a test tool for testing the test object among a plurality of test tools according to the test object. In the method, the test equipment can automatically select the test tool without selecting the test tool by a tester, so that the error in selecting the test tool caused by insufficient experience of the tester is avoided, the selection accuracy of the test tool is improved, and the test accuracy is further improved.
In addition, in the testing method provided by the embodiment of the application, the testing equipment can automatically select the testing tool without manually selecting the testing tool, so that the selecting efficiency of the testing tool is higher, and the testing efficiency is further improved.
The technical scheme of the embodiment of the application is described in detail below by using specific embodiments. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
For ease of understanding, a test system according to an embodiment of the present application will be described with reference to fig. 2.
Fig. 2 is a schematic structural diagram of a test system according to an embodiment of the present application. Referring to fig. 2, a test system may include a computing device and a test device. The computing device may be communicatively connected to the test device. The test device may be used to perform load simulation on the computing device.
The computing device may be an electronic device in a production environment, on which the target test software may be run.
The target test software may be a test software object to be tested. For example, the target test software may be an operating system to be tested, or application software to be tested, or the like.
The test equipment may be an electronic device in a test environment, and a plurality of test tools may be mounted on the test equipment. For example, the plurality of test tools may be test tool 1, test tools 2, … …, and test tool n, which may be integers greater than or equal to 2.
The computing device and the test device may each be a computing, a server, or a server cluster, etc.
In one example, the computing device may be a server, and the test device may be a server.
In this example, the test device may be used to simulate the load of the target test software on the computing device by the test tool to stress test the target test software. When the target test software is tested, the load of the test equipment is consistent with the load of the computing equipment.
In this example, the target test software can be tested through one server, so that the test cost is low.
In another example, the computing device may be a server cluster and the test device may be a server cluster. For ease of description, the server cluster corresponding to the computing device is hereinafter referred to as server cluster 1, and the server cluster corresponding to the test device is referred to as server cluster 2.
In this example, server cluster 2 may be used to simulate the load of target test software on server cluster 1 by a test tool in server cluster 2 to test the target test software. When the target test software is tested, the total load of the server cluster 2 is ensured to be consistent with the total load of the server cluster 1, and the load of any one server in the server cluster 2 is not required to be ensured to be consistent with the load of the corresponding server in the server cluster 1, so that the test flexibility is higher.
For example, assume that server cluster 2 includes server 21, server 22, and server 23, and that server cluster 1 includes server 11, server 12, and server 13. When the target test software is tested, the total load of the server 21, the server 22 and the server 23 can be ensured to be consistent with the total load of the server 11, the server 12 and the server 13, and the load of any one of the servers in the server cluster 2 and the load of the corresponding server in the server cluster 1 are not required to be ensured to be consistent.
Next, a test method provided by an embodiment of the present application will be described with reference to fig. 3.
Fig. 3 is a flow chart of a testing method according to an embodiment of the present application. The subject of execution of the method may be a test apparatus, in particular, the steps of the method may be performed by a processor in the test apparatus. Referring to fig. 3, the method may include:
s301, determining target test software running on the computing device.
The target test software may be a test object to be tested. For example, the target test software may be an operating system to be tested, or application software to be tested, or the like.
The computing device may be an electronic device in a production environment for running target test software. For example, the computing device may be the computing device in the test system shown in FIG. 2.
In one implementation, a test device may obtain resource occupancy of a plurality of processes running on a computing device; and determining target test software according to the resource occupation quantity of the processes.
The resource occupation amount may be a CPU occupation amount, a memory occupation amount, or the like.
The process may be a system process of the computing device, or a process initiated by target test software running on the computing device.
It should be noted that when the object types of the test objects are different, the processes initiated by the test objects are different. That is, when the object types of the target test software running on the computing device are different, the processes running on the computing device are different. Wherein, for any one test object, the number of processes initiated by the test object may be one or more.
The object types of the test objects may be Web application types, database application types, enterprise application types, scientific computing and simulation application types, big data application types, and the like.
It should be appreciated that if the object type of the test object is a Web application type, the test object may be a Web application; if the object type of the test object is the database application type, the test object can be the database application; if the object type of the test object is the enterprise application type, the test object may be the enterprise application; if the object type of the test object is a scientific computing and simulation application type, the test object can be a scientific computing and simulation application; if the object type of the test object is a big data application type, the test object may be a big data application.
The process may be an apachi (APACHE HTTP SERVER, apache) process, a hypertext transfer protocol server main program (httpd) process, or a hypertext transfer protocol and reverse proxy Web server (nginx) process, etc.
By way of example, assuming the target test software running on the computing device is a Web application, the processes running on the computing device may include an apache process, an httpd process, an nginx process, and the like.
It should be noted that, the system process of the computing device has a smaller resource occupation amount, and the process initiated by the target test software has a larger resource occupation amount.
The test device may obtain the resource occupation amounts of M processes running on the computing device, determine N processes with larger resource occupation amounts according to the resource occupation amounts of the M processes, and determine the target test software according to the N processes with larger resource occupation amounts, where M is greater than or equal to N.
Specifically, a test object corresponding to a process with a large resource occupation amount can be determined as target test software.
S302, determining a target test tool from a plurality of test tools according to target test software.
In this embodiment, a plurality of test tools may be installed in the test apparatus. For example, the test tools may be JMeter, loadRunner, apache Standard, stress-ng, and the like. Different test tools may be used to simulate the loading of different test objects. For example, apache Bench may be used to simulate the load of a Web application.
In this embodiment, the computing device in the production environment may run target test software, and the test device in the test environment may have a target test tool installed thereon. The test device may simulate the load of the target test software by the target test tool and may run the target test tool to test the target test software.
In this embodiment, a mapping relationship between a test object and a test tool may be preset, and a target test tool may be determined according to the mapping relationship between the test object and the test tool and target test software.
The mapping relation between the test objects and the test tools can comprise a plurality of test objects and the test tools corresponding to each test object.
For example, the mapping relationship between the test object and the test tool may be as shown in table 1:
TABLE 1
Test object Test tool
Web application program Apache Bench
Database application program LoadRunner
…… ……
In the implementation process, target test software can be searched in the mapping relation between the test object and the test tool, and the test tool corresponding to the target object can be determined as the target test tool. For example, if the target test software is a Web application, and the mapping relationship between the test object and the test tool is shown in table 1, the test device may determine that the target test tool is an Apache standard.
Optionally, in this embodiment, the test device may further obtain installation packages corresponding to a plurality of test tools, where the number of installation packages is smaller than the number of test tools; according to the installation package, a plurality of test tools are installed in the test equipment.
Specifically, in this embodiment, the plurality of test tools may be integrated, so that the number of installation packages corresponding to the plurality of test tools is smaller than the number of test tools. The test equipment can install more test tools through fewer installation times, so that the installation efficiency of the test tools is higher.
Optionally, the plurality of test tools can be integrated, so that the number of the installation packages corresponding to the plurality of test tools is one, and the test equipment can install the plurality of test tools through one installation, so that the installation efficiency of the test tools is higher.
S303, testing the target test software through the target test tool.
In this embodiment, after the test device determines the target test tool, the target test tool may be operated to test the target test software.
According to the test method provided by the embodiment, the test equipment can determine target test software running on the computing equipment; determining a target test tool from a plurality of test tools according to target test software; and the target test software can be tested by the target test tool. In the method, the test equipment can automatically determine the target test tool without determining the target test tool by a tester, so that the selection error of the test tool caused by the insufficient experience of the tester is avoided. By the method, the selection accuracy of the test tool can be improved, and the test accuracy can be improved.
On the basis of the above embodiment, the test device may further generate an operation configuration file of the target test tool according to the operation parameter value of the target test software in the production environment, so as to operate the target test tool according to the operation configuration file. The test method provided by the embodiment of the application is further described below with reference to fig. 4.
Fig. 4 is a flow chart of another test method according to an embodiment of the present application. The subject of execution of the method may be a test apparatus, in particular, the steps of the method may be performed by a processor in the test apparatus. Referring to fig. 4, the method may include:
s401, acquiring the resource occupation quantity of a plurality of processes running on the computing device.
In this embodiment, the test device and the computing device may be communicatively coupled. The test device may receive resource occupancy amounts for a plurality of processes sent by the computing device.
Specifically, the computing device may collect resource occupancy amounts of a plurality of processes running on the computing device, and may send the resource occupancy amounts of the plurality of processes to the testing device, so that the testing device may obtain the resource occupancy amounts of the plurality of processes running on the computing device.
S402, determining a plurality of target processes in the plurality of processes according to the resource occupation amounts of the plurality of processes.
The resource occupation amount of the plurality of target processes is larger than or equal to a preset threshold value.
The preset threshold may be set according to actual needs, which is not limited in this embodiment.
In this embodiment, after the test device obtains the resource occupation amounts of the plurality of processes running on the computing device, the process with the resource occupation amount greater than or equal to the preset threshold may be determined as the target process.
S403, determining target test software according to the target processes.
In this embodiment, the test device may determine at least one process set in a plurality of target processes, where the target process in each process set is a process initiated by the same test object; and determining target test software according to at least one process set and the corresponding relation between the process set and the test object.
The corresponding relation between the process set and the test objects can comprise a plurality of test objects and a process set corresponding to each test object.
For example, the correspondence between the process set and the test object may be as shown in table 2:
TABLE 2
Test object Process set
Test object 1 Process set 1
Test object 2 Process set 2
…… ……
Test object m Process set m
As shown in table 2, the process set corresponding to the test object 1 may be the process set 1, the process set corresponding to the test object 2 may be the process set 2, and the process set corresponding to the … … test object m may be the process set m.
Specifically, a plurality of target processes may be grouped to divide the target processes initiated by the same target test software into the same process set; the process set obtained by grouping processing can be searched in the corresponding relation between the process set and the test object; and the test objects corresponding to the process sets obtained by grouping processing in the corresponding relation between the process sets and the test objects can be determined as target test software.
For example, assuming that the correspondence between the process set and the test object is shown in table 2, and assuming that the test device performs grouping processing on multiple target processes to obtain the process set 1, the test device may determine that the target test software is the test object 1.
It should be noted that, if a plurality of target processes are grouped to obtain a plurality of process sets, one target test software may be determined according to each process set to obtain a plurality of target test software. Wherein the plurality may be two or more.
S404, determining a target test tool from a plurality of test tools in the test equipment according to the target test software.
It should be noted that, the specific implementation of S404 may refer to S302, which is not described herein.
S405, determining the operation parameters of the target test tool.
It should be noted that the operating parameters of different test tools are different. For example, the operation parameter of the test tool 1 may be the number of service requests, and the operation parameter of the test tool 2 may be the number of network requests and the number of concurrent requests.
In this embodiment, the correspondence between the test tool and the operation parameter may be preset. In the implementation process, the target test tool can be searched in the corresponding relation between the test tool and the operation parameter, and the operation parameter corresponding to the target test tool in the corresponding relation between the test tool and the operation parameter can be determined as the operation parameter of the target test tool.
S406, acquiring a first parameter value corresponding to the operation parameter from the computing equipment, and generating an operation configuration file of the target test tool according to the first parameter value.
The first parameter value may be a parameter value corresponding to an operation parameter of the target test software in the computing device. For example, if the operating parameter is the number of service requests, the first parameter value may be a specific value of the number of service requests in the computing device.
The operation configuration file may include an operation parameter of the target test tool and a parameter value corresponding to the operation parameter.
In this embodiment, the test device may periodically obtain a first parameter value corresponding to the operation parameter, and may generate or update the operation configuration file according to the first parameter value.
In particular, the test device may obtain, during a current run period, a first parameter value of the computing device during a last run period; if the existing running configuration file does not exist, generating the running configuration file according to the first parameter value; if the existing operation configuration file exists, the existing operation configuration file is updated according to the first parameter value, and the operation configuration file is obtained. It should be appreciated that the number of operating parameters may be one or more, which is not limited in this embodiment. If the number of the operation parameters is a plurality of, the testing device can acquire a first parameter value corresponding to each operation parameter in the last operation period of the computing device in the current operation period.
In this embodiment, the existing operation configuration file may exist in the test apparatus, or the existing operation configuration file may not exist in the test apparatus. According to the above different situations, generating the operation configuration file of the target test tool according to the first parameter value may include the following two situations:
Case 1, test equipment does not have an existing running configuration file.
The existing operational profile may be an operational profile that has been generated.
In this case, the currently acquired first parameter value may be an initial parameter value, and the test device may generate an operation profile of the target test tool according to the first parameter value.
Specifically, the test device may generate an operation configuration file, and may set a parameter value corresponding to the operation parameter in the operation configuration file to be the same as the first parameter value.
And 2, the existing operation configuration file exists in the test equipment.
In this case, the first parameter value currently acquired is a non-initial parameter value, and the test device may update the existing operation configuration file according to the first parameter value to obtain the operation configuration file.
In particular, the test device may compare the first parameter value with a parameter value corresponding to an operating parameter in an existing operating profile.
If the first parameter value is the same as the parameter value corresponding to the operation parameter in the existing operation configuration file, the test device may not modify the parameter value corresponding to the operation parameter in the existing operation configuration file. The operational profile may be the same as an existing operational profile.
If the first parameter value is different from the parameter value corresponding to the operation parameter in the existing operation configuration file, the test equipment can update the parameter value corresponding to the operation parameter in the existing operation configuration file to the first parameter value to obtain the operation configuration file.
In the implementation process, if the first parameter value is smaller than the parameter value corresponding to the operation parameter in the existing operation configuration file, the test device may reduce the parameter value corresponding to the operation parameter in the operation configuration file, so that the parameter value corresponding to the operation parameter in the operation configuration file is equal to the first parameter value. If the first parameter value is greater than the parameter value corresponding to the operation parameter in the existing operation configuration file, the test device may increase the parameter value corresponding to the operation parameter in the operation configuration file, so that the parameter value corresponding to the operation parameter in the operation configuration file is equal to the first parameter value; or the test equipment can add a new process through the target test tool so as to increase the parameter value corresponding to the operation parameter in the operation configuration file, so that the parameter value corresponding to the operation parameter in the operation configuration file is equal to the first parameter value.
In this embodiment, the test device may dynamically update the operation configuration file of the target test tool. If the first parameter value of the target test software changes, the test equipment can timely adjust the operation parameters of the target test tool, so that the target test tool can simulate the load of the target test software more accurately, the simulation accuracy of the target test tool is improved, and the test accuracy is further improved.
S407, operating the target test tool according to the operation configuration file so as to test the target test software.
In this embodiment, the test device may operate the target test tool according to the operation configuration file according to the test duration, so as to test the target test software.
The test duration can be set according to actual needs, and the embodiment does not limit the test duration.
In the test method provided by the embodiment, the test equipment can acquire the resource occupation amount of a plurality of processes running on the computing equipment; a plurality of target processes can be determined in the plurality of processes according to the resource occupation amount of the plurality of processes; the target test software can be determined according to a plurality of target processes; determining a target test tool from a plurality of test tools in the test equipment according to the target test software; determining an operating parameter of the target test tool; the method comprises the steps that a first parameter value corresponding to an operation parameter can be obtained from computing equipment, and an operation configuration file of a target test tool is generated according to the first parameter value; the target test tool may be run according to the run configuration file to test the target test software. According to the method, the test equipment can automatically determine the target test tool according to the resource occupation amount of the processes, a tester is not required to determine the target test tool, the selection error of the test tool caused by the insufficient experience of the tester is avoided, the selection accuracy of the test tool is improved, and the test accuracy is improved. In addition, in the method, the test equipment can dynamically update the operation configuration file of the target test tool and timely adjust the operation parameters of the target test tool, so that the target test tool can simulate the load of target test software more accurately, the simulation accuracy of the target test tool is improved, and the test accuracy is further improved.
The embodiment of the application also provides a test system, which can comprise a computing device and a test device, wherein,
The computing device may be configured to collect resource occupancy amounts of a plurality of processes running on the computing device and send the resource occupancy amounts of the plurality of processes to the testing device;
The test device may be configured to perform the test method provided by any of the method embodiments described above to test the target test software.
The test system provided in this embodiment may be used to execute the test method shown in the foregoing method embodiment, and its implementation principle and technical effects are similar, and will not be described herein.
Next, a method of testing the above-described test system will be described with reference to fig. 5.
Fig. 5 is a flow chart of another test method according to an embodiment of the present application. Referring to fig. 5, the method may include:
S501, the computing device collects the resource occupation amount of a plurality of processes running on the computing device.
In this embodiment, an acquisition module may be disposed on the computing device, where the acquisition module may be configured to acquire resource occupation amounts of a plurality of processes.
The acquisition module may be a system activity report (SYSTEM ACTIVITY report, SAR) tool, a virtual memory statistics (virtual meomory statistics, vmstat) tool, a resource monitoring (top) tool, or a third party performance monitoring tool, among others.
Optionally, after the collection module collects the resource occupation amounts of the plurality of processes, the collection module may store the resource occupation amounts of the plurality of processes. For example, the collection module may store the resource occupancy of the plurality of processes in a preset file, or in a preset database.
S502, the computing device sends the resource occupation amount of a plurality of processes to the testing device.
In this embodiment, a sending module may also be disposed on the computing device. The computing device may send the resource occupancy of the plurality of processes to the test device via the sending module.
S503, the test equipment determines a plurality of target processes in the processes according to the resource occupation amounts of the processes.
S504, the testing equipment determines target testing software according to a plurality of target processes.
S505, the testing equipment determines a target testing tool from a plurality of testing tools according to the target testing software.
S506, the test equipment determines the operation parameters of the target test tool.
It should be noted that, the specific implementation manner of S503-S506 may refer to S402-S405, which is not described herein.
S507, the test equipment sends the operation parameters to the computing equipment.
In this embodiment, after the test device determines the operation parameters of the target test tool, the operation parameters may be sent to the computing device, so that the computing device may collect data according to the operation parameters.
S508, the computing device collects a first parameter value corresponding to the operation parameter in the computing device.
In this embodiment, the computing device may further collect, by using the collecting module, a first parameter value corresponding to the operation parameter. Specifically, the computing device may periodically acquire the first parameter value according to a preset period.
The preset period may be a collection period preset by a user. Alternatively, the computing device may include a command line interface, and the user-set acquisition period may be obtained through the command line interface.
S509, the computing device sends the first parameter value to the testing device.
S510, the test equipment generates an operation configuration file of the target test tool according to the first parameter value.
S511, the test equipment runs the target test tool according to the running configuration file so as to test the target test software.
It should be noted that, the specific implementation manner of S510-S511 may refer to S406-S407, which are not described herein.
In the test method provided by the embodiment, the computing device may collect the resource occupation amounts of a plurality of processes running on the computing device, and may send the resource occupation amounts of the plurality of processes to the test device. The test device may determine target test software based on the resource occupancy of the plurality of processes, may determine target test tools based on the target test software, may determine operating parameters based on the target test tools, and may send the operating parameters to the computing device. The computing device may periodically collect a first parameter value corresponding to the operating parameter according to the operating parameter, and send the first parameter value to the testing device. The test equipment may generate an operation configuration file according to the first parameter value, and may operate the target test tool according to the operation configuration file to test the target test software. By the method, the test equipment can automatically determine the target test tool. And the running configuration file of the target test tool can be dynamically updated, so that the target test tool can simulate the load of target test software more accurately, the simulation accuracy of the target test tool is improved, and the test accuracy is further improved.
Fig. 6 is a schematic diagram of a testing apparatus according to an embodiment of the present application. The test apparatus 10 may include a determination module 11 and a test module 12, wherein,
The determining module 11 is used for determining target test software running on the computing device;
The determining module 11 is further configured to determine a target test tool from a plurality of test tools according to the target test software;
The test module 12 is used for testing the target test software through the target test tool.
The testing device provided in this embodiment may be used to execute the testing method shown in the foregoing method embodiment, and its implementation principle and technical effects are similar, and are not described herein.
In a possible implementation, the determining module 11 is specifically configured to,
Acquiring resource occupation amounts of a plurality of processes running on the computing device;
and determining target test software according to the resource occupation quantity of the processes.
In a possible implementation, the determining module 11 is specifically configured to,
Determining a plurality of target processes in the plurality of processes according to the resource occupation amounts of the plurality of processes, wherein the resource occupation amounts of the plurality of target processes are larger than or equal to a preset threshold value;
And determining target test software according to the plurality of target processes.
In a possible implementation, the determining module 11 is specifically configured to,
Determining at least one process set in a plurality of target processes, wherein the target process in each process set is a process initiated by the same test object;
And determining target test software according to at least one process set and the corresponding relation between the process set and the test object.
In a possible implementation, the determining module 11 is specifically configured to,
Resource occupancy amounts of a plurality of processes transmitted by a computing device are received.
In one possible implementation, the test module 12 is specifically configured to,
Determining an operating parameter of a target test tool;
Acquiring a first parameter value corresponding to an operation parameter in the computing equipment, and generating an operation configuration file of a target test tool according to the first parameter value;
and operating the target test tool according to the operation configuration file so as to test the target test software.
In one possible implementation, the test module 12 is specifically configured to,
In a current operation period, acquiring a first parameter value of the computing device in a last operation period;
If the existing running configuration file does not exist, generating the running configuration file according to the first parameter value;
if the existing operation configuration file exists, the existing operation configuration file is updated according to the first parameter value, and the operation configuration file is obtained.
Fig. 7 is a schematic diagram of another test apparatus according to an embodiment of the present application. On the basis of fig. 6, the test device 10 may comprise a mounting module 13, the mounting module 13 being adapted to,
Acquiring installation packages corresponding to a plurality of test tools, wherein the number of the installation packages is smaller than that of the test tools;
According to the installation package, a plurality of test tools are installed in the test equipment.
The testing device provided in this embodiment may be used to execute the testing method shown in the foregoing method embodiment, and its implementation principle and technical effects are similar, and are not described herein.
Fig. 8 is a schematic hardware structure of a test apparatus according to an embodiment of the present application. Referring to fig. 8, the test apparatus 20 includes a memory 21 and a processor 22;
memory 21 and processor 22 are coupled;
the memory 21 is used for storing program instructions;
The processor 22 is operative to invoke program instructions to perform the steps of the test method of any of the method embodiments described above.
Illustratively, the processor 22 and the memory 21 are in communication via the bus 23, the memory 21 being configured to store computer-executable instructions, the processor 22 being configured to invoke the computer-executable instructions in the memory 21 to perform the test method as shown in any of the method embodiments described above.
Optionally, the test device 20 may also include a communication interface, which may include a transmitter and/or a receiver.
Alternatively, the processor may be a central processing unit (central processing unit, CPU), but may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processor, DSP), application Specific Integrated Circuits (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The test device provided in this embodiment may be used to execute the test method shown in the foregoing method embodiment, and its implementation principle and technical effects are similar, and are not described herein.
The embodiment of the application also provides a computer readable storage medium, in which computer executable instructions are stored, which can be used to execute the test method shown in the above method embodiment when the computer executable instructions are executed by the processing chip, and its implementation principle and technical effects are similar, and are not repeated here.
All or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a readable memory. The program, when executed, performs steps including the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (abbreviated as ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape (English: MAGNETIC TAPE), floppy disk (English: floppy disk), optical disk (English: optical disk), and any combination thereof.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable terminal device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable terminal device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable terminal device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer implemented process such that the instructions which execute on the computer or other programmable device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the embodiments of the present application without departing from the spirit or scope of the embodiments of the application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims and the equivalents thereof, the embodiments of the present application are intended to include such modifications and variations.
In embodiments of the present application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. The term "or" and variations thereof may refer to "and/or". The terms "first," "second," and the like in embodiments of the present application are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. In the embodiments of the present application, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. The embodiments of the present application are intended to cover any variations, uses, or adaptations of the embodiments of the present application following, in general, the principles of the embodiments of the present application and including such departures from the present disclosure as come within known or customary practice in the art to which the embodiments of the application pertains.

Claims (10)

1. A method of testing, comprising:
determining target test software running on the computing device; the target test software is software to be subjected to pressure test;
determining a target test tool from a plurality of test tools according to the target test software; the target test tool is a test tool for performing pressure test on the target test software;
and testing the target test software through the target test tool.
2. The method of claim 1, wherein determining the target test software running on the computing device comprises:
acquiring the resource occupation amount of a plurality of processes running on the computing equipment;
And determining the target test software according to the resource occupation quantity of the processes.
3. The method of claim 2, wherein determining the target test software based on the resource occupancy of the plurality of processes comprises:
determining a plurality of target processes in the plurality of processes according to the resource occupation amounts of the plurality of processes, wherein the resource occupation amounts of the plurality of target processes are larger than or equal to a preset threshold value;
and determining the target test software according to the target processes.
4. A method according to claim 3, wherein determining the target test software from the plurality of target processes comprises:
Determining at least one process set in the multiple target processes, wherein the target process in each process set is a process initiated by the same test object;
And determining the target test software according to the at least one process set and the corresponding relation between the process set and the test object.
5. The method of any of claims 2-4, wherein obtaining resource footprints of a plurality of processes running on the computing device comprises:
And receiving the resource occupation amounts of the processes sent by the computing equipment.
6. The method of any one of claims 1-5, wherein testing the target test software by the target test tool comprises:
Determining an operating parameter of the target test tool;
acquiring a first parameter value corresponding to the operation parameter in the computing equipment, and generating an operation configuration file of the target test tool according to the first parameter value;
and operating the target test tool according to the operation configuration file so as to test the target test software.
7. The method of claim 6, wherein obtaining a first parameter value corresponding to the operating parameter in the computing device and generating the operating profile of the target test tool according to the first parameter value comprises:
In a current operation period, acquiring the first parameter value of the computing device in a last operation period;
If the existing running configuration file does not exist, generating the running configuration file according to the first parameter value;
And if the existing operation configuration file exists, updating the existing operation configuration file according to the first parameter value to obtain the operation configuration file.
8. The method according to any one of claims 1-7, further comprising:
acquiring installation packages corresponding to the plurality of test tools, wherein the number of the installation packages is smaller than that of the test tools;
And installing the plurality of test tools in the test equipment according to the installation package.
9. A test apparatus comprising a memory and a processor;
the memory is coupled to the processor;
The memory is used for storing program instructions;
the processor is configured to invoke the program instructions to perform the test method steps of any of claims 1-8.
10. A test system comprising a computing device and the test device of claim 9, wherein the computing device is communicatively coupled to the test device; the test device is used for carrying out load simulation on the computing device.
CN202410112150.5A 2024-01-25 2024-01-25 Test method, test equipment and test system Pending CN118012753A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410112150.5A CN118012753A (en) 2024-01-25 2024-01-25 Test method, test equipment and test system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410112150.5A CN118012753A (en) 2024-01-25 2024-01-25 Test method, test equipment and test system

Publications (1)

Publication Number Publication Date
CN118012753A true CN118012753A (en) 2024-05-10

Family

ID=90942311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410112150.5A Pending CN118012753A (en) 2024-01-25 2024-01-25 Test method, test equipment and test system

Country Status (1)

Country Link
CN (1) CN118012753A (en)

Similar Documents

Publication Publication Date Title
CN108874640B (en) Cluster performance evaluation method and device
US10877801B2 (en) Systems and methods for scheduling tasks
US10116534B2 (en) Systems and methods for WebSphere MQ performance metrics analysis
CN111966289B (en) Partition optimization method and system based on Kafka cluster
CN110147470B (en) Cross-machine-room data comparison system and method
CN111752706B (en) Resource allocation method, device and storage medium
CA3167981C (en) Offloading statistics collection
CN113037594A (en) Pressure testing method and device based on cloud service
CN112751726A (en) Data processing method and device, electronic equipment and storage medium
Gupta et al. Long range dependence in cloud servers: a statistical analysis based on google workload trace
US10659289B2 (en) System and method for event processing order guarantee
CN105260245A (en) Resource scheduling method and device
CN112534399A (en) Semantic-based Internet of things equipment data processing related application program installation method and device
CN106547860B (en) Method for positioning performance fault of distributed database
CN118012753A (en) Test method, test equipment and test system
CN112860763B (en) Real-time streaming data processing method and device, computer equipment and storage medium
CN112000657A (en) Data management method, device, server and storage medium
CN114385498A (en) Performance test method, system, computer equipment and readable storage medium
CN114816955A (en) Database performance prediction method and device
CN113778844A (en) Automatic performance testing method and device
CN113742243B (en) Application evaluation method, device, electronic equipment and computer readable medium
CN110633182A (en) System, method and apparatus for monitoring server stability
CN117579626B (en) Optimization method and system based on distributed realization of edge calculation
CN111352795A (en) Method and device for monitoring mobile service
CN115486028B (en) Health checking 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