Fault diagnosis automatic test method and system, electronic equipment and storage medium
By generating standardized fault code tables and automated testing procedures, the existing automotive electronic and electrical fault diagnosis test problem is solved, and automated testing is realized, improving efficiency and speed.
Patent Information
- Application Number
- CN202411093836.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-08-09
AI Technical Summary
The fault diagnosis and testing of existing automotive electronic and electrical functions is inefficient and long cycles, mainly because the test case design and implementation are performed manually.
Generate preset standardized fault code tables through fault diagnosis specifications and preset fault parameters, automatically generate test cases, and generate automated test programs based on test cases to realize automated testing of controller failures.
It improves the efficiency of fault diagnosis and testing, shortens the test cycle, and realizes automatic testing of controller failures.
Smart Images

Figure CN118981200A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of fault diagnosis, and in particular to a fault diagnosis automated testing method, system, electronic device and storage medium. Background Art
[0002] The electronic and electrical functions of automobiles are becoming more and more complex. In order to ensure the safe and reliable operation of automobile functions, all electronic and electrical controllers of the automobile need to be fully tested during the automobile design stage. In addition to functional testing, fault diagnosis testing is also crucial. In related technologies, in general fault diagnosis testing, both test case design and test implementation are performed manually, resulting in low test efficiency and a long test cycle.
[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a fault diagnosis automated testing method, system, electronic device and storage medium, which can realize automated testing of controller fault diagnosis, effectively improve test efficiency, and shorten the test cycle.
[0005] To achieve the above object, an embodiment of the present application provides a method for automated fault diagnosis testing, the method comprising the following steps:
[0006] Generate a preset standardized fault code table according to fault diagnosis specifications and preset fault parameters;
[0007] Generate a preset test case through a preset program development module according to the preset standardized fault code table;
[0008] Generate an automated test program according to the preset test cases;
[0009] A fault diagnosis test is performed through the automated test program to obtain a fault diagnosis test result.
[0010] In some embodiments, generating a preset standardized fault code table according to the fault diagnosis specification and the preset fault parameters includes:
[0011] Constructing the first standardized fault code table template;
[0012] Extracting the preset fault parameters according to the fault diagnosis specification, so as to fill the preset fault parameters into the first standardized fault code table template, and obtain a second standardized fault code table template; wherein the preset fault parameters include fault code information, fault maturity conditions and fault manifestation information;
[0013] The fault setting variable information, fault setting variable values and fault type information are filled into the second standardized fault code table template to generate a full-information standardized fault code table.
[0014] In some embodiments, generating a preset test case through a preset program development module according to the preset standardized fault code table includes:
[0015] Build test case templates;
[0016] The preset test case is generated by a preset program development module according to the test case template and the full-information standardized fault code table.
[0017] In some embodiments, constructing a test case template includes:
[0018] Build preset test steps;
[0019] Construct the corresponding test case template according to the fault type information and preset test steps.
[0020] In some embodiments, the preset test steps include:
[0021] Powering on the controller to be tested, and clearing the controller fault of the controller to be tested through a preset diagnostic instruction;
[0022] When it is determined that the controller to be tested is in a fault-free state, a target fault is set, and a corresponding operating variable is determined; wherein the operating variable is used as an assignment variable interface of the preset test case;
[0023] Obtaining a first fault code of the controller to be tested, and verifying whether the first fault code matches the target fault;
[0024] When it is determined that the first fault code matches the target fault, canceling the target fault;
[0025] Acquire a second fault code of the controller to be tested, so as to determine whether the target fault has been cancelled through the second fault code;
[0026] When it is determined that the target fault cancellation is completed, clearing the fault of the controller to be tested by using the preset diagnostic instruction;
[0027] A third fault code of the controller to be tested is obtained to determine that the controller to be tested is in a non-fault state through the third fault code.
[0028] In some embodiments, generating an automated test program according to the preset test case includes:
[0029] By calling the automated testing program tool, a preset conversion sequence module is constructed;
[0030] Generate automated program steps from the text steps of the preset test case through the preset sequence conversion module;
[0031] The automated test program is generated according to the automated program steps and the preset library file.
[0032] In some embodiments, the method further comprises:
[0033] Obtaining update information of the fault diagnosis specification;
[0034] When it is determined that the update information is obtained, the preset fault list data is configured according to the update information to update the preset test case; wherein the preset fault list data includes fault list extraction column data, fault list directory data and fault list template directory data.
[0035] To achieve the above object, another aspect of the embodiment of the present application provides a fault diagnosis automatic test system, the system comprising:
[0036] The first module is used to generate a preset standardized fault code table according to the fault diagnosis specification and the preset fault parameters;
[0037] The second module is used to generate a preset test case through a preset program development module according to the preset standardized fault code table;
[0038] The third module is used to generate an automated test program according to the preset test case;
[0039] The fourth module is used to perform a fault diagnosis test through the automated test program to obtain a fault diagnosis test result.
[0040] To achieve the above objective, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising:
[0041] at least one processor;
[0042] at least one memory for storing at least one program;
[0043] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.
[0044] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0045] The embodiments of the present application include at least the following beneficial effects: The present application provides a method, system, electronic device and storage medium for automated testing of fault diagnosis, which generates a preset standardized fault code table through fault diagnosis specifications and preset fault parameters, and generates a preset test case through a preset program development module according to the preset standardized fault code table. Then, the embodiment of the present invention generates an automated test program according to the preset test case. Finally, the embodiment of the present invention performs a fault diagnosis test through an automated test program to obtain a fault diagnosis test result, thereby realizing an automated test of controller fault diagnosis. It is easy to understand that the embodiment of the present invention generates a preset standardized fault code table through fault diagnosis and preset fault parameters, and realizes the automatic generation of test case design by generating corresponding test cases through a preset program development module according to the preset standardized code table, and then generates an automated test program according to the preset test case, so as to perform a fault diagnosis test through the generated automated test program to obtain a fault diagnosis test result, effectively improving the test efficiency and shortening the test cycle. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flowchart of the automatic fault diagnosis test method provided by the embodiment of the present invention;
[0047] Figure 2 yes Figure 1 A schematic flow chart of step S110 in FIG.
[0048] Figure 3 yes Figure 1 A schematic diagram of the process of step S120 in FIG.
[0049] Figure 4 yes Figure 3 A schematic diagram of the process of step S310 in FIG.
[0050] Figure 5 is a flowchart of the preset test steps provided by an embodiment of the present invention;
[0051] Figure 6 yes Figure 1 A schematic flow chart of step S130 in FIG.
[0052] Figure 7 It is a schematic diagram of the steps of updating a preset test case provided by an embodiment of the present invention;
[0053] Figure 8 It is a schematic diagram of the fault diagnosis automated test operation interface provided by an embodiment of the present invention;
[0054] Fig. 9 It is a structural diagram of a fault diagnosis automated testing system provided by an embodiment of the present invention;
[0055] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0057] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0058] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0060] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0061] Fault diagnosis: refers to the process of conducting a comprehensive diagnosis of a device or system through a series of inspections, tests and analysis methods to determine whether there is a fault and find out the specific cause, location and severity of the fault. This process is crucial to ensure the normal operation of the equipment or system, improve reliability and maintenance efficiency.
[0062] The electronic and electrical functions of automobiles are becoming more and more complex. In order to ensure the safe and reliable operation of automobile functions, all electronic and electrical controllers of the automobile need to be fully tested during the automobile design stage. In addition to functional testing, fault diagnosis testing is also crucial. In related technologies, in general fault diagnosis testing, both test case design and test implementation are performed manually, resulting in low test efficiency and a long test cycle.
[0063] In view of this, an embodiment of the present invention provides a fault diagnosis automated testing method, system, electronic device and storage medium. The scheme generates a preset standardized fault code table through fault diagnosis and preset fault parameters, and generates corresponding test cases in the preset standardized code table through a preset program development module, thereby realizing the automatic generation of test case design, and then generates an automated test program according to the preset test case, so as to perform fault diagnosis testing through the generated automated test program to obtain fault diagnosis test results, thereby realizing automated testing of controller fault diagnosis, effectively improving test efficiency, and shortening the test cycle.
[0064] The fault diagnosis automation test method provided by the embodiment of the present invention relates to the field of fault diagnosis technology. The fault diagnosis automation test method provided by the embodiment of the present invention can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the fault diagnosis automation test method, etc., but is not limited to the above forms.
[0065] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0066] Figure 1 is an optional flowchart of the fault diagnosis automated testing method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S110 to S140.
[0067] Step S110: Generate a preset standardized fault code table according to the fault diagnosis specification and preset fault parameters.
[0068] Step S120: Generate a preset test case through a preset program development module according to a preset standardized fault code table.
[0069] Step S130: Generate an automated test program according to preset test cases.
[0070] Step S140: Perform a fault diagnosis test through an automated test program to obtain a fault diagnosis test result.
[0071] During the working process of this specific embodiment, the embodiment of the present invention first generates a preset standardized fault code table according to the fault diagnosis specification and the preset fault parameters. Specifically, the fault diagnosis specification in the embodiment of the present invention refers to a series of standardized processes and steps to be followed when handling equipment or system faults. Among them, the embodiment of the present invention determines the corresponding fault diagnosis specification through a pre-configured controller fault diagnosis specification file. Accordingly, the preset fault parameters in the embodiment of the present invention refer to data parameters related to controller faults, such as fault codes, fault manifestations, etc. The embodiment of the present invention generates a preset standardized fault code table by combining the fault diagnosis specification and the preset fault parameters to classify, number and define various faults that may occur in the controller, so that the fault can be quickly and accurately identified and located when the fault occurs. Then, the embodiment of the present invention generates a preset test case through a preset program development module according to the preset standardized fault code table. Specifically, the preset program development module in the embodiment of the present invention refers to various function libraries or components provided in relevant programming languages, such as Python program development modules or C language program development modules. Accordingly, the embodiment of the present invention automatically generates preset test cases through corresponding preset program development targets according to the classification, definition and other information of various faults in the preset standardized code table. Among them, the preset test case refers to a description document of the test task for the corresponding fault, such as the test target, test environment, test steps, etc. Further, the embodiment of the present invention generates an automated test program according to the preset test case. Specifically, the automated test program in the embodiment of the present invention is a program for detecting whether the vehicle controller is normal, and can test the functional correctness of the vehicle controller. Correspondingly, the automated test program in the embodiment of the present invention is a tool and means for executing the corresponding preset test case, and the corresponding automated test program is automatically generated through the preset test case, so that the test steps and expected results in the preset test case can be verified by executing the automated test program. Finally, the embodiment of the present invention performs a fault diagnosis test through the automated test program to obtain a fault diagnosis test result. Specifically, the embodiment of the present invention performs a fault diagnosis test on the vehicle controller by executing the corresponding automated test program, thereby realizing the braking execution of the test implementation. Among them, in the embodiment of the present invention, all aspects from test case development to test implementation are realized in an automated manner, which effectively improves the test efficiency and shortens the test cycle.
[0072] Reference Figure 2 In some embodiments of the present invention, a preset standardized fault code table is generated according to the fault diagnosis specification and the preset fault parameters, including but not limited to the following steps:
[0073] Step S210: construct a first standardized fault code table template.
[0074] Step S220: extracting preset fault parameters according to the fault diagnosis specification, and filling the preset fault parameters into the first standardized fault code table template to obtain a second standardized fault code table template. The preset fault parameters include fault code information, fault maturity conditions and fault manifestation information.
[0075] Step S230: Fill the fault setting variable information, fault setting variable values and fault type information into the second standardized fault code table template to generate a full-information standardized fault code table.
[0076] In this specific embodiment, the embodiment of the present invention first constructs a first standardized fault code table template. Specifically, the embodiment of the present invention constructs the first standardized fault code table template by setting the information parameters contained in the standardized fault code table template. For example, the first standardized fault code table template in the embodiment of the present invention includes parameters such as fault code information, conditions for the generation of fault codes, functional performance when faults occur, variables and specific values for setting fault conditions, and fault types. Next, the embodiment of the present invention extracts preset fault parameters according to the fault diagnosis, so as to fill the preset fault parameters into the first standardized fault code table template to obtain a second standardized fault code table template. Specifically, the preset fault parameters in the embodiment of the present invention include fault code information, fault maturity conditions, and fault performance information. Accordingly, the embodiment of the present invention extracts fault code information, fault maturity conditions, and fault performance information through a Python program according to the fault diagnosis specification, and fills the obtained relevant information into the first standardized fault code table template, thereby constructing a second standardized fault code table template. Among them, the fault diagnosis specification in the embodiment of the present invention is a file that the controller design needs to locate and output, which can explain the fault code that the controller needs to report, the conditions for the generation of the fault code, and the functional performance of the controller after the fault code is generated (degradation or fault light, etc.). Correspondingly, the embodiment of the present invention uses Python programming to write an automated processing program, and fills in the fault codes in the diagnostic specifications, the conditions for generating the fault codes, and the functional performance information of the controller after the fault codes are generated according to the defined first standardized fault code template, thereby obtaining a filled second standardized fault code table template. Furthermore, the embodiment of the present invention fills the fault setting variable information, the fault setting variable values, and the fault type information into the second standardized fault code table template to generate a full-information standardized fault code table. Specifically, the embodiment of the present invention supplements the fault setting variables and values, and the relevant contents of the fault types in the second standardized fault code table template by writing a Python program, thereby generating a full-information standardized fault code table, that is, a preset standardized fault code table.
[0077] Reference Figure 3 In some embodiments of the present invention, a preset test case is generated by a preset program development module according to a preset standardized fault code table, including but not limited to the following steps:
[0078] Step S310: Construct a test case template.
[0079] Step S320: Generate a preset test case through a preset program development module according to the test case template and the full information standardized fault code table.
[0080] In this specific embodiment, the embodiment of the present invention constructs a test case template to generate a preset test case through a preset program development module according to the test case objectives and the full-information standardized fault code table. Specifically, the test case template in the embodiment of the present invention refers to a standardized format or template for writing and recording test cases, including parameter information such as test case numbers, test conditions, test data, and test steps. Accordingly, the embodiment of the present invention uses the full-information standardized fault code table and test case template generated by Python language calls to automatically generate preset test cases through a preset program development module, such as a Python program development module. It is easy to understand that the embodiment of the present invention generates fault diagnosis test cases through an automated program, in which several test cases will be generated by using several test case templates.
[0081] Reference Figure 4 In some embodiments of the present invention, constructing a test case template includes but is not limited to the following steps:
[0082] Step S410: Constructing preset test steps.
[0083] Step S420: Construct a corresponding test case template according to the fault type information and preset test steps.
[0084] In this specific embodiment, the embodiment of the present invention constructs a corresponding test case template by constructing preset test steps, and then constructs a corresponding test case template according to the corresponding fault type information and the preset test steps. Specifically, the preset test steps in the embodiment of the present invention refer to the specific operating steps that need to be followed to execute the test case. For example, the preset test steps in the embodiment of the present invention set the operating steps to be performed under corresponding conditions. In addition, the fault type information in the embodiment of the present invention refers to the type data of the fault, such as electrical type, communication type, high and low voltage fault type, etc. Correspondingly, the test steps for different fault types in the embodiment of the present invention are different, and different test case templates can be customized. Therefore, the embodiment of the present invention combines the fault type information and the preset test steps to generate test case templates corresponding to different fault types, thereby effectively improving the accuracy and reliability of the fault diagnosis automation test.
[0085] Reference Figure 5 In some embodiments of the present invention, the preset test steps include but are not limited to the following steps:
[0086] Step S510: Power on the controller to be tested, and clear the controller fault of the controller to be tested through a preset diagnostic instruction.
[0087] Step S520: When it is determined that the controller to be tested is in a non-fault state, a target fault is set and a corresponding operation variable is determined, wherein the operation variable is used as an assignment variable interface of a preset test case.
[0088] Step S530: Obtain a first fault code of the controller to be tested, and verify whether the first fault code matches the target fault.
[0089] Step S540: When it is determined that the first fault code matches the target fault, cancel the target fault.
[0090] Step S550: Acquire the second fault code of the controller to be tested, so as to determine whether the target fault has been cancelled through the second fault code.
[0091] Step S560: When it is determined that the target fault cancellation is completed, the fault is cleared for the controller to be tested through a preset diagnostic instruction.
[0092] Step S570: Acquire the third fault code of the controller to be tested, so as to determine whether the controller to be tested is in a non-fault state through the third fault code.
[0093] In this specific embodiment, the preset test steps constructed by the embodiment of the present invention first power on the controller to be tested, and clear the controller fault of the controller to be tested through the preset diagnostic instructions. Specifically, after the test process starts, the embodiment of the present invention provides power to the controller to be tested to power on the controller to be tested, so that the controller to be tested is in a working state. At the same time, the embodiment of the present invention sends a preset diagnostic instruction to the controller to be tested to clear all possible fault records, that is, controller faults, in the controller to be tested, thereby ensuring that the controller to be tested is in a fault-free state. Next, the embodiment of the present invention determines whether the controller to be tested is in a fault-free state. When it is determined that the controller to be tested is in a fault-free state, the embodiment of the present invention sets the target fault and determines the corresponding operation variable. Specifically, the embodiment of the present invention reads the check fault, that is, reads the controller state, to determine whether the controller to be tested currently has a fault. When it is determined that there is no fault code in the controller to be tested, that is, the controller to be tested currently does not have a fault and is in a fault-free state, the embodiment of the present invention sets the target fault to simulate the controller fault condition, that is, simulate the scenario of the target fault occurring in the controller. Accordingly, the embodiment of the present invention lists the corresponding operation variables here, which are used as the assignment variable interface when automatically generating preset test cases. Further, the embodiment of the present invention obtains the first fault code of the controller to be tested, and verifies whether the first fault code matches the target fault. When it is determined that the controller fault code (first fault code) matches the target fault, the embodiment of the present invention cancels the target fault. Specifically, by reading the fault code of the controller to be tested in the fault state, that is, the first fault code in the target fault state, it is verified whether the obtained controller fault code is consistent with the expectation, that is, whether the first fault code corresponds to the set target fault. Correspondingly, after verifying the fault code, that is, determining that the obtained controller fault code matches the set target fault, the embodiment of the present invention cancels the set target fault to restore the normal state before setting and prepare for the next test. For example, the embodiment of the present invention cancels the set target fault through the reverse operation of the fault setting step to control the controller to be tested to return to a fault-free state. Next, the embodiment of the present invention obtains the second fault code of the controller to be tested to determine whether the target fault is canceled through the second fault code. When it is determined that the target fault is canceled, the embodiment of the present invention clears the fault of the controller to be tested through a preset diagnostic instruction. Specifically, the embodiment of the present invention reads the controller fault code of the controller to be tested again, that is, obtains the current fault code (second fault code) of the controller to be tested, to determine whether the target fault in the controller to be tested has been restored. Accordingly, when it is determined that the target fault cancellation is completed, such as no fault code is returned or the fault code of the target fault has been cleared, the embodiment of the present invention sends a preset diagnostic instruction to the controller to be tested to perform the fault clearing operation of the controller again.Among them, after determining that the target fault has been cancelled, the embodiment of the present invention ensures the cleanliness of the test environment by performing a controller fault clearing operation. Finally, the embodiment of the present invention obtains the third fault code of the controller to be tested to determine that the controller to be tested is in a non-fault state through the third fault code. Specifically, after the controller to be tested is cleared of the fault through the preset diagnostic instruction, the embodiment of the present invention obtains the third fault code to verify whether the controller to be tested is in a non-fault state, that is, to determine that the fault of the controller to be tested has been completely cleared, which is convenient for the next test and improves the stability and reliability of the test.
[0094] Reference Figure 6 In some embodiments of the present invention, generating an automated test program according to a preset test case includes but is not limited to the following steps:
[0095] Step S610: Building a preset sequence conversion module by calling an automated testing program tool.
[0096] Step S620: Generate automated program steps from the text steps of the preset test case through a preset sequence conversion module.
[0097] Step S630: Generate an automated test program according to the automated program steps and the preset library file.
[0098] In this specific embodiment, the embodiment of the present invention first calls the automated test program tool to build a preset conversion sequence module, and then generates automated program steps from the text steps of the preset test case through the preset conversion sequence module, so as to generate an automated test program according to the automated program steps and the preset library file. Specifically, the automated test program tool in the embodiment of the present invention refers to a software tool or framework for developing, executing and managing automated test scripts to automate continuous test cases. The embodiment of the present invention writes a program by a preset program language (such as Python language), calls the corresponding automated test program tool, and generates a test case conversion sequence module, that is, a preset conversion sequence module. Among them, the test case conversion sequence in the embodiment of the present invention converts the written test case code or the defined test steps into a series of executable instructions or action sequences, so that the automated test tool or framework can automatically execute these test steps in a specified order. Correspondingly, the text steps in the embodiment of the present invention refer to the test execution steps written in the preset test case written in text form in the preset test case described in natural language. The embodiment of the present invention converts the text steps of the preset test case through the constructed preset conversion sequence module to convert the test case in text form into an automated program step that can be executed by the automated test tool. Finally, the embodiment of the present invention directly calls the corresponding preset consultant according to the step description of the generated corresponding automated program steps, thereby generating an automated test program and completing the step of automatically generating a test program from a test case. Accordingly, the test program generated in the embodiment of the present invention can be automatically executed to complete the automated test implementation of fault diagnosis.
[0099] Reference Figure 7 In some embodiments of the present invention, the fault diagnosis automated testing method provided by the embodiment of the present invention further includes but is not limited to the following steps:
[0100] Step S710: Acquire update information of the fault diagnosis specification.
[0101] Step S720: When it is determined that the update information is obtained, the preset fault list data is configured according to the update information to update the preset test case. The preset fault list data includes fault list extraction column data, fault list directory data and fault list template directory data.
[0102] In this specific embodiment, the embodiment of the present invention obtains the update information of the fault diagnosis specification to configure the preset fault list data according to the update information and update the preset test case. Specifically, the embodiment of the present invention integrates the test case automatic update function. When the fault diagnosis specification input by the design is updated, that is, when it is determined that the update information of the fault diagnosis specification is obtained, the embodiment of the present invention directly configures the corresponding preset fault list data to update the fault list target, and then updates the preset test case generated before. Accordingly, the preset fault list data in the embodiment of the present invention includes fault list extraction column data, fault list directory data and fault list template directory data.
[0103] For example, refer to Figure 8 , Figure 8 A schematic diagram of the fault diagnosis automation test operation interface provided by an embodiment of the present invention. Specifically, the embodiment of the present invention fills in the fault list extraction column number in this interface according to the number of the column where the information needs to be extracted in the fault diagnosis specification. At the same time, the controller fault diagnosis specification file that needs to be processed is selected in the fault list directory. At this time, after clicking to create a fault list template, a standardized fault code table can be generated. Further, reconfigure the fault code list template directory in the interface, load the standardized fault code table generated in the previous step here, and then click to generate a test case to generate a test case. Correspondingly, the embodiment of the present invention generates a corresponding automated test program according to the test case, so as to perform a fault diagnosis test through the automated test program, obtain a fault diagnosis test result, and realize the automated test of the controller fault diagnosis, which effectively improves the test efficiency and shortens the test cycle.
[0104] See also Fig. 9 The embodiment of the present application also provides a fault diagnosis automated testing system, which can implement the above-mentioned fault diagnosis automated testing method, and the system includes:
[0105] The first module 810 is used to generate a preset standardized fault code table according to a fault diagnosis specification and preset fault parameters.
[0106] The second module 820 is used to generate a preset test case through a preset program development module according to a preset standardized fault code table.
[0107] The third module 830 is used to generate an automated test program according to preset test cases.
[0108] The fourth module 840 is used to perform a fault diagnosis test through an automated test program to obtain a fault diagnosis test result.
[0109] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0110] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned automatic fault diagnosis test method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0111] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0112] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0113] The processor 910 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0114] The memory 920 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 920 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 920, and the processor 910 calls and executes the fault diagnosis automatic test method of the embodiment of this application;
[0115] Input / output interface 930, used to implement information input and output;
[0116] Communication interface 940, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0117] bus 950 , which transmits information between the various components of the device (e.g., processor 910 , memory 920 , input / output interface 930 , and communication interface 940 );
[0118] The processor 910 , the memory 920 , the input / output interface 930 , and the communication interface 940 are connected to each other in communication within the device via a bus 950 .
[0119] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned automatic fault diagnosis test method is implemented.
[0120] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0121] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0122] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0123] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0124] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0125] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0126] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0127] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0128] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0129] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0130] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0131] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0132] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A fault diagnosis automated testing method, It is characterized in that The method comprises the following steps: Generate a preset standardized fault code table according to fault diagnosis specifications and preset fault parameters; Generate a preset test case through a preset program development module according to the preset standardized fault code table; Generate an automated test program according to the preset test cases; A fault diagnosis test is performed through the automated test program to obtain a fault diagnosis test result.
2. The method according to claim 1, It is characterized in that The method of generating a preset standardized fault code table according to the fault diagnosis specification and the preset fault parameters includes: Constructing the first standardized fault code table template; Extracting the preset fault parameters according to the fault diagnosis specification, so as to fill the preset fault parameters into the first standardized fault code table template, and obtain a second standardized fault code table template; wherein the preset fault parameters include fault code information, fault maturity conditions and fault manifestation information; The fault setting variable information, fault setting variable values and fault type information are filled into the second standardized fault code table template to generate a full-information standardized fault code table.
3. The method according to claim 2, It is characterized in that The generating of preset test cases through a preset program development module according to the preset standardized fault code table includes: Build test case templates; The preset test case is generated by a preset program development module according to the test case template and the full-information standardized fault code table.
4. The method according to claim 3, It is characterized in that The test case template is constructed, including: Build preset test steps; Construct the corresponding test case template according to the fault type information and preset test steps.
5. The method according to claim 4, It is characterized in that The preset test steps include: Powering on the controller to be tested, and clearing the controller fault of the controller to be tested through a preset diagnostic instruction; When it is determined that the controller to be tested is in a fault-free state, a target fault is set, and a corresponding operating variable is determined; wherein the operating variable is used as an assignment variable interface of the preset test case; Obtaining a first fault code of the controller to be tested, and verifying whether the first fault code matches the target fault; When it is determined that the first fault code matches the target fault, canceling the target fault; Acquire a second fault code of the controller to be tested, so as to determine whether the target fault has been cancelled through the second fault code; When it is determined that the target fault cancellation is completed, clearing the fault of the controller to be tested by using the preset diagnostic instruction; A third fault code of the controller to be tested is obtained to determine that the controller to be tested is in a non-fault state through the third fault code.
6. The method according to claim 1, It is characterized in that Generating an automated test program according to the preset test case includes: By calling the automated testing program tool, a preset conversion sequence module is constructed; Generate automated program steps from the text steps of the preset test case through the preset sequence conversion module; The automated test program is generated according to the automated program steps and the preset library file.
7. The method according to claim 1, It is characterized in that The method further comprises: Obtaining update information of the fault diagnosis specification; When it is determined that the update information is obtained, the preset fault list data is configured according to the update information to update the preset test case; wherein the preset fault list data includes fault list extraction column data, fault list directory data and fault list template directory data.
8. A fault diagnosis automated test system, It is characterized in that The system comprises: The first module is used to generate a preset standardized fault code table according to the fault diagnosis specification and the preset fault parameters; The second module is used to generate a preset test case through a preset program development module according to the preset standardized fault code table; The third module is used to generate an automated test program according to the preset test case; The fourth module is used to perform a fault diagnosis test through the automated test program to obtain a fault diagnosis test result.
9. An electronic device, It is characterized in that include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Unified diagnostic service test case generation method and device
CN108490922A
Automatic diagnosis test method, device and equipment
CN113672498A
Vehicle controller diagnosis automation hardware-in-the-loop test method and system
CN114967650A
Test information determination method and device and computer readable storage medium
CN116132357A
Vehicle control unit diagnosis test method, device and equipment and storage medium
CN117950391A
Cited By
Controller fault diagnosis test method and device and electronic equipment
CN119717775A
DSM fault diagnosis test method, equipment and medium
CN121349051A
