Fault diagnosis automation test method, system, electronic device and storage medium

By generating a pre-defined standardized fault code table and automatically generating test cases, the problem of low efficiency in automotive electronic and electrical function fault diagnosis and testing in existing technologies has been solved, realizing automated testing, improving efficiency and shortening the cycle.

CN118981200BActive Publication Date: 2026-03-17CHINA FAW CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies for automotive electronic and electrical function fault diagnosis testing are inefficient and time-consuming, with testing mainly relying on manual operation.

Method used

By generating a pre-defined standardized fault code table, automatically generating test cases, and building automated test programs, automated fault diagnosis testing can be achieved.

Benefits of technology

It improved testing efficiency, shortened the testing cycle, and automated the diagnosis of controller faults.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981200B_ABST
    Figure CN118981200B_ABST
Patent Text Reader

Abstract

The application discloses a fault diagnosis automation test method and system, an electronic device and a storage medium. The method comprises the following steps: generating a preset standardized fault code table according to a fault diagnosis specification and a preset fault parameter; generating a preset test case through a preset program development module according to the preset standardized fault code table; generating an automation test program according to the preset test case; and performing fault diagnosis test through the automation test program to obtain a fault diagnosis test result. The embodiment of the application can realize the automation test of the controller fault diagnosis, effectively improve the test efficiency, and shorten the test period. The application can be widely applied to the technical field of fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of fault diagnosis technology, and in particular to an automated fault diagnosis testing method, system, electronic device and storage medium. Background Technology

[0002] As automotive electronic and electrical functions become increasingly complex, comprehensive testing of all electronic and electrical controllers is required during the vehicle design phase to ensure their safe and reliable operation. In addition to functional testing, fault diagnosis testing is also crucial. Currently, in general fault diagnosis testing, both test case design and test implementation are done manually, resulting in low testing efficiency and long testing cycles.

[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention

[0004] The main objective of this application is to propose an automated fault diagnosis testing method, system, electronic device, and storage medium, which can realize automated testing for controller fault diagnosis, effectively improve testing efficiency, and shorten the testing cycle.

[0005] To achieve the above objectives, one aspect of this application proposes an automated fault diagnosis testing method, the method comprising the following steps:

[0006] Generate a preset standardized fault code table based on fault diagnosis specifications and preset fault parameters;

[0007] Preset test cases are generated based on the preset standardized fault code table through a preset program development module.

[0008] An automated test program is generated based on the preset test cases;

[0009] The fault diagnosis test is performed using the automated test program to obtain the fault diagnosis test results.

[0010] In some embodiments, generating a preset standardized fault code table based on fault diagnosis specifications and preset fault parameters includes:

[0011] Construct the first standardized fault code table template;

[0012] The preset fault parameters are extracted according to the fault diagnosis specifications, and the preset fault parameters are filled into the first standardized fault code table template to obtain the second standardized fault code table template; wherein, the preset fault parameters include fault code information, fault maturity conditions and fault performance information;

[0013] 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 fully information standardized fault code table.

[0014] In some embodiments, generating preset test cases based on the preset standardized fault code table through a preset program development module includes:

[0015] Build test case templates;

[0016] The preset test cases are generated by the preset program development module based on the test case template and the full-information standardized fault code table.

[0017] In some embodiments, the construction of the test case template includes:

[0018] Build a pre-defined test procedure;

[0019] The corresponding test case template is constructed based on the fault type information and the preset test steps.

[0020] In some embodiments, the preset test steps include:

[0021] Power on the controller to be tested and clear the controller fault of the controller to be tested through preset diagnostic instructions;

[0022] When it is determined that the controller under test is in a fault-free state, a target fault is set, and the corresponding operation variables are determined; wherein, the operation variables are used as the assignment variable interface of the preset test cases;

[0023] Obtain the first fault code of the controller under test, and verify whether the first fault code matches the target fault;

[0024] Once it is determined that the first fault code matches the target fault, the target fault is revoked;

[0025] Obtain the second fault code of the controller under test, and use the second fault code to determine whether the target fault has been completely canceled;

[0026] Once it is determined that the target fault has been undone, the fault is cleared from the controller under test using the preset diagnostic command.

[0027] Obtain the third fault code of the controller under test, so as to determine that the controller under test is in a fault-free state through the third fault code.

[0028] In some embodiments, generating an automated test program based on the preset test cases includes:

[0029] By calling automated testing tools, a pre-defined sequence conversion module is built;

[0030] The preset sequence conversion module generates automated program steps from the text steps of the preset test cases.

[0031] The automated test program is generated based on the automated program steps and preset library files.

[0032] In some embodiments, the method further includes:

[0033] Obtain updated information on the fault diagnosis specifications;

[0034] Once the update information is obtained, a preset fault list data is configured according to the update information to update the preset test cases; 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 objectives, another aspect of this application proposes an automated fault diagnosis testing system, the system comprising:

[0036] The first module is used to generate a preset standardized fault code table based on fault diagnosis specifications and preset fault parameters.

[0037] The second module is used to generate preset test cases based on the preset standardized fault code table through a preset program development module.

[0038] The third module is used to generate automated test programs based on the preset test cases;

[0039] The fourth module is used to perform fault diagnosis tests through the automated test program and obtain fault diagnosis test results.

[0040] To achieve the above objectives, another aspect of this 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 performs the method described above.

[0044] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0045] The embodiments of this application include at least the following beneficial effects: This application provides an automated fault diagnosis testing method, system, electronic device, and storage medium. This solution generates a preset standardized fault code table based on fault diagnosis specifications and preset fault parameters, and generates preset test cases based on the preset standardized fault code table through a preset program development module. Then, the embodiments of this invention generate an automated test program based on the preset test cases. Finally, the embodiments of this invention perform fault diagnosis testing through the automated test program to obtain fault diagnosis test results, thereby realizing automated testing of controller fault diagnosis. It is easily understood that the embodiments of this invention generate a preset standardized fault code table through fault diagnosis and preset fault parameters, and then generate corresponding test cases based on the preset standardized fault code table through a preset program development module. This achieves automatic generation of test case design, followed by the generation of an automated test program based on the preset test cases, and then performs fault diagnosis testing through the generated automated test program to obtain fault diagnosis test results, effectively improving testing efficiency and shortening the testing cycle. Attached Figure Description

[0046] Figure 1 This is a flowchart illustrating the automated fault diagnosis testing method provided in an embodiment of the present invention;

[0047] Figure 2 yes Figure 1 A flowchart illustrating step S110 in the process;

[0048] Figure 3 yes Figure 1 A flowchart illustrating step S120 in the process;

[0049] Figure 4 yes Figure 3 A flowchart illustrating step S310 in the process;

[0050] Figure 5 This is a flowchart illustrating the preset test steps provided in an embodiment of the present invention;

[0051] Figure 6 yes Figure 1 A flowchart illustrating step S130 in the process;

[0052] Figure 7 This is a schematic diagram of the steps for updating preset test cases provided in an embodiment of the present invention;

[0053] Figure 8 This is a schematic diagram of the automated fault diagnosis test operation interface provided in an embodiment of the present invention;

[0054] Figure 9 This is a schematic diagram of the structure of the automated fault diagnosis testing system provided in an embodiment of the present invention;

[0055] Figure 10 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying 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 those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0057] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”

[0058] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0060] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.

[0061] Fault diagnosis refers to the comprehensive diagnosis of equipment or systems through a series of inspections, tests, and analyses to determine whether a fault exists and to identify the specific cause, location, and severity of the fault. This process is crucial for ensuring the normal operation of equipment or systems, improving reliability, and enhancing maintenance efficiency.

[0062] As automotive electronic and electrical functions become increasingly complex, comprehensive testing of all electronic and electrical controllers is required during the vehicle design phase to ensure their safe and reliable operation. In addition to functional testing, fault diagnosis testing is also crucial. Currently, in general fault diagnosis testing, both test case design and test implementation are done manually, resulting in low testing efficiency and long testing cycles.

[0063] In view of this, this invention provides an automated fault diagnosis testing method, system, electronic device, and storage medium. This solution generates a preset standardized fault code table through fault diagnosis and preset fault parameters. Based on the preset standardized fault codes, corresponding test cases are generated in the code table through a preset program development module, thereby realizing the automatic generation of test case design. Then, an automated test program is generated based on the preset test cases, and fault diagnosis testing is performed through the generated automated test program to obtain the fault diagnosis test results. This realizes automated testing of controller fault diagnosis, effectively improving testing efficiency and shortening the testing cycle.

[0064] The automated fault diagnosis testing method provided in this invention relates to the field of fault diagnosis technology. This automated fault diagnosis testing method can be applied to a terminal, a server, or software running on a terminal or server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, 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 implementing the automated fault diagnosis testing method, but is not limited to the above forms.

[0065] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: 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, and distributed computing environments including any of the above systems or devices. This 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. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0066] Figure 1 This is an optional flowchart of the automated fault diagnosis testing method provided in the embodiments of this 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 based on the fault diagnosis specifications and preset fault parameters.

[0068] Step S120: Generate preset test cases based on the preset standardized fault code table through the preset program development module.

[0069] Step S130: Generate an automated test program based on preset test cases.

[0070] Step S140: Perform fault diagnosis tests using an automated testing program to obtain fault diagnosis test results.

[0071] In this specific embodiment, the present invention first generates a preset standardized fault code table based on fault diagnosis specifications and preset fault parameters. Specifically, the fault diagnosis specifications in this embodiment refer to a series of standardized processes and steps to be followed when handling equipment or system faults. The present invention determines the corresponding fault diagnosis specifications through a pre-configured controller fault diagnosis specification file. Correspondingly, the preset fault parameters in this embodiment refer to data parameters related to controller faults, such as fault codes and fault manifestations. By combining the fault diagnosis specifications and preset fault parameters to generate a preset standardized fault code table, the present invention classifies, numbers, and defines various faults that may occur in the controller, thereby enabling rapid and accurate identification and location of faults when they occur. Next, the present invention generates preset test cases based on the preset standardized fault code table through a preset program development module. Specifically, the preset program development module in this embodiment refers to various function libraries or components provided by relevant programming languages, such as Python program development modules or C language program development modules. Correspondingly, the present invention automatically generates preset test cases based on the classification and definition information of various faults in the preset standardized code table, through corresponding preset program development objectives. In this invention, preset test cases refer to descriptive documents describing the testing tasks for corresponding faults, such as test objectives, test environment, and test steps. Further, this embodiment of the invention generates automated test programs based on the preset test cases. Specifically, in this embodiment, the automated test program is a program that detects whether the vehicle controller is functioning correctly, and can test the functional correctness of the vehicle controller. Correspondingly, in this embodiment, the automated test program is a tool and means for executing corresponding preset test cases. By automatically generating corresponding automated test programs through preset test cases, the test steps and expected results in the preset test cases can be verified by executing the automated test programs. Finally, this embodiment of the invention performs fault diagnosis testing through the automated test programs to obtain fault diagnosis test results. Specifically, this embodiment of the invention executes corresponding automated test programs to perform fault diagnosis testing on the vehicle controller, thereby realizing the braking execution of the test implementation. In this embodiment, the entire process from test case development to test implementation is automated, effectively improving testing efficiency and shortening the testing cycle.

[0072] Reference Figure 2 In some embodiments of the present invention, a preset standardized fault code table is generated according to fault diagnosis specifications and preset fault parameters, including but not limited to the following steps:

[0073] Step S210: Construct the first standardized fault code table template.

[0074] Step S220: Extract preset fault parameters according to the fault diagnosis specification, and fill the preset fault parameters into the first standardized fault code table template to obtain the 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 present invention first constructs a first standardized fault code table template. Specifically, the present invention constructs the first standardized fault code table template by setting the information parameters included in the standardized fault code table template. For example, the first standardized fault code table template in the present invention includes parameters such as fault code information, fault code generation conditions, functional performance when the fault occurs, variables and specific values ​​for setting fault conditions, and fault type. Next, the present invention extracts preset fault parameters according to the fault diagnosis specification and fills 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 present invention include fault code information, fault maturity conditions, and fault performance information. Correspondingly, the present invention extracts fault code information, fault maturity conditions, and fault performance information using a Python program according to the fault diagnosis specification, and fills these relevant information into the first standardized fault code table template to construct the second standardized fault code table template. In this embodiment, the fault diagnosis specification is a document that the controller design needs to locate and output. This document can describe the fault codes that the controller needs to report, the conditions for fault code generation, and the functional performance of the controller after the fault code is generated (degradation or reporting a fault light, etc.). Accordingly, this embodiment of the invention uses Python programming to write an automated processing program to fill in the fault codes, fault code generation conditions, and controller function performance information after fault code generation according to the defined first standardized fault code template, thus obtaining a filled second standardized fault code table template. Further, this embodiment of the invention fills in fault setting variable information, fault setting variable values, and fault type information into the second standardized fault code table template to generate a fully information standardized fault code table. Specifically, this embodiment of the invention uses a Python program to supplement the fault setting variables and their values, and fault type-related content in the second standardized fault code table template, thereby generating a fully information standardized fault code table, i.e., a preset standardized fault code table.

[0077] Reference Figure 3 In some embodiments of the present invention, preset test cases are generated by a preset program development module based on a preset standardized fault code table, including but not limited to the following steps:

[0078] Step S310: Construct test case templates.

[0079] Step S320: Generate preset test cases through the preset program development module based on the test case template and the full information standardized fault code table.

[0080] In this specific embodiment, the present invention constructs a test case template to generate preset test cases based on the test case objectives and a fully standardized fault code table through a preset program development module. Specifically, the test case template in this embodiment refers to a standardized format or template used for writing and recording test cases, including parameter information such as test case number, test conditions, test data, and test steps. Accordingly, the present invention uses Python language to call the generated fully standardized fault code table and test case template, and automatically generates preset test cases through a preset program development module, such as a Python program development module. It is easy to understand that the present invention generates fault diagnosis test cases through an automated program, where the number of test cases generated will be the number of test case templates used.

[0081] Reference Figure 4 In some embodiments of the present invention, the construction of test case templates includes, but is not limited to, the following steps:

[0082] Step S410: Construct the preset test steps.

[0083] Step S420: Construct the corresponding test case template based on the fault type information and preset test steps.

[0084] In this specific embodiment, the present invention constructs preset test steps, and then constructs corresponding test case templates based on the corresponding fault type information and preset test steps. Specifically, in this embodiment, the preset test steps refer to the specific operational steps required to execute the test cases. For example, in this embodiment, the preset test steps set the operational steps to be executed under corresponding conditions. Furthermore, in this embodiment, fault type information refers to fault type data, such as electrical, communication, high / low voltage faults, etc. Accordingly, the test steps for different fault types are different, and different test case templates can be customized. Therefore, by combining fault type information and preset test steps, the present invention generates test case templates corresponding to different fault types, thereby effectively improving the accuracy and reliability of automated fault diagnosis testing.

[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 by using preset diagnostic commands.

[0087] Step S520: When it is determined that the controller under test is in a fault-free state, set the target fault and determine the corresponding operational variables. The operational variables are used as the assignment variables for the preset test cases.

[0088] Step S530: Obtain the first fault code of the controller under test 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: Obtain the second fault code of the controller under test, so as to determine whether the target fault has been cancelled.

[0091] Step S560: Once the target fault cancellation is confirmed, the fault is cleared in the controller to be tested using a preset diagnostic command.

[0092] Step S570: Obtain the third fault code of the controller under test to determine that the controller under test is in a fault-free state.

[0093] In this specific embodiment, the preset test steps constructed by this invention first power on the controller under test and clear controller faults of the controller under test through preset diagnostic instructions. Specifically, after the test process begins, this invention provides power to the controller under test to power it on and put it into working state. Simultaneously, this invention sends preset diagnostic instructions to the controller under test to clear all possible fault records, i.e., controller faults, thereby ensuring that the controller under test is in a fault-free state. Next, this invention determines whether the controller under test is in a fault-free state. When it is determined that the controller under test is in a fault-free state, this invention sets a target fault and determines the corresponding operation variables. Specifically, this invention reads the fault check, i.e., reads the controller status, to determine whether the controller under test currently has a fault. When it is determined that the controller under test has no fault codes, i.e., the controller is currently fault-free and in a fault-free state, this invention sets a target fault to simulate controller fault conditions, i.e., simulate the scenario where the controller experiences the target fault. Accordingly, this invention lists the corresponding operation variables here as assignment variable interfaces when automatically generating preset test cases. Further, in this embodiment of the invention, a first fault code of the controller under test is obtained, and the first fault code is verified to match the target fault. When it is determined that the controller fault code (first fault code) matches the target fault, the target fault is revoked. Specifically, by reading the fault code of the controller under test in the fault state, i.e., the first fault code in the target fault state, it is verified whether the obtained controller fault code is consistent with the expectation, i.e., whether the first fault code corresponds to and matches the set target fault. Accordingly, after verifying the fault code, i.e., determining that the obtained controller fault code matches the set target fault, the target fault is revoked to restore the normal state before setting, preparing for the next test. For example, the target fault is revoked by reversing the fault setting steps to control the controller under test to return to a fault-free state. Next, the second fault code of the controller under test is obtained to determine whether the target fault has been revoked. When it is determined that the target fault has been revoked, the controller under test is cleared of faults by using preset diagnostic instructions. Specifically, in this embodiment of the invention, the controller fault code of the controller under test is read again, i.e., the current fault code (second fault code) of the controller under test is obtained, to determine whether the target fault in the controller under test has been recovered. Accordingly, when it is determined that the target fault cancellation is completed, if no fault code is returned or the fault code of the target fault has been cleared, this embodiment of the invention sends a preset diagnostic command to the controller under test to perform the fault clearing operation of the controller again.In this embodiment of the invention, after determining that the target fault has been removed, a controller fault clearing operation is performed to ensure the cleanliness of the test environment. Finally, this embodiment of the invention obtains a third fault code of the controller under test to determine that the controller under test is in a fault-free state. Specifically, after clearing the fault of the controller under test using preset diagnostic instructions, this embodiment of the invention obtains a third fault code to verify whether the controller under test is in a fault-free state, that is, to determine that the fault of the controller under test has been completely cleared, facilitating the next test and improving the stability and reliability of the test.

[0094] Reference Figure 6 In some embodiments of the present invention, an automated test program is generated based on preset test cases, including but not limited to the following steps:

[0095] Step S610: Build a preset sequence conversion module by calling an automated test program tool.

[0096] Step S620: Generate automated program steps from the text steps of the preset test cases using the preset sequence conversion module.

[0097] Step S630: Generate an automated test program based on the automated program steps and preset library files.

[0098] In this specific embodiment, the present invention first calls an automated testing program tool to construct a preset conversion module, and then uses the preset conversion module to generate automated program steps from the text steps of preset test cases, thereby generating an automated test program based on the automated program steps and preset library files. Specifically, in this embodiment, the automated testing program tool refers to a software tool or framework used to develop, execute, and manage automated test scripts to automate continuous test cases. In this embodiment, a program is written in a preset programming language (such as Python), and the corresponding automated testing program tool is called to generate the test case conversion module, i.e., the preset conversion module. In this embodiment, the test case conversion module converts the written test case code or defined test steps into a series of executable instructions or action sequences, so that the automated testing tool or framework can automatically execute these test steps in a specified order. Correspondingly, in this embodiment, the text steps refer to the test execution steps described in natural language within the preset test cases, written in text form. This embodiment converts the text steps of preset test cases using the constructed preset conversion module, transforming the text-based test cases into automated program steps that can be executed by the automated testing tool. Finally, according to the step descriptions of the generated automated program steps, this embodiment of the invention directly calls the corresponding preset advisor to generate an automated test program, thus completing the step of automatically generating test programs from test cases. Accordingly, the test program generated in this embodiment can be executed automatically, completing the automated testing implementation for fault diagnosis.

[0099] Reference Figure 7 In some embodiments of the present invention, the automated fault diagnosis testing method provided by the present invention further includes, but is not limited to, the following steps:

[0100] Step S710: Obtain updated information on the fault diagnosis specifications.

[0101] Step S720: Once the update information is confirmed, configure the preset fault list data according to the update information to update the preset test cases. 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 present invention obtains updated information on the fault diagnosis specification to configure preset fault list data and update preset test cases based on the updated information. Specifically, the present invention integrates an automatic test case update function. When the fault diagnosis specification input in the design is updated, i.e., when it is determined that the updated fault diagnosis specification information has been obtained, the present invention directly configures the corresponding preset fault list data to update the fault list target, thereby updating the previously generated preset test cases. Accordingly, the preset fault list data in 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 This is a schematic diagram of the automated fault diagnosis testing operation interface provided in this embodiment of the invention. Specifically, in this embodiment, the column number for extracting information in the fault diagnosis specification is entered into the fault list extraction column number in this interface. Simultaneously, the controller fault diagnosis specification file to be processed is selected in the fault list directory. Then, after clicking "Create Fault List Template," a standardized fault code table is generated. Further, the fault code list template directory in the interface is configured, loading the standardized fault code table generated in the previous step. Then, clicking "Generate Test Cases" generates test cases. Correspondingly, this embodiment generates a corresponding automated test program based on the test cases, performing fault diagnosis testing through the automated test program to obtain fault diagnosis test results, thus realizing automated testing of controller fault diagnosis, effectively improving testing efficiency and shortening the testing cycle.

[0104] Please see Figure 9 This application also provides an automated fault diagnosis testing system that can implement the above-mentioned automated fault diagnosis testing method. The system includes:

[0105] The first module 810 is used to generate a preset standardized fault code table based on the fault diagnosis specifications and preset fault parameters.

[0106] The second module 820 is used to generate preset test cases based on a preset standardized fault code table through a preset program development module.

[0107] The third module 830 is used to generate automated test programs based on preset test cases.

[0108] The fourth module 840 is used to perform fault diagnosis tests through automated test programs and obtain fault diagnosis test results.

[0109] It is understood that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0110] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned automated fault diagnosis testing method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0111] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment 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] Please see Figure 10 , Figure 10 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:

[0113] The processor 910 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, 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 this application.

[0114] The memory 920 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 920 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 920 and called and executed by the processor 910 using the automated fault diagnosis testing method of the embodiments of this application.

[0115] The input / output interface 930 is used to implement information input and output;

[0116] The communication interface 940 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0117] Bus 950 transmits information between various components of the device (e.g., processor 910, memory 920, input / output interface 930, and communication interface 940);

[0118] The processor 910, memory 920, input / output interface 930 and communication interface 940 are connected to each other within the device via bus 950.

[0119] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described automated fault diagnosis testing method.

[0120] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0121] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0122] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0123] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0124] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0125] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0126] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0127] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0128] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0129] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0130] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0131] If the integrated unit is implemented as 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 this application, in essence, 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. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0132] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method of automated testing for fault diagnosis, characterized by, The method comprises the following steps: According to the fault diagnosis specification and the preset fault parameter, a preset standardized fault code table is generated; According to the preset standardized fault code table, a preset test case is generated through a preset program development module; According to the preset test case, an automatic test program is generated; Fault diagnosis test is carried out through the automatic test program, and a fault diagnosis test result is obtained; According to the fault diagnosis specification and the preset fault parameter, a preset standardized fault code table is generated; A first standardized fault code table template is constructed; According to the fault diagnosis specification, the preset fault parameter is extracted, so that the preset fault parameter is filled into the first standardized fault code table template, and a second standardized fault code table template is obtained; wherein the preset fault parameter comprises fault code information, fault maturity condition and fault performance information; Fault setting variable information, fault setting variable value and fault type information are filled into the second standardized fault code table template to generate a full-information standardized fault code table; The method further comprises: Obtain the 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 comprises fault list extraction column data, fault list directory data and fault list template directory data; According to the preset standardized fault code table, a preset test case is generated through a preset program development module; The test case template is constructed; According to the test case template and the full-information standardized fault code table, the preset test case is generated through a preset program development module.

2. The method of claim 1, wherein, The test case template is constructed; The preset test steps are constructed; According to the fault type information and the preset test steps, the corresponding test case template is constructed.

3. The method of claim 2, wherein, The preset test steps comprise: Power on the controller to be tested, and clear the controller fault of the controller to be tested through a preset diagnosis 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 operation variable is determined; wherein the operation variable is used as an assignment variable interface of the preset test case; A first fault code of the controller to be tested is obtained, and it is verified whether the first fault code matches the target fault; When it is determined that the first fault code matches the target fault, the target fault is removed; A second fault code of the controller to be tested is obtained to determine whether the target fault is removed through the second fault code; When it is determined that the target fault is removed, the controller to be tested is cleared through the preset diagnosis instruction; A third fault code of the controller to be tested is obtained to determine whether the controller to be tested is in a fault-free state through the third fault code.

4. The method of claim 1, wherein, The automatic test program is generated according to the preset test case, comprising: A preset sequence conversion module is constructed by calling an automatic test program tool; The text steps of the preset test case are generated into automatic program steps through the preset sequence conversion module; The automation test program is generated according to the automation program steps and the preset library file.

5. A fault diagnostic automated test system, characterized by, The system comprises: A first module for generating a preset standardized fault code table according to a fault diagnosis specification and preset fault parameters; A second module for generating a preset test case through a preset program development module according to the preset standardized fault code table; A third module for generating an automation test program according to the preset test case; A fourth module for performing fault diagnosis testing through the automation test program to obtain a fault diagnosis testing result; The preset standardized fault code table is generated according to the fault diagnosis specification and the preset fault parameters, comprising: A first standardized fault code table template is constructed; The preset fault parameters are extracted according to the fault diagnosis specification to fill the preset fault parameters into the first standardized fault code table template to obtain a second standardized fault code table template; wherein the preset fault parameters include fault code information, fault maturity conditions and fault performance information; 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; Further comprising: Update information of the fault diagnosis specification is obtained; When it is determined that the update information is obtained, 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; The preset test case is generated through a preset program development module according to the preset standardized fault code table, comprising: A test case template is constructed; The preset test case is generated through a preset program development module according to the test case template and the full-information standardized fault code table.

6. An electronic device, comprising: Comprise: 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 of any one of claims 1-4.

7. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising: The computer program is executed by the processor to implement the method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • Vehicle controller diagnosis automation hardware-in-the-loop test method and system

    CN114967650A