CN108717391B - Monitoring device and method for test process and computer readable storage medium - Google Patents

Monitoring device and method for test process and computer readable storage medium Download PDF

Info

Publication number
CN108717391B
CN108717391B CN201810469425.5A CN201810469425A CN108717391B CN 108717391 B CN108717391 B CN 108717391B CN 201810469425 A CN201810469425 A CN 201810469425A CN 108717391 B CN108717391 B CN 108717391B
Authority
CN
China
Prior art keywords
monitoring
item
database table
data
period
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
CN201810469425.5A
Other languages
Chinese (zh)
Other versions
CN108717391A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810469425.5A priority Critical patent/CN108717391B/en
Priority to PCT/CN2018/102103 priority patent/WO2019218513A1/en
Publication of CN108717391A publication Critical patent/CN108717391A/en
Application granted granted Critical
Publication of CN108717391B publication Critical patent/CN108717391B/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/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Abstract

The invention discloses a monitoring method of a test process, which comprises the following steps: determining a monitoring object, and determining monitoring information and a monitoring item according to the monitoring object, wherein the monitoring information comprises an IP address corresponding to the monitoring object, a monitoring period and a mapping relation between the monitoring item and a database table; generating a monitoring instruction according to the monitoring item, the monitoring period and the mapping relation between the monitoring item and the database table, and sending the monitoring instruction to a monitoring object according to the IP address so that the monitoring object can monitor the monitoring item in the test process according to the monitoring instruction; and acquiring the monitoring data of the monitoring item from the corresponding database table according to the monitoring period, and dynamically displaying the dynamic change condition of the monitoring item in the test process according to the monitoring data and a preset visual display mode. The invention also provides a monitoring device of the test process and a computer readable storage medium. The invention improves the efficiency of test monitoring.

Description

Monitoring device and method for test process and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a monitoring apparatus and method for a test process, and a computer-readable storage medium.
Background
At present, the commonly used tools for system test monitoring have the following defects: if the host to be tested or the database of the system to be tested needs to be monitored in the test process, a tester needs to log in the system host remotely by himself and monitor related data through a tool carried by the system, and the related data can not be obtained to analyze the test condition after the test is completed, so that inconvenience is brought to a user, and the test monitoring efficiency is low.
Disclosure of Invention
The invention provides a monitoring device and a monitoring method for a test process and a computer readable storage medium, and mainly aims to solve the technical problem of low test monitoring efficiency in the prior art.
In order to achieve the above object, the present invention provides a monitoring apparatus for a test process, the apparatus including a memory and a processor, the memory storing therein a test monitoring program operable on the processor, the test monitoring program when executed by the processor implementing the steps of:
determining a monitoring object, and determining monitoring information and a monitoring item according to the monitoring object, wherein the monitoring information comprises a monitoring period, an IP address corresponding to the monitoring object and a mapping relation between the monitoring item and a database table;
generating a monitoring instruction according to the monitoring item, the monitoring period and the mapping relation between the monitoring item and the database table, sending the monitoring instruction to a monitoring object according to the IP address so that the monitoring object can monitor the monitoring item in the test process according to the monitoring instruction, and storing the acquired monitoring data to the corresponding database table according to the mapping relation between the monitoring item and the database table;
and acquiring the monitoring data of the monitoring item from a corresponding database table according to the monitoring period, and dynamically displaying the dynamic change condition of the monitoring item in the test process according to the monitoring data and a preset visual display mode.
Optionally, the step of obtaining the monitoring data of the monitoring item from a corresponding database table according to the monitoring period, and dynamically displaying the dynamic change condition of the monitoring item in the testing process according to the monitoring data and a preset visual display mode includes:
when the time interval for reading data from the corresponding database table reaches the monitoring period, acquiring the monitoring data of each monitoring item from the corresponding database table according to the mapping relation between the monitoring item and the database table;
and determining the dynamic change condition of the monitoring item in the test process according to the timestamp in the monitoring data, and dynamically displaying the dynamic change condition according to a preset visual display mode.
Optionally, if the monitoring object is a terminal to be tested, the monitoring item includes network input, network output, CPU load, total memory, used memory, free memory, and disk usage rate;
if the monitoring object is a database of the tested system, the monitoring items comprise an application SQL statement, a memory, a waiting event, a file and a tablespace.
In addition, in order to achieve the above object, the present invention further provides a monitoring system for a testing process, the monitoring system includes the monitoring apparatus for the testing process and a tested terminal, the tested terminal is configured to:
when a monitoring instruction sent by the monitoring device is received, acquiring a monitoring item, a monitoring period and a mapping relation between the monitoring item and a database table from the monitoring instruction;
every interval of the monitoring period, acquiring parameter values of all monitoring items on the tested terminal, and generating monitoring data according to the acquired parameter values;
and correspondingly writing the monitoring data into the database table corresponding to each monitoring item according to the mapping relation between the monitoring item and the database table.
Optionally, the terminal under test is further configured to:
when the interval time reaches a preset time interval, acquiring a parameter value of each monitoring item, packaging the acquired parameter value into monitoring data, and storing the monitoring data into a cache region, wherein the name of each monitoring item, the table name of a corresponding database table, the acquired parameter value and a timestamp are recorded in each monitoring data, the preset time interval is 1/N of the monitoring period, and N is more than 1;
and when the time interval reaches the monitoring period, acquiring the monitoring data stored in the monitoring period from the cache region, and correspondingly writing the monitoring data into the database table corresponding to each monitoring item according to the mapping relation between the monitoring item and the database table.
In addition, to achieve the above object, the present invention further provides a method for monitoring a test process, including:
the monitoring device determines a monitoring object and determines monitoring information and a monitoring item according to the monitoring object, wherein the monitoring information comprises a monitoring period, an IP address corresponding to the monitoring object and a mapping relation between the monitoring item and a database table;
generating a monitoring instruction according to the monitoring item, the monitoring period and the mapping relation between the monitoring item and a database table, and sending the monitoring instruction to a monitoring object according to the IP address;
the tested terminal monitors the monitoring item in the testing process according to the monitoring instruction, and stores the acquired monitoring data to a corresponding database table according to the mapping relation between the monitoring item and the database table;
and the monitoring device acquires the monitoring data of the monitoring item from a corresponding database table according to the monitoring period, and dynamically displays the dynamic change condition of the monitoring item in the test process according to the monitoring data and a preset visual display mode.
Optionally, the step of monitoring, by the terminal under test, the monitoring item in the test process according to the monitoring instruction, and storing the acquired monitoring data in the corresponding database table according to the mapping relationship between the monitoring item and the database table includes:
when the tested terminal receives a monitoring instruction sent by the monitoring device, acquiring a monitoring item, a monitoring period and a mapping relation between the monitoring item and a database table from the monitoring instruction;
every interval of the monitoring period, acquiring parameter values of all monitoring items on the tested terminal, and generating monitoring data according to the acquired parameter values;
and correspondingly writing the monitoring data into the database table corresponding to each monitoring item according to the mapping relation between the monitoring item and the database table.
Optionally, the step of acquiring, by the monitoring device, the monitoring data of the monitoring item from a corresponding database table according to the monitoring period, and dynamically displaying a dynamic change condition of the monitoring item in the test process according to the monitoring data and a preset visual display manner includes:
when the time interval for reading data from the corresponding database table reaches the monitoring period, the monitoring device acquires the monitoring data of each monitoring item from the corresponding database table according to the mapping relation between the monitoring item and the database table;
and the monitoring device determines the dynamic change condition of the monitoring item in the test process according to the timestamp in the monitoring data, and dynamically displays the dynamic change condition according to a preset visual display mode.
Optionally, if the monitoring object is a terminal to be tested, the monitoring item includes network input, network output, CPU load, total memory, used memory, free memory, and disk usage rate;
if the monitoring object is a database of the tested system, the monitoring items comprise an application SQL statement, a memory, a waiting event, a file and a tablespace.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium, which stores thereon a test monitoring program, which is executable by one or more processors to implement the steps of the monitoring method of the test process as described above.
The monitoring device determines a monitoring object, determines monitoring information and a monitoring item according to the monitoring object, wherein the monitoring information comprises a monitoring period, an IP address corresponding to the monitoring object and a mapping relation between the monitoring item and a database table, generates a monitoring instruction according to the monitoring item, the monitoring period and the mapping relation, transmits the monitoring instruction to the monitored object, monitors each monitoring item in the testing process according to the monitoring instruction by the monitoring object, stores the acquired monitoring data into the corresponding database table according to the mapping relation between the monitoring item and the database table, acquires the monitoring data from the corresponding database table according to the monitoring period, dynamically displays the dynamic change condition of the monitoring item in the testing process according to a preset visual display mode, according to the scheme, after the monitoring device is used for configuring relevant monitoring information, the monitoring data are acquired by the monitoring object, the monitoring device dynamically displays in real time, a tester can directly check the monitoring condition as required, the tester does not need to log in the application host by self and check the monitoring condition with the help of a system tool, and the monitoring efficiency of the test process is improved.
Drawings
Fig. 1 is a schematic internal structural diagram of a monitoring apparatus for a test process according to an embodiment of the present invention;
fig. 2 is a schematic diagram of program modules of a test monitoring program in a monitoring device for testing a process according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a monitoring method for a test process according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a monitoring device for a test process. Referring to fig. 1, a schematic diagram of a monitoring apparatus for testing process according to a preferred embodiment of the present invention is shown.
In the present embodiment, the monitoring apparatus 1 for the test process may be a PC (Personal Computer), or may be a terminal device such as a smart phone, a tablet Computer, or a portable Computer. The monitoring device 1 of the test procedure comprises at least a memory 11, a processor 12, a communication bus 13, and a network interface 14.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal memory unit of the monitoring apparatus 1 of the test procedure, for example a hard disk of the monitoring apparatus 1 of the test procedure. The memory 11 may also be an external storage device of the monitoring apparatus 1 for testing in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the monitoring apparatus 1 for testing. Further, the memory 11 may also comprise both an internal memory unit of the monitoring apparatus 1 of the test procedure and an external memory device. The memory 11 may be used not only to store application software installed in the monitoring apparatus 1 for a test procedure and various kinds of data, such as a code of the test monitoring program 01, but also to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip in some embodiments, and is used for executing program codes or Processing data stored in the memory 11, such as executing the test monitoring program 01.
The communication bus 13 is used to realize connection communication between these components.
The network interface 14 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), typically used to establish a communication link between the apparatus 1 and other electronic devices.
Fig. 1 shows only the monitoring device 1 with the components 11-14 and the test procedure of the test monitoring program 01, but it is to be understood that not all shown components are required to be implemented, and that more or fewer components may be implemented instead.
Optionally, the apparatus 1 may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the monitoring device 1 of the test procedure and for displaying a visual user interface.
In the embodiment of the apparatus 1 shown in fig. 1, a test monitoring program 01 is stored in the memory 11; the following steps are implemented when the processor 12 executes the test monitoring program 01 stored in the memory 11:
determining a monitoring object, and determining monitoring information and a monitoring item according to the monitoring object, wherein the monitoring information comprises a monitoring period, an IP address corresponding to the monitoring object and a mapping relation between the monitoring item and a database table.
And generating a monitoring instruction according to the monitoring item, the monitoring period and the mapping relation between the monitoring item and the database table, sending the monitoring instruction to a monitoring object according to the IP address so that the monitoring object can monitor the monitoring item in the test process according to the monitoring instruction, and storing the acquired monitoring data to the corresponding database table according to the mapping relation between the monitoring item and the database table.
And the tester sets monitoring information through the monitoring device. The monitoring information mainly comprises IP addresses corresponding to monitoring period monitoring and mapping relations between monitoring items and database tables. The monitoring object in this embodiment may be a tested terminal where the tested system is located or a database of the tested system, and a monitoring item matched with the monitoring object is set. For the tested terminal, the monitoring items include but are not limited to the following: network input, network output, CPU load, total memory, used memory, free memory, disk usage, CPU switching, and the like; for the database of the system under test, the monitoring items include, but are not limited to, the following: monitoring SQL (Structured Query Language) statements, monitoring memory and waiting events and monitoring file and tablespace, wherein the SQL statements are used for monitoring full-table scanning, implicit conversion, high-frequency execution statements and the like; the content and waiting event monitoring mainly comprises the monitoring of full-table scanning, implicit conversion, high-frequency execution statements and the like; file and tablespace monitoring includes file accumulation, tablespace usage and residual statistics, etc. In addition, when the monitored object is the database of the system under test, the terminal under test is also used as the execution subject to monitor the test process according to the received monitoring instruction. The monitoring period set by the user is the minimum time unit for dynamically showing the change condition of each information item, and for example, the monitoring period can be set to 1-5 seconds by the user.
And the user sets a monitoring period through a display interface of the monitoring device, and inputs the IP address of the tested terminal and the name of the database table in which the monitoring data is stored. It should be noted that the pre-established database for storing the monitoring data includes a plurality of database tables, each of the database tables is provided with a table name, and the monitoring data of different monitoring items are stored in different database tables, so that the mapping relationship between each monitoring item and the database table can be pre-established.
After the monitoring item, the monitoring period and the mapping relation between the monitoring item and the database table name are obtained, a monitoring instruction is generated according to the monitoring item, the monitoring period and the mapping relation between the monitoring item and the database table, and the monitoring instruction is sent to equipment corresponding to an IP address set by a user, namely, a tested terminal to be monitored. It can be understood that the monitoring device of this embodiment can monitor the host operating conditions of multiple terminals to be tested at the same time, and only needs to configure the above parameters in advance and set the IP addresses of the devices, and after the monitoring is started, the monitoring device sends monitoring instructions to the devices, so as to implement synchronous monitoring of the operating conditions of the multiple terminals to be tested.
For a tested terminal, when a monitoring instruction is received, acquiring a monitoring item, a monitoring period and a mapping relation between the monitoring item and a database table from the monitoring instruction; every interval of the monitoring period, acquiring parameter values of all monitoring items on the tested terminal, and generating monitoring data according to the acquired parameter values; and correspondingly writing the monitoring data into the database table corresponding to each monitoring item according to the mapping relation between the monitoring item and the database table.
Optionally, in an embodiment, when the interval time reaches a preset time interval, the terminal to be tested acquires a parameter value of each monitoring item, packages the acquired parameter value into monitoring data, and stores the monitoring data in the cache region, where each monitoring data records a name of a monitoring item, a table name of a corresponding database table, the acquired parameter value, and a timestamp, where the preset time interval is 1/N of the monitoring period, and N is greater than 1; and when the time interval reaches the monitoring period, acquiring the monitoring data stored in the monitoring period from the cache region, and correspondingly writing the monitoring data into the database table corresponding to each monitoring item according to the mapping relation between the monitoring item and the database table.
The method comprises the steps that a cache region used for storing monitoring data is arranged on a tested terminal, the tested terminal obtains parameter values of all monitoring items at each preset time interval, the parameter values are packaged into the monitoring data according to a certain format and are stored in the cache region, and when the time interval for sending the monitoring data to a monitoring device reaches a monitoring period, the monitoring data in the monitoring period are packaged and sent to the monitoring device. The preset time interval is 1/N of the monitoring period, N is greater than 1, for example, the preset time interval is 1 second, and the monitoring period is 3 seconds. Taking the monitoring of the CPU load as an example, the current CPU load parameter value of the tested terminal is obtained every 1 second, and the CPU load, the parameter value, the table name of the database table corresponding to the CPU load and the timestamp are packaged into a piece of monitoring data to be stored in the cache region. And when the interval time reaches 3 seconds, the monitoring data of 3 CPU loads stored in the buffer area are written back to the database table corresponding to the table name. Alternatively, the database for storing the monitoring data is a time-series database, and the time-series database may be disposed on a time-series database server, and the server is connected with the monitoring device and the terminal to be tested respectively.
And acquiring the monitoring data of the monitoring item from the corresponding database table according to the monitoring period, and dynamically displaying the dynamic change condition of the monitoring item in the test process according to the monitoring data and a preset visual display mode.
For the monitoring device, when the time interval for acquiring the monitoring data from the database table reaches the monitoring period, the monitoring data stored by the tested terminal is acquired from the database table of each monitoring item, and the dynamic change condition of each monitoring item in the testing process is dynamically displayed according to a preset visual mode. Optionally, when the time interval for reading data from the corresponding database table reaches the monitoring period, acquiring the monitoring data of each monitoring item from the corresponding database table according to the mapping relationship between the monitoring item and the database table; and determining the dynamic change condition of the monitoring item in the test process according to the time stamp in the monitoring data, and dynamically displaying the dynamic change condition according to a preset visual display mode. Each piece of monitoring data carries a time stamp, the sequence of the monitoring data can be determined according to the time stamps, and then the dynamic change process of the parameter values of each monitoring item is determined for displaying. The visual display mode can enable a tester to timely know the running condition of the tested terminal in the testing process under the condition that the tester does not need to remotely log in the tested terminal.
Optionally, in an embodiment, the monitoring device may further generate a monitoring report for the host computer or the database according to the parameter values of the monitoring items read from the database and the recorded test conditions, and store the monitoring report for a tester to check after the test is completed.
The embodiment provides a monitoring device for a testing process, which determines a monitoring object, determines monitoring information and a monitoring item according to the monitoring object, wherein the monitoring information includes a monitoring period, an IP address corresponding to the monitoring object, and a mapping relation between the monitoring item and a database table, generates a monitoring instruction according to the monitoring item, the monitoring period, and the mapping relation, and transmits the monitoring instruction to a monitored object, the monitoring object monitors each monitoring item in the testing process according to the monitoring instruction, and stores the acquired monitoring data into the corresponding database table according to the mapping relation between the monitoring item and the database table, the monitoring device acquires the monitoring data from the corresponding database table according to the monitoring period, and dynamically displays the dynamic change condition of the monitoring item in the testing process according to a preset visual display mode, after the monitoring device configures related monitoring information, the monitoring data is collected by the monitoring object, the monitoring device dynamically displays in real time, the tester can directly check the monitoring condition as required, the tester does not need to log in the application host by self to check by means of a system tool, and the monitoring efficiency of the test process is improved.
In addition, the invention also provides a monitoring system of the test process. The system comprises the monitoring device of the test process in the embodiment and also comprises a tested terminal, wherein the tested terminal is used for:
when a monitoring instruction sent by the monitoring device is received, acquiring a monitoring item, a monitoring period and a mapping relation between the monitoring item and a database table from the monitoring instruction; every interval of the monitoring period, acquiring parameter values of all monitoring items on the tested terminal, and generating monitoring data according to the acquired parameter values; and correspondingly writing the monitoring data into the database table corresponding to each monitoring item according to the mapping relation between the monitoring item and the database table.
Optionally, the terminal under test is further configured to:
when the interval time reaches a preset time interval, acquiring a parameter value of each monitoring item, packaging the acquired parameter value into monitoring data, and storing the monitoring data into a cache region, wherein the name of each monitoring item, the table name of a corresponding database table, the acquired parameter value and a timestamp are recorded in each monitoring data, the preset time interval is 1/N of the monitoring period, and N is more than 1; and when the time interval reaches the monitoring period, acquiring the monitoring data stored in the monitoring period from the cache region, and correspondingly writing the monitoring data into the database table corresponding to each monitoring item according to the mapping relation between the monitoring item and the database table.
The embodiment of the monitoring system for the testing process of the present invention is substantially the same as the monitoring device and the embodiments of the testing process, and will not be described herein again.
Alternatively, in other embodiments, the test monitoring program may be divided into one or more modules, and the one or more modules are stored in the memory 11 and executed by one or more processors (in this embodiment, the processor 12) to implement the present invention.
For example, referring to fig. 2, a schematic diagram of a program module of a test monitoring program in an embodiment of a monitoring apparatus for a test process according to the present invention is shown, in this embodiment, the test monitoring program may be divided into an information obtaining module 10, an instruction sending module 20, and a dynamic display module 30, which exemplarily:
the information acquisition module 10 is configured to: determining a monitoring object, and determining monitoring information and a monitoring item according to the monitoring object, wherein the monitoring information comprises a monitoring period, an IP address corresponding to the monitoring object and a mapping relation between the monitoring item and a database table;
the instruction sending module 20 is configured to: generating a monitoring instruction according to the monitoring item, the monitoring period and the mapping relation between the monitoring item and the database table, sending the monitoring instruction to a monitoring object according to the IP address so that the monitoring object can monitor the monitoring item in the test process according to the monitoring instruction, and storing the acquired monitoring data to the corresponding database table according to the mapping relation between the monitoring item and the database table;
dynamic presentation module 30 is used to: and acquiring the monitoring data of the monitoring item from a corresponding database table according to the monitoring period, and dynamically displaying the dynamic change condition of the monitoring item in the test process according to the monitoring data and a preset visual display mode.
The functions or operation steps of the information obtaining module 10, the instruction sending module 20, and the dynamic display module 30 when executed are substantially the same as those of the above embodiments, and are not described herein again.
In addition, the invention also provides a monitoring method of the test process. Fig. 3 is a schematic flow chart of a monitoring method of a test process according to an embodiment of the present invention. The method may be performed by an apparatus, which may be implemented by software and/or hardware.
In this embodiment, the monitoring method of the test process includes:
step S10, the monitoring device determines a monitoring object, and determines monitoring information and a monitoring item according to the monitoring object, where the monitoring information includes a monitoring period, an IP address corresponding to the monitoring object, and a mapping relationship between the monitoring item and a database table.
And step S20, generating a monitoring instruction according to the monitoring item, the monitoring period and the mapping relation between the monitoring item and the database table, and sending the monitoring instruction to a monitoring object according to the IP address.
And step S30, the tested terminal monitors the monitoring item in the test process according to the monitoring instruction, and stores the acquired monitoring data to a corresponding database table according to the mapping relation between the monitoring item and the database table.
The tester sets monitoring information through the monitoring device, and the monitoring information mainly comprises IP addresses corresponding to monitoring period monitoring and mapping relations between monitoring items and database tables. The monitoring object in this embodiment may be a tested terminal where the tested system is located or a database of the tested system, and a monitoring item matched with the monitoring object is set. For the tested terminal, the monitoring items include but are not limited to the following: network input, network output, CPU load, total memory, used memory, free memory, disk usage, CPU switching, and the like; for the database of the system under test, the monitoring items include, but are not limited to, the following: monitoring SQL (Structured Query Language) statements, monitoring memory and waiting events and monitoring file and tablespace, wherein the SQL statements are used for monitoring full-table scanning, implicit conversion, high-frequency execution statements and the like; the content and waiting event monitoring mainly comprises the monitoring of full-table scanning, implicit conversion, high-frequency execution statements and the like; file and tablespace monitoring includes file accumulation, tablespace usage and residual statistics, etc. In addition, when the monitored object is the database of the system under test, the terminal under test is also used as the execution subject to monitor the test process according to the received monitoring instruction. The monitoring period set by the user is the minimum time unit for dynamically showing the change condition of each information item, and for example, the monitoring period can be set to 1-5 seconds by the user.
And the user sets a monitoring period through a display interface of the monitoring device, and inputs the IP address of the tested terminal and the name of the database table in which the monitoring data is stored. It should be noted that the pre-established database for storing the monitoring data includes a plurality of database tables, each of the database tables is provided with a table name, and the monitoring data of different monitoring items are stored in different database tables, so that the mapping relationship between each monitoring item and the database table can be pre-established.
After the monitoring item, the monitoring period and the mapping relation between the monitoring item and the database table name are obtained, a monitoring instruction is generated according to the monitoring item, the monitoring period and the mapping relation between the monitoring item and the database table, and the monitoring instruction is sent to equipment corresponding to an IP address set by a user, namely, a tested terminal to be monitored. It can be understood that the monitoring device of this embodiment can monitor the host operating conditions of multiple terminals to be tested at the same time, and only needs to configure the above parameters in advance and set the IP addresses of the devices, and after the monitoring is started, the monitoring device sends monitoring instructions to the devices, so as to implement synchronous monitoring of the operating conditions of the multiple terminals to be tested.
For a tested terminal, when a monitoring instruction is received, acquiring a monitoring item, a monitoring period and a mapping relation between the monitoring item and a database table from the monitoring instruction; every interval of the monitoring period, acquiring parameter values of all monitoring items on the tested terminal, and generating monitoring data according to the acquired parameter values; and correspondingly writing the monitoring data into the database table corresponding to each monitoring item according to the mapping relation between the monitoring item and the database table.
Optionally, in an embodiment, when the interval time reaches a preset time interval, the terminal to be tested acquires a parameter value of each monitoring item, packages the acquired parameter value into monitoring data, and stores the monitoring data in the cache region, where each monitoring data records a name of a monitoring item, a table name of a corresponding database table, the acquired parameter value, and a timestamp, where the preset time interval is 1/N of the monitoring period, and N is greater than 1; and when the time interval reaches the monitoring period, acquiring the monitoring data stored in the monitoring period from the cache region, and correspondingly writing the monitoring data into the database table corresponding to each monitoring item according to the mapping relation between the monitoring item and the database table.
The method comprises the steps that a cache region used for storing monitoring data is arranged on a tested terminal, the tested terminal obtains parameter values of all monitoring items at each preset time interval, the parameter values are packaged into the monitoring data according to a certain format and are stored in the cache region, and when the time interval for sending the monitoring data to a monitoring device reaches a monitoring period, the monitoring data in the monitoring period are packaged and sent to the monitoring device. The preset time interval is 1/N of the monitoring period, N is greater than 1, for example, the preset time interval is 1 second, and the monitoring period is 3 seconds. Taking the monitoring of the CPU load as an example, the current CPU load parameter value of the tested terminal is obtained every 1 second, and the CPU load, the parameter value, the table name of the database table corresponding to the CPU load and the timestamp are packaged into a piece of monitoring data to be stored in the cache region. And when the interval time reaches 3 seconds, the monitoring data of 3 CPU loads stored in the buffer area are written back to the database table corresponding to the table name. Alternatively, the database for storing the monitoring data is a time-series database, and the time-series database may be disposed on a time-series database server, and the server is connected with the monitoring device and the terminal to be tested respectively.
And step S40, the monitoring device acquires the monitoring data of the monitoring item from a corresponding database table according to the monitoring period, and dynamically displays the dynamic change condition of the monitoring item in the test process according to the monitoring data and a preset visual display mode.
For the monitoring device, when the time interval for acquiring the monitoring data from the database table reaches the monitoring period, the monitoring data stored by the tested terminal is acquired from the database table of each monitoring item, and the dynamic change condition of each monitoring item in the testing process is dynamically displayed according to a preset visual mode. Optionally, when the time interval for reading data from the corresponding database table reaches the monitoring period, acquiring the monitoring data of each monitoring item from the corresponding database table according to the mapping relationship between the monitoring item and the database table; and determining the dynamic change condition of the monitoring item in the test process according to the time stamp in the monitoring data, and dynamically displaying the dynamic change condition according to a preset visual display mode. Each piece of monitoring data carries a time stamp, the sequence of the monitoring data can be determined according to the time stamps, and then the dynamic change process of the parameter values of each monitoring item is determined for displaying. The visual display mode can enable a tester to timely know the running condition of the tested terminal in the testing process under the condition that the tester does not need to remotely log in the tested terminal.
Optionally, in an embodiment, in the method of this embodiment, the monitoring device may further generate a monitoring report for the host or the database according to the parameter values of the monitoring items read from the database and the recorded test conditions, and store the monitoring report so that a tester can check the monitoring report after the test is completed.
The embodiment provides a monitoring method of a testing process, which comprises determining a monitoring object, determining monitoring information and a monitoring item according to the monitoring object, wherein the monitoring information comprises a monitoring period, an IP address corresponding to the monitoring object, and a mapping relation between the monitoring item and a database table, generating a monitoring instruction according to the monitoring item, the monitoring period, and the mapping relation, transmitting the monitoring instruction to a monitored object, monitoring each monitoring item in the testing process by the monitoring object according to the monitoring instruction, storing the obtained monitoring data into the corresponding database table according to the mapping relation between the monitoring item and the database table, acquiring the monitoring data from the corresponding database table by a monitoring device according to the monitoring period, dynamically displaying the dynamic change condition of the monitoring item in the testing process according to a preset visual display mode, configuring relevant monitoring information by the monitoring device, the monitoring data is collected by the monitoring object, the monitoring device dynamically displays in real time, the tester can directly check the monitoring condition as required, the tester does not need to log in the application host by self to check by means of a system tool, and the monitoring efficiency of the test process is improved.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a test monitoring program is stored on the computer-readable storage medium, and the test monitoring program is executable by one or more processors to implement the following operations:
determining a monitoring object, and determining monitoring information and a monitoring item according to the monitoring object, wherein the monitoring information comprises a monitoring period, an IP address corresponding to the monitoring object and a mapping relation between the monitoring item and a database table;
generating a monitoring instruction according to the monitoring item, the monitoring period and the mapping relation between the monitoring item and the database table, sending the monitoring instruction to a monitoring object according to the IP address so that the monitoring object can monitor the monitoring item in the test process according to the monitoring instruction, and storing the acquired monitoring data to the corresponding database table according to the mapping relation between the monitoring item and the database table;
and acquiring the monitoring data of the monitoring item from a corresponding database table according to the monitoring period, and dynamically displaying the dynamic change condition of the monitoring item in the test process according to the monitoring data and a preset visual display mode.
The embodiment of the computer readable storage medium of the present invention is substantially the same as the embodiments of the monitoring apparatus and method for testing process, and will not be described herein again.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method 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, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. An apparatus for monitoring a test procedure, the apparatus comprising a memory and a processor, the memory having stored thereon a test monitor executable on the processor, the test monitor when executed by the processor performing the steps of:
determining a monitoring object, and determining monitoring information and a monitoring item according to the monitoring object, wherein the monitoring information comprises a monitoring period, an IP address corresponding to the monitoring object and a mapping relation between the monitoring item and a database table;
generating a monitoring instruction according to the monitoring item, the monitoring period and the mapping relation between the monitoring item and the database table, sending the monitoring instruction to a monitoring object according to the IP address so that the monitoring object can monitor the monitoring item in the test process according to the monitoring instruction, and storing the acquired monitoring data to the corresponding database table according to the mapping relation between the monitoring item and the database table;
acquiring monitoring data of the monitoring item from a corresponding database table according to the monitoring period, and dynamically displaying the dynamic change condition of the monitoring item in the testing process according to the monitoring data and a preset visual display mode;
if the monitoring object is a tested terminal, the monitoring item comprises network input, network output, CPU load, total memory, used memory, idle memory and disk utilization rate;
if the monitoring object is a database of the system to be tested, the monitoring items comprise an application SQL statement, a memory, a waiting event, a file and a tablespace, the monitoring of the application SQL statement comprises monitoring of full-table scanning, implicit conversion and high-frequency execution statements by the application SQL statement, and the monitoring of the file and the tablespace comprises monitoring of file accumulation, tablespace use and residual statistics.
2. The apparatus for monitoring a testing process according to claim 1, wherein the step of obtaining the monitoring data of the monitoring item from the corresponding database table according to the monitoring period, and dynamically displaying the dynamic change condition of the monitoring item in the testing process according to the monitoring data and a preset visual display mode comprises:
when the time interval for reading data from the corresponding database table reaches the monitoring period, acquiring the monitoring data of each monitoring item from the corresponding database table according to the mapping relation between the monitoring item and the database table;
and determining the dynamic change condition of the monitoring item in the test process according to the timestamp in the monitoring data, and dynamically displaying the dynamic change condition according to a preset visual display mode.
3. A monitoring system of a test process, the monitoring system of the test process comprising a monitoring apparatus of the test process according to any one of claims 1 to 2, characterized in that the system further comprises a terminal under test for:
when a monitoring instruction sent by the monitoring device is received, acquiring a monitoring item, a monitoring period and a mapping relation between the monitoring item and a database table from the monitoring instruction;
every interval of the monitoring period, acquiring parameter values of all monitoring items on the tested terminal, and generating monitoring data according to the acquired parameter values;
and correspondingly writing the monitoring data into the database table corresponding to each monitoring item according to the mapping relation between the monitoring item and the database table.
4. The system for monitoring a test process of claim 3, wherein the terminal under test is further configured to:
when the interval time reaches a preset time interval, acquiring a parameter value of each monitoring item, packaging the acquired parameter value into monitoring data, and storing the monitoring data into a cache region, wherein the name of each monitoring item, the table name of a corresponding database table, the acquired parameter value and a timestamp are recorded in each monitoring data, the preset time interval is 1/N of the monitoring period, and N is more than 1;
and when the time interval reaches the monitoring period, acquiring the monitoring data stored in the monitoring period from the cache region, and correspondingly writing the monitoring data into the database table corresponding to each monitoring item according to the mapping relation between the monitoring item and the database table.
5. A method for monitoring a test procedure, the method comprising:
the monitoring device determines a monitoring object and determines monitoring information and a monitoring item according to the monitoring object, wherein the monitoring information comprises a monitoring period, an IP address corresponding to the monitoring object and a mapping relation between the monitoring item and a database table;
generating a monitoring instruction according to the monitoring item, the monitoring period and the mapping relation between the monitoring item and a database table, and sending the monitoring instruction to a monitoring object according to the IP address;
the tested terminal monitors the monitoring item in the testing process according to the monitoring instruction, and stores the acquired monitoring data to a corresponding database table according to the mapping relation between the monitoring item and the database table;
the monitoring device acquires the monitoring data of the monitoring item from a corresponding database table according to the monitoring period, and dynamically displays the dynamic change condition of the monitoring item in the testing process according to the monitoring data and a preset visual display mode;
if the monitoring object is a tested terminal, the monitoring item comprises network input, network output, CPU load, total memory, used memory, idle memory and disk utilization rate;
if the monitoring object is a database of the system to be tested, the monitoring items comprise an application SQL statement, a memory, a waiting event, a file and a tablespace, the monitoring of the application SQL statement comprises monitoring of full-table scanning, implicit conversion and high-frequency execution statements by the application SQL statement, and the monitoring of the file and the tablespace comprises monitoring of file accumulation, tablespace use and residual statistics.
6. The method for monitoring the test process according to claim 5, wherein the step of the tested terminal monitoring the monitoring item in the test process according to the monitoring instruction and storing the obtained monitoring data to the corresponding database table according to the mapping relationship between the monitoring item and the database table comprises:
when the tested terminal receives a monitoring instruction sent by the monitoring device, acquiring a monitoring item, a monitoring period and a mapping relation between the monitoring item and a database table from the monitoring instruction;
every interval of the monitoring period, acquiring parameter values of all monitoring items on the tested terminal, and generating monitoring data according to the acquired parameter values;
and correspondingly writing the monitoring data into the database table corresponding to each monitoring item according to the mapping relation between the monitoring item and the database table.
7. The method for monitoring the testing process according to claim 5 or 6, wherein the step of the monitoring device obtaining the monitoring data of the monitoring item from the corresponding database table according to the monitoring period, and dynamically displaying the dynamic change condition of the monitoring item in the testing process according to the monitoring data and a preset visual display mode comprises:
when the time interval for reading data from the corresponding database table reaches the monitoring period, the monitoring device acquires the monitoring data of each monitoring item from the corresponding database table according to the mapping relation between the monitoring item and the database table;
and the monitoring device determines the dynamic change condition of the monitoring item in the test process according to the timestamp in the monitoring data, and dynamically displays the dynamic change condition according to a preset visual display mode.
8. A computer-readable storage medium having stored thereon a test monitoring program executable by one or more processors to perform the steps of the method of monitoring a test procedure of any one of claims 5 to 7.
CN201810469425.5A 2018-05-16 2018-05-16 Monitoring device and method for test process and computer readable storage medium Active CN108717391B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810469425.5A CN108717391B (en) 2018-05-16 2018-05-16 Monitoring device and method for test process and computer readable storage medium
PCT/CN2018/102103 WO2019218513A1 (en) 2018-05-16 2018-08-24 Apparatus and method for monitoring testing process, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810469425.5A CN108717391B (en) 2018-05-16 2018-05-16 Monitoring device and method for test process and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108717391A CN108717391A (en) 2018-10-30
CN108717391B true CN108717391B (en) 2021-09-28

Family

ID=63900079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810469425.5A Active CN108717391B (en) 2018-05-16 2018-05-16 Monitoring device and method for test process and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN108717391B (en)
WO (1) WO2019218513A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110134680B (en) * 2019-04-04 2022-11-29 平安科技(深圳)有限公司 Space monitoring method and device, computer equipment and storage medium
CN110990224A (en) * 2019-11-28 2020-04-10 浪潮软件股份有限公司 Method and system for monitoring hardware, server side and client side
CN111654408B (en) * 2020-04-24 2023-08-22 平安科技(深圳)有限公司 Device monitoring method, device, computer device and storage medium
CN111737233A (en) * 2020-06-24 2020-10-02 浙江大华技术股份有限公司 Data monitoring method and device
CN112600713A (en) * 2020-12-24 2021-04-02 上海哔哩哔哩科技有限公司 Data monitoring method and system
CN113486077B (en) * 2021-06-11 2023-08-22 北京空间飞行器总体设计部 Method for processing spacecraft power system test data by using real-time database
CN113552497B (en) * 2021-06-11 2023-08-25 北京空间飞行器总体设计部 Method for acquiring parameters from instrument and equipment for testing spacecraft power supply system
CN113627627A (en) * 2021-08-11 2021-11-09 北京互金新融科技有限公司 Abnormity monitoring method, abnormity monitoring device, computer readable medium and processor
CN114389971B (en) * 2022-03-23 2022-12-23 苏州浪潮智能科技有限公司 Intelligent monitoring fine adjustment method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102648465A (en) * 2009-08-26 2012-08-22 杰维斯股份公司 Remote data collection systems and methods
CN103530524A (en) * 2013-10-24 2014-01-22 徐州通软计算机系统集成有限公司 Medical information intelligent data platform, use method and application thereof
CN103593568A (en) * 2013-11-15 2014-02-19 国家电网公司 On-line monitoring data model mapping method based on IEC 61850
CN103731298A (en) * 2013-11-15 2014-04-16 中国航天科工集团第二研究院七〇六所 Large-scale distributed network safety data acquisition method and system
CN104657250A (en) * 2014-12-16 2015-05-27 无锡华云数据技术服务有限公司 Monitoring method for monitoring performance of cloud host
CN104683190A (en) * 2015-03-26 2015-06-03 重庆金美通信有限责任公司 Webmaster managed network simulation system and webmaster managed network simulation method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8401022B2 (en) * 2008-02-08 2013-03-19 Oracle International Corporation Pragmatic approaches to IMS
CN105279226A (en) * 2015-09-09 2016-01-27 浪潮(北京)电子信息产业有限公司 Data monitoring method and equipment based on big data
CN105243016B (en) * 2015-09-30 2018-04-17 北京奇虎科技有限公司 The methods, devices and systems being monitored to the terminal device on test platform
CN105912703A (en) * 2016-04-26 2016-08-31 北京百度网讯科技有限公司 Data storage method and data query method and device
CN106649031A (en) * 2016-10-14 2017-05-10 郑州云海信息技术有限公司 Monitoring data obtaining method and device, and computer

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102648465A (en) * 2009-08-26 2012-08-22 杰维斯股份公司 Remote data collection systems and methods
CN103530524A (en) * 2013-10-24 2014-01-22 徐州通软计算机系统集成有限公司 Medical information intelligent data platform, use method and application thereof
CN103593568A (en) * 2013-11-15 2014-02-19 国家电网公司 On-line monitoring data model mapping method based on IEC 61850
CN103731298A (en) * 2013-11-15 2014-04-16 中国航天科工集团第二研究院七〇六所 Large-scale distributed network safety data acquisition method and system
CN104657250A (en) * 2014-12-16 2015-05-27 无锡华云数据技术服务有限公司 Monitoring method for monitoring performance of cloud host
CN104683190A (en) * 2015-03-26 2015-06-03 重庆金美通信有限责任公司 Webmaster managed network simulation system and webmaster managed network simulation method

Also Published As

Publication number Publication date
WO2019218513A1 (en) 2019-11-21
CN108717391A (en) 2018-10-30

Similar Documents

Publication Publication Date Title
CN108717391B (en) Monitoring device and method for test process and computer readable storage medium
CN109302522B (en) Test method, test device, computer system, and computer medium
CN108984388B (en) Method and terminal equipment for generating automatic test case
CN111078567B (en) Report generation method, terminal and storage medium of automatic test platform
WO2018036273A1 (en) Simulation test method, server, device, and computer-readable storage medium
CN109633351B (en) Intelligent IT operation and maintenance fault positioning method, device, equipment and readable storage medium
CN108763086B (en) Script recording method, terminal and computer readable storage medium based on remote true machine
CN110647471B (en) Interface test case generation method, electronic device and storage medium
CN101867494A (en) Soft hardware performance monitoring method based on monitoring template, and system thereof
WO2019227708A1 (en) Online debugging apparatus and method for test case, and computer-readable storage medium
WO2019214109A1 (en) Monitoring device and method for testing process, and computer readable storage medium
CN108959067B (en) Method and device for testing search engine and computer readable storage medium
CN109426597B (en) Application performance monitoring method, device, equipment, system and storage medium
CN110781089A (en) Method and device for automatically testing UI of equipment, electronic equipment and medium
CN112286806A (en) Automatic testing method and device, storage medium and electronic equipment
CN111506470A (en) Browser error detection and alarm method, device, equipment and storage medium
JP6238221B2 (en) Apparatus, method and program for monitoring execution of software
CN110908915A (en) Test coverage rate display method and device and computer system
CN107729341B (en) Electronic device, information inquiry control method, and computer-readable storage medium
CN109684156B (en) Monitoring method, device, terminal and storage medium based on mixed mode application
CN109271289B (en) Application interface monitoring method, device, equipment and computer readable medium
CN107451056B (en) Method and device for monitoring interface test result
CN107797927B (en) Application automation test method, device, equipment and readable storage medium
CN111124841B (en) Alarm method and device for abnormal page and computer system
CN105812430B (en) Intelligent query method for mobile terminal, mobile terminal and server

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