Processing method and device for error file of test case, electronic equipment and storage medium
By directly obtaining solutions through the process of server and storage development and testing, the high cost and inefficiency problems caused by repeated analysis in the existing technology are solved, and efficient error resolution and shortening the test cycle is achieved.
Patent Information
- Application Number
- CN202510494630.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-08-19
AI Technical Summary
In the prior art, during the development and testing of servers and storage, due to the many test cases and complex errors, there are many problems or errors in the test results, which require a lot of manpower and time to analyze, and there are duplicate errors or invalid errors, resulting in low resolution efficiency and prolong the development and testing cycle.
By obtaining the error files and use case types of test cases, using group classification to find matching items, obtain historical error files, determine whether there are resolved errors, and add the solution to the error file and send it directly to the client to avoid repeated analysis.
It reduces the workload of testing and development, saves labor and time costs, improves the efficiency of solving use case errors, and shortens the development and testing cycle.
Smart Images

Figure CN120508867A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device, and storage medium for processing error files of test cases. Background Art
[0002] With the rapid development of server and storage technologies, competition in the server and storage industry is becoming increasingly fierce, and the demand for shorter server and storage development and testing cycles is becoming increasingly demanding. During the server and storage development and testing phase, facing the need for shorter development and testing cycles, due to the diverse configurations of servers and the complex variety of cables, each configuration requires different cables, and the motherboards, expansion cards, various backplanes, and cable-supported components vary. There are hundreds of different cable combinations, and the large number of test components leads to a large number of test prototypes and test configurations. This results in thousands or even tens of thousands of test cases during server and storage development and testing, which in turn leads to thousands or even tens of thousands of problems or errors in the test results.
[0003] In related technologies, faced with a large number of use case problems and errors, it is necessary to bring together test engineers, R&D engineers, and other R&D personnel or testers from various fields to follow up and analyze the problems or errors one by one. Moreover, for different types of errors and problems such as platform problems, component problems, processor problems, memory problems, etc., not everyone in the project understands the situation, and a large number of meetings or exchanges are required to clarify the root causes of these problems, resulting in a significant waste of manpower and time costs. In addition, due to the large number of use case problems and errors that occur, there are repeated errors or invalid errors. These repeated errors or invalid errors make the resolution of use case errors inefficient, which prolongs the development and testing cycle of the server. Summary of the Invention
[0004] The present application provides a method, device, electronic device and storage medium for processing error files of test cases, so as to at least solve the problems in the related art of analyzing the use case errors of the server one by one, resulting in a waste of a lot of manpower and time costs, low efficiency in solving the use case errors, and long concurrent testing cycle of the server.
[0005] The present application provides a method for processing an error file of a test case, the method comprising: obtaining a first error file and a first use case type corresponding to a first test case, the first error file being an error file generated when at least one first error occurs in executing the first test case corresponding to a target project; based on the first use case type, searching for a grouping classification matching the first use case type from a plurality of grouping classifications as a target grouping classification, the target grouping classification including a plurality of first projects; obtaining a plurality of historical error files corresponding to the plurality of first projects, and determining whether a target error exists in the plurality of historical error files, the target error being an error consistent with any of the first errors; if so, obtaining a solution corresponding to the target error when it is detected that the target error has been resolved, the solution being used to resolve the first error consistent with the target error; adding the solution to the first error file to obtain the target error file, and sending the target error file to a client.
[0006] The present application also provides a processing device, which includes: an acquisition module for acquiring a first error file and a first use case type corresponding to a first test case, wherein the first error file is an error file generated when at least one first error occurs in the first test case corresponding to the execution target project.
[0007] The processing module is configured to search, based on the first use case type, from a plurality of grouping categories for a grouping category matching the first use case type, and use the grouping category as a target grouping category, wherein the target grouping category includes a plurality of first items.
[0008] The processing module is further configured to obtain multiple historical error files corresponding to the multiple first items and determine whether there is a target error in the multiple historical error files, where the target error is an error consistent with any of the first errors.
[0009] The processing module is further configured to, if the target error is detected to have been resolved, obtain a solution corresponding to the target error, where the solution is used to resolve the first error consistent with the target error.
[0010] The processing module is further configured to add the solution to the first error file, obtain a target error file, and send the target error file to the client.
[0011] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of the error file processing method of any of the above test cases when executing the computer program.
[0012] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the method for processing an error file of any of the above test cases are implemented.
[0013] The present application also provides a computer program product, including a computer program, which implements the steps of the error file processing method of any of the above test cases when the computer program is executed by a processor.
[0014] Through the present application, the first error file and the first use case type corresponding to the first test case can be obtained; and a grouping classification matching the first use case type can be searched from multiple grouping classifications to obtain a target grouping classification including multiple first items; and then multiple historical error files corresponding to the multiple first items can be obtained, and it can be determined whether there is a target error consistent with any one of the at least one first error in the multiple historical error files; and when it is detected that the target error has been resolved, a solution corresponding to the target error is obtained; the solution is added to the first error file to obtain the target error file, and the target error file is sent to the client, so that the tester can resolve at least one first error that occurs in the first test case based on the solution.
[0015] Since the target grouping classification matches the first use case type, it means that the multiple first projects included in the target grouping classification have multiple test cases reused with the target project, that is, there may be projects in the multiple first projects that have executed the first test case. Therefore, multiple historical error files corresponding to the multiple first projects can be obtained, and the multiple historical error files can be retrieved to see whether there is an error consistent with at least one first error that occurred when executing the target project. Then, when there is an error consistent with at least one first error, the solution to the error in the historical time period can be directly obtained, and there is no need for the test engineer to further analyze the error or determine the solution again, avoiding the re-analysis and review of repeated errors of existing solutions, reducing the workload of testing and development, saving a lot of manpower and time costs, reducing server development costs, improving the efficiency of solving use case errors, shortening the development and testing cycle of the server, and reducing error analysis time and investment. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0017] Figure 1 A topological diagram of a system for processing error files of a test case provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of a method for processing error files of a test case provided in an embodiment of the present application;
[0019] Figure 3A schematic diagram of a method for processing error files of another test case provided in an embodiment of the present application;
[0020] Figure 4 A structural block diagram of a processing device provided in an embodiment of the present application;
[0021] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0023] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0024] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0025] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the method for processing the error file of the test case depends, the specific application environment architecture or specific hardware architecture is described herein.
[0026] The embodiments of the present application are applied to a scenario where concurrent testing of a server is performed to obtain test results and errors (bugs) appearing in the test results are analyzed.
[0027] In the related art, in the face of a large number of use case problems and use case errors, following up and analyzing the problems or errors one by one wastes a lot of manpower and time costs. In addition, a large number of repeated errors or invalid errors make the solution of use case errors inefficient, which prolongs the concurrent testing cycle of the server. In order to solve the above technical problems, the embodiment of the present application provides a method for processing error files of test cases. Figure 1 Taking the error file processing system of the test case shown as an example, the method provided in the embodiment of the present application is described.
[0028] like Figure 1 As shown, Figure 1 A topological diagram of a system for processing error files of a test case provided in an embodiment of the present application. Figure 1 In the embodiment, the system for processing error files of test cases includes a processing device 101 and a client 102 .
[0029] The processing device 101 may be any electronic device with computing and communication functions, for example, a server, a server cluster, a cloud server, a switch, or a data center.
[0030] The client 102 can be any device with display and communication functions, such as a PC, a personal computer, a mobile terminal device, a Pad, a tablet device, etc.
[0031] The client 102 and the apparatus 101 for processing error files of test cases may be two independent devices, which are connected via at least one communication interface.
[0032] Figure 1 The test case error file processing system shown is for example only and is not intended to limit the technical solution of this application. Those skilled in the art will appreciate that, in a specific implementation, the test case error file processing system may also include more devices without limitation.
[0033] The following describes the method in detail in conjunction with the execution flow of the method for processing error files of test cases.
[0034] The embodiment of the present application provides a method for processing error files of a test case, which is applied to the above-mentioned processing device, such as Figure 2 As shown, Figure 2 A schematic diagram of a method for processing error files of a test case provided in an embodiment of the present application, wherein the method for processing error files of the test case includes the following steps:
[0035] S201: Obtain a first error file and a first test case type corresponding to a first test case.
[0036] The test case is used to test the function of the development project (abbreviated as project) of the server. The first test case is used to test the function of the target project of the server.
[0037] The error file is a test result file obtained by executing a test case. The error item includes multiple errors. The first error file is an error file generated when at least one first error occurs in executing the first test case corresponding to the target item.
[0038] The first use case type is a baseboard management controller (BMC) type, a basic input / output system (BIOS) type, or a system integration test (SIT) type.
[0039] Exemplarily, a test engineer submits a first test case number and a first error file corresponding to the test case number to a client. The processing device receives the test case number and the first error file of the first test case and determines, based on a key field included in the test case number, a first test case type corresponding to the key field.
[0040] S202: Based on the first use case type, searching for a grouping category matching the first use case type from multiple grouping categories as a target grouping category, wherein each of the multiple grouping categories includes multiple items, and the target grouping category includes multiple first items.
[0041] The plurality of grouping categories include at least a first grouping category, a second grouping category, and a third grouping category.
[0042] The first grouping classification includes at least one third item. The servers corresponding to the at least one third item included in the first grouping classification have the same architecture and platform type. For example, the at least one first grouping classification includes a first grouping classification determined according to a first vendor platform type of a first architecture and a first grouping classification determined according to a second vendor platform type of the first architecture. It is understood that the at least one first grouping classification may also include more first grouping classifications determined according to different architectures and different platform types, without limitation.
[0043] The second grouping category includes at least one fourth project. The server code base used by the at least one fourth project included in the second grouping category is a baseboard management controller code base (BMC-codebase). The at least one fourth project is also called a common BMC-codebase project.
[0044] The third grouping category includes at least one fifth item. The server code base used by the at least one fifth item included in the third grouping category is a basic input and output system code base (BIOS-codebase). The at least one fifth item is also called a common BIOS-codebase item.
[0045] In some optional embodiments, the processing device obtains multiple development projects within a historical time period, as well as the architecture and / or platform type of the server corresponding to each development project and the code library of the server used by each project; and divides the multiple projects into multiple grouping categories according to preset rules.
[0046] The preset rules include classification according to the architecture and platform type of the server corresponding to each development project, classification according to the code library of the server corresponding to each development project as the baseboard management controller code library, and classification according to the code library of the server corresponding to each development project as the basic input and output system code library.
[0047] Optionally, the processing device may also classify the server according to the processor type, board type, and configuration type corresponding to each development project to obtain more different group building classifications without limitation.
[0048] In one example, if the first use case type is a system integration test type, the processing device searches for at least one first grouping classification that matches the system integration test type from multiple grouping classifications, and determines the target grouping classification as the target first grouping classification based on the architecture and platform type of the server corresponding to the target project; if the first use case type is a baseboard management controller type, the processing device searches for a target grouping classification that matches the baseboard management controller type from multiple grouping classifications as the second grouping classification; if the first use case type is a basic input / output system type, the processing device searches for a target grouping classification that matches the basic input / output system type from multiple grouping classifications as the third grouping classification.
[0049] It is understandable that since there are many servers and server-related projects, during the development process, each project can be a common BMC-codebase project, a common BIOS-codebase project, a common architecture project, or a common platform type project. Therefore, the server architecture, platform type, BMC-codebase, and BIOS-codebase corresponding to each project can be classified to obtain multiple group classifications.
[0050] S203: Acquire multiple historical error files corresponding to the multiple first items, and determine whether there is a target error in the multiple historical error files.
[0051] Each historical error file is an error file generated when multiple test cases are executed within a historical time period and errors occur.
[0052] The target error is the error that is consistent with any first error.
[0053] In some optional embodiments, the processing device obtains multiple historical error files corresponding to multiple first projects; detects whether there is at least one second project in the multiple first projects that has executed the first test case; if so, filters out at least one second error file of at least one second project from the multiple historical error files; detects whether there is a target error in the at least one second error file; if so, determines whether the target error exists in the multiple historical error files.
[0054] At least one second error file contains multiple second errors.
[0055] In one example, a processing device obtains multiple first error statements included in a first error file and multiple second error statements included in at least one second error file; screens whether there are keywords consistent with each first keyword among the multiple second keywords; and if so, determines that a target error exists in at least one second error file.
[0056] Among them, each first error statement includes at least one first keyword. Each first keyword corresponds to a first error. Each first error statement is used to indicate a first error. For example, the first error statement is: ipmitool has no display (that is, the command line tool has no display), the web interface does not display this network card, the information parsing is incorrect or wrong, I2C error (Inter-Integrated Circuit (I2C) error), downtime, display error, Failure, unable to read temperature information normally, high temperature alarm, bandwidth loss, synchronization failure, restart or high temperature.
[0057] The plurality of second error reporting statements include a plurality of second keywords. Each second keyword corresponds to a second error. It is understandable that the second error reporting statement may be the same as or different from the first error reporting statement.
[0058] Optionally, if no keyword consistent with each first keyword exists in the screening of the plurality of second keywords, the processing device determines that the target error does not exist in at least one second error file.
[0059] In one example, if there is no at least one second project in which the first test case has been executed among multiple first projects, the processing device determines that the target error does not exist in multiple historical error files, records at least one first error, and establishes a mapping relationship between at least one first error, the first use case type, and the first test case.
[0060] Optionally, the processing device may further mark the at least one recorded first error as a newly occurring error.
[0061] It can be understood that the mapping relationship recorded by the processing device can facilitate subsequent test engineers to analyze errors appearing in error files corresponding to other projects that execute the first test case.
[0062] Optionally, the processing device extracts at least one historical error included in each of multiple historical error files to obtain multiple historical errors; classifies the multiple historical errors according to the keywords corresponding to each historical error to obtain multiple error sets; counts the number of each error of at least one historical error included in each error set; calculates the ratio between the number of each error and the total number of at least one historical error to obtain a probability weight value for each error set; obtains the importance weight value of the keyword corresponding to each error set; determines the sum of the probability weight value and the importance weight value as the total weight value of the keyword corresponding to each error set, and stores the total weight value of each keyword in a preset list.
[0063] Each error set includes at least one historical error, and each historical error corresponds to the same keyword. Each error set corresponds to a keyword one-to-one.
[0064] The probability weight value is used to indicate the probability of occurrence of the keyword corresponding to each error set. The probability of occurrence of the keyword corresponding to each error set is positively correlated with the probability weight value.
[0065] The importance weight value is used to indicate the importance or urgency of resolving the errors corresponding to the keywords in each error set. The importance is positively correlated with the importance weight value. The importance weight value for the keywords in each error set can be obtained from a preset mapping table. The preset mapping table stores the correspondence between keywords and importance weight values.
[0066] Furthermore, when it is determined that at least one target error does not exist in at least one second error file, the processing device obtains the total weight value of the keyword corresponding to each first error in at least one first error from a preset list; sorts the keywords corresponding to each first error in descending order according to the total weight value, obtains a target list, and sends the target list to the client.
[0067] It is understandable that the test engineer can process at least one first error based on the target list displayed by the client, giving priority to errors with high importance and high error probability, so that subsequent tests can obtain solutions to errors with high importance and high error probability as soon as possible.
[0068] S204: If yes, then in the case where it is detected that at least one target error has been resolved, a solution corresponding to the target error is obtained.
[0069] In some optional embodiments, if it is determined that a target error exists in multiple historical error files, the processing device detects whether the target error is closed in the second project; if so, it is determined that the target error has been resolved; if not, the first error consistent with the target error is associated with the target error.
[0070] It is understood that if the processing device detects that the target error is closed in the second project, it indicates that the target error has been resolved. If the processing device detects that the target error is not closed in the second project, and associates at least one target error with at least one first error, it indicates that the target error is not resolved, and the at least one first error is associated with at least one repeated target error to facilitate subsequent analysis of the at least one first error by test engineers.
[0071] S205: Add the solution to the first error file to obtain a target error file, and send the target error file to the client.
[0072] In one example, after each target error is resolved within a historical time period, the processing device records the solution corresponding to each target error so that when subsequent detection finds that each target error has been resolved, the solution corresponding to each target error can be obtained.
[0073] Based on the above Figure 2 In the method shown, the processing device obtains a first error file and a first use case type corresponding to a first test case; and searches for a target grouping classification that matches the first use case type from multiple grouping classifications to obtain a target grouping classification including multiple first items; then obtains multiple historical error files corresponding to the multiple first items, and determines whether there is a target error consistent with any one of the at least one first error in the multiple historical error files; and when it is detected that the target error has been resolved, obtains a solution corresponding to the target error; adds the solution to the first error file to obtain a target error file, and sends the target error file to the client, so that the tester can resolve the at least one first error that occurs in the first test case based on the solution.
[0074] Since the target grouping classification matches the first use case type, it indicates that the multiple first projects included in the target grouping classification have multiple test cases reused with the target project, that is, there may be projects in the multiple first projects that have executed the first test case. Therefore, multiple historical error files corresponding to the multiple first projects can be obtained, and the multiple historical error files can be retrieved to see whether there is an error consistent with at least one first error that occurred when executing the target project. Then, when there is an error consistent with at least one first error, the solution to the error in the historical time period can be directly obtained, and the test engineer does not need to further analyze the error or determine the solution again, avoiding the re-analysis and review of repeated errors of existing solutions, saving a lot of manpower and time costs, improving the efficiency of solving use case errors, shortening the development and testing cycle of the server, and reducing error analysis time and investment.
[0075] The embodiment of the present application provides a method for processing error files of a test case, which is applied to the above-mentioned processing device, such as Figure 3 As shown, Figure 3 A schematic diagram of a method for processing error files of another test case provided in an embodiment of the present application, wherein the method for processing error files of the test case includes the following steps:
[0076] S301: Obtain a first error file and a first test case type corresponding to a first test case.
[0077] The specific implementation process can be found in the aforementioned step S201 and will not be repeated here.
[0078] S302: Based on the first use case type, searching for a target group creation category matching the first use case type from multiple group creation categories.
[0079] The specific implementation process can be found in the aforementioned step S202 and will not be repeated here.
[0080] S303: Acquire multiple historical error files corresponding to multiple first items included in the target group creation category.
[0081] S304: Detect whether there is at least one second project among the multiple first projects that has executed the first test case.
[0082] S305: If not, record at least one first error.
[0083] S306: If there is at least one second project in the plurality of first projects that has executed the first test case, filter out at least one second error file of the at least one second project from the plurality of historical error files.
[0084] S307: Acquire multiple first error reporting statements included in the first error file and multiple second error reporting statements included in at least one second error file.
[0085] S308: Screening the plurality of second keywords to see whether there is a keyword that is consistent with each first keyword; if not, executing S305.
[0086] The specific implementation process of S303 to S308 can refer to the aforementioned step S203 and will not be repeated here.
[0087] S309: If yes, check whether the target error is closed in the second item.
[0088] S310: If not closed, the first error that is consistent with the target error is associated with the target error.
[0089] S311: If closed, obtain a solution corresponding to the target error, add the solution to the first error file, obtain a target error file, and send the target error file to the client.
[0090] The specific implementation process of S309 to S310 can refer to the aforementioned steps S203-S204, which will not be repeated here.
[0091] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0092] Based on the above Figure 3 The method shown can directly obtain the solution to the error in the historical time period when there is an error that is consistent with at least one first error, without the need for the test engineer to further analyze the error or determine the solution again, avoiding the need to analyze and review repeated errors with existing solutions again, saving a lot of manpower and time costs, improving the efficiency of solving use case errors, shortening the development and testing cycle of the server, and reducing error analysis time and investment.
[0093] The embodiment of the present application also provides a processing device, such as Figure 4 As shown, Figure 4 This is a structural block diagram of a processing device provided in an embodiment of the present application; the device includes: an acquisition module 401, a processing module 402, and in addition, the device may also include other modules or units, such as a storage module, a sending module, etc., which are not limited in this embodiment.
[0094] The acquisition module 401 is used to acquire a first error file and a first case type corresponding to a first test case. The first error file is an error file generated when at least one first error occurs in executing a first test case corresponding to a target project.
[0095] The processing module 402 is configured to search, based on the first use case type, from a plurality of grouping categories for a grouping category that matches the first use case type, and use the grouping category as a target grouping category, where the target grouping category includes a plurality of first items.
[0096] In addition, the processing module 402 is further configured to obtain multiple historical error files corresponding to the multiple first items, and determine whether there is a target error in the multiple historical error files, where the target error is an error consistent with any first error.
[0097] The processing module 402 is further configured to, if it is detected that the target error has been resolved, obtain a solution corresponding to the target error, where the solution is used to resolve the first error that is consistent with the target error.
[0098] The processing module 402 is further configured to add the solution to the first error file, obtain a target error file, and send the target error file to the client.
[0099] In some optional embodiments, the processing module 402 is specifically used to obtain multiple historical error files corresponding to multiple first projects, each historical error file is an error file generated when multiple test cases are executed within a historical time period and errors occur; detect whether there is at least one second project in the multiple first projects that has executed the first test case; if so, filter out at least one second error file of at least one second project from the multiple historical error files; and detect whether there is a target error in the at least one second error file.
[0100] In some optional implementations, at least one second error file contains multiple second errors; processing module 402 is further specifically configured to obtain multiple first error reporting statements included in the first error file and multiple second error reporting statements included in the at least one second error file, where each first error reporting statement includes at least one first keyword, each first keyword corresponds to a first error, and multiple second error reporting statements include multiple second keywords, each second keyword corresponds to a second error; screen the multiple second keywords to see whether there is a keyword consistent with each first keyword; if so, determine that the target error exists in the at least one second error file. If not, determine that the target error does not exist in the at least one second error file.
[0101] In some optional embodiments, before searching for a grouping classification that matches the first use case type from multiple grouping classifications, the acquisition module 401 is further used to obtain multiple projects within a historical time period, as well as the architecture and / or platform type of the server corresponding to each development project and the code library of the server used by each project; the processing module 402 is further used to divide the multiple projects into multiple grouping classifications according to preset rules, the multiple grouping classifications include at least one first grouping classification, a second grouping classification and a third grouping classification, the architecture and platform type of the server corresponding to at least one third project included in the first grouping classification are the same, the code library of the server used by at least one fourth project included in the second grouping classification is a baseboard management controller code library, and the code library of the server used by at least one fifth project included in the third grouping classification is a basic input and output system code library.
[0102] In some optional implementations, the first use case type is a baseboard management controller type, a basic input / output system type, or a system integration test type; the processing module 402 is further specifically used to, if the first use case type is a system integration test type, search for at least one first grouping category that matches the system integration test type from multiple grouping categories, and determine the target grouping category as the target first grouping category based on the architecture and platform type of the server corresponding to the target project; if the first use case type is a baseboard management controller type, search for a target grouping category that matches the baseboard management controller type from multiple grouping categories as the second grouping category; if the first use case type is a basic input / output system type, search for a target grouping category that matches the basic input / output system type from multiple grouping categories as the third grouping category.
[0103] In some optional embodiments, the processing module 402 is further specifically used to determine that at least one target error does not exist in multiple historical error files if there is no at least one second project in the multiple first projects that has executed the first test case, and to record at least one first error, and establish a mapping relationship between at least one first error, the first use case type and the first test case.
[0104] In some optional embodiments, before detecting that at least one target error has been resolved, the processing module 402 is further used to, if it is determined that at least one target error exists in multiple historical error files, detect whether the at least one target error is closed in the second project where each target error is located; if so, determine that the at least one target error has been resolved; if not, associate the at least one target error with the at least one first error.
[0105] For the description of the features in the embodiment corresponding to the processing device, please refer to the relevant description of the embodiment corresponding to the method for processing the error file of the test case, which will not be repeated here.
[0106] The embodiment of the present application further provides an electronic device, which may include the aforementioned Figure 1 The processing device 101, such as Figure 5 As shown, Figure 5 A hardware structure diagram of an electronic device provided in an embodiment of the present application; the electronic device includes a processor 10 and a memory 20, the memory 20 stores a computer program, and the processor 10 is configured to run the computer program to execute the steps in the embodiment of the method for processing an error file of any of the above test cases.
[0107] Optionally, the electronic device may further include a communication interface, and the communication interface may also communicate with other devices. For example, when the electronic device is the processing device 101, it may communicate with the client 102 via the communication interface.
[0108] In addition, the above Figure 1 The client 102 can be as follows Figure 5 Electronic devices shown.
[0109] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned error file processing method embodiments of the test case when running.
[0110] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0111] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the embodiment of the method for processing an error file of any of the above test cases are implemented.
[0112] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in the embodiment of the method for processing the error file of any of the above test cases.
[0113] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0114] The above is a detailed introduction to the error file processing method, device, electronic device and storage medium of a test case provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for processing error files of test cases, characterized in that: The method comprises: Obtaining a first error file and a first case type corresponding to a first test case, where the first error file is an error file generated when at least one first error occurs during execution of the first test case corresponding to the target project; Based on the first use case type, searching for a grouping category matching the first use case type from a plurality of grouping categories as a target grouping category, wherein the target grouping category includes a plurality of first items; Acquire multiple historical error files corresponding to the multiple first items, and determine whether a target error exists in the multiple historical error files, where the target error is an error consistent with any of the first errors; If yes, then in the case of detecting that the target error has been resolved, obtaining a solution to the target error, the solution being used to resolve the first error consistent with the target error; The solution is added to the first error file to obtain a target error file, and the target error file is sent to the client.
2. The method according to claim 1, characterized in that The acquiring a plurality of historical error files corresponding to the plurality of first items and determining whether a target error exists in the plurality of historical error files includes: Acquire the plurality of historical error files corresponding to the plurality of first items, each historical error file being an error file generated when errors occur during execution of a plurality of test cases within a historical time period; Detecting whether there is at least one second project among the plurality of first projects that has executed the first test case; If yes, filtering out at least one second error file of the at least one second item from the plurality of historical error files; It is detected whether the target error exists in the at least one second error file.
3. The method according to claim 2, characterized in that The at least one second error file contains a plurality of second errors; and detecting whether the at least one second error file contains the target error comprises: Obtaining a plurality of first error reporting statements included in the first error file and a plurality of second error reporting statements included in the at least one second error file, wherein each of the first error reporting statements includes at least one first keyword, each of the first keywords corresponds to one of the first errors, and the plurality of second error reporting statements includes a plurality of second keywords, each of the second keywords corresponds to one of the second errors; screening the plurality of second keywords to determine whether there is a keyword that is consistent with each of the first keywords; If so, determining that the target error exists in the at least one second error file; If not, it is determined that the target error does not exist in the at least one second error file.
4. The method according to claim 3, characterized in that Before searching for a grouping classification matching the first use case type from the plurality of grouping classifications, the method further includes: Acquire multiple projects within the historical time period, as well as the architecture and platform type of the server corresponding to each project and the code library of the server used by each project; The multiple projects are divided into the multiple grouping categories according to preset rules, and the multiple grouping categories include at least one first grouping category, a second grouping category, and a third grouping category. The architecture and platform type of the server corresponding to at least one third project included in the first grouping category are the same. The code library of the server used by at least one fourth project included in the second grouping category is a baseboard management controller code library, and the code library of the server used by at least one fifth project included in the third grouping category is a basic input and output system code library.
5. The method according to claim 4, characterized in that The first use case type is a baseboard management controller type, a basic input / output system type, or a system integration test type; and searching, based on the first use case type, a grouping classification matching the first use case type from a plurality of grouping classifications as a target grouping classification includes: If the first use case type is the system integration test type, searching for the at least one first grouping classification that matches the system integration test type from the multiple grouping classifications, and determining the target grouping classification as the target first grouping classification based on the architecture and platform type of the server corresponding to the target project; If the first use case type is the baseboard management controller type, searching the target grouping classification matching the baseboard management controller type from the multiple grouping classifications as the second grouping classification; If the first use case type is the basic input / output system type, the target grouping category matching the basic input / output system type is searched from the multiple grouping categories as the third grouping category.
6. The method according to claim 2, characterized in that The method further comprises: If the at least one second project that has executed the first test case does not exist in the multiple first projects, it is determined that the target error does not exist in the multiple historical error files, and the at least one first error is recorded, and a mapping relationship is established between the at least one first error, the first use case type and the first test case.
7. The method according to claim 1, characterized in that Before detecting that the target error has been resolved, the method further includes: If it is determined that the target error exists in the plurality of historical error files, detecting whether the target error is closed in the second project; If so, determining that the target error has been resolved; If not, the first error that is consistent with the target error is associated with the target error.
8. A processing device, characterized in that: The processing device comprises: An acquisition module, configured to acquire a first error file and a first test case type corresponding to a first test case, wherein the first error file is an error file generated when at least one first error occurs in executing a first test case corresponding to a target project; a processing module, configured to search, based on the first use case type, from a plurality of grouping categories for a grouping category matching the first use case type, and use the grouping category as a target grouping category, wherein the target grouping category includes a plurality of first items; The processing module is further configured to obtain a plurality of historical error files corresponding to the plurality of first items, and determine whether a target error exists in the plurality of historical error files, the target error being an error consistent with any one of the first errors; The processing module is further configured to, if it is detected that the target error has been resolved, obtain a solution corresponding to the target error, where the solution is used to resolve the first error consistent with the target error; The processing module is further configured to add the solution to the first error file, obtain a target error file, and send the target error file to the client.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for processing an error file of a test case according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method for processing an error file of a test case according to any one of claims 1 to 7 are implemented.