Test data collection method, device, electronic device and storage medium
By receiving test operation instructions, the performance data of the test execution end and the tested end are obtained and associated, and displayed using timestamps, which solves the problem that existing tools cannot associate and display performance test data, and simplifies the analysis process of performance test results.
Patent Information
- Application Number
- CN201910453166.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing tools cannot effectively associate and display the initiator, tested end, and test result data related to performance testing, making it difficult to analyze performance test results and requiring a lot of time to collect and analyze data.
By receiving test operation instructions, the test program is started, the performance data of the test execution end and the tested end are obtained and associated, and the time stamp is used for association and display to form an easy-to-analyze display page.
It realizes the summary of all monitoring data into one display page, simplifies users' analysis of test results, and improves the efficiency of data collection and display.
Smart Images

Figure CN110362470B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a test data collection method, device, electronic equipment and storage medium. Background Art
[0002] Performance test related data includes three aspects: initiator performance data (host, JVM), tested end performance data (host, JVM / middleware, network, etc.), and test result data. Currently, there is no tool on the market that can collect and display the three aspects of data in a correlated manner, making the analysis of performance test results very inconvenient. It takes a lot of time to collect, analyze and display different performance data, and then summarize the data from multiple parties to analyze the performance test results. Summary of the invention
[0003] In view of the above, it is necessary to propose a test data collection method, device, electronic device and computer-readable storage medium to aggregate all monitoring data into a display page, thereby facilitating users to analyze the test results.
[0004] A first aspect of the present application provides a test data collection method, the method comprising:
[0005] When receiving the test operation instruction, the test execution end is controlled to start the test program to test the end under test;
[0006] Acquire performance data of the test execution end, performance data of the tested end, and test data;
[0007] Associating the performance data of the test execution end, the performance data of the tested end and the test data through timestamps; and
[0008] The performance data of the test execution end, the performance data of the tested end, and the test data associated with the timestamp are refreshed and displayed according to the progression of time with the time axis as the horizontal axis.
[0009] Preferably, the obtaining of the performance data of the test execution end, the performance data of the tested end and the test data comprises:
[0010] Run the performance data collection script of the test execution end to obtain the performance data of the test execution end;
[0011] Running the performance data collection script of the tested terminal to obtain the performance data of the tested terminal; and
[0012] Run the test data collection script of the tested end to obtain the test data of the tested end.
[0013] Preferably, the step of running the performance data collection script of the test execution end to obtain the performance data of the test execution end, running the performance data collection script of the tested end to obtain the performance data of the tested end, and running the test data collection script of the tested end to obtain the test data of the tested end comprises:
[0014] Parsing the performance data collection task of the test execution end to determine the performance data collection rule and performance data collection script of the test execution end;
[0015] Running the performance data collection script of the test execution end according to the performance data collection rule of the test execution end to collect the performance data of the test execution end;
[0016] Parsing the performance data collection task of the tested end to determine the performance data collection rule and performance data collection script of the tested end;
[0017] Running the performance data collection script of the tested terminal according to the performance data collection rule of the tested terminal to collect the performance data of the tested terminal;
[0018] parsing the test data collection task of the tested end to determine the test data collection rule and test data collection script of the tested end; and
[0019] The test data collection script of the tested end is run according to the test data collection rule of the tested end to collect the test data of the tested end.
[0020] Preferably, associating the performance data of the test execution end, the performance data of the tested end, and the test data through a timestamp comprises:
[0021] Extracting a test scenario from the test data of the tested end;
[0022] Strongly associating the performance data of the test execution end, the performance data of the tested end, and the test data in the same test scenario as the test data of the tested end according to the test scenario; and
[0023] The performance data of the test execution end, the performance data of the tested end, and the test data that are strongly associated are weakly associated through timestamps.
[0024] Preferably, displaying the performance data of the test execution end, the performance data of the tested end and the test data associated with the timestamp includes:
[0025] Set each test scenario to correspond to a monitoring page; and
[0026] On the monitoring page corresponding to each test scenario, the time axis is used as the horizontal axis, and the performance data of the test execution end, the performance data of the tested end and the test data corresponding to each test scenario are refreshed and displayed according to the progression of time.
[0027] Preferably, the method further comprises:
[0028] Determine whether the performance data of the test execution end, the performance data of the tested end and the test data reach a preset threshold; and
[0029] When the performance data of the test execution end, the performance data of the tested end and the test data reach a preset threshold, an alarm is issued.
[0030] Preferably, the method further comprises:
[0031] The performance data of the test execution end, the performance data of the tested end and the test data are written into the database of the test system through a unified interface.
[0032] A second aspect of the present application provides a test data collection device, the device comprising:
[0033] The start module is used to control the test execution end to start the test program to test the end under test when receiving the test operation instruction;
[0034] A data acquisition module, used to acquire the performance data of the test execution end, the performance data of the tested end and the test data;
[0035] an association module, used to associate the performance data of the test execution end, the performance data of the tested end and the test data through a timestamp; and
[0036] The display module is used to refresh and display the performance data of the test execution end, the performance data of the tested end and the test data associated with the timestamp with the time axis as the horizontal axis according to the progression of time.
[0037] A third aspect of the present application provides an electronic device, the electronic device comprising a processor, the processor being configured to implement the test data collection method when executing a computer program stored in a memory.
[0038] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the test data collection method when executed by a processor.
[0039] The present invention associates the performance data of the test execution end, the performance data of the tested end and the test data through timestamps, and displays the performance data of the test execution end, the performance data of the tested end and the test data associated with timestamps, thereby aggregating all monitoring data into one display page, making it convenient for users to analyze the test results. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a flow chart of a test data collection method in one embodiment of the present invention.
[0041] Figure 2 This is a diagram of the application environment for test data collection in one embodiment of the present invention.
[0042] Figure 3 It is a structural diagram of a test data collection device in one embodiment of the present invention.
[0043] Figure 4 It is a schematic diagram of the electronic device of the present invention. DETAILED DESCRIPTION
[0044] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0045] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. The embodiments described are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0047] Preferably, the test data collection method of the present invention is applied in one or more electronic devices. The electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.
[0048] The electronic device may be a computing device such as a desktop computer, a laptop computer, a tablet computer, a cloud server, etc. The device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0049] Example 1
[0050] Figure 1 The flowchart of the test data collection method in one embodiment of the present invention is shown in FIG.
[0051] See also Figure 1 As shown, the test data collection method specifically includes the following steps:
[0052] Step S201 , when receiving a test operation instruction, the test execution terminal 1 is controlled to start a test program to test the tested terminal 2 .
[0053] Please refer to Figure 2 , shown is an application environment diagram of a test data collection method in one embodiment of the present invention. In this embodiment, the method is applied in a test system 100, and the test system 100 includes a test execution terminal 1 and a tested terminal 2. The test execution terminal 1 is communicatively connected with the tested terminal 2 to test the tested terminal 2. For example, the test execution terminal 1 can be started to perform a stress test on the tested terminal 2. In this embodiment, the test execution terminal 1 can be a host, a stress testing machine, a server, a virtual machine, and other devices. The tested terminal 2 is a server, a virtual machine, and other devices.
[0054] Step S202, obtaining the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data.
[0055] In this embodiment, the performance data collection script of the test execution terminal 1 is run to obtain the performance data of the test execution terminal 1, the performance data collection script of the tested terminal 2 is run to obtain the performance data of the tested terminal 2, and the test data collection script of the tested terminal 2 is run to obtain the test data of the tested terminal 2. In this embodiment, the performance data of the test execution terminal 1 includes the host CPU and memory performance data. The performance data of the tested terminal 2 includes the average throughput, the peak throughput, and the minimum throughput. Among them, the average throughput refers to the average value of the throughput of the tested terminal 2 over a period of time, and the throughput refers to the number of transactions processed by the tested terminal 2 within a fixed time. The peak throughput refers to the maximum value of the throughput of the tested terminal 2 over a period of time. The minimum throughput is the minimum value of the throughput of the tested terminal 2 over a period of time. The test data of the tested terminal 2 includes the CPU usage rate.
[0056] Specifically, the step S202, obtaining the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data of the tested terminal 2 includes: parsing the performance data collection task of the test execution terminal 1 to determine the performance data collection rule and performance data collection script of the test execution terminal 1; running the performance data collection script of the test execution terminal 1 according to the performance data collection rule of the test execution terminal 1 to collect the performance data of the test execution terminal 1; parsing the performance data collection task of the tested terminal 2 to determine the performance data collection rule and performance data collection script of the tested terminal 2; running the performance data collection script of the tested terminal 2 according to the performance data collection rule of the tested terminal 2 to collect the performance data of the tested terminal 2; parsing the test data collection task of the tested terminal 2 to determine the test data collection rule and test data collection script of the tested terminal 2; running the test data collection script of the tested terminal 2 according to the test data collection rule of the tested terminal 2 to collect the test data of the tested terminal 2.
[0057] In this embodiment, when it is parsed that the performance data collection task of the test execution terminal 1 is to collect the host CPU and memory performance data of the test execution terminal 1, a collection rule for collecting the host CPU and memory performance data of the test execution terminal 1 at every first preset time interval is determined, and a data collection script for collecting the host CPU and memory performance data of the test execution terminal 1 at every first preset time interval is determined. For example, the first preset time is 5 seconds. The test execution terminal 1 collects the performance data of the test execution terminal 1 according to the collection rule for collecting the host CPU and memory performance data of the test execution terminal 1 at every first preset time interval, and the data collection script for collecting the host CPU and memory performance data of the test execution terminal 1 at every first preset time interval.
[0058] In this embodiment, when it is analyzed that the performance data collection task of the tested terminal 2 is to collect the average throughput, peak throughput, and minimum throughput of the tested terminal 2, a collection rule for collecting the host CPU and memory performance data of the tested terminal 2 at every second preset time interval is determined, and a data collection script for collecting the average throughput, peak throughput, and minimum throughput of the tested terminal 2 at every second preset time interval is determined. The tested terminal 2 collects the performance data of the tested terminal 2 according to the collection rule for collecting the average throughput, peak throughput, and minimum throughput of the tested terminal 2 at every second preset time interval and the data collection script for collecting the average throughput, peak throughput, and minimum throughput of the tested terminal 2 at every second preset time interval.
[0059] In this embodiment, when it is analyzed that the test data collection task of the tested terminal 2 is to collect the CPU usage of the tested terminal 2, it is determined to collect the CPU usage of the tested terminal 2 at every third preset time interval, and it is determined to collect the CPU usage of the tested terminal 2 at every third preset time interval. The tested terminal 2 collects the performance data of the tested terminal 2 according to the collection rule of the tested terminal 2 for collecting the tested terminal 2 at every third preset time interval and the data collection script for collecting the CPU usage of the tested terminal 2 at every third preset time interval.
[0060] Step S203, associating the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data through timestamps.
[0061] In this implementation, the performance data of the test execution terminal 1 , the performance data of the tested terminal 2 , and the test data may be associated through timestamps according to the test scenario of the tested terminal 2 .
[0062] Specifically, the step S203, associating the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data through a timestamp includes: extracting the test scenario in the test data of the tested terminal 2; strongly associating the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data in the same test scenario as the test data of the tested terminal 2 according to the test scenario; and weakly associating the strongly associated performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data through a timestamp.
[0063] In this embodiment, the test scenario is a stress test scenario. In a specific embodiment, the stress test scenario in the test data of the tested terminal 2 is first extracted, and then the performance data of the test execution terminal 1, the performance data of the tested terminal 2, and the test data are strongly associated in the same stress scenario as the test data of the tested terminal 2, and finally the performance data of the test execution terminal 1, the performance data of the tested terminal 2, and the test data are weakly associated through the timestamp.
[0064] Step S204, displaying the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data associated with the timestamp.
[0065] In this embodiment, the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data associated with the timestamp are refreshed and displayed according to the progression of time with the time axis as the horizontal axis. Specifically, the step S204, setting the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data associated with the timestamp to be displayed includes: setting each test scenario to correspond to a monitoring page; on the monitoring page corresponding to each test scenario, the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data corresponding to each test scenario are refreshed and displayed with the time axis as the horizontal axis according to the progression of time. In this embodiment, the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data associated with the timestamp are displayed on the same display chart. Among them, the display chart includes but is not limited to a bar chart, a pie chart, a waterfall chart, a K-line chart, and an instrument chart. In another embodiment, the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data associated with the timestamp are displayed on three display charts respectively.
[0066] In this implementation manner, after step S202 , the method further includes: writing the performance data of the test execution terminal 1 , the performance data of the tested terminal 2 , and the test data into the database of the test system 100 through a unified interface.
[0067] In this embodiment, the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data are written into the database of the test system 100 through a unified interface and saved in the same data file. The file is named with a number and a date.
[0068] In this embodiment, step S204 also includes: obtaining the performance data of the test execution end 1, the performance data of the tested end 2 and the test data; determining whether the performance data of the test execution end 1, the performance data of the tested end 2 and the test data reach a preset threshold; and issuing an alarm when the performance data of the test execution end 1, the performance data of the tested end 2 and the test data reach the preset threshold.
[0069] In this embodiment, when the performance data of the test execution end 1, the performance data of the tested end 2 and the test data reach the preset threshold, the performance data of the test execution end 1, the performance data of the tested end 2 and the test data corresponding to the preset threshold time point will also be recorded to facilitate analysis and processing by the tester.
[0070] The present invention associates the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data through timestamps, and displays the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data associated with timestamps, thereby facilitating aggregating all monitoring data into a display page for display, making it convenient for users to analyze the test results.
[0071] Example 2
[0072] Figure 3 FIG. 4 is a structural diagram of a test data collection device 40 according to an embodiment of the present invention.
[0073] In some embodiments, the test data collection device 40 runs in an electronic device. The test data collection device 40 may include multiple functional modules composed of program code segments. The program code of each program segment in the test data collection device 40 may be stored in a memory and executed by at least one processor.
[0074] In this embodiment, the test data collection device 40 can be divided into multiple functional modules according to the functions it performs. Figure 3 As shown, the test data collection device 40 may include a startup module 401, a data acquisition module 402, an association module 403, a display module 404, a storage module 405 and an alarm module 406. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In some embodiments, the functions of each module will be described in detail in subsequent embodiments.
[0075] The starting module 401 is used to control the test execution terminal 1 to start the test program to test the tested terminal 2 when receiving the test operation instruction.
[0076] In this embodiment, the test execution end 1 can be a host, a stress tester, a server, a virtual machine, etc. The tested end 2 can be a server, a virtual machine, etc.
[0077] The data acquisition module 402 is used to acquire the performance data of the test execution terminal 1 , the performance data of the tested terminal 2 , and the test data.
[0078] In this embodiment, the data acquisition module 402 runs the performance data collection script of the test execution terminal 1 to obtain the performance data of the test execution terminal 1, runs the performance data collection script of the tested terminal 2 to obtain the performance data of the tested terminal 2, and runs the test data collection script of the tested terminal 2 to obtain the test data of the tested terminal 2. In this embodiment, the performance data of the test execution terminal 1 includes the host CPU and memory performance data. The performance data of the tested terminal 2 includes the average throughput, the peak throughput, and the minimum throughput. Among them, the average throughput refers to the average value of the throughput of the tested terminal 2 over a period of time, and the throughput refers to the number of transactions processed by the tested terminal 2 within a fixed time. The peak throughput refers to the maximum value of the throughput of the tested terminal 2 over a period of time. The minimum throughput is the minimum value of the throughput of the tested terminal 2 over a period of time. The test data of the tested terminal 2 includes the CPU usage rate.
[0079] Specifically, the data acquisition module 402 acquires the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data of the tested terminal 2, including: parsing the performance data collection task of the test execution terminal 1 to determine the performance data collection rule and performance data collection script of the test execution terminal 1; running the performance data collection script of the test execution terminal 1 according to the performance data collection rule of the test execution terminal 1 to collect the performance data of the test execution terminal 1; parsing the performance data collection task of the tested terminal 2 to determine the performance data collection rule and performance data collection script of the tested terminal 2; running the performance data collection script of the tested terminal 2 according to the performance data collection rule of the tested terminal 2 to collect the performance data of the tested terminal 2; parsing the test data collection task of the tested terminal 2 to determine the test data collection rule and test data collection script of the tested terminal 2; running the test data collection script of the tested terminal 2 according to the test data collection rule of the tested terminal 2 to collect the test data of the tested terminal 2.
[0080] In this embodiment, when it is parsed that the performance data collection task of the test execution terminal 1 is to collect the host CPU and memory performance data of the test execution terminal 1, the data acquisition module 402 determines the collection rules for collecting the host CPU and memory performance data of the test execution terminal 1 at each first preset time interval and determines the data collection script for collecting the host CPU and memory performance data of the test execution terminal 1 at each first preset time interval. For example, the first preset time is 5 seconds. The test execution terminal 1 collects the performance data of the test execution terminal 1 according to the collection rules for collecting the host CPU and memory performance data of the test execution terminal 1 at each first preset time interval and the data collection script for collecting the host CPU and memory performance data of the test execution terminal 1 at each first preset time interval.
[0081] In this embodiment, when it is parsed that the performance data collection task of the tested terminal 2 is to collect the average throughput, peak throughput, and minimum throughput of the tested terminal 2, the data acquisition module 402 determines the collection rules for collecting the host CPU and memory performance data of the tested terminal 2 at every second preset time interval and determines the data collection script for collecting the average throughput, peak throughput, and minimum throughput of the tested terminal 2 at every second preset time interval. The tested terminal 2 collects the performance data of the tested terminal 2 according to the collection rules for collecting the average throughput, peak throughput, and minimum throughput of the tested terminal 2 at every second preset time interval and the data collection script for collecting the average throughput, peak throughput, and minimum throughput of the tested terminal 2 at every second preset time interval.
[0082] In this embodiment, when it is parsed that the test data collection task of the tested terminal 2 is to collect the CPU usage of the tested terminal 2, the data acquisition module 402 determines to collect the CPU usage of the tested terminal 2 at every third preset time interval and determines to collect the CPU usage of the tested terminal 2 at every third preset time interval. The tested terminal 2 collects the performance data of the tested terminal 2 according to the collection rule of the tested terminal 2 for collecting the tested terminal 2 at every third preset time interval and the data collection script for collecting the CPU usage of the tested terminal 2 at every third preset time interval.
[0083] The association module 403 is used to associate the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data through timestamps.
[0084] In this implementation, the association module 403 may associate the performance data of the test execution terminal 1 , the performance data of the tested terminal 2 , and the test data through timestamps according to the test scenario of the tested terminal 2 .
[0085] Specifically, the association module 403 associates the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data through timestamps, including: extracting the test scenario in the test data of the tested terminal 2; strongly associating the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data in the same test scenario as the test data of the tested terminal 2 according to the test scenario; and weakly associating the strongly associated performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data through timestamps.
[0086] In this embodiment, the test scenario is a stress test scenario. In a specific embodiment, the stress test scenario in the test data of the tested terminal 2 is first extracted, and then the performance data of the test execution terminal 1, the performance data of the tested terminal 2, and the test data are strongly associated in the same stress scenario as the test data of the tested terminal 2, and finally the performance data of the test execution terminal 1, the performance data of the tested terminal 2, and the test data are weakly associated through the timestamp.
[0087] The display module 404 is used to display the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data associated with the timestamp.
[0088] In this embodiment, the display module 404 uses the time axis as the horizontal axis to refresh and display the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data associated with the timestamp according to the progression of time. Specifically, the display module 404 sets the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data associated with the timestamp to be displayed, including: setting each test scenario to correspond to a monitoring page; on the monitoring page corresponding to each test scenario, using the time axis as the horizontal axis, refreshing and displaying the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data corresponding to each test scenario according to the progression of time. In this embodiment, the display module 404 displays the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data associated with the timestamp on the same display chart. Among them, the display chart includes but is not limited to a bar chart, a pie chart, a waterfall chart, a K-line chart, and an instrument chart. In another embodiment, the display module 404 displays the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data associated with the timestamp on three display charts respectively.
[0089] The storage module 405 is used to write the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data into the database of the test system 100 through a unified interface.
[0090] In this embodiment, the storage module 405 writes the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data into the database of the test system 100 through a unified interface and saves them in the same data file. The file is named with a number and a date.
[0091] The alarm module 406 is used to determine whether the performance data of the test execution end 1, the performance data of the tested end 2 and the test data reach the preset threshold; and to alarm when the performance data of the test execution end 1, the performance data of the tested end 2 and the test data reach the preset threshold.
[0092] In this embodiment, when the performance data of the test execution end 1, the performance data of the tested end 2 and the test data reach the preset threshold, the performance data of the test execution end 1, the performance data of the tested end 2 and the test data corresponding to the preset threshold time point will also be recorded to facilitate analysis and processing by the tester.
[0093] The present invention associates the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data through timestamps, and displays the performance data of the test execution terminal 1, the performance data of the tested terminal 2 and the test data associated with timestamps, thereby facilitating aggregating all monitoring data into a display page for display, making it convenient for users to analyze the test results.
[0094] Example 3
[0095] Figure 4 FIG. 6 is a schematic diagram of an electronic device 6 according to an embodiment of the present invention.
[0096] The electronic device 6 includes a memory 61, a processor 62, and a computer program 63 stored in the memory 61 and executable on the processor 62. When the processor 62 executes the computer program 63, the steps in the above test data collection method embodiment are implemented, for example: Figure 2 Alternatively, when the processor 62 executes the computer program 63, the functions of each module / unit in the above-mentioned test data collection device embodiment are realized, for example Figure 3 Modules 401 to 406 in .
[0097] Exemplarily, the computer program 63 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 62 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 63 in the electronic device 6. For example, the computer program 63 may be divided into Figure 3 The startup module 401, data acquisition module 402, association module 403, display module 404, storage module 405 and alarm module 406 in the embodiment, the specific functions of each module refer to the second embodiment.
[0098] The electronic device 6 may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. Those skilled in the art will appreciate that the schematic diagram is merely an example of the electronic device 6 and does not limit the electronic device 6. The electronic device 6 may include more or fewer components than shown in the diagram, or may combine certain components, or different components. For example, the electronic device 6 may also include input and output devices, network access devices, buses, etc.
[0099] The processor 62 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor 62 may be any conventional processor, etc. The processor 62 is the control center of the electronic device 6, and uses various interfaces and lines to connect various parts of the entire electronic device 6.
[0100] The memory 61 can be used to store the computer program 63 and / or modules / units. The processor 62 implements various functions of the electronic device 6 by running or executing the computer program and / or modules / units stored in the memory 61 and calling the data stored in the memory 61. The memory 61 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device 6 (such as audio data, a phone book, etc.), etc. In addition, the memory 61 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0101] If the module / unit integrated in the electronic device 6 is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0102] In the several embodiments provided by the present invention, it should be understood that the disclosed electronic device and method can be implemented in other ways. For example, the electronic device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0103] In addition, the functional modules in the various embodiments of the present invention may be integrated into the same processing module, or each module may exist physically separately, or two or more modules may be integrated into the same module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0104] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other modules or steps, and the singular does not exclude the plural. Multiple modules or electronic devices stated in the electronic device claim can also be implemented by the same module or electronic device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A test data collection method, It is characterized in that The method comprises: When receiving the test operation instruction, the control test execution end starts the test program to test the tested end; Acquire the performance data of the test execution end, the performance data of the tested end and the test data, and write the performance data of the test execution end, the performance data of the tested end and the test data into the database of the test system through a unified interface, wherein the acquisition of the performance data of the test execution end, the performance data of the tested end and the test data comprises: parsing the performance data collection task of the test execution end to determine the performance data collection rule and the performance data collection script of the test execution end; running the performance data collection script of the test execution end according to the performance data collection rule of the test execution end to collect the performance data of the test execution end; parsing the performance data collection task of the tested end to determine the performance data collection rule and the performance data collection script of the tested end; running the performance data collection script of the tested end according to the performance data collection rule of the tested end to collect the performance data of the tested end; parsing the test data collection task of the tested end to determine the test data collection rule and the test data collection script of the tested end; and running the test data collection script of the tested end according to the test data collection rule of the tested end to collect the test data of the tested end; Associating the performance data of the test execution end, the performance data of the tested end, and the test data through a timestamp, including: extracting a test scenario in the test data of the tested end; strongly associating the performance data of the test execution end, the test scenario in the performance data of the tested end, and the same test scenario in the test data of the tested end according to the test scenario; and weakly associating the performance data of the test execution end, the performance data of the tested end, and the test data that are strongly associated through the test scenario through a timestamp; and The performance data of the test execution end, the performance data of the tested end, and the test data associated with the timestamp are refreshed and displayed according to the progression of time with the time axis as the horizontal axis.
2. The test data collection method according to claim 1, It is characterized in that Displaying the performance data of the test execution end, the performance data of the tested end and the test data associated with the timestamp includes: Set each test scenario to correspond to a monitoring page; and On the monitoring page corresponding to each test scenario, the time axis is used as the horizontal axis, and the performance data of the test execution end, the performance data of the tested end and the test data corresponding to each test scenario are refreshed and displayed according to the progression of time.
3. The test data collection method according to claim 1, It is characterized in that The method further comprises: Determine whether the performance data of the test execution end, the performance data of the tested end and the test data reach a preset threshold; and When the performance data of the test execution end, the performance data of the tested end and the test data reach a preset threshold, an alarm is issued.
4. A test data collection device, It is characterized in that The device comprises a module for implementing the test data collection method according to any one of claims 1 to 3, and the device comprises: The start module is used to control the test execution end to start the test program to test the end under test when receiving the test operation instruction; A data acquisition module, used to acquire the performance data of the test execution end, the performance data of the tested end and the test data; an association module, used to associate the performance data of the test execution end, the performance data of the tested end and the test data through a timestamp; and The display module is used to refresh and display the performance data of the test execution end, the performance data of the tested end and the test data associated with the timestamp with the time axis as the horizontal axis according to the progression of time.
5. An electronic device, Features: The electronic device comprises a processor, and the processor is used to implement the test data collection method according to any one of claims 1 to 3 when executing a computer program stored in a memory.
6. A computer-readable storage medium having a computer program stored thereon, Features: When the computer program is executed by a processor, the test data collection method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Remote operation method and device for testing equipment
CN108282542A
Method and system for testing APPs
CN108536588A
Power consumption testing method and device, electronic equipment and storage medium
CN109697168A
Method and system for automatically generating test data for testing applications
US20180095866A1
