CN112115005B - Test data acquisition method and device, computer equipment and storage medium - Google Patents

Test data acquisition method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112115005B
CN112115005B CN202010800473.5A CN202010800473A CN112115005B CN 112115005 B CN112115005 B CN 112115005B CN 202010800473 A CN202010800473 A CN 202010800473A CN 112115005 B CN112115005 B CN 112115005B
Authority
CN
China
Prior art keywords
server
file
test data
test
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010800473.5A
Other languages
Chinese (zh)
Other versions
CN112115005A (en
Inventor
刘锷
杨婧
徐梅兰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suning Cloud Computing Co Ltd
Original Assignee
Suning Cloud Computing 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 Suning Cloud Computing Co Ltd filed Critical Suning Cloud Computing Co Ltd
Priority to CN202010800473.5A priority Critical patent/CN112115005B/en
Publication of CN112115005A publication Critical patent/CN112115005A/en
Priority to CA3127343A priority patent/CA3127343A1/en
Application granted granted Critical
Publication of CN112115005B publication Critical patent/CN112115005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2289Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by configuration test
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing

Abstract

The application relates to the field of performance testing, in particular to a test data acquisition method, a test data acquisition device, computer equipment and a storage medium. The method comprises the following steps: acquiring server configuration information of a target service system to be tested, wherein the target service system comprises a plurality of servers, and the server configuration information comprises server information corresponding to each server; establishing communication connection between a local server and each server according to server information corresponding to each server, sending a test command to each server through the communication connection corresponding to each server, and collecting test data generated when each server executes the test command received by each server. The embodiment of the invention can acquire the test data of the related server in a short time, and improve the test efficiency.

Description

Test data acquisition method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of performance testing, and in particular, to a method and an apparatus for acquiring test data, a computer device, and a storage medium.
Background
Generally, when a performance test is performed, a monitoring platform is set up in a test environment, so that relevant performance index test data of a server can be monitored and collected through the monitoring platform in a test process.
However, in the interface performance test process, the test environment does not have the condition for setting up the monitoring platform, so that a tester can only record the relevant performance index test data of the server manually, but the manual test data acquisition mode takes a long time (the time can reach tens of minutes to half an hour). In addition, when the number of the databases is large, the number of the servers to be tested is large, and accordingly, the data volume of the test data to be collected is also large, which further reduces the test efficiency.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a test data acquisition method, a test data acquisition device, computer equipment and a storage medium.
The present invention provides, according to a first aspect, a method of test data acquisition, which, in one embodiment, comprises:
acquiring server configuration information of a target service system to be tested, wherein the target service system comprises a plurality of servers, and the server configuration information comprises server information corresponding to each server;
the method comprises the steps of establishing communication connection between a local server and each server according to server information corresponding to each server, sending a test command to each server through the communication connection corresponding to each server, and collecting test data generated when each server executes the received test command, wherein the test data generated by each server comprises multiple items of performance index test data.
In one embodiment, collecting the test data generated by each server when executing the test command received by the server comprises:
creating a thread pool, wherein the thread pool comprises a plurality of threads;
asynchronously collecting multiple items of performance index test data generated by each server when executing the test command received by each server according to each thread;
after all threads collect multiple items of performance index test data from the corresponding servers, the multiple items of performance index test data collected by all threads are uniformly stored in a test data recording file using a mutual exclusion lock.
In one embodiment, obtaining server configuration information of a target business system to be tested includes:
acquiring data acquisition task information input by a user through a preset graphical interface, wherein the data acquisition task information comprises an output file path parameter, a sampling interval parameter, an execution duration parameter and default installation path information;
acquiring a configuration file prestored in the local according to the default installation path information;
and obtaining the server configuration information of the target business system to be tested according to the configuration file.
In one embodiment, collecting the test data generated by each server when executing the test command received by the server comprises:
according to the sampling interval parameters, parallelly acquiring test data generated when each server executes the test command received by the server;
and determining the data acquisition duration, and stopping data acquisition when the data acquisition duration is equal to the execution duration parameter.
In one embodiment, the method further comprises:
generating a first file path parameter and a second file path parameter according to the output file path parameter;
generating a first file corresponding to the first file path parameter and a second file corresponding to the second file path parameter;
after the step of parallelly acquiring the test data generated when each server executes the test command received by the server according to the sampling interval parameters, the method comprises the following steps:
integrating the collected test data to obtain first file data in a first format and second file data in a second format;
the first file data is stored in the first file, and the second file data is stored in the second file.
In one embodiment, the method further comprises:
displaying the data in the first file according to a first display mode;
and displaying the data in the second file according to a second display mode.
In one embodiment, the method further comprises:
screening the collected test data according to the type of each server to obtain abnormal data corresponding to each server;
displaying the data in the first file according to a first display mode, wherein the displaying comprises the following steps:
and displaying the data in the first file according to the first display mode, and identifying the abnormal data corresponding to each server in the first file in a preset identification mode during display.
The present invention provides according to a second aspect a test data acquisition apparatus, which in one embodiment comprises:
the server configuration information acquisition module is used for acquiring server configuration information of a target service system to be tested, wherein the target service system comprises a plurality of servers, and the server configuration information comprises server information corresponding to each server;
the data acquisition module is used for establishing communication connection between the local server and each server according to the server information corresponding to each server, sending a test command to each server through the communication connection corresponding to each server, and acquiring test data generated when each server executes the received test command, wherein the test data generated by each server comprises a plurality of items of performance index test data.
The invention provides according to a third aspect a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of an embodiment of any of the methods described above when executing the computer program.
The present invention provides according to a fourth aspect a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the embodiments of the method of any one of the above.
In the embodiment of the invention, a data acquisition end firstly acquires server configuration information of a target service system to be tested, wherein the target service system comprises a plurality of servers, and the server configuration information comprises server information corresponding to each server; the method comprises the steps of establishing communication connection between a local server and each server according to server information corresponding to each server, sending test commands to each server through the communication connection corresponding to each server, and collecting test data generated when each server executes the received test commands, so that the test data of the relevant servers can be collected in a short time, and the test efficiency is improved.
Drawings
FIG. 1 is a diagram of an exemplary test data collection system;
FIG. 2 is a schematic flow chart diagram illustrating a method for test data acquisition according to one embodiment;
FIG. 3 is a diagram illustrating a default graphical interface in accordance with an embodiment;
FIG. 4 is a schematic diagram illustrating a report display in one embodiment;
FIG. 5 is a schematic diagram of a diagram showing an embodiment;
FIG. 6 is a block diagram of a test data acquisition device according to an embodiment;
FIG. 7 is a diagram of the internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
Fig. 1 shows an application environment of the test data acquisition method according to an embodiment of the present invention. A tester may collect, through a data collection end 10 (hereinafter, referred to as a data collection end), test data generated by each server in a business system during a test process, where the test data generated by each server includes multiple items of performance index test data.
The data acquisition end can be realized by an independent server or a server cluster formed by a plurality of servers, and in one embodiment, the data acquisition end can also be a desktop computer, a notebook computer and other computing equipment; the types of servers (for example, application servers such as Jboss servers, database servers such as MySQL servers, cache servers such as Redis servers, etc.) and the number thereof included in different business systems may be different, for example, the business system illustrated in fig. 1 includes a server 21, a server 22, and a server 23, although the number of servers illustrated in fig. 1 is only an example.
The following description will take the data acquisition terminal 10 in the application environment as an example of the execution subject of the test data acquisition method. As shown in fig. 2, the test data acquisition method includes the following steps:
s110: and acquiring the server configuration information of the target service system to be tested.
The target service system comprises a plurality of servers, and the server configuration information comprises server information corresponding to each server.
S120: establishing communication connection between a local server and each server according to server information corresponding to each server, sending a test command to each server through the communication connection corresponding to each server, and collecting test data generated when each server executes the test command received by each server.
The test data generated by each server includes multiple items of performance index test data, such as CPU utilization, disk I/O (in/out), network utilization, memory utilization, database QPS (Queries Per Second), and Redis cache OPS (Operations Per Second), and so on.
In this embodiment, a tester may configure a data acquisition task for the data acquisition end, for example, indicate to the data acquisition end which service system to test, how long to test, how to process after the test data is acquired, and the like. In one embodiment, the data collection task information includes output file path parameters, sampling interval parameters, execution duration parameters, and default installation path information.
The data acquisition end obtains the server configuration information of the target business system to be tested after receiving a test instruction from a tester (i.e. an instruction for the tester to instruct the data acquisition end to start to acquire test data). The target business system refers to a business system to be tested by a tester.
In one embodiment, the step of obtaining the server configuration information of the target business system to be tested includes:
acquiring data acquisition task information input by a user through a preset graphical interface, wherein the data acquisition task information comprises an output file path parameter, a sampling interval parameter, an execution duration parameter and default installation path information;
acquiring a configuration file prestored in the local according to the default installation path information;
and obtaining the server configuration information of the target business system to be tested according to the configuration file.
The data acquisition terminal provides a graphical interface for a tester, and the tester can input data acquisition task information on the graphical interface. In different scenarios, the data included in the data acquisition task information acquired through the graphical interface may be different, for example, the data acquisition end may provide the graphical interface shown in fig. 3 for the user, and the tester may fill (or select) the target service system to be tested, such as system1, the output file path parameter, such as D:/, the sampling interval parameter, such as 5 seconds, and the execution duration parameter, such as 1 minute, on the graphical interface, and default installation path information is pre-stored locally at the data acquisition end and does not need to be specified by the tester.
After the data acquisition end acquires the data acquisition task information, acquiring a pre-existing local configuration file from a storage area corresponding to the default installation path information, wherein the configuration file records server configuration information corresponding to a plurality of service systems, and then acquiring the server configuration information corresponding to the target service system from the server configuration information corresponding to the plurality of service systems recorded by the configuration file. The specific implementation manner may be that, after the data acquisition end obtains the configuration file, the server configuration information recorded by the configuration file is read line by line, then the server configuration information is analyzed into a list according to categories and stored in the machine configuration parameters, and then the server configuration information corresponding to the target service system is found out from the machine configuration parameters. The server configuration information corresponding to each service system comprises a service system display name and server information of each server in the service system, wherein the server information comprises server IP address information, types of application software installed in the server, and server user name and password information, if the types of the application software installed in the server are database software, the server information further comprises function names of database sub-libraries, the function names may be different in different scenes, and exemplarily, in one scene, the function names may be a public library, an index library, a service library and the like.
After obtaining the server configuration information of the target service system, the data acquisition end establishes communication connection between the local and each server according to the server information corresponding to each server in the target service system, and sends a test command to each server through the communication connection corresponding to each server. After each server executes the received test command, the data acquisition end acquires the test data generated in the process of executing the test command by each server.
In one embodiment, the step of the data acquisition end acquiring the test data generated when each server executes the test command received by the data acquisition end includes:
creating a thread pool, wherein the thread pool comprises a plurality of threads;
asynchronously acquiring multiple items of performance index test data generated by each server when executing the test command received by each server according to each thread;
after all threads collect multiple items of performance index test data from the corresponding servers, the multiple items of performance index test data collected by all threads are uniformly stored in a test data recording file using a mutual exclusion lock.
In this embodiment, the data collection end creates a thread pool including a plurality of threads, and one thread in the thread pool is responsible for collecting test data generated by one server, so that the collection of the test data of a plurality of servers included in the target service system can be performed in parallel. In some scenarios, if the number of servers that need to collect test data is too large or the number of threads opened in the thread pool is small, then the test data needs to be collected for a part of the servers first, and after the threads finish collecting the test data of one server, the test data of another server that has not been collected is executed. After all threads collect test data from the corresponding servers, the test data collected by all threads are uniformly stored in a test data recording file using a mutual exclusion lock.
Furthermore, when the data acquisition end acquires the test data of each server, the data acquisition end parallelly acquires the test data generated when each server executes the test command received by the server according to the sampling interval parameters; and then determining the data acquisition duration, and stopping data acquisition when the data acquisition duration is equal to the execution duration parameter.
Specifically, in the process of testing the server (the total testing time length is determined by the execution duration parameter), the thread acquires the testing data of the server at intervals, where the intervals are determined by the sampling interval parameter, for example, if the sampling interval parameter is set to 5 seconds, the acquisition is executed at intervals of 5 seconds. And (3) after all threads finish the acquisition work of the test data, uniformly writing the test data acquired by each thread into a test data recording file using a mutual exclusion lock at one time, and executing in a circulating way until the test is finished (namely the data acquisition duration is equal to the execution duration parameter). After all threads execute the acquisition work, the test data acquired by all threads are written into the test data recording file using the mutual exclusion lock once again, so that the thread safety can be effectively ensured, and errors of the acquired test data can be avoided.
In one embodiment, the test data acquisition method further comprises:
generating a first file path parameter and a second file path parameter according to the output file path parameter;
and generating a first file corresponding to the first file path parameter and a second file corresponding to the second file path parameter.
Correspondingly, after the step of parallelly collecting the test data generated when each server executes the test command received by the server according to the sampling interval parameters, the method comprises the following steps:
integrating the collected test data to obtain first file data in a first format and second file data in a second format;
the first file data is stored in the first file, and the second file data is stored in the second file.
In this embodiment, after obtaining the data acquisition task information, the data acquisition end generates a first file path parameter and a second file path parameter according to an output file path parameter therein, and generates a first file corresponding to the first file path parameter and a second file corresponding to the second file path parameter, where the first file is stored in the first file path and the second file is stored in the second file path. After the data acquisition end acquires the test data generated by each server in the target service system, integrating all the acquired test data to obtain first file data in a first format and second file data in a second format, storing the first file data into the first file, and storing the second file data into the second file.
Illustratively, in one embodiment, the first file may be a reporting data file such as an Excel file, and the second file may be a chart data file such as an html format chart. The data acquisition end integrates test data corresponding to each server in the target service system to obtain report data (namely first file data) and chart data (namely second file data), and then stores the report data in a report data file and the chart data in a chart data file.
Further, in one embodiment, after the first file data and the second file data are respectively stored in the first file and the second file, the data acquisition end displays the data in the first file according to the first display mode and displays the data in the second file according to the second display mode, so that a tester can timely know the first file data and the second file data. In one scenario, the first display mode may be a report display mode, and the second display mode may be a chart display mode. Illustratively, the report data may be presented in the presentation manner shown in fig. 4, and the chart data may be presented in the presentation manner shown in fig. 5.
Still further, in another embodiment, the test data acquisition method further includes: and screening the acquired test data according to the type of each server to obtain abnormal data corresponding to each server.
When the data acquisition end integrates the test data corresponding to each server in the target service system, abnormal data corresponding to each server is screened out from the test data according to the type of each server, for example, an abnormally input file path parameter, a sampling interval parameter, an execution duration parameter, an abnormal content of a configuration file, an abnormal server connection, an abnormal network in the process of executing test data acquisition, and the like. The types of the servers can be distinguished by the types of the application software installed on the servers, and the abnormal data judgment rules corresponding to different types of servers can be different.
Correspondingly, displaying the data in the first file according to a first display mode, comprising: and displaying the data in the first file according to a first display mode, and identifying the abnormal data corresponding to each server in the first file in a preset identification mode during display.
When the data acquisition end displays the first file, the abnormal data corresponding to each server in the first file can be identified in a preset identification mode. For example, in fig. 4, the CPU utilization of the two servers, i.e., JB _ IP _3 and Redis _ IP _3, is listed as abnormal data, so that during the display, the background color of the cell corresponding to the related abnormal data is changed to distinguish the abnormal data from the non-abnormal data, which is convenient for the tester to quickly know the abnormal data. Of course, the preset identification manner may be to change the base color of the cell, or to perform bolding on the display font of the abnormal data or to change the font type.
In one embodiment, as shown in fig. 6, there is provided a test data acquisition device comprising the following modules:
a server configuration information obtaining module 110, configured to obtain server configuration information of a target service system to be tested, where the target service system includes a plurality of servers, and the server configuration information includes server information corresponding to each server;
the data acquisition module 120 is configured to establish a communication connection between a local server and each server according to server information corresponding to each server, send a test command to each server through the communication connection corresponding to each server, and acquire test data generated when each server executes the test command received by each server, where the test data generated by each server includes multiple items of performance index test data.
In one embodiment, the data acquisition module comprises a data acquisition sub-module; the data acquisition submodule comprises:
a thread pool creating unit for creating a thread pool, the thread pool including a plurality of threads;
the performance index acquisition unit is used for asynchronously acquiring a plurality of items of performance index test data generated by each server when executing the test command received by the server according to each thread;
and the performance index storage unit is used for uniformly storing the multiple items of performance index test data acquired by each thread into a test data recording file using the mutual exclusion lock after all threads acquire the multiple items of performance index test data from the corresponding servers.
In one embodiment, the server configuration information obtaining module includes:
the task information acquisition sub-module is used for acquiring data acquisition task information input by a user through a preset graphical interface, wherein the data acquisition task information comprises an output file path parameter, a sampling interval parameter, an execution duration parameter and default installation path information;
the configuration file obtaining submodule is used for obtaining a configuration file prestored in the local according to the default installation path information;
and the server configuration information acquisition submodule is used for acquiring the server configuration information of the target service system to be tested according to the configuration file.
In one embodiment, the data acquisition sub-module is further configured to acquire, in parallel, test data generated when each server executes a test command received by the server according to the sampling interval parameter; and determining the data acquisition duration, and stopping data acquisition when the data acquisition duration is equal to the execution duration parameter.
In one embodiment, the test data acquisition device further comprises:
the path parameter input module is used for generating a first file path parameter and a second file path parameter according to the output file path parameter;
the file generating module is used for generating a first file corresponding to the first file path parameter and a second file corresponding to the second file path parameter;
after the data acquisition module is executed, the test data acquisition device also executes the following modules:
the data integration module is used for integrating the acquired test data to obtain first file data in a first format and second file data in a second format;
and the file data storage module is used for storing the first file data into the first file and storing the second file data into the second file.
In one embodiment, the test data acquisition device further comprises:
the first display module is used for displaying the data in the first file according to a first display mode;
and the second display module is used for displaying the data in the second file according to a second display mode.
In one embodiment, the test data acquisition device further comprises:
the abnormal data acquisition module is used for screening the acquired test data according to the type of each server to obtain abnormal data corresponding to each server;
correspondingly, the first display module is further configured to display the data in the first file according to the first display mode, and identify the abnormal data corresponding to each server in the first file in a preset identification mode during display.
For the specific definition of the test data acquisition device, reference may be made to the definition of the test data acquisition method above, and details are not described here. The modules in the test data acquisition device can be implemented in whole or in part by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of 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, 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 nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The database of the computer equipment is used for storing collected data such as test data of the server. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a test data acquisition method.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring server configuration information of a target service system to be tested, wherein the target service system comprises a plurality of servers, and the server configuration information comprises server information corresponding to each server; the method comprises the steps of establishing communication connection between a local server and each server according to server information corresponding to each server, sending a test command to each server through the communication connection corresponding to each server, and collecting test data generated when each server executes the received test command, wherein the test data generated by each server comprises multiple items of performance index test data.
In one embodiment, the processor executes the computer program to realize the following steps when collecting the test data generated by each server when executing the test command received by the server:
creating a thread pool, wherein the thread pool comprises a plurality of threads; asynchronously acquiring multiple items of performance index test data generated by each server when executing the test command received by each server according to each thread; after all threads collect multiple items of performance index test data from the corresponding servers, the multiple items of performance index test data collected by all threads are uniformly stored in a test data recording file using a mutual exclusion lock.
In one embodiment, when the processor executes the computer program to obtain the server configuration information of the target service system to be tested, the following steps are also implemented:
acquiring data acquisition task information input by a user through a preset graphical interface, wherein the data acquisition task information comprises an output file path parameter, a sampling interval parameter, an execution duration parameter and default installation path information; acquiring a configuration file prestored in the local according to the default installation path information; and obtaining the server configuration information of the target business system to be tested according to the configuration file.
In one embodiment, the processor executes the computer program to realize the following steps when collecting the test data generated by each server when executing the test command received by the server:
according to the sampling interval parameters, parallelly acquiring test data generated when each server executes the test command received by the server; and determining the data acquisition duration, and stopping data acquisition when the data acquisition duration is equal to the execution duration parameter.
In one embodiment, the processor executes the computer program, further implementing the steps of:
generating a first file path parameter and a second file path parameter according to the output file path parameter; generating a first file corresponding to the first file path parameter and a second file corresponding to the second file path parameter;
further, after the processor executes the computer program to realize the step of collecting the test data generated by each server when executing the test command received by the server in parallel according to the sampling interval parameter, the following steps are also realized:
integrating the collected test data to obtain first file data in a first format and second file data in a second format; and storing the first file data into the first file, and storing the second file data into the second file.
In one embodiment, the processor executes the computer program, further implementing the steps of:
displaying the data in the first file according to a first display mode; and displaying the data in the second file according to a second display mode.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
screening the collected test data according to the type of each server to obtain abnormal data corresponding to each server;
further, when the processor executes the computer program and displays the data in the first file according to the first display mode, the method further includes the following steps:
and displaying the data in the first file according to a first display mode, and identifying the abnormal data corresponding to each server in the first file in a preset identification mode during display.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring server configuration information of a target service system to be tested, wherein the target service system comprises a plurality of servers, and the server configuration information comprises server information corresponding to each server; establishing communication connection between a local server and each server according to server information corresponding to each server, sending a test command to each server through the communication connection corresponding to each server, and collecting test data generated when each server executes the received test command, wherein the test data generated by each server comprises a plurality of items of performance index test data.
In one embodiment, the computer program is executed by a processor, and when collecting test data generated by each server when executing the test command received by the server, the following steps are further implemented:
creating a thread pool, wherein the thread pool comprises a plurality of threads; asynchronously collecting multiple items of performance index test data generated by each server when executing the test command received by each server according to each thread; after all threads collect multiple items of performance index test data from the corresponding servers, the multiple items of performance index test data collected by all threads are uniformly stored in a test data recording file using a mutual exclusion lock.
In one embodiment, the computer program is executed by the processor, and when the server configuration information of the target service system to be tested is obtained, the following steps are further implemented:
acquiring data acquisition task information input by a user through a preset graphical interface, wherein the data acquisition task information comprises an output file path parameter, a sampling interval parameter, an execution duration parameter and default installation path information; acquiring a configuration file prestored in the local according to the default installation path information; and obtaining the server configuration information of the target business system to be tested according to the configuration file.
In one embodiment, when the computer program is executed by a processor and collects test data generated by each server when executing the test command received by the server, the following steps are also implemented:
according to the sampling interval parameters, parallelly acquiring test data generated when each server executes the test command received by the server; and determining the data acquisition duration, and stopping data acquisition when the data acquisition duration is equal to the execution duration parameter.
In one embodiment, the computer program is executed by a processor and further implements the steps of:
generating a first file path parameter and a second file path parameter according to the output file path parameter; generating a first file corresponding to the first file path parameter and a second file corresponding to the second file path parameter;
further, after the step of parallelly collecting the test data generated when each server executes the test command received by the server according to the sampling interval parameter, the computer program is executed by the processor, and the following steps are also realized:
integrating the collected test data to obtain first file data in a first format and second file data in a second format; the first file data is stored in the first file, and the second file data is stored in the second file.
In one embodiment, the computer program is executed by a processor and further implements the steps of:
displaying the data in the first file according to a first display mode; and displaying the data in the second file according to a second display mode.
In one embodiment, the computer program, when executed by the processor, further performs the steps of:
screening the collected test data according to the type of each server to obtain abnormal data corresponding to each server;
further, when the computer program is executed by the processor and displays the data in the first file according to the first display mode, the method further comprises the following steps:
and displaying the data in the first file according to a first display mode, and identifying the abnormal data corresponding to each server in the first file in a preset identification mode during display.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. 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 (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.

Claims (7)

1. A method of test data acquisition, comprising:
acquiring server configuration information of a target service system to be tested, wherein the target service system comprises a plurality of servers, and the server configuration information comprises server information corresponding to each server;
establishing communication connection between a local server and each server according to server information corresponding to each server, sending a test command to each server through the communication connection corresponding to each server, and collecting test data generated when each server executes the test command received by the server, wherein the test data generated by each server comprises a plurality of items of performance index test data;
the acquiring of the server configuration information of the target service system to be tested includes:
acquiring data acquisition task information input by a user through a preset graphical interface, wherein the data acquisition task information comprises an output file path parameter, a sampling interval parameter, an execution duration parameter and default installation path information;
acquiring a configuration file prestored in the local according to the default installation path information;
obtaining server configuration information of a target service system to be tested according to the configuration file;
the collecting test data generated when each server executes the test command received by the server comprises:
according to the sampling interval parameters, parallelly collecting test data generated when each server executes the test command received by the server;
the method further comprises the following steps:
generating a first file path parameter and a second file path parameter according to the output file path parameter;
generating a first file corresponding to the first file path parameter and a second file corresponding to the second file path parameter;
after the step of parallelly collecting the test data generated when each server executes the test command received by the server according to the sampling interval parameters, the method comprises the following steps:
integrating the collected test data to obtain first file data in a first format and second file data in a second format;
storing the first file data into the first file, and storing the second file data into the second file;
screening the collected test data according to the type of each server to obtain abnormal data corresponding to each server;
and displaying the data in the first file according to a first display mode, and identifying the abnormal data corresponding to each server in the first file in a preset identification mode during display.
2. The method for collecting test data according to claim 1, wherein said collecting test data generated by each of said servers when executing the test command received by said server comprises:
creating a thread pool, wherein the thread pool comprises a plurality of threads;
asynchronously collecting multiple items of performance index test data generated by each server when executing the test command received by the server according to each thread;
after all the threads acquire a plurality of performance index test data from the corresponding servers, uniformly storing the plurality of performance index test data acquired by each thread into a test data recording file using a mutual exclusion lock.
3. The test data acquisition method of claim 1,
the collecting of the test data generated when each server executes the test command received by the server further comprises:
and determining the data acquisition duration, and stopping data acquisition when the data acquisition duration is equal to the execution duration parameter.
4. The method of test data acquisition of claim 1, the method further comprising:
and displaying the data in the second file according to a second display mode.
5. A test data acquisition apparatus for implementing the test data acquisition method according to claim 1, comprising:
the server configuration information acquisition module is used for acquiring server configuration information of a target service system to be tested, wherein the target service system comprises a plurality of servers, and the server configuration information comprises server information corresponding to each server;
the data acquisition module is used for establishing communication connection between a local server and each server according to server information corresponding to each server, sending a test command to each server through the communication connection corresponding to each server, and acquiring test data generated when each server executes the received test command, wherein the test data generated by each server comprises a plurality of items of performance index test data.
6. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 4 are implemented when the computer program is executed by the processor.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
CN202010800473.5A 2020-08-11 2020-08-11 Test data acquisition method and device, computer equipment and storage medium Active CN112115005B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010800473.5A CN112115005B (en) 2020-08-11 2020-08-11 Test data acquisition method and device, computer equipment and storage medium
CA3127343A CA3127343A1 (en) 2020-08-11 2021-08-10 Test data acquisition method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010800473.5A CN112115005B (en) 2020-08-11 2020-08-11 Test data acquisition method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112115005A CN112115005A (en) 2020-12-22
CN112115005B true CN112115005B (en) 2022-11-29

Family

ID=73805615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010800473.5A Active CN112115005B (en) 2020-08-11 2020-08-11 Test data acquisition method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN112115005B (en)
CA (1) CA3127343A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112968809B (en) * 2021-02-02 2022-09-13 杭州安恒信息技术股份有限公司 Method and device for testing system stability and compatibility
CN113778768A (en) * 2021-08-24 2021-12-10 深圳市联影高端医疗装备创新研究院 Reconstruction server testing method and device, computer equipment and storage medium
CN114595159B (en) * 2022-05-10 2022-09-02 太平金融科技服务(上海)有限公司 Test data generation method, device, equipment and storage medium
CN116467151B (en) * 2023-06-19 2023-08-25 浙江无端科技股份有限公司 Program performance information acquisition method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214133A (en) * 2011-07-22 2011-10-12 苏州工业园区七星电子有限公司 System for quickly diagnosing and testing computer hardware
CN111061610A (en) * 2019-12-09 2020-04-24 广州鼎甲计算机科技有限公司 Generation method and device of cluster system performance test report and computer equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040015744A1 (en) * 2002-07-22 2004-01-22 Finisar Corporation Scalable multithreaded network testing tool

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214133A (en) * 2011-07-22 2011-10-12 苏州工业园区七星电子有限公司 System for quickly diagnosing and testing computer hardware
CN111061610A (en) * 2019-12-09 2020-04-24 广州鼎甲计算机科技有限公司 Generation method and device of cluster system performance test report and computer equipment

Also Published As

Publication number Publication date
CA3127343A1 (en) 2022-02-11
CN112115005A (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN112115005B (en) Test data acquisition method and device, computer equipment and storage medium
CN108427613B (en) Abnormal interface positioning method and device, computer equipment and storage medium
CN110088744B (en) Database maintenance method and system
CN109726134B (en) Interface test method and system
CN112269744A (en) System abnormity testing method and device, computer equipment and storage medium
CN107483283B (en) Communication reliability test method and device
CN111258591B (en) Program deployment task execution method, device, computer equipment and storage medium
CN111290941A (en) Method and device for testing multiple interfaces, computing equipment and medium
CN112650688A (en) Automated regression testing method, associated device and computer program product
CN112463588A (en) Automatic test system and method, storage medium and computing equipment
CN114328243A (en) Abnormal operation data processing method, device, equipment and storage medium
CN113377668A (en) Automatic testing method and device for service interface and computer equipment
CN114924990A (en) Abnormal scene testing method and electronic equipment
CN115048257A (en) System service function verification method and device, computer equipment and storage medium
CN114385485A (en) Interface test method, device, equipment and storage medium
CN110149421A (en) Method for monitoring abnormality, system, device and the computer equipment of domain name system
CN113377669A (en) Automatic testing method and device, computer equipment and storage medium
CN111767218B (en) Automatic test method, equipment and storage medium for continuous integration
CN111459796B (en) Automated testing method, apparatus, computer device and storage medium
CN111400171A (en) Interface testing method, system, device and readable storage medium
CN116230067A (en) Automatic testing method, system, equipment and medium for solid state disk
CN111666200A (en) Testing method and terminal for time consumption of cold start of PC software
CN111061610B (en) Generation method and device of cluster system performance test report and computer equipment
CN110309057B (en) Automatic script-based flow project testing method and related equipment
CN112350879B (en) Data communication equipment test management method, device, system and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant