CN110968518A - Analysis method and device for automatic test log file - Google Patents
Analysis method and device for automatic test log file Download PDFInfo
- Publication number
- CN110968518A CN110968518A CN201911331664.5A CN201911331664A CN110968518A CN 110968518 A CN110968518 A CN 110968518A CN 201911331664 A CN201911331664 A CN 201911331664A CN 110968518 A CN110968518 A CN 110968518A
- Authority
- CN
- China
- Prior art keywords
- log file
- automatic test
- test log
- analysis
- analysis result
- 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
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 297
- 238000004458 analytical method Methods 0.000 title claims abstract description 284
- 238000000034 method Methods 0.000 claims abstract description 21
- 238000004891 communication Methods 0.000 claims description 17
- 238000004422 calculation algorithm Methods 0.000 claims description 14
- 230000011218 segmentation Effects 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 11
- 238000012545 processing Methods 0.000 claims description 8
- 238000013135 deep learning Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 10
- 238000006243 chemical reaction Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000013515 script Methods 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 238000012356 Product development Methods 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000019771 cognition Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses an analysis method and a device for an automatic test log file, wherein the method comprises the following steps: after acquiring the collected automatic test log file, determining whether the automatic test log file needs to be analyzed; if the automatic test log file is determined to be needed to be analyzed, analyzing the automatic test log file by adopting each preset analysis system in at least one analysis system to obtain each initial analysis result; determining the credibility of the corresponding initial analysis result according to the credibility determination rule of at least one analysis system; and taking the initial analysis result with the highest reliability and exceeding a set threshold value as the final analysis result of the automatic test log file. In the scheme, automatic analysis of the automatic test log file can be realized, and the analysis efficiency is greatly improved compared with a manual mode, so that more and more analysis requirements can be met.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for analyzing an automatic test log file.
Background
The automatic test log means that automatic test scripts written by different scripting languages run under an automatic test framework, and various data such as a server, network equipment, an operating system, a database, application software and the like are output according to a certain fixed agreed format. After the automatic test log is obtained, it is important to analyze the automatic test log.
At present, the method for automatically testing logs mainly comprises the steps of manually comparing automatic test logs in a test period before and after testing, and identifying, judging and discriminating difference results.
Due to the rapid development of new network technologies and the emergence of new network services, the scale of an automatic test script is increasingly enlarged and complicated, tens of thousands of automatic test logs are generated every day in a product development and update iteration period, the workload of automatic test analysis is large, the analysis of automatic test log files is performed in a manual mode, the efficiency is very low, and more analysis requirements are difficult to meet.
Disclosure of Invention
The embodiment of the invention provides an analysis method and device for an automatic test log file, which are used for solving the problems that in the prior art, the efficiency is very low and more analysis requirements are difficult to meet when the automatic test log file is analyzed in a manual mode.
According to an embodiment of the present invention, there is provided an analysis method for an automated test log file, including:
after acquiring the collected automatic test log file, determining whether the automatic test log file needs to be analyzed;
if the automatic test log file is determined to be needed to be analyzed, analyzing the automatic test log file by adopting each preset analysis system in at least one analysis system to obtain each initial analysis result;
determining the credibility of the corresponding initial analysis result according to the credibility determination rule of at least one analysis system;
and taking the initial analysis result with the highest reliability and exceeding a set threshold value as the final analysis result of the automatic test log file.
Specifically, determining whether the automatic test log file needs to be analyzed specifically includes:
acquiring a file identifier of the automatic test log file;
determining whether the file identifier of the automatic test log file comprises a failure identifier;
if the file identification of the automatic test log file comprises a failure identification, determining that the automatic test log file needs to be analyzed;
and if the file identifier of the automatic test log file does not comprise the failure identifier, determining that the automatic test log file does not need to be analyzed.
Specifically, if the analysis system is a baseline analysis system, analyzing the automated test log file by using each of at least one preset analysis system to obtain each initial analysis result, specifically including:
acquiring at least one historical log file corresponding to the automatic test log file from a baseline library;
extracting information corresponding to each baseline keyword in a baseline keyword set from the automatic test log file and the at least one history log file respectively;
calculating the text similarity of the automatic test log file and each history log file in the at least one history log file according to the information corresponding to each baseline keyword extracted from the automatic test log file and the at least one history log file respectively;
obtaining a history log file corresponding to the highest text similarity to obtain a selected history log file;
and acquiring an analysis result corresponding to the selected historical log file from the baseline library as an analysis result of the automatic test log file.
Specifically, if the analysis system is an expert analysis system, analyzing the automated test log file by using each analysis system of at least one preset analysis system to obtain each initial analysis result, specifically including:
converting the automated test log file by adopting a first preset code;
performing line segmentation on the converted automatic test log file to obtain at least one line of data;
and after the at least one line of data is input into a preset rule engine, outputting an initial analysis result of the automatic test log file from the preset rule engine.
Specifically, if the analysis system is an intelligent analysis system, analyzing the automated test log file by using each analysis system of at least one preset analysis system to obtain each initial analysis result, specifically including:
converting the automated test log file by adopting a second preset code;
performing word segmentation on the converted automatic test log file to obtain at least one word group;
inputting the at least one phrase into a corpus model to obtain the prediction data of the automatic test log file;
inputting the prediction data of the automatic test log file into a deep learning algorithm model to obtain the analysis type of the automatic test file;
obtaining at least one historical log file which has the analysis type and corresponds to the automatic test log file from the baseline library;
respectively calculating the text similarity of the acquired at least one history log file and the automatic test log file according to a text similarity algorithm;
determining the reason explanation of the history log file corresponding to the maximum text similarity as the reason explanation of the automatic test file;
and combining the analysis type and the reason description of the automatic test log file to obtain an analysis result of the automatic test log file.
Optionally, the method further includes:
if the credibility of each initial analysis result is lower than the set threshold, sending out manual analysis prompt information; and the number of the first and second groups,
receiving a manual analysis result of the automatic test log file;
and saving the manual analysis result of the automatic test log file in the baseline library.
According to an embodiment of the present invention, there is also provided an analysis apparatus for an automated test log file, including:
the first determining module is used for determining whether the automatic test log file needs to be analyzed after the acquired automatic test log file is acquired;
the analysis module is used for analyzing the automatic test log file by adopting each preset analysis system in at least one analysis system to obtain each initial analysis result if the automatic test log file is determined to be required to be analyzed;
the second determining module is used for determining the credibility of the corresponding initial analysis result according to the credibility determining rule of at least one analysis system;
and the third determining module is used for taking the initial analysis result with the highest reliability and exceeding a set threshold value as the final analysis result of the automatic test log file.
Specifically, the first determining module is configured to determine whether the automated test log file needs to be analyzed, and specifically, is configured to:
acquiring a file identifier of the automatic test log file;
determining whether the file identifier of the automatic test log file comprises a failure identifier;
if the file identification of the automatic test log file comprises a failure identification, determining that the automatic test log file needs to be analyzed;
and if the file identifier of the automatic test log file does not comprise the failure identifier, determining that the automatic test log file does not need to be analyzed.
Specifically, if the analysis system is a baseline analysis system, the analysis module is configured to analyze the automated test log file by using each of at least one preset analysis system to obtain each initial analysis result, and specifically configured to:
acquiring at least one historical log file corresponding to the automatic test log file from a baseline library;
extracting information corresponding to each baseline keyword in a baseline keyword set from the automatic test log file and the at least one history log file respectively;
calculating the text similarity of the automatic test log file and each history log file in the at least one history log file according to the information corresponding to each baseline keyword extracted from the automatic test log file and the at least one history log file respectively;
obtaining a history log file corresponding to the highest text similarity to obtain a selected history log file;
and acquiring an analysis result corresponding to the selected historical log file from the baseline library as an analysis result of the automatic test log file.
Specifically, if the analysis system is an expert analysis system, the analysis module is configured to analyze the automated test log file by using each analysis system of at least one preset analysis system to obtain each initial analysis result, and specifically configured to:
converting the automated test log file by adopting a first preset code;
performing line segmentation on the converted automatic test log file to obtain at least one line of data;
and after the at least one line of data is input into a preset rule engine, outputting an initial analysis result of the automatic test log file from the preset rule engine.
Specifically, if the analysis system is an intelligent analysis system, the analysis module is configured to analyze the automated test log file by using each analysis system of at least one preset analysis system to obtain each initial analysis result, and specifically configured to:
converting the automated test log file by adopting a second preset code;
performing word segmentation on the converted automatic test log file to obtain at least one word group;
inputting the at least one phrase into a corpus model to obtain the prediction data of the automatic test log file;
inputting the prediction data of the automatic test log file into a deep learning algorithm model to obtain the analysis type of the automatic test file;
obtaining at least one historical log file which has the analysis type and corresponds to the automatic test log file from the baseline library;
respectively calculating the text similarity of the acquired at least one history log file and the automatic test log file according to a text similarity algorithm;
determining the reason explanation of the history log file corresponding to the maximum text similarity as the reason explanation of the automatic test file;
and combining the analysis type and the reason description of the automatic test log file to obtain an analysis result of the automatic test log file.
Optionally, the apparatus further includes a processing module, configured to:
if the credibility of each initial analysis result is lower than the set threshold, sending out manual analysis prompt information; and the number of the first and second groups,
receiving a manual analysis result of the automatic test log file;
and saving the manual analysis result of the automatic test log file in the baseline library.
According to the embodiment of the invention, the electronic equipment comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the above method steps when executing the program stored in the memory.
According to an embodiment of the present invention, there is also provided a computer-readable storage medium having stored therein a computer program, which when executed by a processor, performs the above-mentioned method steps.
The invention has the following beneficial effects:
the embodiment of the invention provides an analysis method and device for an automatic test log file, which are used for determining whether the automatic test log file needs to be analyzed or not after the acquired automatic test log file is acquired; if the automatic test log file is determined to be needed to be analyzed, analyzing the automatic test log file by adopting each preset analysis system in at least one analysis system to obtain each initial analysis result; determining the credibility of the corresponding initial analysis result according to the credibility determination rule of at least one analysis system; and taking the initial analysis result with the highest reliability and exceeding a set threshold value as the final analysis result of the automatic test log file. In the scheme, automatic analysis of the automatic test log file can be realized, and the analysis efficiency is greatly improved compared with a manual mode, so that more and more analysis requirements can be met.
Drawings
FIG. 1 is a flowchart of a method for analyzing an automated test log file according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an apparatus for analyzing an automatic test log file according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device shown in the present application.
Detailed Description
Aiming at the problems that the efficiency is very low and more analysis requirements are difficult to meet when the automatic test log file is analyzed in a manual mode in the prior art, the embodiment of the invention provides an analysis method of the automatic test log file, the flow of the method is shown in figure 1, and the execution steps are as follows:
s11: and after the acquired automatic test log file is acquired, determining whether the automatic test log file needs to be analyzed.
The collection of the automatic test log files is integrated in the respective automated test frames, and the automatic test log files are transmitted in the respective automated test frames in a hypertext Transfer Protocol (HTTP) or File Transfer Protocol (FTP) manner.
The automated test framework is an environment framework for providing running of automated test scripts and generation of automated test log files, and specific types may be, but are not limited to, as shown in table 1 below:
TABLE 1
S12: and if the automatic test log file is determined to need to be analyzed, analyzing the automatic test log file by each preset analysis system in at least one analysis system to obtain each initial analysis result.
At least one analysis system may be preset to analyze the automated test log file, each analysis system may obtain an analysis result, and the analysis result may be defined as an initial analysis result.
S13: and determining the credibility of the corresponding initial analysis result according to the credibility determination rule of at least one analysis system.
A reliability determination rule may be set for each analysis system in advance, so that the reliability of the corresponding initial analysis result may be determined according to the reliability determination rule of each analysis system.
S14: and taking the initial analysis result with the highest reliability and exceeding a set threshold value as the final analysis result of the automatic test log file.
In an optional embodiment, if the credibility of each initial analysis result is determined to be lower than a set threshold, sending a manual analysis prompt message; receiving a manual analysis result of the automatic test log file; saving the manual analysis results of the automated test log file in a baseline repository. Thereby improving the analysis results of the historical log files in the baseline library.
In the scheme, automatic analysis of the automatic test log file can be realized, and the analysis efficiency is greatly improved compared with a manual mode, so that more and more analysis requirements can be met.
Specifically, the determining in S11 whether the automatic test log file needs to be analyzed specifically includes:
acquiring a file identifier of an automatic test log file;
determining whether the file identifier of the automatic test log file comprises a failure identifier;
if the file identification of the automatic test log file comprises the failure identification, determining that the automatic test log file needs to be analyzed;
and if the file identifier of the automatic test log file does not comprise the failure identifier, determining that the automatic test log file does not need to be analyzed.
To facilitate identification of the automated test log file, the file identification of the automated test log file typically includes: the method includes the steps that information such as project names, product names, use case names, time, test results and the like is obtained, the test results can be success identifications (which can be set to be PASS without limitation) or failure identifications (which can be set to be FAIL without limitation), only automatic test log files carrying the failure identifications need to be analyzed, the reason of failure is found out from the automatic test log files to conduct subsequent improvement, and therefore whether the automatic test log files need to be analyzed or not can be determined based on whether the failure identifications are carried or not.
Specifically, if the analysis system is a baseline analysis system, in S12, each analysis system in the at least one preset analysis system is used to analyze the automated test log file to obtain each initial analysis result, and the implementation process specifically includes:
acquiring at least one historical log file corresponding to the automatic test log file from a baseline library;
extracting information corresponding to each baseline keyword in a baseline keyword set from an automatic test log file and at least one historical log file respectively;
calculating the text similarity of the automatic test log file and each history log file in the at least one history log file according to the information corresponding to each baseline keyword extracted from the automatic test log file and the at least one history log file respectively;
obtaining a history log file corresponding to the highest text similarity to obtain a selected history log file;
and acquiring an analysis result corresponding to the selected historical log file from the baseline library as an analysis result of the automatic test log file.
In computer terminology, a baseline is a "snapshot" of each artifact version in the project repository over a particular period of time. Generally, a project test cycle reversely comprises automatic test log files according to admission test, first round test, second round test, first round regression test and second round regression test, the automatic test log files of the tests are corresponding to each other, the manual analysis result of the automatic test log file obtained by each test is the most accurate, the automatic test log files can be used as historical log files and corresponding analysis results to be stored in a baseline library, and the historical log files can be used as the baseline of the automatic test log files obtained after analysis.
The baseline log key may include, but is not limited to, initial information, condition checking, loading a file, testing topology, topology finding, topology translation, topology switching, topology setting, script numbering, test ports, global variables, device check array translation, Step steps, test description, expected results, measured results, Result determination Step Result, TC Result, test elapsed time, and the like.
In an optional implementation manner, the format of the history log file may be tree-structured data in a Json format with a baseline keyword as key, the automatic session test log file may also be converted into tree-structured data in a Json format with a baseline keyword as key, and then a text similarity algorithm of cosine distance is used to calculate the cosine of a vector included angle between the automatic test log and each history file of at least one history log file, so as to obtain text similarity, and the text similarity is ranked, and the maximum text similarity is taken as an initial analysis result of the automatic test log file.
One initial analysis result of the baseline analysis system is shown in table 2:
TABLE 2
Specifically, if the analysis system is an expert analysis system, in S12, each analysis system in the at least one preset analysis system is used to analyze the automated test log file to obtain each initial analysis result, and the implementation process specifically includes:
automatically testing a log file by adopting first preset code conversion;
performing line segmentation on the converted automatic test log file to obtain at least one line of data;
and after inputting at least one row of data into the preset rule engine, outputting an initial analysis result of the automatic test log file from the preset rule engine.
The first preset code may be, but is not limited to, a universal conversion Format (UTF) 8, the converted automatic test log file is segmented into at least one line of data, the at least one line of data is input into the preset rule engine, specifically, the at least one line of data is filled into a Fact object of the preset rule engine, then, the Fact object is subjected to any read-write operation, an analysis result is written into the Fact object when the matching calculation is completed, and then, an initial analysis result of the automatic test log file may be output from the Fact object.
The preset rules engine may add the required rules by a technician.
One initial analysis result of the expert analysis system is shown in table 3 below:
TABLE 3
Specifically, if the analysis system is an intelligent analysis system, each analysis system in the at least one preset analysis system in S12 analyzes the automated test log file to obtain each initial analysis result, and the implementation process specifically includes:
automatically testing the log file by adopting a second preset code conversion;
performing word segmentation on the converted automatic test log file to obtain at least one word group;
inputting at least one phrase into a corpus model to obtain the prediction data of an automatic test log file;
inputting the prediction data of the automatic test log file into a deep learning algorithm model to obtain the analysis type of the automatic test file;
acquiring at least one historical log file which has an analysis type and corresponds to the automatic test log file from a baseline library;
respectively calculating the text similarity of the acquired at least one history log file and the automatic test log file according to a text similarity algorithm;
determining the reason explanation of the history log file corresponding to the maximum text similarity as the reason explanation of the automatic test file;
and combining the analysis type and the reason description of the automatic test log file to obtain an analysis result of the automatic test log file.
Wherein the second preset code may be, but is not limited to UTF 8.
One initial analysis result of the intelligent analysis system is shown in table 4 below:
TABLE 4
In an alternative embodiment, after S14, the automatic test log file may be added to the intelligent analysis system, and when the intelligent analysis system obtains a plurality of log files, the corpus model, the deep learning algorithm, and the text similarity model may be retrained to ensure that these models may be more accurate.
According to an optional implementation mode, analysis navigation assistance can be further performed on each initial analysis result, so that a tester can jump to the abnormal position of the corresponding log according to the prompt information of the initial analysis result, find the abnormal point quickly, reduce the cognition and operation cost of the automatic system, judge the type and the analysis description of the automatic test log by integrating each analysis result, feed the type and the analysis description back to the automatic test management system, and store the analysis result.
Based on the same inventive concept, an embodiment of the present invention provides an analysis apparatus for an automated test log file, where the structure of the apparatus is shown in fig. 2, and the analysis apparatus includes:
the first determining module 21 is configured to determine whether the automatic test log file needs to be analyzed after the acquired automatic test log file is acquired;
the analysis module 22 is configured to analyze the automatic test log file by using each analysis system of the preset at least one analysis system to obtain each initial analysis result if it is determined that the automatic test log file needs to be analyzed;
the second determining module 23 is configured to determine, according to the reliability determination rule of at least one analysis system, the reliability of the corresponding initial analysis result;
and the third determining module 24 is used for taking the initial analysis result with the highest reliability and exceeding the set threshold as the final analysis result of the automatic test log file.
In the scheme, automatic analysis of the automatic test log file can be realized, and the analysis efficiency is greatly improved compared with a manual mode, so that more and more analysis requirements can be met.
Specifically, the first determining module 21 is configured to determine whether an analysis of the automated test log file is required, and specifically configured to:
acquiring a file identifier of an automatic test log file;
determining whether the file identifier of the automatic test log file comprises a failure identifier;
if the file identification of the automatic test log file comprises the failure identification, determining that the automatic test log file needs to be analyzed;
and if the file identifier of the automatic test log file does not comprise the failure identifier, determining that the automatic test log file does not need to be analyzed.
Specifically, if the analysis system is a baseline analysis system, the analysis module 22 is configured to analyze the automated test log file by using each preset analysis system of the at least one analysis system to obtain each initial analysis result, and specifically configured to:
acquiring at least one historical log file corresponding to the automatic test log file from a baseline library;
extracting information corresponding to each baseline keyword in a baseline keyword set from an automatic test log file and at least one historical log file respectively;
calculating the text similarity of the automatic test log file and each history log file in the at least one history log file according to the information corresponding to each baseline keyword extracted from the automatic test log file and the at least one history log file respectively;
obtaining a history log file corresponding to the highest text similarity to obtain a selected history log file;
and acquiring an analysis result corresponding to the selected historical log file from the baseline library as an analysis result of the automatic test log file.
Specifically, if the analysis system is an expert analysis system, the analysis module 22 is configured to analyze the automated test log file by using each preset analysis system of the at least one analysis system to obtain each initial analysis result, and specifically configured to:
automatically testing a log file by adopting first preset code conversion;
performing line segmentation on the converted automatic test log file to obtain at least one line of data;
and after inputting at least one row of data into the preset rule engine, outputting an initial analysis result of the automatic test log file from the preset rule engine.
Specifically, if the analysis system is an intelligent analysis system, the analysis module 22 is configured to analyze the automated test log file by using each preset analysis system of the at least one analysis system to obtain each initial analysis result, and specifically configured to:
automatically testing the log file by adopting a second preset code conversion;
performing word segmentation on the converted automatic test log file to obtain at least one word group;
inputting at least one phrase into a corpus model to obtain the prediction data of an automatic test log file;
inputting the prediction data of the automatic test log file into a deep learning algorithm model to obtain the analysis type of the automatic test file;
acquiring at least one historical log file which has an analysis type and corresponds to the automatic test log file from a baseline library;
respectively calculating the text similarity of the acquired at least one history log file and the automatic test log file according to a text similarity algorithm;
determining the reason explanation of the history log file corresponding to the maximum text similarity as the reason explanation of the automatic test file;
and combining the analysis type and the reason description of the automatic test log file to obtain an analysis result of the automatic test log file.
Optionally, the apparatus further includes a processing module, configured to:
if the credibility of each initial analysis result is lower than a set threshold value, sending manual analysis prompt information; and the number of the first and second groups,
receiving a manual analysis result of the automatic test log file;
saving the manual analysis results of the automated test log file in a baseline repository.
An electronic device is further provided in the embodiment of the present application, please refer to fig. 3, which includes a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 complete communication with each other through the communication bus 340.
A memory 330 for storing a computer program;
the processor 310 is configured to implement the analysis method of the automated test log file according to any one of the embodiments described above when executing the program stored in the memory 330.
The communication interface 320 is used for communication between the above-described electronic device and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In the scheme, automatic analysis of the automatic test log file can be realized, and the analysis efficiency is greatly improved compared with a manual mode, so that more and more analysis requirements can be met.
Accordingly, an embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute the analysis method for an automated test log file described in any one of the above embodiments.
In the scheme, automatic analysis of the automatic test log file can be realized, and the analysis efficiency is greatly improved compared with a manual mode, so that more and more analysis requirements can be met.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While alternative embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following appended claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.
Claims (14)
1. An analysis method for an automated test log file is characterized by comprising the following steps:
after acquiring the collected automatic test log file, determining whether the automatic test log file needs to be analyzed;
if the automatic test log file is determined to be needed to be analyzed, analyzing the automatic test log file by adopting each preset analysis system in at least one analysis system to obtain each initial analysis result;
determining the credibility of the corresponding initial analysis result according to the credibility determination rule of at least one analysis system;
and taking the initial analysis result with the highest reliability and exceeding a set threshold value as the final analysis result of the automatic test log file.
2. The method of claim 1, wherein determining whether the automated test log file needs to be analyzed specifically comprises:
acquiring a file identifier of the automatic test log file;
determining whether the file identifier of the automatic test log file comprises a failure identifier;
if the file identification of the automatic test log file comprises a failure identification, determining that the automatic test log file needs to be analyzed;
and if the file identifier of the automatic test log file does not comprise the failure identifier, determining that the automatic test log file does not need to be analyzed.
3. The method of claim 1, wherein if the analysis system is a baseline analysis system, analyzing the automated test log file using each of at least one preset analysis system to obtain each initial analysis result, specifically comprising:
acquiring at least one historical log file corresponding to the automatic test log file from a baseline library;
extracting information corresponding to each baseline keyword in a baseline keyword set from the automatic test log file and the at least one history log file respectively;
calculating the text similarity of the automatic test log file and each history log file in the at least one history log file according to the information corresponding to each baseline keyword extracted from the automatic test log file and the at least one history log file respectively;
obtaining a history log file corresponding to the highest text similarity to obtain a selected history log file;
and acquiring an analysis result corresponding to the selected historical log file from the baseline library as an analysis result of the automatic test log file.
4. The method of claim 1, wherein if the analysis system is an expert analysis system, analyzing the automated test log file using each of at least one predetermined analysis system to obtain each initial analysis result, specifically comprising:
converting the automated test log file by adopting a first preset code;
performing line segmentation on the converted automatic test log file to obtain at least one line of data;
and after the at least one line of data is input into a preset rule engine, outputting an initial analysis result of the automatic test log file from the preset rule engine.
5. The method of claim 1, wherein if the analysis system is an intelligent analysis system, analyzing the automated test log file using each of at least one preset analysis system to obtain each initial analysis result, specifically comprising:
converting the automated test log file by adopting a second preset code;
performing word segmentation on the converted automatic test log file to obtain at least one word group;
inputting the at least one phrase into a corpus model to obtain the prediction data of the automatic test log file;
inputting the prediction data of the automatic test log file into a deep learning algorithm model to obtain the analysis type of the automatic test file;
obtaining at least one historical log file which has the analysis type and corresponds to the automatic test log file from the baseline library;
respectively calculating the text similarity of the acquired at least one history log file and the automatic test log file according to a text similarity algorithm;
determining the reason explanation of the history log file corresponding to the maximum text similarity as the reason explanation of the automatic test file;
and combining the analysis type and the reason description of the automatic test log file to obtain an analysis result of the automatic test log file.
6. The method of any of claims 1-5, further comprising:
if the credibility of each initial analysis result is lower than the set threshold, sending out manual analysis prompt information; and the number of the first and second groups,
receiving a manual analysis result of the automatic test log file;
and saving the manual analysis result of the automatic test log file in the baseline library.
7. An analysis device for an automated test log file, comprising:
the first determining module is used for determining whether the automatic test log file needs to be analyzed after the acquired automatic test log file is acquired;
the analysis module is used for analyzing the automatic test log file by adopting each preset analysis system in at least one analysis system to obtain each initial analysis result if the automatic test log file is determined to be required to be analyzed;
the second determining module is used for determining the credibility of the corresponding initial analysis result according to the credibility determining rule of at least one analysis system;
and the third determining module is used for taking the initial analysis result with the highest reliability and exceeding a set threshold value as the final analysis result of the automatic test log file.
8. The apparatus of claim 7, wherein the first determining module is configured to determine whether the automated test log file needs to be analyzed, and in particular is configured to:
acquiring a file identifier of the automatic test log file;
determining whether the file identifier of the automatic test log file comprises a failure identifier;
if the file identification of the automatic test log file comprises a failure identification, determining that the automatic test log file needs to be analyzed;
and if the file identifier of the automatic test log file does not comprise the failure identifier, determining that the automatic test log file does not need to be analyzed.
9. The apparatus of claim 7, wherein if the analysis system is a baseline analysis system, the analysis module is configured to analyze the automated test log file using each of at least one preset analysis system to obtain each initial analysis result, and specifically configured to:
acquiring at least one historical log file corresponding to the automatic test log file from a baseline library;
extracting information corresponding to each baseline keyword in a baseline keyword set from the automatic test log file and the at least one history log file respectively;
calculating the text similarity of the automatic test log file and each history log file in the at least one history log file according to the information corresponding to each baseline keyword extracted from the automatic test log file and the at least one history log file respectively;
obtaining a history log file corresponding to the highest text similarity to obtain a selected history log file;
and acquiring an analysis result corresponding to the selected historical log file from the baseline library as an analysis result of the automatic test log file.
10. The apparatus of claim 7, wherein if the analysis system is an expert analysis system, the analysis module is configured to analyze the automated test log file using each of at least one preset analysis system to obtain each initial analysis result, and specifically configured to:
converting the automated test log file by adopting a first preset code;
performing line segmentation on the converted automatic test log file to obtain at least one line of data;
and after the at least one line of data is input into a preset rule engine, outputting an initial analysis result of the automatic test log file from the preset rule engine.
11. The apparatus of claim 7, wherein if the analysis system is an intelligent analysis system, the analysis module is configured to analyze the automated test log file using each of at least one preset analysis system to obtain each initial analysis result, and specifically configured to:
converting the automated test log file by adopting a second preset code;
performing word segmentation on the converted automatic test log file to obtain at least one word group;
inputting the at least one phrase into a corpus model to obtain the prediction data of the automatic test log file;
inputting the prediction data of the automatic test log file into a deep learning algorithm model to obtain the analysis type of the automatic test file;
obtaining at least one historical log file which has the analysis type and corresponds to the automatic test log file from the baseline library;
respectively calculating the text similarity of the acquired at least one history log file and the automatic test log file according to a text similarity algorithm;
determining the reason explanation of the history log file corresponding to the maximum text similarity as the reason explanation of the automatic test file;
and combining the analysis type and the reason description of the automatic test log file to obtain an analysis result of the automatic test log file.
12. The apparatus of any of claims 7-11, further comprising a processing module to:
if the credibility of each initial analysis result is lower than the set threshold, sending out manual analysis prompt information; and the number of the first and second groups,
receiving a manual analysis result of the automatic test log file;
and saving the manual analysis result of the automatic test log file in the baseline library.
13. An electronic device, characterized in that the electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored on a memory.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911331664.5A CN110968518A (en) | 2019-12-21 | 2019-12-21 | Analysis method and device for automatic test log file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911331664.5A CN110968518A (en) | 2019-12-21 | 2019-12-21 | Analysis method and device for automatic test log file |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110968518A true CN110968518A (en) | 2020-04-07 |
Family
ID=70035661
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911331664.5A Pending CN110968518A (en) | 2019-12-21 | 2019-12-21 | Analysis method and device for automatic test log file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110968518A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112363904A (en) * | 2020-11-30 | 2021-02-12 | 歌尔科技有限公司 | Log data analysis positioning method and device and computer readable storage medium |
CN113778874A (en) * | 2021-09-08 | 2021-12-10 | 中国银行股份有限公司 | Test result discrimination method and test result discrimination device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100162050A1 (en) * | 2008-12-19 | 2010-06-24 | Cathro Ian A | Fault replay system and method |
CN106155884A (en) * | 2015-03-31 | 2016-11-23 | 展讯通信(上海)有限公司 | A kind of log analysis method and system |
CN107819623A (en) * | 2017-11-08 | 2018-03-20 | 平安科技(深圳)有限公司 | Applied performance analysis method and device |
CN109800572A (en) * | 2019-01-07 | 2019-05-24 | 深圳中兴网信科技有限公司 | Detection method, system and computer readable storage medium |
US20190230021A1 (en) * | 2018-01-20 | 2019-07-25 | Hcl Technologies Limited | System for debugging a network environment |
-
2019
- 2019-12-21 CN CN201911331664.5A patent/CN110968518A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100162050A1 (en) * | 2008-12-19 | 2010-06-24 | Cathro Ian A | Fault replay system and method |
CN106155884A (en) * | 2015-03-31 | 2016-11-23 | 展讯通信(上海)有限公司 | A kind of log analysis method and system |
CN107819623A (en) * | 2017-11-08 | 2018-03-20 | 平安科技(深圳)有限公司 | Applied performance analysis method and device |
US20190230021A1 (en) * | 2018-01-20 | 2019-07-25 | Hcl Technologies Limited | System for debugging a network environment |
CN109800572A (en) * | 2019-01-07 | 2019-05-24 | 深圳中兴网信科技有限公司 | Detection method, system and computer readable storage medium |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112363904A (en) * | 2020-11-30 | 2021-02-12 | 歌尔科技有限公司 | Log data analysis positioning method and device and computer readable storage medium |
CN112363904B (en) * | 2020-11-30 | 2022-11-22 | 歌尔科技有限公司 | Log data analysis positioning method and device and computer readable storage medium |
CN113778874A (en) * | 2021-09-08 | 2021-12-10 | 中国银行股份有限公司 | Test result discrimination method and test result discrimination device |
CN113778874B (en) * | 2021-09-08 | 2024-11-22 | 中国银行股份有限公司 | Test result determination method and test result determination device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110764993A (en) | Automatic testing method and terminal equipment | |
CN113282504A (en) | Incremental code coverage rate detection method and service development method and device | |
CN119003375B (en) | AIGC model-based software testing method, system and device | |
CN102043720A (en) | Method and device for generating test data automatically by utilizing structured query language (SQL) sentences | |
CN112905370A (en) | Topological graph generation method, anomaly detection method, device, equipment and storage medium | |
CN113609008B (en) | Test result analysis method and device and electronic equipment | |
CN110334262B (en) | Model training method and device and electronic equipment | |
CN114020645A (en) | Test method, apparatus, apparatus, readable storage medium and computer program product | |
CN111240974A (en) | Log output method and device, electronic equipment and medium | |
CN110968518A (en) | Analysis method and device for automatic test log file | |
CN119512866A (en) | Abnormal log processing method and device based on large language dialogue model | |
CN118567993A (en) | Anomaly identification method, model training method, device, equipment, medium and product | |
CN109508204B (en) | Front-end code quality detection method and device | |
US20240004747A1 (en) | Processor System and Failure Diagnosis Method | |
RU2669686C1 (en) | Method and system for assisting in verification and validation of algorithm chain | |
CN117669484A (en) | Chip simulation log checking method, device and readable medium | |
CN113282496B (en) | Automatic interface testing method, device, equipment and storage medium | |
CN114528135B (en) | A network fault root cause analysis method, terminal device and storage medium | |
CN112306868B (en) | Automatic testing method, terminal device and storage medium for Google mobile services | |
CN115049084A (en) | Fault equipment tracing method, device, equipment and storage medium based on block chain | |
CN114064489A (en) | Automatic testing method, device, equipment and readable storage medium | |
CN113722302A (en) | Data management method and device | |
CN112035364A (en) | Function test result evaluation method and device | |
CN105589904B (en) | The influence backtracking analysis method and backtracking analytical equipment compared based on bytecode | |
CN116414610B (en) | Method, device, equipment and storage medium for acquiring abnormal log fragments |
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: 20200407 |