Vehicle-mounted controller test method and system, control equipment and storage medium
By combining control equipment with multiple communication boards and power modules, parallel testing of the vehicle controller is achieved, solving the problems of low testing efficiency and high cost in the existing technology, improving testing efficiency and reducing hardware and software costs.
Patent Information
- Application Number
- CN202511159449.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2025-11-14
AI Technical Summary
Existing technologies for testing vehicle controllers are inefficient and costly, heavily reliant on manual intervention, leading to low testing efficiency and increased hardware and software costs.
By combining control equipment with multiple communication boards and power modules, parallel testing of multiple vehicle controllers can be achieved. Through the automated loading of configuration information and the automated processing of test commands, manual intervention is reduced.
It significantly improves testing efficiency, reduces hardware and software costs, avoids the increased costs caused by adding separate boards and computers, and enables simultaneous testing of multiple controllers.
Smart Images

Figure CN120949746A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle controller testing technology, and more specifically, to a vehicle controller testing method, system, control device, and storage medium. Background Technology
[0002] During the vehicle research and development and production process, it is necessary to conduct functional tests on the vehicle controller to determine whether the vehicle controller is functioning properly.
[0003] In existing technologies, the testing of vehicle-mounted controllers typically employs a single-rack, single-controller serial testing approach. Specifically, each controller is sequentially connected to the test equipment for individual testing.
[0004] However, the entire testing process relies heavily on manual intervention. This approach results in low testing efficiency for the controller. Summary of the Invention
[0005] The purpose of this application is to address the shortcomings of the prior art by providing a vehicle controller testing method, system, control device, and storage medium, effectively solving the technical problems of low testing efficiency and high cost of vehicle controllers.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, embodiments of this application provide a vehicle controller testing method, applied to a control device in a vehicle controller testing system. The vehicle controller testing system includes: the control device, multiple communication boards, and multiple power modules, wherein the control device is communicatively connected to each of the communication boards and each of the power modules; the method includes: The response involves inserting at least one controller under test (DUT) into the corresponding communication board and connecting the at least one DUT to the corresponding power module, and loading the test configuration information of each DUT. The test configuration information includes: the communication board corresponding to the DUT, the power module corresponding to the DUT, and the test information of the DUT. The test information includes at least: communication channel, test cases, and test system parameters. In response to the test instructions for each of the controllers under test, the system controls the power module corresponding to the controller under test to supply power to the controller under test, sends test instructions to the controller under test and obtains the operating data of the controller under test through the communication channel on the communication board corresponding to the controller under test according to the test cases and the test system parameters, and generates the test results of the controller under test based on the operating data of the controller under test.
[0007] Optionally, loading the test configuration information of each of the controllers under test includes: The test configuration files of each controller under test are obtained from the target storage location of the control device; The test configuration files of each controller under test are loaded into the corresponding test module in the test software, which is deployed on the control device.
[0008] Optionally, loading the test configuration files of each of the controllers under test into each test module in the test software includes: Obtain the identifier of the communication board in each of the aforementioned test configuration files; Based on the mapping relationship between the communication board and the test module, each of the test configuration files is loaded into the corresponding test module; Configure the test system parameters of the test module according to the test system parameters in each of the test configuration files.
[0009] Optionally, before loading the test configuration files of each of the controllers under test into each test module in the test software, the method further includes: Multiple test modules are created in the test software, and the number of test modules is the same as the number of communication boards. Multiple real-time message windows and multiple data storage channels are created in the test software. The number of real-time message windows and the number of data storage channels are the same as the number of boards.
[0010] Optionally, the step of sending test commands to the controller under test and obtaining the operating data of the controller under test according to the test cases and the test system parameters, via the communication channel on the communication board corresponding to the controller under test, includes: The test module parses the test cases to obtain a sequence of test instructions; The test module determines the common system variables and unique system variables based on the test system parameters; The test module sends test commands to the controller under test via the communication channel and obtains the operating data of the controller under test according to the test command sequence, the common system variables, and the unique system variables.
[0011] Optionally, the step of sending test commands to the controller under test via the communication channel and obtaining the operating data of the controller under test according to the test command sequence, the common system variables, and the unique system variables includes: Based on the common system variables and the unique system variables, establish communication between the test module and the communication channel, and between the communication channel and the controller under test; The test instructions in the test instruction sequence are sent sequentially to the controller under test via the communication channel, and the running data of the controller under test after executing the test instructions is obtained.
[0012] Optionally, acquiring the operating data of the controller under test includes: The target real-time message window of the controller under test is determined based on the mapping relationship between the controller under test, the communication board and each of the real-time message windows; The operating data of the controller under test is obtained through the target real-time message window.
[0013] Optionally, after obtaining the operating data of the controller under test through the target real-time message window, the process includes: The target data storage channel of the controller under test is determined based on the mapping relationship between the controller under test, the communication board and each of the data storage channels; The operating data of the controller under test is saved through the target data storage channel.
[0014] Secondly, this application also provides an on-board controller testing system, which includes: the control device, multiple communication boards and multiple power modules, wherein the control device is communicatively connected to each of the communication boards and each of the power modules; The control device is used to perform the steps of the vehicle controller testing method described in the first aspect to achieve parallel testing of multiple vehicle controllers.
[0015] Thirdly, embodiments of this application also provide a control device, including a memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor executes the computer program to implement the steps of the vehicle controller testing method described in the first aspect.
[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which is read and executes the steps of the vehicle controller testing method described in the first aspect.
[0017] The beneficial effects of this application are: This application provides a vehicle-mounted controller testing method, system, control device, and storage medium. The control device can control multiple controllers under test (DUTs) in parallel via multiple communication boards and power modules. Furthermore, by loading the configuration information of each DUT into the control device, it can simultaneously control the power modules of each DUT to supply power to them. It can also simultaneously test each DUT via the communication channels on its corresponding communication boards, based on the test cases and test system parameters. This application requires only one control device to test multiple DUTs, significantly improving testing efficiency and reducing hardware costs. It avoids the problems in existing technologies where adding a new DUT requires a separate board and computer, increasing hardware costs, or where sequential testing requires connecting new DUTs to the control device, leading to low testing efficiency. Moreover, only one testing software license is needed, reducing software costs and avoiding the problems in existing technologies where each DUT requires a separate computer and a separate testing software license for each computer, increasing software costs. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This application provides a schematic diagram of the architecture of a static vehicle controller testing system. Figure 2 This application provides a schematic diagram of the architecture of a dynamic vehicle controller testing system. Figure 3 A flowchart illustrating a vehicle controller testing method provided in an embodiment of this application; Figure 4 A flowchart illustrating the second vehicle controller testing method provided in this application embodiment; Figure 5 A flowchart illustrating the third vehicle controller testing method provided in this application embodiment; Figure 6 A schematic diagram of a test module provided in an embodiment of this application; Figure 7 A schematic diagram illustrating the creation of a message window, provided as an embodiment of this application; Figure 8 A flowchart illustrating the fourth vehicle controller testing method provided in this application embodiment; Figure 9 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0021] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0022] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0023] Figure 1 This application provides a schematic diagram of the architecture of a static vehicle controller testing system, as shown in the embodiments below. Figure 1 As shown, the system may include: a control device, multiple communication boards, and multiple power modules. The control device is communicatively connected to each communication board and each power module.
[0024] For example, the control device can be a desktop computer, laptop computer or other terminal device. The user can send test instructions to the vehicle controller test system through interaction with the control device and view the test results through the control device.
[0025] like Figure 1As shown, the control device can communicate with each communication board and each power module, with one communication board corresponding to one power module. Figure 1 There are four communication boards and four power supply modules, namely communication board 1, communication board 2, communication board 3, and communication board 4. Power supply module 1 includes a programmable power supply 1 and a relay 1; power supply module 2 includes a programmable power supply 2 and a relay 2; power supply module 3 includes a programmable power supply 3 and a relay 3; and power supply module 4 includes a programmable power supply 4 and a relay 4.
[0026] Continue as Figure 1 As shown, communication board 1 can correspond one-to-one with power module 1; communication board 2 can correspond one-to-one with power module 2; communication board 3 can correspond one-to-one with power module 3; and communication board 4 can correspond one-to-one with power module 4. Each power module contains a programmable power supply and a relay.
[0027] Figure 2 This application provides an embodiment of a dynamic vehicle controller testing system, as shown in the following diagram. Figure 2 As shown, during the test, each controller under test is inserted into the corresponding communication board, and a connection is established with the inserted communication board and the corresponding power module.
[0028] like Figure 2 As shown, when communication board 1 is inserted into controller under test 1, controller under test 1 can establish a connection with communication board 1 and power module 1; when communication board 2 is inserted into controller under test 2, controller under test 2 can establish a connection with communication board 2 and power module 2; when communication board 3 is inserted into controller under test 3, controller under test 3 can establish a connection with communication board 3 and power module 3; when communication board 4 is inserted into controller under test 4, controller under test 4 can establish a connection with communication board 4 and power module 4.
[0029] Optionally, the control device can utilize the vehicle controller testing method provided in this application embodiment to simultaneously test multiple controllers under test (DUTs) via multiple communication boards. During the testing process, the control device can control the power modules connected to each DUT to supply power to each DUT. The number of DUTs can be four, three, or two.
[0030] For example, when the controller under test 1 is inserted into communication board 1, the controller under test 1 is connected to the control device through communication board 1, and the power module 1 is connected to the controller under test 1; when the controller under test 2 is inserted into communication board 2, the controller under test 2 is connected to the control device through communication board 2, and the power module 2 is connected to the controller under test 2; when the controller under test 3 is inserted into communication board 3, the controller under test 3 is connected to the control device through communication board 3, and the power module 3 is connected to the controller under test 3; when the controller under test 4 is inserted into communication board 4, the controller under test 4 is connected to the control device through communication board 4, and the power module 4 is connected to the controller under test 4; then the control device can use the vehicle controller testing method provided in this application embodiment to simultaneously perform parallel testing of the controller under test 1, the controller under test 2, the controller under test 3, and the controller under test 4 through communication board 1, communication board 2, communication board 3, and communication board 4.
[0031] Optionally, the control device includes a software automation toolchain with the following functions: CAN communication, sensor-based upgrade, sensorless upgrade, CANTP protocol, CAN diagnostic overview, and diagnostic ID test.
[0032] Figure 3 This is a flowchart illustrating a vehicle controller testing method provided in an embodiment of this application. The execution subject of this method is the control device described above. Figure 3 As shown, the method includes: S101, The response involves inserting at least one controller under test into the corresponding communication board and connecting at least one controller under test to the corresponding power module, and loading the test configuration information of each controller under test.
[0033] The test configuration information includes: the communication board corresponding to the controller under test (DUT), the power module corresponding to the DUT, and the test information for the DUT. The test information includes at least: the communication channel, test cases, and test system parameters. The communication channel refers to the channel through which the DUT connects to the communication board. Test system parameters may include, for example, common system variables and unique system variables. Common system variables are variables that are present in all DUTs, while unique system variables are variables that are uniquely present in that specific DUT and not present in other DUTs.
[0034] Optionally, inserting the corresponding communication board into the controller under test (DUT) means selecting one communication board from multiple communication boards to connect to the DUT, for example, selecting communication board 1 to connect to DUT 1. Similarly, inserting the corresponding power module into the DUT means selecting one power module from multiple power modules to connect to the DUT, for example, selecting power module 1 to connect to DUT 1. If there are four DUTs, after inserting each of the four DUTs into its corresponding communication board and connecting each DUT to its corresponding power module, the test configuration information for each DUT can be loaded into the control device, meaning that the test configuration information for all four DUTs is recorded in the control device.
[0035] S102. Respond to the test instructions for each controller under test, control the power module corresponding to the controller under test to supply power to the controller under test, send test instructions to the controller under test and obtain the operating data of the controller under test through the communication channel on the communication board corresponding to the controller under test according to the test cases and test system parameters, and generate the test results of the controller under test based on the operating data of the controller under test.
[0036] Optionally, when a user triggers a test operation for each controller under test on the control device, a test instruction can be generated based on the test operation. The control device can respond to the test instruction for each controller under test by controlling the power module corresponding to the controller under test to supply power to the controller under test.
[0037] For example, if the user's test instruction is to test four controllers under test simultaneously, the control device can control power module 1 to supply power to controller 1 under test, control power module 2 to supply power to controller 2 under test, control power module 3 to supply power to controller 3 under test, and control power module 3 to supply power to controller 4 under test.
[0038] Optionally, after controlling the power modules corresponding to each controller under test (DUT) to supply power to each DUT, the control device can send test commands to each DUT via the communication channels on the corresponding communication boards of each DUT, based on the test cases and test system parameters of each DUT. Upon receiving the test commands, each DUT can execute its test cases. While each DUT is being tested, the control device can also acquire the operating data of each DUT and generate test results based on that data.
[0039] For example, the control device can send test commands to the controller under test 1 via the communication channel on the communication board 1 according to the test cases and test system parameters of the controller under test 1; the control device can send test commands to the controller under test 2 via the communication channel on the communication board 2 according to the test cases and test system parameters of the controller under test 2; the control device can send test commands to the controller under test 3 via the communication channel on the communication board 3 according to the test cases and test system parameters of the controller under test 3; the control device can send test commands to the controller under test 4 via the communication channel on the communication board 4 according to the test cases and test system parameters of the controller under test 4.
[0040] In this embodiment, the control device can achieve parallel control of multiple controllers under test (DUTs) through multiple communication boards and multiple power modules. Furthermore, by loading the configuration information of each DUT into the control device, it can simultaneously control the power modules corresponding to each DUT to supply power to each DUT. It can also simultaneously test each DUT via the communication channels on the corresponding communication boards according to the test cases and test system parameters of each DUT. This application requires only one control device to complete the testing of multiple DUTs, significantly improving testing efficiency and reducing hardware costs. It avoids the problems in the prior art where adding a new DUT requires a separate board and a corresponding computer, increasing hardware costs, or the problems in the prior art where sequential testing with each new DUT requires connecting to the control device, resulting in low testing efficiency. Moreover, only one test software license is needed during testing, reducing software costs and avoiding the problems in the prior art where each DUT requires a separate computer and each computer requires an independent test software license, increasing software costs.
[0041] Figure 4 This is a flowchart illustrating the second vehicle controller testing method provided in the embodiments of this application, as shown below. Figure 4 As shown, loading the test configuration information for each controller under test in S101 above may include: S201. Obtain the test configuration files of each controller under test from the target storage location of the control device.
[0042] Optionally, after inserting each controller under test (DUT) into its corresponding communication board and connecting each DUT to its corresponding power module, the hardware configuration information of each DUT can be pre-configured into its test configuration file based on the inserted communication board and connected power module. Simultaneously, test cases and test system parameters can also be configured into each DUT's test configuration file. Therefore, each DUT's test configuration file can include the identifier of the inserted communication board, the communication channel connected to the communication board, the identifier of the power module, and test cases and test system parameters. This test configuration file can be, for example, a YAML file.
[0043] For example, the controller under test 1 corresponds to test configuration file 1, the controller under test 2 corresponds to test configuration file 2, the controller under test 3 corresponds to test configuration file 3, and the controller under test 4 corresponds to test configuration file 4.
[0044] S202. Load the test configuration files of each controller under test into the corresponding test module in the test software.
[0045] The testing software is deployed on the control device, and this testing software can be, for example, CANoe testing software.
[0046] For example, the test configuration file 1 of the controller under test 1 can be loaded into the test module 1 of the test software, the test configuration file 2 of the controller under test 2 can be loaded into the test module 2 of the test software, the test configuration file 3 of the controller under test 3 can be loaded into the test module 3 of the test software, and the test configuration file 4 of the controller under test 4 can be loaded into the test module 4 of the test software.
[0047] Figure 5 This is a flowchart illustrating the third vehicle controller testing method provided in the embodiments of this application, as shown below. Figure 5 As shown, S202, loading the test configuration files of each controller under test into the corresponding test module in the test software, may include: S301. Obtain the identifier of the communication board in each test configuration file, and load each test configuration file into the corresponding test module according to the mapping relationship between the communication board and the test module.
[0048] Optionally, since each controller under test (DUT) inserts a corresponding communication board, the test configuration file for each DUT may include the identifier of the communication board inserted. The test software may include multiple test modules, each corresponding to one communication board. Furthermore, since each communication board is inserted into one DUT during testing, one DUT can correspond to one test module.
[0049] For example, the identifier of the communication board in the test configuration file 1 is 1, that is, the test configuration file 1 includes the communication board 1. There is a mapping relationship between the communication board 1 and the test module 1. Since the communication board 1 is inserted into the controller under test 1, the test module 1 refers to the test module of the controller under test 1 connected to the communication board 1. Therefore, the test configuration file 1 of the controller under test 1 can be loaded into the test module 1.
[0050] For example, the test configuration file 2 includes a communication board 2, and there is a mapping relationship between the communication board 2 and the test module 2. Since the communication board 2 is inserted into the controller under test 2, the test module 2 refers to the test module of the controller under test 2 connected to the communication board 2. Therefore, the test configuration file 2 of the controller under test 2 can be loaded into the test module 2.
[0051] For example, the test configuration file 3 includes a communication board 3, and there is a mapping relationship between the communication board 3 and the test module 3. Since the communication board 3 is inserted into the controller under test 3, the test module 3 refers to the test module of the controller under test 3 connected to the communication board 3. Therefore, the test configuration file 3 of the controller under test 3 can be loaded into the test module 3.
[0052] The test configuration file 4 includes the communication board 4. There is a mapping relationship between the communication board 4 and the test module 4. Since the communication board 4 is inserted into the controller under test 4, the test module 4 refers to the test module of the controller under test 4 connected to the communication board 4. Therefore, the test configuration file 4 of the controller under test 4 can be loaded into the test module 4.
[0053] S302. Configure the test system parameters of the test modules according to the test system parameters in each test configuration file.
[0054] Optionally, common system variables in the test system parameters may include flashing file path, DBC path, vehicle model, controller, programmable power supply port number, relay port number, test type, test case path, etc. Unique system variables in the test system parameters may include test module name, test case file name, test channel, DBC channel name, system variable input information, etc.
[0055] For example, the common system variable 1 and the unique system variable 1 in the test configuration file 1 of the controller under test 1 can be configured as the test system parameters of the test module 1; the common system variable 2 and the unique system variable 2 in the test configuration file 2 of the controller under test 2 can be configured as the test system parameters of the test module 2; the common system variable 3 and the unique system variable 3 in the test configuration file 3 of the controller under test 3 can be configured as the test system parameters of the test module 3; and the common system variable 4 and the unique system variable 4 in the test configuration file 4 of the controller under test 4 can be configured as the test system parameters of the test module 4.
[0056] In this embodiment, the test configuration files of each controller under test are loaded into the corresponding test modules in the test software, so that each controller under test can be tested according to the test system parameters of each test module in the subsequent process, thereby improving the test efficiency.
[0057] Optionally, before step S202 above, which involves loading the test configuration files of each controller under test into the corresponding test module in the test software, the following may be included: Optionally, multiple test modules can be created in the testing software, with the number of test modules matching the number of communication boards. For example, if there are four communication boards, four test modules can be pre-created in the testing software. Each test module can also have its own sub-modules, which are the test sub-modules executed by the controller under test. When loading the test configuration file of the controller under test into each test module, the test cases from the test configuration file can be loaded into each test sub-module, facilitating subsequent testing of the controller under test based on the test cases in each test sub-module. Figure 6 This is a schematic diagram of a test module provided in an embodiment of this application.
[0058] Specifically, you can first create a folder for each communication board, such as Figure 6 In the TSE section, a test module for the communication board is then created in each folder, such as... Figure 6 The Testmodule in the example. Figure 6 In the filenames, ECU1.tse is the folder for communication board 1, and ECU1_Test is the test module 1 for communication board 1 under ECU1.tse; ECU2.tse is the folder for communication board 2, and ECU2_Test is the test module 2 for communication board 2 under ECU2.tse; ECU3.tse is the folder for communication board 3, and ECU3_Test is the test module 3 for communication board 3 under ECU3.tse; ECU4.tse is the folder for communication board 4, and ECU4_Test is the test module 4 for communication board 4 under ECU4.tse. Furthermore, as... Figure 6As shown, ECU1_Test includes multiple test submodules, and each submodule can load its corresponding test cases. It is worth noting that... Figure 6 The number of folders and test modules in this example is only one example and is not intended to limit the scope of this embodiment.
[0059] Optionally, multiple real-time message windows and multiple data storage channels can be created in the testing software. The number of real-time message windows and the number of data storage channels are the same as the number of boards. Specifically, multiple real-time message windows and multiple data storage channels can be created under the Measurement setup module in the Analysis section of the testing software. Figure 7 This is a schematic diagram illustrating the creation of a message window, as provided in an embodiment of this application. Figure 7 As shown, four real-time message windows can be created under the Measurementsetup module. For example, real-time message window 1 monitors the running data of the controller under test 1 with the communication board 1 inserted during the test, and saves the running data of the controller under test 1 through data saving channel 1; real-time message window 2 monitors the running data of the controller under test 2 with the communication board 2 inserted during the test, and saves the running data of the controller under test 2 through data saving channel 2; real-time message window 3 monitors the running data of the controller under test 3 with the communication board 3 inserted during the test, and saves the running data of the controller under test 3 through data saving channel 3; real-time message window 4 monitors the running data of the controller under test 4 with the communication board 4 inserted during the test, and saves the running data of the controller under test 4 through data saving channel 4.
[0060] Figure 8 This is a flowchart illustrating the fourth vehicle controller testing method provided in the embodiments of this application, as shown below. Figure 8 As shown, in S102 above, based on the test cases and test system parameters, and by sending test commands to the controller under test and obtaining the controller under test's operating data via the communication channel on the corresponding communication board, the process may include: S401. The test module parses the test cases to obtain the test instruction sequence.
[0061] Specifically, for each controller under test (DUT), a sequence of test instructions can be generated for each test case in the test module of each DUT. Specifically, the parsing of test cases for each DUT can be implemented based on the main function of each DUT.
[0062] S402. The test module determines the common system variables and unique system variables based on the test system parameters.
[0063] Specifically, the test module of each controller under test can determine its common system variables and unique system variables based on the test system parameters; that is, it can determine the common system variables and unique system variables of the controller under test corresponding to that test module. The unique system variables can be determined first, followed by the common system variables.
[0064] Optionally, the unique system variables of the controller under test can be determined first based on the private functions of the controller under test, and then the common system variables of the controller under test can be determined based on the public functions of the controller under test.
[0065] S403. The test module sends test commands to the controller under test and obtains the operating data of the controller under test through the communication channel according to the test command sequence, common system variables and unique system variables.
[0066] For example, test module 1 sends test command 1 to controller under test 1 via the communication channel of communication board 1 according to test command sequence 1, common system variable 1, and unique system variable 1 of controller under test, and obtains the operating data of controller under test 1. Test module 2 sends test command 2 to controller under test 2 via the communication channel of communication board 2 according to test command sequence 2, common system variable 2, and unique system variable 2 of controller under test, and obtains the operating data of controller under test 2. Test module 3 sends test command 3 to controller under test 3 via the communication channel of communication board 3 according to test command sequence 3, common system variable 3, and unique system variable 3 of controller under test, and obtains the operating data of controller under test 3. Test module 4 sends test command 4 to controller under test 4 via the communication channel of communication board 4 according to test command sequence 4, common system variable 4, and unique system variable 4 of controller under test, and obtains the operating data of controller under test 4.
[0067] In this embodiment, the testing of the controller under test is designed in a multi-level manner: first, the test cases are parsed; then, the unique system variables of the controller under test are determined; next, the common system variables of the controller under test are determined; and finally, test instructions are generated to implement the testing of the controller under test. This makes the testing process more accurate.
[0068] Optionally, S403 above, where the test module sends test commands to the controller under test (DUT) via a communication channel and obtains the DUT's operating data based on the test command sequence, common system variables, and unique system variables, may include: Specifically, based on common system variables and unique system variables, communication is established between the test module and the communication channel, as well as between the communication channel and the controller under test. The test instructions in the test instruction sequence are sent to the controller under test in sequence through the communication channel, and the running data of the controller under test after executing the test instructions is obtained.
[0069] For example, the programmable power supply and relays can be turned on based on the programmable power supply port number and relay port number in the common system variables, so that the power module supplies power to the controller under test. Alternatively, communication between the test module and the communication channel and between the communication channel and the controller under test can be established based on the channel identifier in the unique system variables. Then, each test command in the test command sequence is sent to the controller under test through the established communication channel. The running data of the controller under test after executing the test commands is saved according to the data saving method in the unique system variables and the file writing path in the common system variables.
[0070] Optionally, obtaining the operating data of the controller under test in S102 above may include: Specifically, based on the mapping relationship between the controller under test, the communication board, and each real-time message window, the target real-time message window of the controller under test is determined, and the operating data of the controller under test is obtained through the target real-time message window.
[0071] Since the controller under test is inserted into the communication module, and there is a one-to-one mapping relationship between the communication module and each real-time message window, the operating data of the controller under test inserted into the communication module can be obtained through the real-time message window that has a mapping relationship with the communication module.
[0072] For example, if there is a mapping relationship between the real-time message window 1 and the communication module 1 as mentioned above, and the controller under test 1 is the controller under test inserted into the communication module 1, then the real-time message window 1 is used as the target real-time message window of the controller under test 1, and the operating data of the controller under test 1 can be obtained through the real-time message window 1.
[0073] Optionally, after obtaining the operating data of the controller under test through the target real-time message window, the process may include: Based on the mapping relationship between the controller under test, the communication board, and each data storage channel, the target data storage channel of the controller under test is determined, and the operating data of the controller under test is saved through the target data storage channel.
[0074] Since the controller under test is inserted into the communication module, and there is a one-to-one mapping relationship between the communication module and each data storage channel, the operating data of the controller under test inserted into the communication module can be saved through the data storage channel that has a mapping relationship with the communication module.
[0075] For example, if there is a mapping relationship between the data storage channel 1 and the communication module 1 as mentioned above, and the controller under test 1 is the controller under test inserted into the communication module 1, then the data storage channel 1 is used as the target data storage channel of the controller under test 1, and the running data of the controller under test 1 can be saved through the real-time message window 1.
[0076] Figure 9 This is a structural block diagram of a control device 500 provided in an embodiment of this application. Figure 9 As shown, the control device may include: processor 501 and memory 502.
[0077] Optionally, a bus 503 may also be included, wherein the memory 502 is used to store machine-readable instructions executable by the processor 501. When the control device 500 is running, the processor 501 and the memory 502 communicate via the bus 503. When the machine-readable instructions are executed by the processor 501, the method steps in the above method embodiments are performed.
[0078] This application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the method steps described in the above-described vehicle controller testing method embodiment.
[0079] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0080] 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. If the functions are implemented as software functional units 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 this application, in essence, or the part that contributes to the prior art, 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 several 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 described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0081] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for testing an on-board controller, characterized in that, A control device is used in an on-board controller testing system, the on-board controller testing system comprising: a control device, multiple communication boards, and multiple power modules, wherein the control device is communicatively connected to each of the communication boards and each of the power modules; the method includes: The response involves inserting at least one controller under test (DUT) into the corresponding communication board and connecting the at least one DUT to the corresponding power module, and loading the test configuration information of each DUT. The test configuration information includes: the communication board corresponding to the DUT, the power module corresponding to the DUT, and the test information of the DUT. The test information includes at least: communication channel, test cases, and test system parameters. In response to the test instructions for each of the controllers under test, the system controls the power module corresponding to the controller under test to supply power to the controller under test, sends test instructions to the controller under test and obtains the operating data of the controller under test through the communication channel on the communication board corresponding to the controller under test according to the test cases and the test system parameters, and generates the test results of the controller under test based on the operating data of the controller under test.
2. The vehicle controller testing method according to claim 1, characterized in that, The loading of the test configuration information for each of the controllers under test includes: The test configuration files of each controller under test are obtained from the target storage location of the control device; The test configuration files of each controller under test are loaded into the corresponding test module in the test software, which is deployed on the control device.
3. The vehicle controller testing method according to claim 2, characterized in that, The step of loading the test configuration files of each of the controllers under test into each test module in the test software includes: Obtain the identifier of the communication board in each of the aforementioned test configuration files; Based on the mapping relationship between the communication board and the test module, each of the test configuration files is loaded into the corresponding test module; Configure the test system parameters of the test module according to the test system parameters in each of the test configuration files.
4. The vehicle controller testing method according to claim 2, characterized in that, Before loading the test configuration files of each of the controllers under test into the test modules of the test software, the method further includes: Multiple test modules are created in the testing software, and the number of test modules is the same as the number of communication boards. Multiple real-time message windows and multiple data storage channels are created in the test software. The number of real-time message windows and the number of data storage channels are the same as the number of boards.
5. The vehicle controller testing method according to claim 2, characterized in that, The step of sending test commands to the controller under test and obtaining the operating data of the controller under test based on the test cases and the test system parameters, via the communication channel on the communication board corresponding to the controller under test, includes: The test module parses the test cases to obtain a sequence of test instructions; The test module determines the common system variables and unique system variables based on the test system parameters; The test module sends test commands to the controller under test via the communication channel and obtains the operating data of the controller under test according to the test command sequence, the common system variables, and the unique system variables.
6. The vehicle controller testing method according to claim 5, characterized in that, The step of sending test commands to the controller under test (DUT) via the communication channel and obtaining the DUT's operating data according to the test command sequence, the common system variables, and the unique system variables includes: Based on the common system variables and the unique system variables, establish communication between the test module and the communication channel, and between the communication channel and the controller under test; The test instructions in the test instruction sequence are sent sequentially to the controller under test via the communication channel, and the running data of the controller under test after executing the test instructions is obtained.
7. The vehicle controller testing method according to claim 4, characterized in that, The acquisition of the operating data of the controller under test includes: The target real-time message window of the controller under test is determined based on the mapping relationship between the controller under test, the communication board and each real-time message window; The operating data of the controller under test is obtained through the target real-time message window.
8. The vehicle controller testing method according to claim 7, characterized in that, After obtaining the operating data of the controller under test through the target real-time message window, the process includes: The target data storage channel of the controller under test is determined based on the mapping relationship between the controller under test, the communication board and each of the data storage channels; The operating data of the controller under test is saved through the target data storage channel.
9. A vehicle-mounted controller testing system, characterized in that, The vehicle controller testing system includes: the control device, multiple communication boards, and multiple power modules, wherein the control device is communicatively connected to each of the communication boards and each of the power modules. The control device is used to perform the steps of the vehicle controller testing method according to any one of claims 1-8 to achieve parallel testing of multiple vehicle controllers.
10. A control device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor executes the computer program to implement the steps of the vehicle controller testing method according to any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the vehicle controller testing method as described in any one of claims 1-8.