Automatic error-reporting tracing method and apparatus, storage medium and electronic device

By using an automated error reporting and tracing method, the execution information of MPU test cases is retrieved and regression test suggestions are matched in the database. This solves the problem of relying on human experience for error reporting and tracing in MPU automated integration testing, and achieves efficient and accurate error reporting and tracing and regression testing.

WO2026002146A1PCT designated stage Publication Date: 2026-01-02CHINA FAW CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/103995
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-26
Filing Date
2025-06-26
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

In existing technologies, error tracing in MPU automated integration testing relies on the subjective experience of test engineers, which cannot generate appropriate regression testing suggestions and makes it difficult to perform tracing efficiently.

Method used

An automated error reporting and tracing method is provided. By determining whether a test case triggers an error, execution information is retrieved and matched against an error-regression test suggestion database to obtain regression test suggestions. This includes configuring key information, obtaining variable information, converting to natural language format, tracing the execution directory, and performing database matching.

Benefits of technology

It reduces reliance on human subjective experience, improves the efficiency and accuracy of error tracing, and automatically generates regression test suggestions, thereby enhancing the efficiency and accuracy of MPU automated integration testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025103995_02012026_PF_FP_ABST
    Figure CN2025103995_02012026_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides an automatic error-reporting tracing method and apparatus, a storage medium and an electronic device. The automatic error-reporting tracing method comprises: determining whether a running test case has triggered error reporting; when the test case has triggered error reporting, performing tracing to acquire execution information corresponding to the error reporting; and on the basis of the execution information, performing matching in an error reporting-regression test suggestion database so as to obtain a regression test suggestion. The embodiments of the present disclosure can trace error reporting in vehicle-mounted operating systems, so as to determine the positions of modules where errors have occurred and analyze the errors, and can provide corresponding regression test suggestions for the causes of error reporting. For common errors, automatic regression test scripts are given such that regression tests can be performed automatically.
Need to check novelty before this filing date? Find Prior Art

Description

Automated error trace method and device, storage medium and electronic equipment Cross-reference to related applications

[0001] The present disclosure claims priority to the Chinese patent publication with publication number 202410841487.X and publication name "Automated error trace method and device, storage medium and electronic equipment" filed on June 26, 2024 with the China Patent Office, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD

[0002] The present disclosure relates to the technical field of system error tracing, in particular, to an automated error trace method, device, storage medium and electronic equipment. BACKGROUND

[0003] With the strengthening of the networking and intelligentization trend of automobiles, the microprocessor unit (MPU) in the vehicle operating system has become a crucial core component in vehicles. To ensure that the MPU can run stably and efficiently when the passenger car faces various complex environments and vehicle conditions, integrated testing of the MPU is necessary. With the increasing testing needs, to improve testing efficiency and reduce human errors, it is inevitable to use automated testing for integrated testing.

[0004] In recent years, MPU integration technology has been significantly improved, and universities and research institutions have also proposed some innovative testing methods. However, in the field of MPU automated integrated testing, there is still a problem of being unable to trace the errors generated by testing. The current error trace highly depends on the subjective experience of testing engineers, and cannot generate appropriate regression testing suggestions. SUMMARY

[0005] The purpose of the embodiments of the present disclosure is to provide an automated error trace method, device, storage medium and electronic equipment to solve the above-mentioned problems existing in the prior art.

[0006] To solve the above technical problems, the embodiments of the present disclosure provide an automated error trace method, which comprises: determining whether a running test case triggers an error; when the test case triggers an error, tracing to obtain execution information corresponding to the error; and matching in an error-regression testing suggestion database based on the execution information to obtain a regression testing suggestion.

[0007] In some embodiments, the tracing to obtain the execution information corresponding to the error in the case that the test case triggers an error comprises: configuring a predetermined key information in the test case; obtaining variable information corresponding to the error based on the key information in the case that the test case triggers an error; and obtaining an execution directory corresponding to the error command line based on the variable information.

[0008] In some embodiments, the obtaining the execution directory corresponding to the error command line based on the variable information comprises: obtaining original error information in the error command line based on the variable information; converting the original error information into a natural language format based on an error information database; and tracing to obtain the execution directory corresponding to the error command line based on the key information.

[0009] In some embodiments, the tracing to obtain the execution directory corresponding to the error command line based on the key information comprises: tracing to determine an error position in the test case where the key information is called based on the key information; tracing to obtain a console output line corresponding to the error information in the error command line based on the error position; and determining the execution directory corresponding to the error command line based on the console output line.

[0010] In some embodiments, the matching based on the execution information in an error-regression test suggestion database to obtain a regression test suggestion comprises: matching in the error-regression test suggestion database based on the execution directory according to the error information; and obtaining output information in the case of successful matching, the output information at least including error information in a natural language format, trace information of an error position, and a regression test suggestion.

[0011] In some embodiments, the method further comprises: determining a regression test suggestion based on the most frequent calling times of the same application module in the case of unsuccessful matching.

[0012] In some embodiments, the method further comprises: iterating the error information database and the error-regression test suggestion database based on feedback information.

[0013] Embodiments of the present disclosure provide an automatic error trace device in one aspect, comprising: a judgment module configured to judge whether a test case in operation generates an error; a tracing module configured to trace to obtain execution information corresponding to the error in the case that the test case generates an error; and a matching module configured to match based on the execution information in an error-regression test suggestion database to obtain a regression test suggestion.

[0014] The present disclosure further provides a storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the above control method.

[0015] The electronic device at least includes a memory and a processor, the memory has a computer program stored thereon, and the processor implements the steps of the control method when executing the computer program on the memory.

[0016] The error traceability method can trace errors in the vehicle-mounted operating system to determine the module position of the error and analyze the error, and can also give corresponding regression test suggestions for the error causes. For common errors, an automatic regression test script is given, so that regression testing can be automatically performed.

[0017] The device, storage medium and electronic device of the present disclosure have all the beneficial effects of the above control method, which will not be described here. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments described in the present disclosure, and other drawings can also be obtained by those skilled in the art without creative labor.

[0019] FIG. 1 is a step schematic diagram of the automatic error traceability method in the embodiment of the present disclosure;

[0020] FIG. 2 is a step schematic diagram of the automatic error traceability method in the embodiment of the present disclosure;

[0021] FIG. 3 is a step schematic diagram of the automatic error traceability method in the embodiment of the present disclosure;

[0022] FIG. 4 is a step schematic diagram of the automatic error traceability method in the embodiment of the present disclosure;

[0023] FIG. 5 is a step schematic diagram of the automatic error traceability method in the embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] The various schemes and features of the present disclosure are described herein with reference to the accompanying drawings.

[0025] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be regarded as limiting, but only as an example of the embodiments. Those skilled in the art will think of other modifications within the scope and spirit of the present disclosure.

[0026] The accompanying drawings, which are included in the specification and form a part of the specification, illustrate embodiments of the present disclosure and, together with the general description of the present disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the present disclosure.

[0027] These and other characteristics of the present disclosure will become patently apparent as the description proceeds in conjunction with the accompanying drawings.

[0028] It should also be understood that, while the present disclosure has been described above with reference to particular embodiments, many alternatives, modifications, and equivalents will be apparent to those of ordinary skill in the art in light of the disclosure. The disclosure is to be understood as not limited to the particular examples disclosed, but is intended to cover what is claimed and any equivalents thereof.

[0029] The above and other aspects, features, and advantages of the present disclosure will become apparent from the following detailed description, taken in conjunction with the accompanying drawings.

[0030] Specific embodiments of the present disclosure will be described hereinafter with reference to the accompanying drawings; however, it will be understood that the disclosed embodiments are merely examples of the present disclosure, which can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present disclosure. Therefore, the specific structural and functional details disclosed herein are not intended to be limiting, but are merely representative of the present disclosure and the basis for the claims and representative of the present disclosure.

[0031] The first embodiment of the present disclosure provides an automated error tracing method, and the automated test environment used in the embodiment is Robot framework, which is a python-based automated test framework. As shown in FIG. 1, the automated tracing method of the embodiment of the present disclosure is mainly used for implementing automated tracing operation on errors in the integrated test process of the microprocessor unit in the vehicle operating system, including:

[0032] S101, determining whether the running test case produces an error.

[0033] In this step, it is determined whether the running test case produces an error. Specifically, the determination of whether the running test case produces an error is achieved according to the way of setting the test target for the bit processor unit in the vehicle operating system. In this embodiment, the automated error tracing of the CPU occupancy error in the vehicle operating system is taken as an example, for example, in the automated integrated test of the microprocessor unit, a test case with the function of detecting CPU occupancy is run, here the test case will produce an error when the CPU occupancy is too high (for example, exceeds a predetermined threshold), which will affect the running of part of the application, and the test case will produce an error to ensure the normal operation of the vehicle operating system. Of course, other test targets and corresponding conditions can also be set to determine whether an error is produced in the test.

[0034] S102, when the test case produces an error, the execution information corresponding to the error is traced and obtained.

[0035] After judging whether the test case in operation produces an error through the above step S101, in this step, when the test case produces an error, the execution information corresponding to the error is traced and obtained. Specifically, in the prior art, when the test case produces an error, the CPU occupancy rate is usually first judged by the test personnel to exceed a predetermined threshold, then it is determined that the error is generated from which chip, and then it is manually confirmed that which processes are currently pulled up, and finally the sources of these processes are confirmed in turn. However, in this embodiment, the source of the error can be automatically traced and the corresponding execution information can be obtained when the test case produces an error.

[0036] As shown in FIG. 2, further, when the test case produces an error, the execution information corresponding to the error is traced and obtained, including:

[0037] S201, configuring a predetermined key information in the test case.

[0038] In this step, the predetermined key information is configured in the test case. Specifically, in order to accurately locate the error information after the error is generated, the script of the test case needs to be configured first so that the error information can be quickly determined. Specifically, a keyword information such as Teardown is added after the script of each test case. The keyword information here is triggered only when the test case produces an error, and is used to trace the error.

[0039] S202, when the test case produces an error, based on the key information, obtaining variable information corresponding to the error.

[0040] After the predetermined key information is configured in the test case through the above step S201, in this step, when the test case produces an error, based on the key information, the variable information corresponding to the error is obtained. Specifically, when the test case produces an error, the key information is triggered to extract the key information, and based on the key information, the variable information of ${MESSAGE} recording the original error information of the test case is generated. For example, when the CPU occupancy rate produces an error through the test case, the ${MESSAGE} variable information with the Teardown keyword is captured and obtained at the same time of the error.

[0041] S203, based on the variable information, obtaining an execution directory corresponding to an error command line.

[0042] In the case that the test case generates an error through the above step S202, after obtaining the variable information corresponding to the error based on the key information, in this step, the execution directory corresponding to the error command line is obtained based on the variable information. Specifically, after obtaining the variable information corresponding to the error, the original error information can be obtained through the variable information, and then the execution directory associated with the original error information is further obtained, so as to determine the application module generating the error through the execution directory.

[0043] As shown in FIG. 3, further, the obtaining of the execution directory corresponding to the error command line based on the variable information includes:

[0044] S301, obtaining the original error information in the error command line based on the variable information.

[0045] In this step, the original error information in the error command line is obtained based on the variable information. Specifically, the original error information can be extracted in the error command line through the variable information, and the original error information here cannot be further processed.

[0046] S302, converting the original error information into a natural language format based on an error information database.

[0047] After obtaining the original error information in the error command line based on the variable information through the above step S301, in this step, the original error information is converted into a natural language format based on an error information database. Specifically, the original error information is converted into error information in a natural language format corresponding to the error information database through searching in the error information database. The error information in the language format here is convenient for realizing automatic traceability operation later.

[0048] Specifically, considering that the original error information in the variable information of ${MESSAGE} usually only records an error signal, and the original error information often needs to be interpreted with rich test experience and deep understanding of the working relationship between each application module of the vehicle-mounted operating system, which makes the previous error traceability work highly dependent on manual operation. In this step, by setting the error information database, the original error information of the error information database is manually pre-established and stores common error information and corresponding natural language. Of course, the error information database here is pre-established by manual operation, and the maintenance of the error information database can also be realized after each test, so that the error information database is continuously enriched and improved.

[0049] S303, obtaining the execution directory corresponding to the error command line based on the key information.

[0050] After the original bug information is converted into the natural language format based on the bug information database in step S302, in this step, the execution directory corresponding to the bug command line is obtained based on the key information. Specifically, the automatic tracing operation can be realized based on the bug information in the natural language format and in combination with the key information, so that the execution directory corresponding to the bug command line can be obtained through the tracing mode, thereby facilitating the automatic search for the execution information.

[0051] As shown in FIG. 4, further, the obtaining of the execution directory corresponding to the bug command line based on the key information comprises:

[0052] S401, determining the bug position in the test case where the key information is called based on the key information.

[0053] In this step, the bug position in the test case where the key information is called is determined based on the key information. Specifically, after the original bug information is converted into the bug information in the natural language format, the bug position where the bug is generated in the script of the test case is located through the keyword information carried in the variable information of ${MESSAGE}.

[0054] S402, obtaining the console output line corresponding to the bug information in the bug command line based on the bug position.

[0055] S403, determining the execution directory corresponding to the bug command line based on the console output line.

[0056] After the bug position in the test case where the key information is called is determined based on the key information in step S401 and the console output line corresponding to the bug information in the bug command line is obtained based on the bug position in step S402, in this step, the execution directory corresponding to the bug command line is determined based on the console output line. Specifically, after the bug position of the bug is located, the console output line where the bug is generated in the Linux command line of the vehicle-mounted operating system is traced back to the front through the bug position, and the Linux directory where the console command line is located, i.e., the execution directory, is obtained.

[0057] In the embodiment, the application module generating the error is traced according to the error information in natural language format. Firstly, the error position of the test case script is located by backtracking the keyword information in the variable information of ${MESSAGE} in the test case script, and then the command line generating the error in the Linux system console is further backtracked according to the keyword information. The directory position when the command is executed is obtained by obtaining the console output line, that is, the command line, so as to determine which application module in the vehicle-mounted operating system generates the error.

[0058] In the step S102, the execution information corresponding to the error is obtained by backtracking when the test case generates the error.

[0059] In the step S102, the execution information corresponding to the error is obtained by backtracking when the test case generates the error.

[0060] The matching result is intuitively given to the user in the form of a windows pop-up window. In the embodiment, the regression test suggestion may be, for example, viewing the processes with the highest CPU occupancy rate by the ps command. Since the error is generated due to the excessively high CPU occupancy rate, the error is a relatively common error, and the script for executing the regression test suggestion is stored in the error-regression test suggestion database. The user can execute the regression test script by clicking the "execute" button in the pop-up window, and the program directly feeds back the process pull-up result to the user in the form of an icon, so that the user can intuitively see the process pull-up result.

[0061] As shown in FIG. 5, further, the matching in the predetermined database based on the execution information to obtain the regression test suggestion comprises:

[0062] In the step S501, the error-regression test suggestion database is matched based on the execution directory according to the error information.

[0063] In the step S501, the error-regression test suggestion database is matched based on the execution directory according to the error information.

[0064] The error-regression test suggestion database needs to be established in advance, in which error information and regression test suggestions are stored one by one, and each error contains the attribute of the operating system module to which it belongs. The attribute is used to identify which application module in the vehicle-mounted operating system each error information belongs to, so as to facilitate the classification of error information.

[0065] Therefore, the Linux directory in the vehicle-mounted operating system can usually identify the application module to which it belongs, and then the error information can be located to determine which application module in the vehicle-mounted operating system produces the error. Therefore, the error-regression test suggestion database can be searched based on two dimensions, namely the application module to which the error information belongs and the error information in natural language format.

[0066] According to the two dimensions, if the error type is matched, the regression test suggestion stored in the error-regression test suggestion database is given; if not, the regression test suggestion with the most calls in the system module is given, and the user is reminded that this is a relevant suggestion for reference.

[0067] S502, in the case of successful matching, obtaining output information, the output information at least includes error information in natural language format, error location trace information and regression test suggestion.

[0068] After the error-regression test suggestion database is matched based on the execution directory according to the error information in the above step S501, in this step, in the case of successful matching, the output information is obtained, which at least includes error information in natural language format, error location trace information and regression test suggestion.

[0069] Specifically, after matching in the error-regression test suggestion database and obtaining the regression test suggestion in the case of successful matching, a first pop-up window is output by the python front-end module tkinter, so as to output information to the test personnel at the first time of error and feedback. The first pop-up window at least includes three information, which are error information described in natural language format, error location trace information in the vehicle-mounted operating system and regression test suggestion. In this way, the test personnel can quickly respond to the error according to the information in the pop-up window and perform regression test at the first time.

[0070] In addition, after the first pop-up window is closed, a test report appendix in an html version can be generated, so that the tester can subsequently search again. Specifically, after the test is completed, the error report information in a natural language format, the traceability information of the error location in the in-vehicle operating system, and the regression test suggestion are generated into the same html file as an appendix of the test report, so that the tester can view it later.

[0071] S503, in the case of unsuccessful matching, determining the regression test suggestion with the most frequent application module call based on the same application module.

[0072] After the matching in the error-regression test suggestion database based on the execution directory and the error report information in step S501, in the case of unsuccessful matching, the regression test suggestion with the most frequent application module call based on the same application module is determined in this step. Specifically, after the matching in the error-regression test suggestion database and the unsuccessful matching, i.e., no corresponding regression test suggestion is obtained, the regression test suggestion with the most frequent application module call based on the application module to which the error report information belongs is determined for feedback.

[0073] In addition, the automatic error traceability method further comprises: iterating the error report information library and the error-regression test suggestion database based on the feedback information.

[0074] After the test is completed, a second pop-up window can also be sent to the tester, which has two functions: first, to confirm with the tester whether the natural language version of the error report information is accurate, and if not, to ask the tester to input a more accurate description; second, to confirm whether the regression test suggestion is effective, and if not, to ask the tester to input the steps and methods of the regression test and record the information in the database. Specifically, when the tester closes the first pop-up window, the second pop-up window is output to prompt the user to evaluate whether the natural language version of the error report information is accurate and whether the regression test suggestion is effective. If both are not accurate enough, the user will be prompted to input the exact information, so as to iterate the error report information library and the error-regression test suggestion database.

[0075] In this way, by continuously iterating the error report information library and the error-regression test suggestion database, test data is continuously accumulated to lay a data foundation for subsequent research and development. In this embodiment, the generation speed of the first pop-up window and the second pop-up window is at most 3 seconds, while manually tracing the error and performing regression test takes at least five minutes or more, which undoubtedly greatly improves the test efficiency and to some extent improves the test accuracy.

[0076] The error processing logic can be customized according to the experience and needs of the tester, and the test database of different vehicle models can be iterated in a targeted manner through the improved database.

[0077] In addition, the embodiments of the present disclosure allow testers to customize error processing logic according to their experience and needs, and through the improved database, the test database of different vehicle models can be iterated in a targeted manner.

[0078] The embodiments of the present disclosure can trace the error in the vehicle-mounted operating system to determine the module position of the error and analyze the error, and can also give corresponding regression test suggestions for the error causes. For common errors, an automatic regression test script is given, so that regression testing can be automatically performed.

[0079] Based on the same inventive concept, a second embodiment of the present disclosure provides an automatic error tracing device, which includes a judgment module, a tracing module and a matching module coupled with each other, wherein:

[0080] The judgment module is configured to judge whether a test case in operation triggers an error;

[0081] The tracing module is configured to trace and obtain execution information corresponding to the error when the test case triggers the error;

[0082] The matching module is configured to match in an error-regression test suggestion database based on the execution information to obtain a regression test suggestion.

[0083] Further, the tracing module includes:

[0084] The configuration unit is configured to configure predetermined key information in the test case;

[0085] The variable information acquisition unit is configured to obtain variable information corresponding to the error based on the key information when the test case triggers the error;

[0086] The execution directory acquisition unit is configured to obtain an execution directory corresponding to an error command line based on the variable information.

[0087] Further, the execution directory acquisition unit includes:

[0088] The first acquisition sub-unit is configured to obtain original error information in the error command line based on the variable information;

[0089] a conversion subunit configured to convert the original error information into a natural language format based on an error information database;

[0090] a second acquisition subunit configured to acquire an execution directory corresponding to the error command line based on the key information.

[0091] Further, the second acquisition subunit is further configured to:

[0092] determine an error position in the test case where the key information is called based on the key information;

[0093] acquire a console output line corresponding to the error information in the error command line based on the error position;

[0094] determine an execution directory corresponding to the error command line based on the console output line.

[0095] Further, the matching module comprises:

[0096] a matching unit configured to match the error information in the error- regression test suggestion database based on the execution directory;

[0097] an output unit configured to acquire output information including at least the error information in the natural language format, the trace information of the error position, and the regression test suggestion if the matching is successful.

[0098] Further, the method further comprises:

[0099] a determination unit configured to determine a regression test suggestion with the most calling times based on the same application module if the matching is unsuccessful.

[0100] Further, the method further comprises:

[0101] an iteration module configured to iteratively update the error information database and the error- regression test suggestion database based on feedback information.

[0102] The embodiments of the present disclosure can trace the error in the vehicle-mounted operating system to determine the module position where the error occurs and analyze the error, and can give corresponding regression test suggestions for the error causes. For common errors, an automatic regression test script is given, so that the regression test can be automatically performed.

[0103] Based on the same inventive concept, a third embodiment of the present disclosure provides a storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the above method, comprising:

[0104] S11, determining whether a test case in operation triggers an error;

[0105] S12, when the test case triggers an error, trace to obtain execution information corresponding to the error;

[0106] S13, match in an error-regression suggestion database based on the execution information to obtain a regression test suggestion.

[0107] The storage medium of the present disclosure stores a computer program, which can implement the method in different embodiments of the above embodiments when executed by a processor.

[0108] The embodiments of the present disclosure can trace the error in the vehicle-mounted operating system to determine the module position of the error and analyze the error, and can give corresponding regression test suggestions for the error causes. For common errors, an automated regression test script is given, so that regression testing can be automatically performed.

[0109] The fourth embodiment of the present disclosure provides an electronic device, which at least includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program on the memory, specifically including:

[0110] S21, determining whether a running test case triggers an error;

[0111] S22, when the test case triggers an error, trace to obtain execution information corresponding to the error;

[0112] S23, match in an error-regression suggestion database based on the execution information to obtain a regression test suggestion.

[0113] The memory of the electronic device of the present disclosure stores a computer program, and the processor implements the method of other embodiments in the first embodiment of the above when executing the computer program in the memory.

[0114] The embodiments of the present disclosure can trace the error in the vehicle-mounted operating system to determine the module position of the error and analyze the error, and can give corresponding regression test suggestions for the error causes. For common errors, an automated regression test script is given, so that regression testing can be automatically performed.

[0115] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be realized in the form of hardware or software. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction, and do not limit the protection scope of the present disclosure. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0116] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.

[0117] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present disclosure.

[0118] In the embodiments provided in the present disclosure, it should be understood that the disclosed apparatus / terminal device and method can be implemented by other ways. For example, the above-described apparatus / terminal device embodiments are only schematic, and the division of the modules or units is only a logical function division, and there can be another division way in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed units can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0119] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0120] In addition, each of the functional units in the various embodiments of the present disclosure can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0121] The integrated module, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can be completed by the computer program instructing the related hardware, and the computer program can be stored in a computer readable storage medium. When the processor executes the computer program, the steps of the above-mentioned method embodiment can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable file or some intermediate form. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content included in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.

[0122] In addition, the features of the embodiments shown in the drawings of the present disclosure or mentioned in the specification of the present disclosure are not necessarily understood as independent embodiments from each other. Rather, each feature described in one example of an embodiment can be combined with one or more other desired features from other embodiments, thereby generating other embodiments not described in words or with reference to the drawings.

[0123] The above-described embodiments are only used to illustrate the technical solutions of the present disclosure, rather than limit them; although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Industrial applicability

[0124] The error information is processed, so that the dependence of error source tracking work of MPU automatic integrated testing on artificial subjective experience is weakened; the error information is tracked, so that the time cost of manual tracking is reduced, and the efficiency of MPU automatic integrated testing is further improved; in addition, the regression test suggestion is automatically given, so that the regression test scheme becomes more mature and perfect in iteration, and the accuracy of integrated testing is improved.

Claims

1. An automated error reporting and tracing method, comprising: Determine if any running test cases trigger errors; When the test case triggers an error, the execution information corresponding to the error is retrieved by tracing back. Based on the execution information, a match is made in the error-regression test suggestion database to obtain regression test suggestions.

2. The automated error reporting and tracing method according to claim 1, wherein, When the test case triggers an error, the execution information corresponding to the error is retrieved by tracing back, including: Configure predetermined key information in the test cases; When the test case triggers an error, the variable information corresponding to the error is obtained based on the key information. Based on the variable information, obtain the execution directory corresponding to the error command line.

3. The automated error reporting and tracing method according to claim 2, wherein, The step of obtaining the execution directory corresponding to the error command line based on the variable information includes: Based on the variable information, obtain the original error information in the error command line; The original error messages are converted into natural language format based on the error message database. Based on the key information, the execution directory corresponding to the error command line can be traced and obtained.

4. The automated error reporting and tracing method according to claim 3, wherein, The step of tracing and obtaining the execution directory corresponding to the error command line based on the key information includes: The location of the error that called the key information in the test case was determined by tracing the key information. Based on the error location, trace back to obtain the console output line corresponding to the error information in the error command line; The execution directory corresponding to the error command line is determined based on the console output line.

5. The automated error reporting and tracing method according to claim 3, wherein, The step of matching the execution information in the error-regression test suggestion database to obtain regression test suggestions includes: Based on the execution directory, a match is made in the error-regression test suggestion database according to the error information; If a match is successful, the output information is obtained, which includes at least error information in natural language format, source information of the error location, and regression test suggestions.

6. The automated error reporting and tracing method according to claim 5, wherein, Also includes: If a match fails, determine the regression test recommendations based on the most frequent calls to the same application module.

7. The automated error reporting and tracing method according to claim 3, wherein, Also includes: The error information database and the error-regression test suggestion database are iterated based on the feedback information.

8. An automated error reporting and tracing device, comprising: The judgment module is set to determine whether running test cases generate errors; The traceability module is configured to retrieve the execution information corresponding to the error when the test case generates an error. The matching module is configured to perform a match in the error-regression test suggestion database based on the execution information to obtain regression test suggestions.

9. A storage medium storing a computer program, wherein, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

10. An electronic device, comprising at least a memory and a processor, wherein the memory stores a computer program, wherein... The processor implements the steps of the method according to any one of claims 1 to 7 when executing a computer program on the memory.

Citation Information

Patent Citations

  • Method and system for automatic analysis of error reporting logs of automatic software testing

    CN107145445A

  • Automatic test method and device, electronic equipment and storage medium

    CN111782508A

  • Error code positioning method and device, storage medium and electronic equipment

    CN114047923A

  • Error report information processing method and device, computer equipment and storage medium

    CN115033240A

  • Software automatic regression testing method, system and equipment with intelligent handling function

    CN116069628A