CN110704326A - Test analysis method and device - Google Patents

Test analysis method and device Download PDF

Info

Publication number
CN110704326A
CN110704326A CN201910959188.5A CN201910959188A CN110704326A CN 110704326 A CN110704326 A CN 110704326A CN 201910959188 A CN201910959188 A CN 201910959188A CN 110704326 A CN110704326 A CN 110704326A
Authority
CN
China
Prior art keywords
performance data
performance
tester
parameter
analysis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910959188.5A
Other languages
Chinese (zh)
Inventor
齐海燕
杨丹君
叶学莉
李春雅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Supcon Technology Co Ltd
Original Assignee
Zhejiang Supcon Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Supcon Technology Co Ltd filed Critical Zhejiang Supcon Technology Co Ltd
Priority to CN201910959188.5A priority Critical patent/CN110704326A/en
Publication of CN110704326A publication Critical patent/CN110704326A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Abstract

The embodiment of the invention discloses a test analysis method, which comprises the following steps: responding to the test analysis instruction, and acquiring performance data of at least one test machine; wherein the performance data of the tester is recorded by a performance calculator deployed on the tester; and classifying the performance data of different testing machines, and calling a preset analysis function to analyze the performance data of the testing machines. Therefore, the performance data of the testing machine can be automatically acquired, the data can be automatically analyzed, the operation efficiency is improved, and the consumption of manpower and material resources is reduced.

Description

Test analysis method and device
Technical Field
The invention relates to the field of software testing, in particular to a test analysis method and a test analysis device.
Background
The working condition software is usually continuously operated on site for a long time, and the stability of software operation is crucial to ensuring the operation of the software, so that the long-term stability test of the software is required to ensure the long-term stability operation of the software.
In the prior art, when the long-term stability is tested and analyzed, the test is performed manually, but the long-term stability test is characterized by long test time and large test data volume, and in this case, the manual test and analysis mode is adopted, so that the efficiency is low, the time consumption is long, and a large amount of manpower and material resources are consumed.
Disclosure of Invention
In view of this, the embodiment of the invention discloses a test machine analysis method and device, which achieve automatic analysis of long-term test and improve operation efficiency.
The embodiment of the invention discloses a test analysis method, which comprises the following steps:
responding to the test analysis instruction, and acquiring performance data of at least one test machine; the performance data of the tester is recorded by a performance counter deployed on the tester;
classifying the performance data of different testers;
and calling a preset analysis function to analyze the performance data of the tester.
Optionally, the obtaining performance data of at least one tester through a preconfigured IP address of the tester includes:
aiming at any one test machine, connecting the test machine through the IP address of the test machine;
and acquiring performance data from the tester in a network sharing mode.
Optionally, the method further includes:
limiting the execution of other instructions in the process of acquiring the performance of the tester;
and after the completion of acquiring the performance of the tester is detected, releasing the limitation on other instructions.
Optionally, the process of recording the performance data of the tester by the performance counter includes:
recording performance data of different processes;
and recording abnormal data when the process is detected to be abnormal.
Optionally, the invoking a preset analysis function to analyze the performance data of the testing machine includes:
merging the performance data stored in different folders according to the performance data of each tester;
storing the combined performance data in a structural body according to the process; filtering data of different processes in the structure to obtain performance data of each performance parameter;
and calling an analysis function corresponding to each performance parameter, and analyzing the performance data of each parameter.
Optionally, the invoking an analysis function corresponding to each parameter to analyze the performance data of each parameter includes:
copying the performance data for each performance parameter into an EXCEL table;
and reading the performance data corresponding to each performance parameter in the EXCEL table, calling an analysis function of each performance parameter, and analyzing the performance data of each parameter to obtain an analysis chart corresponding to each parameter.
The embodiment of the invention discloses a test analysis device, which comprises:
an obtaining unit, configured to obtain performance data of at least one tester in response to a test analysis instruction; the performance data of the tester is recorded by a performance counter deployed on the tester;
the classification unit is used for classifying the performance data of different testers;
and the analysis unit is used for calling a preset analysis function to analyze the performance data of the tester.
Optionally, the obtaining unit includes:
the connection subunit is used for connecting the tester through the IP address of the tester aiming at any tester;
and the acquisition subunit is used for acquiring the performance data from the tester in a network sharing mode.
Optionally, the analysis unit includes:
the merging subunit is used for merging the performance data stored in different folders according to the performance data of each tester;
the storage subunit is used for storing the combined performance data into the structure body according to the process;
the filtering subunit is used for filtering the data of different processes in the structure to obtain the performance data of each performance parameter;
and the analysis subunit is used for calling an analysis function corresponding to each performance parameter and analyzing the performance data of each parameter.
Optionally, the analysis subunit is configured to:
a copy subunit for copying the performance data of each performance parameter into the EXCEL table;
and the chart generation subunit is used for reading the performance data corresponding to each performance parameter in the EXCEL table, calling an analysis function of each performance parameter, and analyzing the performance data of each parameter to obtain an analysis chart corresponding to each parameter.
The embodiment of the invention discloses a test analysis method, which comprises the following steps: responding to the test analysis instruction, and acquiring performance data of at least one test machine; wherein the performance data of the tester is recorded by a performance calculator deployed on the tester; and classifying the performance data of different testing machines, and calling a preset analysis function to analyze the performance data of the testing machines. Therefore, the performance data of the testing machine can be automatically acquired, the data can be automatically analyzed, the operation efficiency is improved, and the consumption of manpower and material resources is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a test analysis method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an architecture for test analysis according to an embodiment of the present invention;
FIG. 3 shows an exemplary illustrative schematic of an analysis chart provided by an embodiment of the invention;
fig. 4 is a schematic structural diagram illustrating a test analysis apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a schematic flow chart of a test analysis method provided in an embodiment of the present invention is shown, where the method includes:
s101: responding to the test analysis instruction, and acquiring performance data of at least one test machine; the performance data of the tester is recorded by a performance counter which is pre-deployed on a test set;
in this embodiment, the triggering manner of the test analysis instruction may include two types:
mode one, automatic triggering, such as triggering of periodic performance;
and the second mode is manual triggering.
In this embodiment, the tester represents a machine installed with industrial control software, and in order to collect performance data generated by the tester during operation, a performance counter is deployed on the tester, where the process of collecting the performance data by the performance machine may include:
recording performance data of different processes;
and recording abnormal data when the process is detected to be abnormal.
Wherein the exception data includes: the abnormal process, the abnormal time, the abnormal condition, etc. wherein the abnormal condition may include: abnormal exit or restart, etc.
In this embodiment, a computer or a server for performing test analysis may automatically obtain performance data from a tester, specifically, the method includes:
aiming at any one test machine, connecting the test machine through the IP address of the test machine;
and acquiring performance data from the tester based on a network sharing mode.
The acquired performance data may include performance parameters of processes in the product, such as: cpu and memory usage, etc.
As shown in fig. 2, an architecture for test analysis provided by an embodiment of the present invention is shown, in which a performance calculator is deployed in a long-term test machine, and a test data analysis tool is deployed in a server for analyzing acquired performance data, where the server and the test machine may be connected through a network.
Besides, the method also comprises the following steps:
calling a CMD command to acquire the operating station data configured in the configuration file;
or the storage address of a file in a performance counter arranged in the testing machine can be modified, wherein the file stores the performance data of the testing machine.
In this embodiment, in the process of acquiring the performance of the tester, if there is more information to be acquired, in order to ensure processing efficiency, the method always responds to the information for acquiring the performance of the tester until the end, and then responds to other information, specifically, the method further includes:
limiting the execution of other instructions in the process of acquiring the performance of the tester;
and after detecting that the performance of the acquisition tester is completed, releasing the limitation on other instructions.
The user may specify which tester performance data is to be obtained, or may obtain performance data of all testers.
S102: classifying the performance data of different testers;
in this embodiment, in order to facilitate subsequent analysis of data, the obtained performance data may be stored in a classified manner, and specifically, the performance data of different testing machines may be stored in a classified manner. For example, the data may be analyzed according to a data acquisition path, and in this embodiment, the data acquisition path may be an IP address of the tester.
S103: and calling a preset analysis function, and analyzing the performance data of the tester.
In this embodiment, as can be seen from the above description, the acquired performance data of the tester is a performance parameter of a process, such as CPU and memory usage.
The analysis of the performance data of the tester can be understood as the analysis of the operation condition of the performance parameters of the tester.
In this embodiment, in order to improve the analysis efficiency, the performance data may be decomposed in advance, and the performance data of different performance parameters corresponding to each process may be extracted, specifically, S103 includes:
merging the performance data stored in different folders according to the performance data of each tester;
storing the combined performance data into a structural body according to a process;
filtering data of different processes in the structure to obtain performance data of each performance parameter;
and calling an analysis function corresponding to each performance parameter, and analyzing the performance data of each parameter.
In this embodiment, the acquired performance data of each tester includes a plurality of folders, and the data needs to be merged before the performance data is stored in the structure.
Wherein a structure represents a collection that stores different types of data. In this embodiment, the merged performance data is stored in the structure according to the processes, for example, the data may be grouped according to the processes, and different processes are stored in different arrays of the structure.
For example, the following steps are carried out: the process of the testing machine comprises the following steps: the first process and the second process respectively store the performance data of the first process and the second process in different arrays of the structure body, filter the performance data of the processes stored in each array, for example, the performance parameters comprise CPU and memory occupation, and respectively screen out the data related to CPU in each process.
The analyzing of the data may be performed through a variety of results, for example, the analyzing result may be displayed in a data form, but the displaying of the data form is not very intuitive, and in order to more intuitively display the analyzing result to the user, the analyzing result may be displayed in a graph form, specifically, the analyzing function corresponding to each performance parameter is called, and the performance data of each parameter is analyzed, including:
copying the performance data for each performance parameter into an EXCEL table;
and reading the performance data corresponding to each performance parameter in the EXCEL table, calling an analysis function of each performance parameter, and analyzing the performance data of each parameter to obtain an analysis chart corresponding to each parameter.
For example, the following steps are carried out: the office self-contained component function can be called to copy the performance data between pages, for example, the performance data with different performance parameters are copied to different sheet pages, and then the analysis function corresponding to each performance parameter is called to automatically generate an analysis chart.
In this embodiment, the applicant finds that if the read-write frequency of the EXCEL is too high, the CPU of the computer is consumed, and the drawing efficiency is further reduced, so to avoid this problem, in this embodiment, the data is decomposed in the memory first, the performance data corresponding to each parameter is decomposed, and then the performance data is copied into the EXCEL table, so that only one time of reading the EXCEL table is needed, all the data of a certain performance parameter can be read, and the read frequency of the EXCEL is reduced.
In this embodiment, there are various methods for operating an Excel table, which are respectively: 1. implementing an ODBC database; 2. analyzing an Excel table file; 3. and (4) realizing OLE/COM.
Wherein, the operation of Excel table is realized by adopting OLE/COM, and a chart is generated by Chartwizard. And the data processing and chart generation of the EXCEL table can be quickly and conveniently realized without other tools.
For example, in the generated analysis chart, all information required for the long-term test platform report is shown, including: raw data information, charting information of the whole CPU, the memory, and charting information of 8 parameters of the main process, wherein the analysis result is shown in fig. 3.
In the embodiment, a test analysis method is disclosed, which includes: responding to the test analysis instruction, and acquiring performance data of at least one test machine; wherein the performance data of the tester is recorded by a performance calculator deployed on the tester; and classifying the performance data of different testing machines, and calling a preset analysis function to analyze the performance data of the testing machines. Therefore, the performance data of the testing machine can be automatically acquired, the data can be automatically analyzed, the operation efficiency is improved, and the consumption of manpower and material resources is reduced.
Referring to fig. 4, a schematic structural diagram of a test analysis apparatus according to an embodiment of the present invention is shown, in this embodiment, the apparatus includes:
an obtaining unit, configured to obtain performance data of at least one tester in response to a test analysis instruction; the performance data of the tester is recorded by a performance counter deployed on the tester;
the classification unit is used for classifying the performance data of different testers;
and the analysis unit is used for calling a preset analysis function to analyze the performance data of the tester.
Optionally, the obtaining unit includes:
the connection subunit is used for connecting the tester through the IP address of the tester aiming at any tester;
and the acquisition subunit is used for acquiring the performance data from the tester in a network sharing mode.
Optionally, the analysis unit includes:
the merging subunit is used for merging the performance data stored in different folders according to the performance data of each tester; the storage subunit is used for storing the combined performance data into the structure body according to the process;
the filtering subunit is used for filtering the data of different processes in the structure to obtain the performance data of each performance parameter;
and the analysis subunit is used for calling an analysis function corresponding to each performance parameter and analyzing the performance data of each parameter.
Optionally, the analysis subunit is configured to:
a copy subunit for copying the performance data of each performance parameter into the EXCEL table;
and the chart generation subunit is used for reading the performance data corresponding to each performance parameter in the EXCEL table, calling an analysis function of each performance parameter, and analyzing the performance data of each parameter to obtain an analysis chart corresponding to each parameter.
Optionally, the method further includes:
a response defining unit for:
limiting the execution of other instructions in the process of acquiring the performance of the tester;
and after the completion of acquiring the performance of the tester is detected, releasing the limitation on other instructions.
Optionally, a data recording unit is further included for
Recording performance data of different processes;
and recording abnormal data when the process is detected to be abnormal.
By the device of the embodiment, the performance data of at least one tester is acquired in response to the test analysis instruction; wherein the performance data of the tester is recorded by a performance calculator deployed on the tester; and classifying the performance data of different testing machines, and calling a preset analysis function to analyze the performance data of the testing machines. Therefore, the performance data of the testing machine can be automatically acquired, the data can be automatically analyzed, the operation efficiency is improved, and the consumption of manpower and material resources is reduced.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of test analysis, comprising:
responding to the test analysis instruction, and acquiring performance data of at least one test machine; the performance data of the tester is recorded by a performance counter deployed on the tester;
classifying the performance data of different testers;
and calling a preset analysis function to analyze the performance data of the tester.
2. The method of claim 1, wherein obtaining performance data for at least one tester via a preconfigured IP address of a tester comprises:
aiming at any one test machine, connecting the test machine through the IP address of the test machine;
and acquiring performance data from the tester in a network sharing mode.
3. The method of claim 1 or 2, further comprising:
limiting the execution of other instructions in the process of acquiring the performance of the tester;
and after the completion of acquiring the performance of the tester is detected, releasing the limitation on other instructions.
4. The method of claim 1, wherein the performance counter recording performance data for the tester comprises:
recording performance data of different processes;
and recording abnormal data when the process is detected to be abnormal.
5. The method of claim 1, wherein invoking the predetermined analysis function to analyze the performance data of the tester comprises:
merging the performance data stored in different folders according to the performance data of each tester;
storing the combined performance data in a structural body according to the process;
filtering data of different processes in the structure to obtain performance data of each performance parameter;
and calling an analysis function corresponding to each performance parameter, and analyzing the performance data of each parameter.
6. The method of claim 4, wherein the invoking of the analysis function corresponding to each parameter to analyze the performance data of each parameter comprises:
copying the performance data for each performance parameter into an EXCEL table;
and reading the performance data corresponding to each performance parameter in the EXCEL table, calling an analysis function of each performance parameter, and analyzing the performance data of each parameter to obtain an analysis chart corresponding to each parameter.
7. A test analysis device, comprising:
an obtaining unit, configured to obtain performance data of at least one tester in response to a test analysis instruction; the performance data of the tester is recorded by a performance counter deployed on the tester;
the classification unit is used for classifying the performance data of different testers;
and the analysis unit is used for calling a preset analysis function to analyze the performance data of the tester.
8. The apparatus of claim 7, wherein the obtaining unit comprises:
the connection subunit is used for connecting the tester through the IP address of the tester aiming at any tester;
and the acquisition subunit is used for acquiring the performance data from the tester in a network sharing mode.
9. The apparatus of claim 7, wherein the analysis unit comprises:
the merging subunit is used for merging the performance data stored in different folders according to the performance data of each tester; the storage subunit is used for storing the combined performance data into the structure body according to the process;
the filtering subunit is used for filtering the data of different processes in the structure to obtain the performance data of each performance parameter;
and the analysis subunit is used for calling an analysis function corresponding to each performance parameter and analyzing the performance data of each parameter.
10. The apparatus of claim 7, wherein the analysis subunit is configured to:
a copy subunit for copying the performance data of each performance parameter into the EXCEL table;
and the chart generation subunit is used for reading the performance data corresponding to each performance parameter in the EXCEL table, calling an analysis function of each performance parameter, and analyzing the performance data of each parameter to obtain an analysis chart corresponding to each parameter.
CN201910959188.5A 2019-10-10 2019-10-10 Test analysis method and device Pending CN110704326A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910959188.5A CN110704326A (en) 2019-10-10 2019-10-10 Test analysis method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910959188.5A CN110704326A (en) 2019-10-10 2019-10-10 Test analysis method and device

Publications (1)

Publication Number Publication Date
CN110704326A true CN110704326A (en) 2020-01-17

Family

ID=69199012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910959188.5A Pending CN110704326A (en) 2019-10-10 2019-10-10 Test analysis method and device

Country Status (1)

Country Link
CN (1) CN110704326A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631868A (en) * 2020-12-28 2021-04-09 浙江中控技术股份有限公司 Performance monitoring method and device of CentOS system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887392A (en) * 2010-07-06 2010-11-17 中兴通讯股份有限公司 Method and device for testing software system operation stability
CN105138563A (en) * 2015-07-23 2015-12-09 浪潮电子信息产业股份有限公司 Method for rapidly extracting key information of test log
CN106201846A (en) * 2016-06-30 2016-12-07 微梦创科网络科技(中国)有限公司 Method for monitoring performance in automatic test and device
CN106445817A (en) * 2016-09-09 2017-02-22 网易(杭州)网络有限公司 Test data processing method, apparatus and system
CN108038013A (en) * 2017-11-30 2018-05-15 海尔优家智能科技(北京)有限公司 Distributed performance test method and device and computer-readable recording medium
CN109542729A (en) * 2018-11-27 2019-03-29 苏州思必驰信息科技有限公司 Device performance parameters data analysing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887392A (en) * 2010-07-06 2010-11-17 中兴通讯股份有限公司 Method and device for testing software system operation stability
CN105138563A (en) * 2015-07-23 2015-12-09 浪潮电子信息产业股份有限公司 Method for rapidly extracting key information of test log
CN106201846A (en) * 2016-06-30 2016-12-07 微梦创科网络科技(中国)有限公司 Method for monitoring performance in automatic test and device
CN106445817A (en) * 2016-09-09 2017-02-22 网易(杭州)网络有限公司 Test data processing method, apparatus and system
CN108038013A (en) * 2017-11-30 2018-05-15 海尔优家智能科技(北京)有限公司 Distributed performance test method and device and computer-readable recording medium
CN109542729A (en) * 2018-11-27 2019-03-29 苏州思必驰信息科技有限公司 Device performance parameters data analysing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MKLESS: ""如何优化文件写入速度"", 《HTTPS://SEGMENTFAULT.COM/Q/1010000007120434》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631868A (en) * 2020-12-28 2021-04-09 浙江中控技术股份有限公司 Performance monitoring method and device of CentOS system
CN112631868B (en) * 2020-12-28 2023-06-16 浙江中控技术股份有限公司 Performance monitoring method and device of CentOS system

Similar Documents

Publication Publication Date Title
CN106095866B (en) The optimization method and device of application program recommended method, program starting speed
CN110275878B (en) Service data detection method and device, computer equipment and storage medium
CN112526319B (en) Chip testing method and device, processor chip and server
CN110688358B (en) Log collection method, device and equipment and readable storage medium
US10467590B2 (en) Business process optimization and problem resolution
CN113342685A (en) Precise test method and device, computer equipment and storage medium
CN112817866A (en) Recording playback method, device, system, computer equipment and storage medium
CN102043720A (en) Method and device for generating test data automatically by utilizing structured query language (SQL) sentences
CN110704326A (en) Test analysis method and device
CN106294109B (en) Method and device for acquiring defect code
CN103336739B (en) Method for testing software and platform
CN106557419B (en) Program testing method and device
CN111597111A (en) Application program starting speed monitoring method and device
CN111368104B (en) Information processing method, device and equipment
CN113535538A (en) Application full-link automatic testing method and device, electronic equipment and storage medium
JP2008232654A (en) Control unit for analyzing device and control program
CN114141302A (en) Test method of solid state disk and electronic equipment
CN114942878A (en) Automatic performance testing method for internet application and related equipment
CN110187385B (en) Seismic data acquisition method, seismic data processing method and device
CN105227333B (en) The method and apparatus of network element device data maintenance
CN113608956A (en) Method, system and related device for testing power consumption of hard disk
CN112306870A (en) Data processing method and device based on live APP
CN112579598B (en) Test data identification method and device
CN112598816B (en) Vehicle data acquisition method and device and vehicle diagnosis system
CN109726818B (en) Model editing method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200117