Vehicle controller test method, test system, equipment and medium

By using a virtual controller to simulate the bus messages of non-controllers under test in the vehicle controller test, the problems of test signal influence and low efficiency in the existing technology are solved, and a more accurate and efficient vehicle controller test is achieved.

CN118795867AInactive Publication Date: 2024-10-18CHINA FAW CO LTD

Patent Information

Application Number
CN202411093945.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-10-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In existing vehicle controller testing methods, the use of real signals affects the operational reliability of other controllers, and excessive input signals reduce the accuracy and efficiency of the test.

Method used

Use a virtual controller to simulate the bus messages of the non-under-test controller, send the bus messages of the virtual non-under-test controller to the controller to make it run according to the test case, and compare the real running results with the expected results to generate a test Report.

Benefits of technology

It improves the accuracy and efficiency of vehicle controller testing, avoids the impact on other vehicle controller signals, and conforms to real usage scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118795867A_ABST
    Figure CN118795867A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a vehicle controller test method, test system, device and medium, the test system comprises an upper computer and a plurality of vehicle controllers, and the upper computer is provided with a plurality of virtual controllers corresponding to the vehicle controllers; the method comprises the following steps: sending a bus message of a virtual non-to-be-tested controller to a to-be-tested controller; enabling the to-be-tested controller to run according to the test case to obtain a real running result; comparing the real operation result with the expected test result to obtain a comparison result; according to the invention, only part of the input of the vehicle controller is simulated, which accords with the real vehicle usage scene, improves the accuracy and efficiency of the vehicle controller test, and also avoids affecting the signals of other vehicle controllers of the vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle testing, and in particular to a vehicle controller testing method, a testing system, equipment and a medium. Background Art

[0002] The vehicle controller is an important module responsible for controlling the functions of various modules of the vehicle. Various tests need to be performed on the vehicle controller to ensure the accuracy of the vehicle controller. The current vehicle controller test usually inputs all the real signals of other controllers into the controller to be tested to test the controller, but this will affect the operating reliability of other controllers. At the same time, too many input signals and processing unnecessary signals also reduce the accuracy and efficiency of the test. Summary of the invention

[0003] The present application provides a vehicle controller testing method, testing system, equipment and medium to improve the accuracy and efficiency of testing vehicle controllers.

[0004] In a first aspect of the present application, a vehicle controller testing method is applied to a test system, wherein the test system includes a host computer and a plurality of vehicle controllers, wherein the host computer is provided with a plurality of virtual controllers corresponding to the vehicle controllers; the method includes:

[0005] Obtaining a test case, wherein the test case includes an expected test result;

[0006] Sending a bus message of a virtual non-controller to be tested in a virtual controller to a controller to be tested, wherein the controller to be tested belongs to the vehicle controller, and the virtual non-controller to be tested is a virtual controller other than the virtual controller corresponding to the controller to be tested;

[0007] Inputting the bus message of the virtual non-controller to be tested into the controller to be tested, so that the controller to be tested runs according to the test case to obtain a real running result;

[0008] The actual operation result and the expected test result are compared to obtain a comparison result.

[0009] According to certain embodiments of the first aspect of the present application, the sending of a bus message of a virtual non-controller to be tested in a virtual controller to the controller to be tested includes:

[0010] In response to detecting that a bus message of a non-controller to be tested in the vehicle controller is sent to the controller to be tested, a first feedback value is received;

[0011] In response to detecting that a bus message of a non-controller to be tested in the vehicle controller is stopped from being sent to the controller to be tested, receiving a second feedback value, and sending a bus message of a virtual non-controller to be tested in the virtual controller to the controller to be tested;

[0012] The second feedback value is different from the first feedback value, and the non-test controller is a virtual controller other than the test controller.

[0013] According to certain embodiments of the first aspect of the present application, the bus message of the virtual non-controller to be tested in the virtual controller is obtained by simulating the virtual non-controller to be tested.

[0014] According to certain embodiments of the first aspect of the present application, after sending the bus message of the virtual non-controller under test in the virtual controller to the controller under test, the method further includes:

[0015] In response to detecting a fault code returned by the controller under test after receiving the bus message of the virtual non-controller under test, parameters of the simulation environment of the virtual non-controller under test are adjusted according to the fault code.

[0016] According to certain embodiments of the first aspect of the present application, the comparing the actual operation result with the expected test result to obtain a comparison result includes:

[0017] Comparing the actual operation result with the expected test result;

[0018] When the actual operation result meets the expected test result, a comparison result indicating that the controller to be tested passes the test is obtained;

[0019] When the actual operation result does not meet the expected test result, a comparison result indicating that the controller to be tested fails the test is obtained;

[0020] A test report is generated according to the comparison result.

[0021] According to certain embodiments of the first aspect of the present application, the test report records the software version number and the hardware version number of the controller to be tested.

[0022] In a second aspect of the present application, a test system includes a host computer and a plurality of vehicle controllers, wherein the host computer is provided with a plurality of virtual controllers corresponding to the vehicle controllers; the host computer includes:

[0023] An input module, used for obtaining a test case, wherein the test case includes an expected test result;

[0024] A message forwarding module, used for sending a bus message of a virtual non-controller to be tested in a virtual controller to a controller to be tested, wherein the controller to be tested belongs to the vehicle controller, and the virtual non-controller to be tested is a virtual controller other than the virtual controller corresponding to the controller to be tested;

[0025] A test case running module, used for inputting the bus message of the virtual non-controller to be tested into the controller to be tested, so that the controller to be tested runs according to the test case to obtain a real running result;

[0026] The comparison module is used to compare the actual operation result with the expected test result to obtain a comparison result.

[0027] According to certain embodiments of the second aspect of the present application, the test system also includes a bus test tool, which is used to forward bus messages to the host computer and the vehicle controller; the host computer is connected to the bus test tool, and the bus test tool is connected to the vehicle controller.

[0028] An embodiment of the third aspect of the present application is an electronic device, comprising a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein the program, when executed by the processor, realizes the vehicle controller testing method as described in the embodiment of the first aspect of the present application.

[0029] An embodiment of the fourth aspect of the present application is a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to enable a computer to execute the vehicle controller testing method as described in the embodiment of the first aspect of the present application.

[0030] The present application has the following beneficial effects: by sending a bus message of a virtual non-controller to be tested to the controller to be tested; making the controller to be tested run according to the test case to obtain the real running result; comparing the real running result with the expected test result to obtain the comparison result; only simulating the input of part of the vehicle controller, which conforms to the real vehicle usage scenario, improves the accuracy and efficiency of the vehicle controller test, and avoids affecting the signals of other vehicle controllers of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a step diagram of a vehicle controller testing method provided in an embodiment of the present application;

[0032] Figure 2 It is a sub-step diagram of step S200 provided in an embodiment of the present application;

[0033] Figure 3 is a step diagram of step S230 provided in an embodiment of the present application;

[0034] Figure 4 It is a sub-step diagram of step S400 provided in an embodiment of the present application;

[0035] Figure 5is a structural diagram of a test system provided in an embodiment of the present application;

[0036] Figure 6 It is a structural diagram of the host computer provided in the embodiment of the present application;

[0037] Figure 7 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0039] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims or the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0040] The embodiments of the present application are further described below in conjunction with the accompanying drawings.

[0041] An embodiment of the present application provides a testing system.

[0042] Reference Figure 5 The test system includes a host computer 701 and multiple vehicle controllers 704. The host computer 701 is provided with multiple virtual controllers corresponding to the vehicle controllers 704. Figure 6 The host computer 701 includes: an input module 801, a message forwarding module 802, a test case running module 803 and a comparison module 804.

[0043] Among them, the input module 801 is used to obtain test cases; the message forwarding module 802 is used to send bus messages of the virtual non-controller under test in the virtual controller to the controller under test; the test case running module 803 is used to input the bus messages of the virtual non-controller under test into the controller under test, so that the controller under test runs according to the test case to obtain the actual running results; the comparison module 804 is used to compare the actual running results with the expected test results in the test case to obtain the comparison results.

[0044] The test system also includes a bus test tool 702, which is used to forward bus messages to a host computer 701 and a vehicle controller 704; the host computer 701 and the bus test tool 702 are connected via a universal serial bus (USB), an on-board diagnostics system (OBD) interface is connected between the bus test tool 702 and the vehicle controller 704, the bus test tool 702 and the OBD interface 703 are connected via a controller area network (CAN) line, and the OBD interface 703 and the vehicle controller 704 are connected via a CAN line.

[0045] The host computer 701 is installed with a simulation controller interface logic program, which is used to input specific interface logic to the controller to be tested, and to compare the expected results and observed values ​​to achieve comparative verification. The test case running module 803 is provided with a test case automatic execution program, which is used to automatically execute test cases, and the tester can be free from manual testing. The host computer 701 is installed with a test report generation program, which can automatically generate a test report after the test case automatic execution program ends. The generated test report records the software version number, hardware version number and test results of the controller to be tested.

[0046] The host computer 701 is provided with a visual interface, which includes a test interface switch, program running, program ending, test case execution, simulation signal logic selection, test report printing button, etc.

[0047] The controller to be tested belongs to the vehicle controller 704, which is the real vehicle controller 704 that needs to be tested. The virtual controller to be tested is the virtual controller corresponding to the controller to be tested in the simulation program of the host computer 701. The controller not to be tested is the real vehicle controller 704 other than the controller to be tested, and the virtual non-controller to be tested is the virtual vehicle controller other than the virtual controller to be tested. For example, the multiple vehicle controllers 704 include vehicle controller A, vehicle controller B and vehicle controller C; correspondingly, the multiple virtual vehicle controllers include a virtual vehicle controller a corresponding to vehicle controller A, a virtual vehicle controller b corresponding to vehicle controller B and a virtual vehicle controller c corresponding to vehicle controller C. When vehicle controller A is the controller to be tested, the virtual vehicle controller a is the virtual controller to be tested, vehicle controller B and vehicle controller C are non-controllers to be tested, and vehicle controller B and vehicle controller C are virtual non-controllers to be tested.

[0048] The test system applies the following vehicle controller test method.

[0049] Reference Figure 1 , a vehicle controller testing method, comprising the following steps:

[0050] Step S100, obtaining a test case;

[0051] Step S200, sending a bus message of a virtual non-controller to be tested in a virtual controller to the controller to be tested;

[0052] Step S300, inputting the bus message of the virtual non-controller under test into the controller under test, so that the controller under test runs according to the test case to obtain the real running result;

[0053] Step S400, comparing the actual operation result with the expected test result to obtain a comparison result.

[0054] In step S100 of some embodiments, the test case is a test content preset by a tester for the vehicle controller 704. The test case includes an expected test result; the test case specifies the input data of the vehicle controller 704 to be tested and the expected test result after the vehicle controller 704 processes the input data.

[0055] In step S200 of some embodiments, a bus message of a virtual non-controller under test in a virtual controller is sent to the controller under test.

[0056] Exemplarily, the simulation test interface is turned on through the test interface switch of the visual interface of the host computer 701, and the sending and stopping of the bus message of the vehicle controller 704 are controlled through the bus test tool 702.

[0057] Reference Figure 2 Specifically, sending a bus message of a virtual non-controller to be tested in a virtual controller to the controller to be tested includes the following steps:

[0058] Step S210, in response to detecting that a bus message of a non-controller to be tested in the vehicle controller 704 is sent to the controller to be tested, receiving a first feedback value;

[0059] Step S220, in response to detecting that bus messages of non-controllers under test in the vehicle controller 704 stop being sent to the controller under test, receiving a second feedback value, and sending bus messages of virtual non-controllers under test in the virtual controller to the controller under test.

[0060] The second feedback value is different from the first feedback value. Specifically, the first feedback value is 1, and the second feedback value is 0.

[0061] The bus test tool 702 sends the bus message of the non-controller to be tested in the vehicle controller 704 to the controller to be tested, and returns the first feedback value to the upper computer 701, indicating that the real signal of the non-controller to be tested is continuously sent to the controller to be tested; the upper computer 701 responds to the detection that the bus message of the non-controller to be tested in the vehicle controller 704 is sent to the controller to be tested, receives the first feedback value, and does not perform simulation. The bus test tool 702 stops sending the bus message of the non-controller to be tested in the vehicle controller 704 to the controller to be tested, and returns the second feedback value to the upper computer 701, indicating that the bus message of the virtual non-controller to be tested in the virtual controller can be sent to the controller to be tested; the upper computer 701 responds to the detection that the bus message of the non-controller to be tested in the vehicle controller 704 is stopped from being sent to the controller to be tested, and receives the second feedback value.

[0062] It is necessary to ensure that when the simulation test interface is turned on, only bus messages of the controller not to be tested are stopped or only sent to avoid affecting the signals of other vehicle controllers 704 of the vehicle.

[0063] The host computer 701 runs the simulation program to simulate the virtual controller, and the virtual controller outputs the bus message. The host computer 701 can obtain the current parameters of the vehicle controller 704, and simulate the virtual controller according to the current parameters to ensure the accuracy of the bus message output by the virtual controller. The host computer 701 selects the bus message of the virtual non-test controller from the bus message of the virtual controller, and sends the bus message of the virtual non-test controller in the virtual controller to the bus test tool 702, and the bus test tool 702 forwards the bus message of the virtual non-test controller in the virtual controller to the controller to be tested.

[0064] For example, the controller to be tested is vehicle controller A, the non-tested controllers are vehicle controller B and vehicle controller C, the virtual controller to be tested is virtual vehicle controller a, and the virtual non-tested controllers are virtual vehicle controller b and virtual vehicle controller c. The host computer 701 runs the simulation program to simulate the virtual controller, and the virtual controller outputs a bus message. The host computer 701 selects the bus message of the virtual vehicle controller b and the bus message of the virtual vehicle controller c from the bus messages of the virtual vehicle controller a, the bus messages of the virtual vehicle controller b, and the bus messages of the virtual vehicle controller c, and sends the bus message of the virtual vehicle controller b and the bus message of the virtual vehicle controller c to the bus test tool 702, and the bus test tool 702 forwards the bus message of the virtual vehicle controller b and the bus message of the virtual vehicle controller c to the vehicle controller A.

[0065] In addition, the host computer 701 needs to determine whether the simulation program runs normally; when the simulation program does not run or runs abnormally, the simulation step is terminated.

[0066] Reference Figure 3 After sending the bus message of the virtual non-controller to be tested in the virtual controller to the controller to be tested, the vehicle controller testing method further includes the following steps:

[0067] Step S230 , in response to detecting a fault code returned by the controller under test after receiving a bus message from the virtual controller not under test, adjusting parameters of the simulation environment of the virtual controller not under test according to the fault code.

[0068] Exemplarily, the host computer 701 sends a bus message of a virtual non-controller to be tested in the virtual controller to the controller to be tested, and the fault code returned by the controller to be tested after receiving the bus message of the virtual non-controller to be tested indicates that there is a problem with the bus message of the virtual non-controller to be tested in the virtual controller. The host computer 701 receives the fault code returned by the controller to be tested after receiving the bus message of the virtual non-controller to be tested, and adjusts the parameters of the simulation environment of the virtual non-controller to be tested according to the fault code to optimize the simulation environment, so that the bus message of the virtual non-controller to be tested simulated by the optimized simulation environment is more accurate, so as to ensure the accuracy of the bus message of the virtual non-controller to be tested.

[0069] In step S300 of some embodiments, the bus message of the virtual non-controller under test is input into the controller under test, so that the controller under test runs according to the test case to obtain a real running result.

[0070] Exemplarily, the bus test tool 702 transmits the bus message of the virtual non-controller under test through the CAN line, and inputs it to the controller under test through the OBD interface 703. The controller under test runs according to the test case to obtain the real running result.

[0071] For example, the controller to be tested is vehicle controller A, the non-tested controllers are vehicle controller B and vehicle controller C, the virtual controller to be tested is virtual vehicle controller a, and the virtual non-tested controllers are virtual vehicle controller b and virtual vehicle controller C. The bus test tool 702 transmits the bus message of the virtual vehicle controller b and the bus message of the virtual vehicle controller c through the CAN line, and inputs them to the vehicle controller A through the OBD interface 703. The vehicle controller A runs according to the test case to obtain the real running result.

[0072] When the input specified by the test case is only the bus message of vehicle controller B, vehicle controller A only processes the bus message of virtual vehicle controller B; when the input specified by the test case is only the bus message of vehicle controller C, vehicle controller A only processes the bus message of virtual vehicle controller C.

[0073] Reference Figure 4In step S400 of some embodiments, comparing the actual operation result with the expected test result to obtain a comparison result includes the following steps:

[0074] Step S410, comparing the actual operation result with the expected test result;

[0075] Step S421, when the actual operation result meets the expected test result, a comparison result indicating that the controller to be tested has passed the test is obtained;

[0076] Step S422, when the actual operation result does not meet the expected test result, a comparison result indicating that the controller to be tested fails the test is obtained;

[0077] Step S430: Generate a test report based on the comparison result.

[0078] The test report records the software version number and hardware version number of the controller to be tested.

[0079] Exemplarily, the test case includes an expected test result of 10 for the bus message of the non-controller B to be tested and the bus message of the non-controller C to be tested, and the actual operation result obtained by testing the controller A to be tested based on the bus message of the virtual non-controller b and the bus message of the virtual non-controller c to be tested is 10. The actual operation result meets the expected test result, and a comparison result indicating that the controller to be tested has passed the test is obtained. A test report is generated based on the comparison result, and the test report includes a comparison result indicating that the controller to be tested has passed the test. The actual operation result obtained by testing the controller A to be tested based on the bus message of the virtual non-controller b and the bus message of the virtual non-controller c to be tested is 7. The actual operation result does not meet the expected test result, and a comparison result indicating that the controller to be tested has not passed the test is obtained. A test report is generated based on the comparison result, and the test report includes a comparison result indicating that the controller to be tested has not passed the test.

[0080] After one test case is executed, the next test case is automatically executed to achieve automated testing and automated output of test reports.

[0081] The present application also provides an electronic device. Figure 7 The electronic device includes a memory 902 and a processor 901. The memory 902 stores a computer program. When the processor 901 executes the computer program, the vehicle controller test method is implemented. The electronic device can be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.

[0082] The processor 901 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solution provided in the embodiment of the present application; the memory 902 can be implemented in the form of a read-only memory (Read Only Memory, ROM), a static storage device, a dynamic storage device or a random access memory (Random Access Memory, RAM), etc. The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 is called to execute the vehicle controller test method of the embodiment of the present application.

[0083] The input / output interface 903 is used to realize information input and output; the communication interface 904 is used to realize communication interaction between this device and other devices, and communication can be realized through wired methods (such as USB, network cable, etc.) or wireless methods (such as mobile network, WIFI, Bluetooth, etc.); the bus 905 transmits information between the various components of the device (such as the processor 901, the memory 902, the input / output interface 903 and the communication interface 904); wherein the processor 901, the memory 902, the input / output interface 903 and the communication interface 904 realize communication connection with each other within the device through the bus 905.

[0084] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned vehicle controller testing method is implemented.

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

[0086] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

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

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

[0089] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0090] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0091] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0092] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0094] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0095] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0096] The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the rights of the present application is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application should be within the scope of the rights of the present application.

Claims

1. A vehicle controller testing method, characterized in that: Applied to a test system, the test system includes a host computer and multiple vehicle controllers, the host computer is provided with multiple virtual controllers corresponding to the vehicle controllers; the method includes: Obtaining a test case, wherein the test case includes an expected test result; Sending a bus message of a virtual non-controller to be tested in a virtual controller to a controller to be tested, wherein the controller to be tested belongs to the vehicle controller, and the virtual non-controller to be tested is a virtual controller other than the virtual controller corresponding to the controller to be tested; Inputting the bus message of the virtual non-controller to be tested into the controller to be tested, so that the controller to be tested runs according to the test case to obtain a real running result; The actual operation result and the expected test result are compared to obtain a comparison result.

2. The vehicle controller testing method according to claim 1, characterized in that: The sending of a bus message of a virtual non-controller to be tested in a virtual controller to the controller to be tested comprises: In response to detecting that a bus message of a non-controller to be tested in the vehicle controller is sent to the controller to be tested, a first feedback value is received; In response to detecting that a bus message of a non-controller to be tested in the vehicle controller is stopped from being sent to the controller to be tested, receiving a second feedback value, and sending a bus message of a virtual non-controller to be tested in the virtual controller to the controller to be tested; The second feedback value is different from the first feedback value, and the non-test controller is a virtual controller other than the test controller.

3. The vehicle controller testing method according to claim 1, characterized in that: The bus message of the virtual non-controller to be tested in the virtual controller is obtained by simulating the virtual non-controller to be tested.

4. The vehicle controller testing method according to claim 3, characterized in that: After sending the bus message of the virtual non-controller to be tested in the virtual controller to the controller to be tested, the method further includes: In response to detecting a fault code returned by the controller under test after receiving the bus message of the virtual non-controller under test, parameters of the simulation environment of the virtual non-controller under test are adjusted according to the fault code.

5. The vehicle controller testing method according to claim 1, characterized in that: The comparing the actual operation result with the expected test result to obtain a comparison result includes: Comparing the actual operation result with the expected test result; When the actual operation result meets the expected test result, a comparison result indicating that the controller to be tested passes the test is obtained; When the actual operation result does not meet the expected test result, a comparison result indicating that the controller to be tested fails the test is obtained; A test report is generated according to the comparison result.

6. The vehicle controller testing method according to claim 1, characterized in that: The test report records the software version number and the hardware version number of the controller to be tested.

7. A testing system, characterized in that: The system comprises a host computer and a plurality of vehicle controllers, wherein the host computer is provided with a plurality of virtual controllers corresponding to the vehicle controllers; the host computer comprises: An input module, used for obtaining a test case, wherein the test case includes an expected test result; A message forwarding module, used for sending a bus message of a virtual non-controller to be tested in a virtual controller to a controller to be tested, wherein the controller to be tested belongs to the vehicle controller, and the virtual non-controller to be tested is a virtual controller other than the virtual controller corresponding to the controller to be tested; A test case running module, used for inputting the bus message of the virtual non-controller to be tested into the controller to be tested, so that the controller to be tested runs according to the test case to obtain a real running result; The comparison module is used to compare the actual operation result with the expected test result to obtain a comparison result.

8. A test system according to claim 7, characterized in that: The test system further comprises a bus test tool, which is used to forward bus messages to the host computer and the vehicle controller; the host computer is connected to the bus test tool, and the bus test tool is connected to the vehicle controller.

9. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the vehicle controller testing method as described in any one of claims 1 to 6 is realized.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the vehicle controller testing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • New energy automobile overall controller and battery controller joint test system

    CN104503424A

  • Vehicle-mounted controller joint test control method, device and system

    CN112306033A

  • Automatic test method based on HIL bench

    CN112306875A

  • Simulation test system and method for automobile

    CN114675614A

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

    CN117572851A

Cited By

  • Test method and device of vehicle controller and storage medium

    CN120523170A