Method and tool for automatically analyzing test log

Through methods and tools for automatically analyzing test logs, the problem of low efficiency and accuracy of test log analysis in the existing technology is solved, and the testing problems and exceptions are quickly positioned, real-time data processing is supported, and testing efficiency and software quality are improved.

CN119441028APending Publication Date: 2025-02-14ABUP TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411428358.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-02-14

Smart Images

  • Figure CN119441028A_ABST
    Figure CN119441028A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a tool for automatically analyzing a test log, and the method comprises the following steps: collecting test data, cleaning the data according to a parameter label, then storing the cleaned data in a database, carrying out the flexible configuration based on a multi-scene test log rule, precisely positioning a test log problem based on the cleaned data, and carrying out the visual display and report generation. An advanced log analysis algorithm is utilized to automatically analyze and classify log data generated in the test process, problems and abnormities in the test process can be automatically positioned by identifying key information and error features in logs, meanwhile, the invention further provides an automatic test log analysis tool, and the automatic test log analysis efficiency is improved. The tool supports real-time processing and transmission of log data, has a powerful data visualization function, can help testers to quickly discover and solve problems, and can greatly improve the efficiency and accuracy of test log analysis, reduce the test cost and improve the software quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle software testing, and in particular to a method and tool for automatically analyzing a test log. Background Art

[0002] In the prior art, it is not convenient to automatically parse and classify the test results of the vehicle after the test, it is not convenient to automatically locate the problems and anomalies in the test process, it is not convenient to process and transmit log data in real time, it is not convenient for people to discover and solve problems, the efficiency and accuracy of test log analysis are reduced, the test cost is increased, and the quality of software degradation is reduced.

[0003] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0004] In view of the problems in the related art, the present invention proposes a method and a tool for automatically analyzing a test log to overcome the above technical problems existing in the existing related art.

[0005] To this end, the specific technical solution adopted by the present invention is as follows: A method and tool for automatically analyzing test logs, comprising the following steps: Step 1: Test data collection: Step 2: Clean the data according to the parameter labels and store them in the database; Step 3: Flexible configuration of log rules based on multi-scenario testing; Step 4: Accurately locate test log issues based on cleaned data; Step 5: Visualization and report generation.

[0006] As a further solution of the present invention, the test data collection in step 1 is carried out through a variety of channels to collect data of the test log file, and the test log channels come from: integration of the test log analysis tool with the cloud server, integration of the test log analysis tool with the vehicle side, and one-click import.

[0007] Method 1: Use http / https / ssh protocol to establish communication between the test log analysis tool and the cloud server, and pass the vehicle log file information stored in the cloud server to the test log analysis tool.

[0008] Method 2: Use http / https / ssh protocol to establish communication between the test log analysis tool and the vehicle, and pass the test log generated in real time by the vehicle to the test log analysis tool.

[0009] Method 3: Obtain the test log file offline and import it into the test log analysis tool with one click.

[0010] As a further solution of the present invention, in step 2, the data is cleaned and stored in the database according to the parameter tags. The specific steps are as follows: 1. Configure parameter tags in the test log analysis tool; (for example: fixed timestamp, service name, module name and content, error code, etc.); 2. Load the test logs collected by S1 into the test analysis tool; 3. The test analysis tool cleans the data according to the parameter labels; 4. Store the cleaned data into the database.

[0011] As a further solution of the present invention, the flexible configuration based on multi-scenario test log rules in step 3 is achieved by flexibly configuring the services of multiple scenarios in the test log analysis tool. The services of multiple scenarios include: setting of service status code / abnormal error code / detailed description during vehicle upgrade, setting of device-side performance consumption, setting of the name and status of a certain upgrade part on the device side, setting of status code for vehicle-side module service call, etc.

[0012] The configuration process is as follows: 1. Configure the module in the test log analysis tool; for example: setting the interface retry interval / number of retries, setting the keyword recognition in the log and the number of keyword acquisition statistics, setting the upgrade progress threshold and threshold range, setting the serial and parallel upgrade mode, setting the upper and lower high voltage, etc.: 2. After completing the above parameter settings, sort the discrete parameters according to the actual business to complete the main process; 3. After completing the main process settings, the configuration of log rules is completed.

[0013] As a further solution of the present invention, the test log problem is accurately located based on the cleaned data in step 4, and the structured data cleaned in step 2 is retrieved from the database according to the rules of the log configuration in step 3, thereby completing the rapid and accurate problem location of the test log.

[0014] As a further solution of the present invention, the visualization display and report generation in step 5, according to the problem location conclusion in step 4, displays the analysis results in the test analysis tool interface, and satisfies the automatic generation of the report of the test problem, and can also analyze the historical test log analysis data according to different dimensions to obtain more valuable information. (For example: controller dimension, keyword dimension, status code dimension, etc.).

[0015] As a further solution of the present invention, it includes the test data collection as described in claims 1-6, cleaning the data and warehousing it according to parameter tags, flexible configuration of test log rules based on multiple scenarios, precise positioning of test log problems based on cleaned data, and generation of visual display and reports.

[0016] The beneficial effects of the present invention are: using advanced log analysis algorithms to automatically parse and classify the log data generated during the test process, and by identifying key information and error features in the log, the present invention can automatically locate problems and anomalies in the test process. At the same time, the present invention also provides a test log automatic analysis tool, which supports real-time processing and transmission of log data, and has powerful data visualization functions, which can help testers quickly discover and solve problems. The application of the present invention can greatly improve the efficiency and accuracy of test log analysis, reduce testing costs, and improve software quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 1 is a diagram of a data acquisition test system and a script management system according to a method and tool for automatically analyzing test logs according to an embodiment of the present invention; Figure 2 is a schematic diagram of an identification log error information base of a method and tool for automatically analyzing a test log according to an embodiment of the present invention; Figure 3 is a schematic diagram of a log file parsing library of a method and tool for automatically analyzing test logs according to an embodiment of the present invention; Figure 4 It is a schematic diagram of erroneous log information obtained after conversion by a method and tool for automatically analyzing test logs according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in the field should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0020] According to an embodiment of the present invention, a method and a tool for automatically analyzing a test log are provided.

[0021] Please refer to the instruction manual Figure 1-4 According to an embodiment of the present invention, a method and tool for automatically analyzing a test log includes the following steps: Step 1: Test data collection: Step 2: Clean the data according to the parameter labels and store them in the database; Step 3: Flexible configuration of log rules based on multi-scenario testing; Step 4: Accurately locate test log issues based on cleaned data; Step 5: Visualization and report generation.

[0022] Furthermore, the test data collection in step 1 is performed through a variety of channels to collect data from the test log file, and the test log channels come from: integration of the test log analysis tool with the cloud server, integration of the test log analysis tool with the vehicle side, and one-click import.

[0023] Method 1: Use http / https / ssh protocol to establish communication between the test log analysis tool and the cloud server, and pass the vehicle log file information stored in the cloud server to the test log analysis tool.

[0024] Method 2: Use http / https / ssh protocol to establish communication between the test log analysis tool and the vehicle, and pass the test log generated in real time by the vehicle to the test log analysis tool.

[0025] Method 3: Obtain the test log file offline and import it into the test log analysis tool with one click.

[0026] Furthermore, in step 2, the data is cleaned and stored in the database according to the parameter tags. The specific steps are as follows: 1. Configure parameter tags in the test log analysis tool; (for example: fixed timestamp, service name, module name and content, error code, etc.); 2. Load the test logs collected by S1 into the test analysis tool; 3. The test analysis tool cleans the data according to the parameter labels; 4. Store the cleaned data into the database.

[0027] Furthermore, the flexible configuration based on multi-scenario test log rules in step 3 is achieved by flexibly configuring multi-scenario services in the test log analysis tool. The multi-scenario services include: setting of service status code / abnormal error code / detailed description during vehicle upgrade, setting of device-side performance consumption, setting of the name and status of a certain upgrade part on the device side, setting of status code for vehicle-side module service call, etc.

[0028] The configuration process is as follows: 1. Configure the module in the test log analysis tool; for example: setting the interface retry interval / number of retries, setting the keyword recognition in the log and the number of keyword acquisition statistics, setting the upgrade progress threshold and threshold range, setting the serial and parallel upgrade mode, setting the upper and lower high voltage, etc.: 2. After completing the above parameter settings, sort the discrete parameters according to the actual business to complete the main process; 3. After completing the main process settings, the configuration of log rules is completed.

[0029] Furthermore, in step 4, the test log problem is accurately located based on the cleaned data, and according to the rules of the log configuration in step 3, the structured data cleaned in step 2 is retrieved from the database, thereby completing the rapid and accurate problem location of the test log.

[0030] Furthermore, the visualization and report generation in step 5, based on the problem location conclusion in step 4, displays the analysis results in the test analysis tool interface, and at the same time satisfies the automatic generation of reports for test problems, and can also analyze historical test log analysis data according to different dimensions to obtain more valuable information. (For example: controller dimension, keyword dimension, status code dimension, etc.).

[0031] Furthermore, it includes the test data collection as described in claims 1-6, cleaning the data and warehousing it according to parameter tags, flexible configuration of test log rules based on multiple scenarios, precise positioning of test log problems based on cleaned data, and generation of visual display and reports.

Claims

1. A method and tool for automatically analyzing test logs, characterized in that: The following steps are involved: Step 1: Test data collection: Step 2: Clean the data according to the parameter labels and store them in the database; Step 3: Flexible configuration of log rules based on multi-scenario testing; Step 4: Accurately locate test log issues based on cleaned data; Step 5: Visualization and report generation.

2. A method and tool for automatically analyzing test logs according to claim 1, characterized in that: The test data collection in step 1 is performed through multiple channels to collect data from the test log file. The test log is obtained by integrating the test log analysis tool with the cloud server, integrating the test log analysis tool with the vehicle end, and importing it with one click. Method 1: Use http / https / ssh protocol to open up the communication between the test log analysis tool and the cloud server, and pass the vehicle log file information stored in the cloud server to the test log analysis tool; Method 2: Use http / https / ssh protocol to establish communication between the test log analysis tool and the vehicle, and pass the test log generated by the vehicle in real time to the test log analysis tool; Method 3: Obtain the test log file offline and import it into the test log analysis tool with one click.

3. A method and tool for automatically analyzing test logs according to claim 1, characterized in that: In step 2, the data is cleaned and stored in the database according to the parameter tags. The specific steps are as follows: Configure parameter tags in the test log analysis tool; (for example: fixed timestamp, service name, module name and content, error code, etc.); Load the test logs collected by S1 into the test analysis tool; The test analysis tool cleans the data based on parameter labels; The cleaned data is stored in the database.

4. A method and tool for automatically analyzing test logs according to claim 1, characterized in that: The flexible configuration based on multi-scenario test log rules in step 3 is to flexibly configure the multi-scenario services in the test log analysis tool, and the multi-scenario services include: setting of service status code / abnormal error code / detailed description during vehicle upgrade, setting of device-side performance consumption, setting of name and status of a certain upgrade part on the device side, and setting of status code of vehicle-side module service call; The configuration process is as follows: 1). Configure the module in the test log analysis tool; for example: setting the interface retry interval / number of retries, setting the keyword recognition in the log and the number of keyword acquisition statistics, setting the upgrade progress threshold and threshold range, setting the serial and parallel upgrade method, and setting the upper and lower high voltage: 2). After completing the above parameter settings, sort the discrete parameters according to the actual business to complete the main process; 3). After completing the main process settings, the configuration of log rules is completed.

5. A method and tool for automatically analyzing test logs according to claim 1, characterized in that: In step 4, the test log problem is accurately located based on the cleaned data. According to the log configuration rules in step 3, the structured data cleaned in step 2 is retrieved from the database, thereby completing the rapid and accurate problem location of the test log.

6. A method and tool for automatically analyzing test logs according to claim 1, characterized in that: The visualization and report generation in step 5 displays the analysis results in the test analysis tool interface according to the problem location conclusion in step 4, and satisfies the automatic generation of reports on test problems. The historical test log analysis data can also be analyzed according to different dimensions to obtain more valuable information.

7. A method and tool for automatically analyzing test logs according to claim 1, characterized in that: It includes the test data collection as described in claims 1-6, cleaning the data and storing it in a warehouse according to parameter tags, flexible configuration of test log rules based on multiple scenarios, accurate positioning of test log problems based on cleaned data, and generation of visual display and reports.