Fault simulation test method and device

By building a peripheral vehicle model of the application layer and conducting software and hardware testing, the problem of binding of application layer software and hardware in the existing technology is solved, and automated testing is achieved, reducing testing costs and improving testing flexibility and accuracy are achieved.

CN119645862APending Publication Date: 2025-03-18GAC AION NEW ENERGY AUTOMOBILE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411741664.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-11-25
Filing Date
2024-11-29
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing automotive HIL testing solutions cannot decouple the application layer software and hardware, resulting in high testing costs and insufficient flexibility, making it difficult to effectively conduct software testing when hardware changes.

Method used

By building the peripheral vehicle model of the application layer of the vehicle controller, obtaining software and hardware testing requirements, conducting software and hardware testing, and outputting test results to decouple the application layer software and hardware.

Benefits of technology

It realizes automated testing of application-level software, reduces testing costs, improves testing flexibility and accuracy, and can only test some versions when hardware changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645862A_ABST
    Figure CN119645862A_ABST
Patent Text Reader

Abstract

The invention provides a fault simulation test method and device. The method comprises the steps that an application layer peripheral whole vehicle model of a whole vehicle controller is built; acquiring a software test requirement and a hardware test requirement; performing software testing on the application layer peripheral whole vehicle model according to a software testing requirement to obtain a processing result output after the software testing fault signal is subjected to software fault testing; hardware testing is carried out on the application layer peripheral whole vehicle model according to hardware testing requirements, and an application layer fault flag bit when hardware fault testing is carried out on the software testing fault signal is obtained; determining a software test result according to the processing result, and determining a hardware test result according to the application layer fault flag bit; and outputting a software test result and a hardware test result. According to the method and device, application layer software and hardware can be effectively decoupled, automatic testing of the application layer software is carried out, the testing cost is reduced, and the testing flexibility and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automobile simulation technology, and in particular to a fault simulation test method and device. Background Art

[0002] At present, cars are an important means of transportation for people's daily travel. Any failure in their internal embedded systems may directly affect the driver's life safety and the overall safety of road traffic. Therefore, ensuring that faults in embedded systems can be diagnosed and handled in a timely, accurate and reliable manner is an indispensable part of the automotive product development process. Traditional HIL test solutions are highly dependent on specific hardware products and test benches, and cannot decouple the binding of application layer software and hardware. Changes in hardware products lead to repeated testing of application layer software. It can be seen that the existing methods have problems such as tight binding of hardware and software, high testing costs, and insufficient flexibility. Therefore, developing a new fault handling test method that can effectively decouple application layer software and hardware, reduce testing costs, and improve test flexibility and accuracy has become a technical problem that needs to be solved urgently in the current field of embedded product development. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a fault simulation test method and device, which can effectively decouple application layer software and hardware, perform automated testing of application layer software, reduce testing costs, and improve testing flexibility and accuracy.

[0004] The first aspect of the present application provides a fault simulation test method, comprising:

[0005] Build the application layer peripheral vehicle model of the vehicle controller;

[0006] Obtain software testing requirements and hardware testing requirements;

[0007] Performing software testing on the application layer peripheral vehicle model according to the software testing requirements, and obtaining a processing result output after the software test fault signal is subjected to software fault testing;

[0008] Performing hardware testing on the application layer peripheral vehicle model according to the hardware testing requirements, and obtaining the application layer fault flag bit when the software test fault signal is used to perform hardware fault testing;

[0009] Determine a software test result according to the processing result, and determine a hardware test result according to the application layer fault flag bit;

[0010] The software test result and the hardware test result are output.

[0011] In the above implementation process, the method can effectively decouple application layer software and hardware, perform automated testing of application layer software, reduce testing costs, and improve testing flexibility and accuracy.

[0012] Furthermore, the software test requirement includes at least a preset first test condition, a simulated first fault signal, and a first expected result corresponding to the first fault signal;

[0013] The first fault signal includes one or more of a digital signal, an analog signal, a communication signal, a combined fault signal, an abnormal operating condition signal, a charge and discharge signal, and a driving function signal;

[0014] The hardware test requirement includes at least a preset second test condition, a simulated second fault signal, and a preset flag bit expected value;

[0015] The second fault signal includes one or more of a digital signal and a controller IO port signal.

[0016] Further, the software test is performed on the application layer peripheral vehicle model according to the software test requirement, and the processing result output after the software test fault signal is subjected to the software fault test includes:

[0017] Under the first test condition, inputting the first fault signal to the application layer peripheral vehicle model;

[0018] Obtain a processing result output by the application layer peripheral vehicle model after performing fault processing on the first fault signal.

[0019] Further, the hardware test is performed on the application layer peripheral vehicle model according to the hardware test requirement, and the application layer fault flag bit when the software test fault signal is performed on the hardware fault test is obtained, including:

[0020] Under the second test condition, inputting the second fault signal to the application layer peripheral vehicle model;

[0021] Obtain an application layer fault flag of the application layer peripheral vehicle model.

[0022] Further, determining the software test result according to the processing result includes:

[0023] When the processing result matches the first expected result, it is determined that the application layer peripheral vehicle model passes the software test.

[0024] Further, determining the hardware test result according to the application layer fault flag bit includes:

[0025] When the value of the application layer fault flag is the expected value of the flag, it is determined that the application layer peripheral vehicle model passes the hardware test.

[0026] A second aspect of the present application provides a fault simulation test device, the fault simulation test device comprising:

[0027] A building unit is used to build a vehicle model surrounding the application layer of the vehicle controller;

[0028] An acquisition unit, used to acquire software test requirements and hardware test requirements;

[0029] A first testing unit is used to perform software testing on the application layer peripheral vehicle model according to the software testing requirements, and obtain a processing result output after the software test fault signal is subjected to software fault testing;

[0030] A second testing unit is used to perform a hardware test on the application layer peripheral vehicle model according to the hardware testing requirement, and obtain an application layer fault flag bit when the software test fault signal is used to perform a hardware fault test;

[0031] A first determining unit, configured to determine a software test result according to the processing result;

[0032] A second determining unit, configured to determine a hardware test result according to the application layer fault flag bit;

[0033] An output unit is used to output the software test result and the hardware test result.

[0034] Furthermore, the software test requirement includes at least a preset first test condition, a simulated first fault signal, and a first expected result corresponding to the first fault signal;

[0035] The first fault signal includes one or more of a digital signal, an analog signal, a communication signal, a combined fault signal, an abnormal operating condition signal, a charge and discharge signal, and a driving function signal;

[0036] The hardware test requirement includes at least a preset second test condition, a simulated second fault signal, and a preset flag bit expected value;

[0037] The second fault signal includes one or more of a digital signal and a controller IO port signal.

[0038] Furthermore, the first test unit includes:

[0039] A first input subunit, used for inputting the first fault signal to the application layer peripheral vehicle model under the first test condition;

[0040] The first acquisition subunit is used to obtain a processing result output by the application layer peripheral vehicle model after performing fault processing on the first fault signal.

[0041] Furthermore, the second test unit includes:

[0042] A second input subunit, used for inputting the second fault signal to the application layer peripheral vehicle model under the second test condition;

[0043] The second acquisition subunit is used to acquire the application layer fault flag of the application layer peripheral vehicle model.

[0044] Furthermore, the first determination unit is specifically used to determine that the application layer peripheral vehicle model passes the software test when the processing result matches the first expected result.

[0045] Furthermore, the second determination unit is specifically used to determine that the application layer peripheral vehicle model passes the hardware test when the value of the application layer fault flag is the expected value of the flag.

[0046] A third aspect of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the fault simulation test method described in any one of the first aspects of the present application.

[0047] A fourth aspect of the present application provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, the fault simulation test method described in any one of the first aspects of the present application is executed.

[0048] The beneficial effects of the present application are as follows: the method and device can decouple the application layer from the hardware, and when the hardware remains unchanged, only some versions are tested to avoid testing all versions, thereby reducing the testing of the hardware. When the software is iterated, the method can perform fault handling tests on each version; wherein, the method can use automated testing tools to write test cases and scripts to perform the above tests.

[0049] At the same time, by decoupling the testing of hardware and software, it is possible to perform fault handling tests for each hardware replacement in the case of frequent hardware replacement to observe whether the relevant fault signals can be triggered normally. At this time, the software version can be tested less without modification, for example, only the first version, the intermediate version, and the final output version can be tested, which can reduce a lot of testing work and improve testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 A flowchart of a fault simulation test method provided in an embodiment of the present application;

[0052] Figure 2 A flowchart of another fault simulation test method provided in an embodiment of the present application;

[0053] Figure 3 A structural schematic diagram of a fault simulation test device provided in an embodiment of the present application;

[0054] Figure 4 A schematic diagram of the structure of another fault simulation test device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0056] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0057] Example 1

[0058] Please see Figure 1 , Figure 1 A schematic diagram of a flow chart of a fault simulation test method provided in this embodiment. The fault simulation test method includes:

[0059] S101, build the application layer peripheral vehicle model of the vehicle controller.

[0060] S102: Obtain software testing requirements and hardware testing requirements.

[0061] In this embodiment, the software test requirement includes at least a preset first test condition, a simulated first fault signal, and a first expected result corresponding to the first fault signal;

[0062] The first fault signal includes one or more of a digital signal, an analog signal, a communication signal, a combined fault signal, an abnormal operating condition signal, a charge and discharge signal, and a driving function signal;

[0063] The hardware test requirements include at least a preset second test condition, a simulated second fault signal, and a preset flag bit expected value;

[0064] The second fault signal includes one or more of a digital signal and a controller IO port signal.

[0065] S103, performing software testing on the entire vehicle model peripheral to the application layer according to software testing requirements, and obtaining a software testing fault signal and performing software fault testing on the output processing result.

[0066] S104, performing hardware testing on the application layer peripheral vehicle model according to hardware testing requirements, and obtaining an application layer fault flag bit when performing hardware fault testing on a software test fault signal.

[0067] S105: Determine the software test result according to the processing result, and determine the hardware test result according to the application layer fault flag.

[0068] S106: Output software test results and hardware test results.

[0069] In this embodiment, the method can illustrate the signal flow based on the AUTOSAR fault handling process as an example, wherein the signal flow is generally: fault trigger signal → application layer logic judges it as a fault → bottom layer fault handling → fault handling signal setting → application layer fault handling action.

[0070] In this embodiment, the execution subject of the method may be a computing device such as a computer or a server, and no limitation is made in this embodiment.

[0071] In this embodiment, the execution subject of the method may also be a smart device such as a smart phone, a tablet computer, etc., which is not limited in this embodiment.

[0072] It can be seen that the implementation of the fault simulation test method described in this embodiment can effectively decouple application layer software and hardware, perform automated testing of application layer software, reduce testing costs, and improve testing flexibility and accuracy.

[0073] Example 2

[0074] Please see Figure 2 , Figure 2 A schematic diagram of a flow chart of a fault simulation test method provided in this embodiment. The fault simulation test method includes:

[0075] S201, build the application layer peripheral vehicle model of the vehicle controller.

[0076] In this embodiment, the method can give priority to building an application layer peripheral vehicle model of the vehicle controller. The application layer peripheral vehicle model is an interaction model between the vehicle controller and other vehicle function nodes. Based on this model, it can be seen whether the vehicle charging and discharging, driving, high voltage, display functions, etc. are normal.

[0077] S202: Obtain software testing requirements and hardware testing requirements.

[0078] In this embodiment, the software test requirement includes at least a preset first test condition, a simulated first fault signal, and a first expected result corresponding to the first fault signal;

[0079] The first fault signal includes one or more of a digital signal, an analog signal, a communication signal, a combined fault signal, an abnormal operating condition signal, a charge and discharge signal, and a driving function signal;

[0080] The hardware test requirements include at least a preset second test condition, a simulated second fault signal, and a preset flag bit expected value;

[0081] The second fault signal includes one or more of a digital signal and a controller IO port signal.

[0082] S203: Under a first test condition, input a first fault signal to the peripheral vehicle model of the application layer.

[0083] In this embodiment, in terms of digital signals, the method can input a fault signal (such as brake pedal abnormality) simulated under a driving condition (ie, a first test condition) into an application layer peripheral vehicle model (such as application layer software).

[0084] S204: Obtain a processing result output by the application layer peripheral vehicle model after performing fault processing on the first fault signal.

[0085] In this embodiment, the application layer peripheral vehicle model can determine whether the brake pedal unavailable fault signal is set, and after determining that it is set, it simulates the debounce time of the underlying layer for 100ms and inputs the fault processing action FID-1 to the application layer, and accordingly requests processing actions such as setting the fault signal light, providing a text prompt for abnormal braking system, and shutting down brake energy recovery.

[0086] In this embodiment, the method can similarly simulate the output of the application layer software (ie, the processing result) when the fault occurs under other working conditions.

[0087] In this embodiment, taking the abnormal temperature rise of a temperature sensor as an example, for analog signals, the method can test the logic of temperature control at the application layer by simulating the change of the temperature rise curve, and determine whether the processing result of the software is normal after the temperature abnormality.

[0088] In this embodiment, for communication signals, the method can directly simulate errors such as bus signal loss, signal error, signal value exceeding the limit, etc., to test whether the processing of the application layer software meets the design expectations.

[0089] In this embodiment, for combined faults (such as simultaneous short circuit of braking hardware and short circuit of temperature sensor, simultaneous hardware short circuit fault and communication loss fault), the method can also input the corresponding combined fault signal into the application layer peripheral vehicle model to determine whether the software processing result is normal.

[0090] In this embodiment, for abnormal operating condition signals (generated during abnormal operating condition simulation), such as simulating unexpected acceleration or high-speed braking failure, the method can test whether the software processing under abnormal operating conditions meets design expectations.

[0091] In this embodiment, the method can also test normal charging and discharging tests and driving function tests to determine whether the application layer software design logic meets expectations.

[0092] S205. Under a second test condition, input a second fault signal to the application layer peripheral vehicle model.

[0093] S206: Obtain an application layer fault flag of the application layer peripheral vehicle model.

[0094] In this embodiment, since the hardware test can also decouple the judgment logic and processing results of the application layer, it is only necessary to observe whether the corresponding application layer fault signal is set when the fault occurs, and there is no need to test the backend processing logic.

[0095] In this embodiment, the fault signal under driving conditions is simulated by taking the abnormality of the brake pedal as an example. If the brake pedal is stuck, short-circuited, or open-circuited, it is only necessary to observe whether the fault signal (which is a digital signal) is normally set, and the signal can be observed normally at the application layer. Similarly, for analog signals, CAN / CANFD communication signals, and all IO port signals of the controller, the power supply signal of the controller itself, etc., similar processing measures are also taken.

[0096] S207: When the processing result matches the first expected result, it is determined that the application layer peripheral vehicle model passes the software test.

[0097] S208. When the value of the application layer fault flag is the expected flag value, it is determined that the application layer peripheral vehicle model passes the hardware test.

[0098] S209: Output software test results and hardware test results.

[0099] In this embodiment, the execution subject of the method may be a computing device such as a computer or a server, and no limitation is made in this embodiment.

[0100] In this embodiment, the execution subject of the method may also be a smart device such as a smart phone, a tablet computer, etc., which is not limited in this embodiment.

[0101] It can be seen that the implementation of the fault simulation test method described in this embodiment can effectively decouple application layer software and hardware, perform automated testing of application layer software, reduce testing costs, and improve testing flexibility and accuracy.

[0102] Example 3

[0103] Please see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of a structure of a fault simulation test device provided in this embodiment. Figure 3 As shown, the fault simulation test device comprises:

[0104] A building unit 310 is used to build an application layer peripheral vehicle model of a vehicle controller;

[0105] An acquisition unit 320 is used to acquire software test requirements and hardware test requirements;

[0106] The first testing unit 330 is used to perform software testing on the application layer peripheral vehicle model according to the software testing requirements, and obtain the processing result output after the software test fault signal is performed on the software fault test;

[0107] The second test unit 340 is used to perform hardware testing on the application layer peripheral vehicle model according to the hardware test requirements, and obtain the application layer fault flag bit when the software test fault signal is used to perform hardware fault testing;

[0108] A first determining unit 350, configured to determine a software test result according to the processing result;

[0109] A second determining unit 360, configured to determine a hardware test result according to an application layer fault flag bit;

[0110] The output unit 370 is used to output software test results and hardware test results.

[0111] In this embodiment, the explanation of the fault simulation test device can refer to the description in Embodiment 1 or Embodiment 2, and will not be further elaborated in this embodiment.

[0112] It can be seen that the implementation of the fault simulation test device described in this embodiment can effectively decouple application layer software and hardware, perform automated testing of application layer software, reduce testing costs, and improve testing flexibility and accuracy.

[0113] Example 4

[0114] Please see Figure 4 , Figure 4 FIG. 1 is a schematic diagram of a structure of a fault simulation test device provided in this embodiment. Figure 4 As shown, the fault simulation test device comprises:

[0115] A building unit 310 is used to build an application layer peripheral vehicle model of a vehicle controller;

[0116] An acquisition unit 320 is used to acquire software test requirements and hardware test requirements;

[0117] The first testing unit 330 is used to perform software testing on the application layer peripheral vehicle model according to the software testing requirements, and obtain the processing result output after the software test fault signal is performed on the software fault test;

[0118] The second test unit 340 is used to perform hardware testing on the application layer peripheral vehicle model according to the hardware test requirements, and obtain the application layer fault flag bit when the software test fault signal is used to perform hardware fault testing;

[0119] A first determining unit 350, configured to determine a software test result according to the processing result;

[0120] A second determining unit 360, configured to determine a hardware test result according to an application layer fault flag bit;

[0121] The output unit 370 is used to output software test results and hardware test results.

[0122] In this embodiment, the software test requirement includes at least a preset first test condition, a simulated first fault signal, and a first expected result corresponding to the first fault signal;

[0123] The first fault signal includes one or more of a digital signal, an analog signal, a communication signal, a combined fault signal, an abnormal operating condition signal, a charge and discharge signal, and a driving function signal;

[0124] The hardware test requirements include at least a preset second test condition, a simulated second fault signal, and a preset flag bit expected value;

[0125] The second fault signal includes one or more of a digital signal and a controller IO port signal.

[0126] As an optional implementation, the first testing unit 330 includes:

[0127] The first input subunit 331 is used to input a first fault signal to the application layer peripheral vehicle model under a first test condition;

[0128] The first acquisition subunit 332 is used to obtain the processing result output by the application layer peripheral vehicle model after performing fault processing on the first fault signal.

[0129] As an optional implementation, the second testing unit 340 includes:

[0130] The second input subunit 341 is used to input a second fault signal to the application layer peripheral vehicle model under a second test condition;

[0131] The second acquisition subunit 342 is used to acquire the application layer fault flag of the application layer peripheral vehicle model.

[0132] As an optional implementation, the first determination unit 350 is specifically configured to determine that the application layer peripheral vehicle model passes the software test when the processing result matches the first expected result.

[0133] As an optional implementation, the second determination unit 360 is specifically configured to determine that the application layer peripheral vehicle model passes the hardware test when the value of the application layer fault flag is the flag expected value.

[0134] In this embodiment, the explanation of the fault simulation test device can refer to the description in Embodiment 1 or Embodiment 2, and will not be further elaborated in this embodiment.

[0135] It can be seen that the implementation of the fault simulation test device described in this embodiment can effectively decouple application layer software and hardware, perform automated testing of application layer software, reduce testing costs, and improve testing flexibility and accuracy.

[0136] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the fault simulation test method in Embodiment 1 or Embodiment 2 of the present application.

[0137] An embodiment of the present application provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and executed by a processor, the fault simulation test method in Embodiment 1 or Embodiment 2 of the present application is executed.

[0138] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0139] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0140] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0141] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0142] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0143] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A fault simulation test method, characterized in that: include: Build the application layer peripheral vehicle model of the vehicle controller; Obtain software testing requirements and hardware testing requirements; Performing software testing on the application layer peripheral vehicle model according to the software testing requirements, and obtaining a processing result output after the software test fault signal is subjected to software fault testing; Performing hardware testing on the application layer peripheral vehicle model according to the hardware testing requirements, and obtaining the application layer fault flag bit when the software test fault signal is used to perform hardware fault testing; Determine a software test result according to the processing result, and determine a hardware test result according to the application layer fault flag bit; The software test result and the hardware test result are output.

2. The fault simulation test method according to claim 1, characterized in that: The software testing requirement at least includes a preset first test condition, a simulated first fault signal, and a first expected result corresponding to the first fault signal; The first fault signal includes one or more of a digital signal, an analog signal, a communication signal, a combined fault signal, an abnormal operating condition signal, a charge and discharge signal, and a driving function signal; The hardware test requirement includes at least a preset second test condition, a simulated second fault signal, and a preset flag bit expected value; The second fault signal includes one or more of a digital signal and a controller IO port signal.

3. The fault simulation test method according to claim 2, characterized in that: The performing software testing on the application layer peripheral vehicle model according to the software testing requirements, and obtaining the processing result output after the software testing fault signal is subjected to software fault testing, comprises: Under the first test condition, inputting the first fault signal to the application layer peripheral vehicle model; Obtain a processing result output by the application layer peripheral vehicle model after fault processing on the first fault signal.

4. The fault simulation test method according to claim 2, characterized in that: The step of performing hardware testing on the application layer peripheral vehicle model according to the hardware testing requirement and obtaining the application layer fault flag bit when performing hardware fault testing on the software test fault signal comprises: Under the second test condition, inputting the second fault signal to the application layer peripheral vehicle model; Obtain an application layer fault flag of the application layer peripheral vehicle model.

5. The fault simulation test method according to claim 2, characterized in that: Determining the software test result according to the processing result includes: When the processing result matches the first expected result, it is determined that the application layer peripheral vehicle model passes the software test.

6. The fault simulation test method according to claim 2, characterized in that: Determining the hardware test result according to the application layer fault flag bit includes: When the value of the application layer fault flag is the expected value of the flag, it is determined that the application layer peripheral vehicle model passes the hardware test.

7. A fault simulation test device, characterized in that: The fault simulation test device comprises: A building unit is used to build a vehicle model surrounding the application layer of the vehicle controller; An acquisition unit, used to acquire software test requirements and hardware test requirements; A first testing unit is used to perform software testing on the application layer peripheral vehicle model according to the software testing requirements, and obtain a processing result output after the software test fault signal is subjected to software fault testing; A second testing unit is used to perform a hardware test on the application layer peripheral vehicle model according to the hardware testing requirement, and obtain an application layer fault flag bit when the software test fault signal is used to perform a hardware fault test; A first determining unit, configured to determine a software test result according to the processing result; A second determining unit, configured to determine a hardware test result according to the application layer fault flag bit; An output unit is used to output the software test result and the hardware test result.

8. The fault simulation test device according to claim 7, characterized in that: The software testing requirement at least includes a preset first test condition, a simulated first fault signal, and a first expected result corresponding to the first fault signal; The first fault signal includes one or more of a digital signal, an analog signal, a communication signal, a combined fault signal, an abnormal operating condition signal, a charge and discharge signal, and a driving function signal; The hardware test requirement includes at least a preset second test condition, a simulated second fault signal, and a preset flag bit expected value; The second fault signal includes one or more of a digital signal and a controller IO port signal.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the fault simulation test method according to any one of claims 1 to 6.

10. A readable storage medium, characterized in that: The readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the fault simulation test method according to any one of claims 1 to 6 is executed.

Citation Information

Patent Citations

  • Electric vehicle controller model in-the-loop test system and method

    CN105629960A

  • Hardware-in-the-loop test platform for vehicle control unit and method thereof

    CN111007840A

  • Automatic generation method, device and apparatus for I / O module model of vehicle control unit software and storage medium

    CN111291443A

  • Test method, system and device

    CN117597669A

  • System and method of simulating input / output modules in a control system

    US20120239374A1