Function test system, method and device for vehicle domain controller
By constructing a simulation working environment and fault injection technology for vehicle domain controllers, the problem of low efficiency and high cost of functional testing of domain controllers in vehicles is solved, comprehensive and accurate testing of network management functions is achieved, and labor costs and time are reduced. consumption.
Patent Information
- Application Number
- CN202410814575.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-10-01
AI Technical Summary
The existing technology's functional testing methods for domain controllers in vehicles are inefficient and costly, and cannot comprehensively and effectively verify the performance, stability, and security of local network management functions.
By constructing the initial simulation working environment of the target vehicle, fault communication data is generated, the simulation board and bus communication data simulation equipment are used to inject faults into the environment, the industrial computer and test management platform are used for functional testing, and a test report is generated to determine whether the function has passed. .
It achieves accurate and comprehensive simulation of various network management functions of the vehicle domain controller, reduces labor costs and time consumption, and improves test efficiency.
Smart Images

Figure CN118732658A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle function testing, and in particular to a function testing system, method and device for a vehicle domain controller. Background Art
[0002] With the development of vehicle electronics and intelligence, the network management function in passenger cars is becoming more and more popular. In the development and implementation of the vehicle network system, comprehensive, accurate and reliable testing of the network management function is an important guarantee to ensure the normal operation of the vehicle network system.
[0003] Traditional network management adopts a simple and clear "sleep together" approach, but in some scenarios, usually only a limited number of electronic control units (ECUs) in the network segment of the Internet of Vehicles are required to participate in the work, and not all ECUs are required to participate in the work, otherwise it is easy to cause excess power consumption, and as the number of ECUs increases, the "waste" problem becomes more prominent. The local network further subdivides the network, so that different ECUs are in working state in different scenarios, while unrelated ECUs are in low power consumption state, so as to further reduce power consumption. However, traditional testing methods cannot comprehensively and effectively verify the performance, stability and security of local network management functions.
[0004] From the above analysis, it can be seen that there is no effective solution to the problem of low efficiency and high cost of the functional testing method of the domain controller in the vehicle in the above-mentioned prior art. Summary of the invention
[0005] The embodiments of the present invention provide a system, method and device for testing the function of a domain controller in a vehicle, so as to at least solve the technical problems of low efficiency and high cost in the prior art method for testing the function of a domain controller in a vehicle.
[0006] According to one aspect of an embodiment of the present invention, a functional testing system for a vehicle domain controller is provided, comprising:
[0007] A simulation board is used to construct an initial simulation working environment of the controller to be tested in the target vehicle, wherein the controller to be tested is any type of domain controller under the network communication system of the target vehicle; a bus communication data simulation device is used to generate fault communication data according to the function to be tested of the controller to be tested, wherein the function to be tested is any network management function of the controller to be tested; a data communication device is used to transmit the fault communication data to the simulation board, so as to use the fault communication data to inject faults into the initial simulation working environment to obtain a target simulation working environment; an industrial computer is used to test the function to be tested in the target simulation working environment to obtain test data; a test management platform is used to generate a test report according to the test data, wherein the test report is used to determine whether the function to be tested has passed the test.
[0008] Optionally, the functional test system of the vehicle domain controller further includes: a programmable power supply for supplying power to the simulation board, bus communication data simulation equipment, data communication equipment, industrial computer, test management platform and controller to be tested.
[0009] According to another aspect of an embodiment of the present invention, a method for testing a function of a vehicle domain controller is provided, which is applied to a system for testing a function of a vehicle domain controller according to any one of the above items, and includes:
[0010] Construct an initial simulation working environment of the controller to be tested in the target vehicle, wherein the controller to be tested is any type of domain controller under the network communication system of the target vehicle; generate fault communication data according to the function to be tested of the controller to be tested, wherein the function to be tested is any network management function of the controller to be tested; transmit the fault communication data to the simulation board to inject faults into the initial simulation working environment using the fault communication data to obtain a target simulation working environment; test the function to be tested under the target simulation working environment to obtain test data; generate a test report according to the test data, wherein the test report is used to determine whether the function to be tested has passed the test.
[0011] Optionally, the functional testing method of the vehicle domain controller further includes: constructing a target test case of the function to be tested according to a test requirement of the function to be tested.
[0012] Optionally, the function to be tested is a door status acquisition function, the target simulation working environment is a target vehicle in which the simulated door status is an open state, and the function to be tested is tested under the target simulation working environment to obtain test data, including: executing the target test case to send a first service request to the controller to be tested, wherein the first service request is used to request the controller to be tested to obtain the simulated door status; and collecting response data of the controller to be tested to the first service request to obtain test data.
[0013] Optionally, generating a test report based on the test data includes: in response to determining that the simulated door state is an open state based on the response data, writing a first test result in the test report, wherein the first test result is used to determine that the door state acquisition function test has passed; in response to determining that the simulated door state is a closed state based on the response data or that the controller to be tested does not respond to the first service request, writing a second test result in the test report, wherein the second test result is used to determine that the door state acquisition function test has failed.
[0014] Optionally, the function to be tested is a cooling fan control function, the target simulation working environment is a target vehicle whose simulated engine operating temperature is higher than a preset temperature threshold, and the function to be tested is tested under the target simulation working environment to obtain test data, including: executing the target test case to send a second service request to the controller to be tested, wherein the second service request is used to request the controller to be tested to turn on the simulated cooling fan; collecting the working data of the simulated cooling fan to obtain test data.
[0015] Optionally, generating a test report based on the test data includes: in response to determining based on the working data that the simulated cooling fan cools the simulated engine, writing a third test result in the test report, wherein the third test result is used to determine that the cooling fan control function test has passed; in response to determining based on the working data that the simulated cooling fan is operating abnormally or the simulated cooling fan is not turned on, writing a fourth test result in the test report, wherein the fourth test result is used to determine that the cooling fan control function test has failed.
[0016] Optionally, the function to be tested is a local network management function, the target simulation working environment is that the power supply voltage of the controller to be tested is the normal working voltage, and the initial states of multiple electronic control units in the controller to be tested are all in sleep state, and the function to be tested is tested under the target simulation working environment to obtain test data including: for any local network cluster, executing the target test case to wake up multiple electronic control units in turn; collecting the communication messages of any electronic control unit to obtain test data.
[0017] Optionally, generating a test report based on the test data includes: in response to an abnormal communication message of any electronic control unit or a failure of any electronic control unit to be awakened, writing a fifth test result in the test report, wherein the fifth test result is used to determine that a local functional test of any local network cluster of the controller under test has failed.
[0018] Optionally, the functional testing method of the vehicle domain controller further includes: in response to communication messages of multiple electronic control units being normal, testing the local network management function of the controller to be tested for the next local network cluster according to a target test case; in response to determining based on the test data that the local network management functions of the controller to be tested for multiple local network clusters in the target vehicle have all passed the test, generating a test report.
[0019] According to another aspect of an embodiment of the present invention, a functional testing device for a vehicle domain controller is provided, which is applied to any one of the functional testing methods for a vehicle domain controller described above, and includes:
[0020] The first construction module is used to construct an initial simulation working environment of the controller to be tested in the target vehicle, wherein the controller to be tested is any type of domain controller under the network communication system of the target vehicle; the first generation module is used to generate fault communication data according to the function to be tested of the controller to be tested, wherein the function to be tested is any network management function of the controller to be tested; the fault processing module is used to transmit the fault communication data to the simulation board so as to inject faults into the initial simulation working environment using the fault communication data to obtain a target simulation working environment; the test module is used to test the function to be tested in the target simulation working environment to obtain test data; the second generation module is used to generate a test report according to the test data, wherein the test report is used to determine whether the function to be tested has passed the test.
[0021] Optionally, the functional testing device of the vehicle domain controller further includes: a second building module, configured to build a target test case of the function to be tested according to a test requirement of the function to be tested.
[0022] Optionally, the function to be tested is a door status acquisition function, and the target simulation working environment is that the simulated door status of the target vehicle is an open state. The above-mentioned test module is also used to: execute the target test case to send a first service request to the controller to be tested, wherein the first service request is used to request the controller to be tested to obtain the simulated door status; collect the response data of the controller to be tested to the first service request to obtain test data.
[0023] Optionally, the above-mentioned second generation module is also used to: in response to determining that the simulated door state is an open state based on the response data, write a first test result in the test report, wherein the first test result is used to determine that the door state acquisition function test has passed; in response to determining that the simulated door state is a closed state based on the response data or the controller to be tested does not respond to the first service request, write a second test result in the test report, wherein the second test result is used to determine that the door state acquisition function test has failed.
[0024] Optionally, the function to be tested is a cooling fan control function, and the target simulated working environment is that the operating temperature of the simulated engine of the target vehicle is higher than a preset temperature threshold. The above-mentioned test module is also used to: execute the target test case to send a second service request to the controller to be tested, wherein the second service request is used to request the controller to be tested to turn on the simulated cooling fan; collect the working data of the simulated cooling fan to obtain test data.
[0025] Optionally, the above-mentioned second generation module is also used to: in response to determining based on the working data that the simulated cooling fan cools the simulated engine, write a third test result in the test report, wherein the third test result is used to determine that the cooling fan control function test has passed; in response to determining based on the working data that the simulated cooling fan is working abnormally or the simulated cooling fan is not turned on, write a fourth test result in the test report, wherein the fourth test result is used to determine that the cooling fan control function test has failed.
[0026] Optionally, the function to be tested is a local network management function, the target simulation working environment is that the power supply voltage of the controller to be tested is the normal working voltage, and the initial states of multiple electronic control units in the controller to be tested are all in sleep state. The above-mentioned test module is also used for: for any local network cluster, executing the target test case to wake up multiple electronic control units in turn; collecting the communication messages of any electronic control unit to obtain test data.
[0027] Optionally, the above-mentioned second generation module is also used to: in response to an abnormal communication message of any electronic control unit or any electronic control unit not being awakened, write a fifth test result in the test report, wherein the fifth test result is used to determine that the local functional test of the controller under test for any local network cluster has failed.
[0028] Optionally, the functional testing device of the vehicle domain controller further includes: a cyclic testing module, for testing the local network management function of the controller to be tested for the next local network cluster according to a target test case in response to the communication messages of multiple electronic control units being normal; and generating a test report in response to determining based on the test data that the local network management functions of the controller to be tested for multiple local network clusters in the target vehicle have all passed the test.
[0029] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the function testing method of a vehicle domain controller described in any one of the above is implemented.
[0030] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the aforementioned vehicle domain controller functional testing methods.
[0031] According to another aspect of an embodiment of the present invention, a vehicle is provided, comprising an on-board memory and an on-board processor, wherein a computer program is stored in the on-board memory, and the on-board processor is configured to run the computer program to execute any one of the aforementioned functional testing methods for a vehicle domain controller.
[0032] In an embodiment of the present invention, an initial simulation working environment of a controller to be tested in a target vehicle is first constructed, wherein the controller to be tested is any type of domain controller under the network communication system of the target vehicle; fault communication data is generated according to the function to be tested of the controller to be tested, wherein the function to be tested is any type of network management function of the controller to be tested; the fault communication data is transmitted to the simulation board to inject faults into the initial simulation working environment using the fault communication data to obtain a target simulation working environment; the function to be tested is tested under the target simulation working environment to obtain test data; a test report is generated according to the test data, wherein the test report is used to determine whether the function to be tested has passed the test. By using the constructed vehicle domain controller function test system to accurately and comprehensively simulate the various network management functions of any domain controller to be tested in the vehicle, and at the same time, personalized fault communication data is generated according to the function to be tested of the controller to be tested, so as to achieve the purpose of comprehensively and accurately testing the function of the vehicle domain controller by executing the target test case corresponding to the function to be tested, thereby achieving the technical effect of automating and efficiently testing the function to be tested, reducing labor costs and time consumption, and thus solving the technical problems of low efficiency and high cost of the function test method of the domain controller in the vehicle in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0034] Figure 1 is a hardware structure block diagram of a vehicle terminal for an optional function testing method of a vehicle domain controller according to an embodiment of the present invention;
[0035] Figure 2 is a schematic diagram of an optional functional testing system for a vehicle domain controller according to an embodiment of the present invention;
[0036] Figure 3is a schematic diagram of another optional functional testing system for a vehicle domain controller according to an embodiment of the present invention;
[0037] Figure 4 is a flow chart of a method for functional testing of a vehicle domain controller according to an embodiment of the present invention;
[0038] Figure 5 is a flow chart of a door status acquisition function test process according to an embodiment of the present invention;
[0039] Figure 6 is a flow chart of a cooling fan control function test process according to an embodiment of the present invention;
[0040] Figure 7 is a flow chart of a local network management function testing process according to an embodiment of the present invention;
[0041] Figure 8 The present invention is a structural block diagram of a functional testing device for a vehicle domain controller according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0044] According to an embodiment of the present invention, a method embodiment of a functional testing method for a vehicle domain controller is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0045] Figure 1 is a hardware structure block diagram of a vehicle terminal according to an optional functional testing method for a vehicle domain controller according to an embodiment of the present invention, such as Figure 1 As shown, the vehicle terminal (or mobile device) may include one or more processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor (Microcontroller Unit, MCU) or a programmable logic device (Field Programmable Gate Array, FPGA)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display device 110, an input and output device 108 (i.e., an IO device), a Universal Serial Bus (USB) port (which may be included as one of the ports of a computer bus, not shown in the figure), a network interface (not shown in the figure), a power supply (not shown in the figure) and / or a camera (not shown in the figure). It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the vehicle terminal 10. For example, the vehicle terminal 10 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0046] It should be noted that the one or more processors 102 and / or other data processing circuits may be embodied in whole or in part as software, hardware, firmware or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the vehicle terminal 10 (or mobile device).
[0047] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the functional test method of the vehicle domain controller in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the functional test method of the vehicle domain controller described above is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the vehicle terminal 10 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.
[0048] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the vehicle terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0049] Under the above operating environment, the embodiment of the present invention provides the following Figure 2 The functional test system of the vehicle domain controller shown, Figure 2 is a schematic diagram of an optional functional test system for a vehicle domain controller according to an embodiment of the present invention, such as Figure 3 As shown, the system includes:
[0050] The simulation board (including: load and IO simulation board 201, load and IO board model software 202) is used to construct the initial simulation working environment of the controller to be tested 210 in the target vehicle, wherein the controller to be tested is any type of domain controller under the network communication system of the target vehicle. It should be noted here that the load and IO (input / output, Input / Output) simulation board 201 can be used as a peripheral interface of the simulation domain controller (i.e., the controller to be tested 210), and can be used to realize functions such as digital input and output, analog input and output, load simulation, and pulse width modulation (Pulse Width Modulation, PWM) signal simulation. By using the load and IO simulation board 201 to simulate the actual peripheral working environment of the controller to be tested 210, at the same time, the load and IO simulation board 201 supports program control and assists in abnormal working conditions of the manufacturing peripherals, and can realize abnormal working state testing of the controller to be tested 210; the load and IO board model software 202 can realize the modeling of the hardware IO board to facilitate the call of the test case editing and execution software 208. The load and IO board model software 202 models different types of peripheral simulation boards into variable forms through standardized modeling methods. By reading the variable status, assigning values, etc. into statements, the control of the board can be realized. At the same time, the driver of the board can be made transparent to ensure the reuse of the upper-level test program.
[0051] The bus communication data simulation device 203 is used to generate fault communication data according to the function to be tested of the controller to be tested, wherein the function to be tested is any network management function of the controller to be tested. It should be noted here that the fault communication function data can be used to interfere with normal communication data during the function test process, and the fault communication data can be but is not limited to: Ethernet empty packet data, controller area network (Controller Area Network, CAN) bus data with invalid identification (Identification, ID), and at the same time, the bus communication data simulation device 203 also supports program control, custom data format according to test requirements, and is used to simulate data frequency.
[0052] The data communication device (including: bus data communication device 204, data routing device 205) is used to transmit fault communication data to the simulation board, so as to use the fault communication data to perform fault injection on the initial simulation working environment to obtain the target simulation working environment. It should be noted here that the bus data communication device 204 can be used to realize the interactive communication between the industrial computer 206 and the controller to be tested 210. The communication method between the industrial computer 206 and the controller to be tested 210 can be but not limited to: communication through the vehicle Ethernet, through the CAN bus or the local area Internet (Local Interconnect Network, LIN). The bus data communication device 204 can receive test data sent from the controller to be tested 210 and output simulation data; the data routing device 205 can integrate the normal communication data of the bus data communication device 204 with the fault communication data (or interference data) so that the integrated communication data can communicate normally with the controller to be tested 210.
[0053] The industrial computer 206 is used to test the function to be tested in the target simulation working environment and obtain test data. It should be noted here that the industrial computer 206 can be used to run the test management platform 207 and execute software. It is a computer control device of the functional test system of the entire vehicle domain controller, and can realize functions such as running the test management platform 207, testing execution software, managing test data, and hardware connection with other devices.
[0054] The test management platform 207 (including the test case editing and execution software 208) is used to generate a test report based on the test data, wherein the test report is used to determine whether the function to be tested has passed the test. It should be noted here that the test management platform 207 can coordinate the process and data management of the functional test system of the entire vehicle domain controller, including but not limited to: test requirements management, test case management, mapping management between test cases and test scripts, test execution software call, test execution process status tracking, test result management, test report generation, test data management, which is equivalent to the core brain of the functional test system of the entire vehicle domain controller; the test case editing and execution software 208 is a set of IDE integrated script editing and test execution environment, and the test script editing supports test parameter management and test code management, and also supports parameter transfer between the test management platform 207, so as to realize the call and control of all hardware in the functional test system of the vehicle domain controller, so as to realize the automated test function.
[0055] Still Figure 2As shown, the functional test system of the vehicle domain controller further includes: a program-controlled power supply 209, which is used to power the simulation board, bus communication data simulation equipment, data communication equipment, industrial computer, test management platform and controller under test. It should be noted here that the program-controlled power supply 209 can be used for testing software program control, including but not limited to: power switch operation, power supply voltage adjustment operation, and power supply for the functional test system of the entire vehicle domain controller.
[0056] The following combination Figure 3 The above system is further described as follows: Figure 3 As shown, the system where the controller to be tested 210 is located may include: multiple Ethernet controllers (such as Figure 3 Ethernet controller 1, Ethernet controller 2), multiple CAN controllers (such as Figure 3 CAN controller 1, CAN controller 2), multiple LIN controllers (such as Figure 3 LIN controller 1, LIN controller 2) and multiple fault injection devices (such as Figure 3 Fault injection devices 1 to 3 are shown). When testing the network management function of the controller 210 to be tested, the functional test bench system of the vehicle domain controller is first arranged, and the program-controlled power supply 209 is used to provide normal working voltage for each test device. Then, the test management platform 207 configures the test parameters required for the function to be tested, selects the test case corresponding to the function to be tested, and then calls the execution software to start the functional test process. During the functional test process, the communication board and other test equipment are controlled according to the test case to operate, and the load and IO simulation board 201 is used to provide the simulation working environment required for the controller 210 to execute the function to be tested. The normal communication data is collected through the bus data monitoring device 211, and then the normal communication data is merged with the fault communication data generated by the bus communication interference device 212, and the fused communication data is provided to the system where the controller 210 to be tested is located through the input and output simulation device 213.
[0057] Based on the functional test system of the vehicle domain controller, the embodiment of the present invention provides the following Figure 4 The functional test method of the vehicle domain controller shown, Figure 4 is a flow chart of a method for testing the function of a vehicle domain controller according to an embodiment of the present invention. Figure 4 As shown, the method includes the following implementation steps:
[0058] Step S401, constructing an initial simulation working environment of a controller to be tested in a target vehicle, wherein the controller to be tested is any type of domain controller under a network communication system of the target vehicle;
[0059] Step S402, generating fault communication data according to a function to be tested of the controller to be tested, wherein the function to be tested is any network management function of the controller to be tested;
[0060] Step S403, transmitting the fault communication data to the simulation board, so as to use the fault communication data to perform fault injection on the initial simulation working environment to obtain the target simulation working environment;
[0061] Step S404, testing the function to be tested in the target simulation working environment to obtain test data;
[0062] Step S405: Generate a test report based on the test data, wherein the test report is used to determine whether the function to be tested has passed the test.
[0063] In an embodiment of the present invention, an initial simulation working environment of a controller to be tested in a target vehicle is first constructed, wherein the controller to be tested is any type of domain controller under the network communication system of the target vehicle; fault communication data is generated according to the function to be tested of the controller to be tested, wherein the function to be tested is any type of network management function of the controller to be tested; the fault communication data is transmitted to the simulation board to inject faults into the initial simulation working environment using the fault communication data to obtain a target simulation working environment; the function to be tested is tested under the target simulation working environment to obtain test data; a test report is generated according to the test data, wherein the test report is used to determine whether the function to be tested has passed the test. By using the constructed vehicle domain controller function test system to accurately and comprehensively simulate the various network management functions of any domain controller to be tested in the vehicle, and at the same time, personalized fault communication data is generated according to the function to be tested of the controller to be tested, so as to achieve the purpose of comprehensively and accurately testing the function of the vehicle domain controller by executing the target test case corresponding to the function to be tested, thereby achieving the technical effect of automating and efficiently testing the function to be tested, reducing labor costs and time consumption, and thus solving the technical problems of low efficiency and high cost of the function test method of the domain controller in the vehicle in the prior art.
[0064] The above method of the embodiment of the present invention is further introduced below.
[0065] In an optional embodiment, the functional testing method of the vehicle domain controller further includes:
[0066] Step S406: construct a target test case for the function to be tested according to the test requirements of the function to be tested.
[0067] Still Figure 2As shown, in the present invention, after determining the controller to be tested in the target vehicle and the function to be tested of the controller to be tested, the test requirements corresponding to the function to be tested can be obtained from the test management platform 207, and the target test case corresponding to the function to be tested can be obtained from the database storing the test cases. When the target test case corresponding to the function to be tested does not exist in the database, the control test case editing and execution software 208 constructs the target test case of the function to be tested according to the test requirements corresponding to the function to be tested, so as to facilitate the subsequent testing of the function to be tested through automated target test cases.
[0068] In an optional embodiment, in step S404, the function to be tested is a door state acquisition function, the target simulation working environment is a simulated door state of a target vehicle is an open state, and the function to be tested is tested in the target simulation working environment, and the test data obtained includes:
[0069] Step S4411, executing the target test case to send a first service request to the controller under test, wherein the first service request is used to request the controller under test to obtain a simulated door state;
[0070] Step S4412: collecting response data of the controller to be tested to the first service request to obtain test data.
[0071] And, in step S405, generating a test report according to the test data includes:
[0072] Step S4511, in response to determining that the simulated door state is open based on the response data, a first test result is written into the test report, wherein the first test result is used to determine that the door state acquisition function test has passed;
[0073] Step S4512, in response to determining based on the response data that the simulated door state is closed or the controller under test does not respond to the first service request, write a second test result in the test report, wherein the second test result is used to determine that the door state acquisition function test fails.
[0074] The following combination Figure 5 The above method is further described as follows: Figure 5 As shown, when the door status acquisition function of the controller to be tested is tested, the test case corresponding to the door status acquisition function is automatically executed. First, the test equipment is initialized, and the test parameters and other data are configured for the test management platform, and all the test equipment and the controller to be tested are powered by a programmable power supply. Then, the target simulation working environment of the door status acquisition function of the controller to be tested is provided through the IO and load board. For example, the target simulation working environment at least includes the simulated door state of the simulated vehicle being in the open state, and then, a service request requesting the door opening state is sent to the controller to be tested, and the controller to be tested is waited for a service response.
[0075] Still Figure 5 As shown, when the controller under test obtains the simulated door state as an open state, it is determined that the door state acquisition function test has passed; when the controller under test obtains the simulated door state as a closed state or the controller under test does not respond to the service request for the door open state, it is determined that the door state acquisition function test has failed.
[0076] In an optional embodiment, in step S404, the function to be tested is a cooling fan control function, the target simulation working environment is a target vehicle whose simulated engine operating temperature is higher than a preset temperature threshold, and the function to be tested is tested under the target simulation working environment, and the test data obtained includes:
[0077] Step S4421, executing the target test case to send a second service request to the controller under test, wherein the second service request is used to request the controller under test to turn on a simulated cooling fan;
[0078] Step S4422, collecting the working data of the simulated cooling fan to obtain test data.
[0079] And, in step S405, generating a test report according to the test data includes:
[0080] Step S4521, in response to determining based on the working data that the simulated cooling fan cools down the simulated engine, writing a third test result in the test report, wherein the third test result is used to determine that the cooling fan control function test has passed;
[0081] Step S4522, in response to determining based on the working data that the simulated cooling fan is operating abnormally or the simulated cooling fan is not turned on, write a fourth test result in the test report, wherein the fourth test result is used to determine that the cooling fan control function test has failed.
[0082] The following combination Figure 6 The above method is further described as follows: Figure 6 As shown, when the cooling fan control function of the controller to be tested is tested, the test case corresponding to the cooling fan control function is automatically executed. First, the test equipment is initialized, and the test parameters and other data are configured for the test management platform, and all the test equipment and the controller to be tested are powered by a programmable power supply. Then, the target simulation working environment of the cooling fan control function of the controller to be tested is provided through the IO and load board. For example, the target simulation working environment at least includes setting the current operating temperature of the simulated engine to exceed the preset temperature threshold. Then, the control test software sends a service request to the controller to be tested requesting the cooling fan to start working, and waits for the controller to be tested to respond to the service.
[0083] Still Figure 6As shown, when the controller to be tested responds positively to the service request for the cooling fan to start working so as to control the cooling fan to start working, the output data of the cooling fan is collected, and the output data may be the temperature of the air output by the cooling fan. When it is further determined that the temperature of the air output by the cooling fan is equal to the current operating temperature of the simulated engine so as to cool down the simulated engine, it is determined that the cooling fan control function test has passed. When the controller to be tested does not respond positively to the service request for the cooling fan to start working or the temperature of the air output by the cooling fan cannot cool down the simulated engine, it is determined that the cooling fan control function test has failed.
[0084] In an optional embodiment, in step S404, the function to be tested is a local network management function, the target simulation working environment is that the power supply voltage of the controller to be tested is a normal working voltage, and the initial states of multiple electronic control units in the controller to be tested are all in a sleep state, and the function to be tested is tested in the target simulation working environment, and the test data obtained includes:
[0085] Step S4431, for any local network cluster, executing a target test case to wake up multiple electronic control units in sequence;
[0086] Step S4432, collect the communication message of any electronic control unit to obtain test data.
[0087] And, in step S405, generating a test report according to the test data includes:
[0088] Step S4531, in response to an abnormal communication message of any electronic control unit or any electronic control unit not being awakened, write the fifth test result in the test report, wherein the fifth test result is used to determine that the local function test of the controller under test for any local network cluster has failed.
[0089] And, the functional testing method of the vehicle domain controller further includes:
[0090] Step S4532, in response to the communication messages of the plurality of electronic control units being normal, testing the local network management function of the controller to be tested for the next local network cluster according to the target test case;
[0091] Step S4533, in response to determining based on the test data that the local network management functions of the controller to be tested for multiple local network clusters in the target vehicle have all passed the test, a test report is generated.
[0092] The following combination Figure 7 The above method is further described as follows: Figure 7As shown, when the local network management function of the controller to be tested is tested, the test case corresponding to the local network management function is automatically executed. First, the test equipment is initialized, and the test parameters and other data are configured for the test management platform, and all the test equipment and the controller to be tested are powered by a programmable power supply. Then, the target simulation working environment of the local network management function of the controller to be tested is provided through the IO and load board. For example, the target simulation working environment at least includes setting the power supply voltage of the controller to be tested to the normal working voltage, setting the waiting time for maintaining communication stability to a preset time (such as 5 seconds), and putting all ECUs in the controller to be tested in a sleep state. Then, the locally stored wake-up conditions are obtained one by one to wake up the corresponding ECU. After a certain ECU is successfully woken up, the communication message output by the ECU is collected to determine whether the communication message of the ECU is normal, thereby determining whether the management function of the controller to be tested for the ECU has passed the test.
[0093] Still Figure 7 As shown, when it is determined that the communication message output by a certain ECU is normal, the local wake-up condition corresponding to the next ECU is traversed to test the management function of the controller under test for the next ECU. After the current partial network cluster (PNC) test is passed, the next PNC is traversed to continue the partial network management function test. Thus, for each PNC in all PNCs, when the communication messages of all ECUs are normal, it is determined that the partial network management function test of the controller under test has passed. When the communication message of any ECU is abnormal or any ECU is not awakened, it is determined that the partial network management function test of the controller under test has failed.
[0094] In an embodiment of the present invention, an initial simulation working environment of a controller to be tested in a target vehicle is first constructed, wherein the controller to be tested is any type of domain controller under the network communication system of the target vehicle; fault communication data is generated according to the function to be tested of the controller to be tested, wherein the function to be tested is any type of network management function of the controller to be tested; the fault communication data is transmitted to the simulation board to inject faults into the initial simulation working environment using the fault communication data to obtain a target simulation working environment; the function to be tested is tested under the target simulation working environment to obtain test data; a test report is generated according to the test data, wherein the test report is used to determine whether the function to be tested has passed the test. By using the constructed vehicle domain controller function test system to accurately and comprehensively simulate the various network management functions of any domain controller to be tested in the vehicle, and at the same time, personalized fault communication data is generated according to the function to be tested of the controller to be tested, so as to achieve the purpose of comprehensively and accurately testing the function of the vehicle domain controller by executing the target test case corresponding to the function to be tested, thereby achieving the technical effect of automating and efficiently testing the function to be tested, reducing labor costs and time consumption, and thus solving the technical problems of low efficiency and high cost of the function test method of the domain controller in the vehicle in the prior art.
[0095] In this embodiment, a functional testing device for a vehicle domain controller is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, a "module" is a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0096] Figure 8 is a structural block diagram of a functional testing device for a vehicle domain controller according to an embodiment of the present invention. Figure 8 As shown, the device comprises:
[0097] The first construction module 801 is used to construct an initial simulation working environment of a controller to be tested in a target vehicle, wherein the controller to be tested is any type of domain controller under a network communication system of the target vehicle;
[0098] A first generating module 802 is used to generate fault communication data according to a function to be tested of the controller to be tested, wherein the function to be tested is any network management function of the controller to be tested;
[0099] The fault processing module 803 is used to transmit the fault communication data to the simulation board, so as to use the fault communication data to perform fault injection on the initial simulation working environment to obtain the target simulation working environment;
[0100] The testing module 804 is used to test the function to be tested in the target simulation working environment to obtain test data;
[0101] The second generating module 805 is used to generate a test report according to the test data, wherein the test report is used to determine whether the function to be tested has passed the test.
[0102] Optionally, the functional testing device of the vehicle domain controller further includes: a second construction module 806 (not shown in the figure), which is used to construct a target test case of the function to be tested according to the test requirements of the function to be tested.
[0103] Optionally, the function to be tested is a door status acquisition function, and the target simulation working environment is that the simulated door status of the target vehicle is an open state. The above-mentioned test module 804 is also used to: execute the target test case to send a first service request to the controller to be tested, wherein the first service request is used to request the controller to be tested to obtain the simulated door status; collect the response data of the controller to be tested to the first service request to obtain test data.
[0104] Optionally, the above-mentioned second generation module 805 is also used to: in response to determining that the simulated door state is an open state based on the response data, write a first test result in the test report, wherein the first test result is used to determine that the door state acquisition function test has passed; in response to determining that the simulated door state is a closed state based on the response data or the controller to be tested does not respond to the first service request, write a second test result in the test report, wherein the second test result is used to determine that the door state acquisition function test has failed.
[0105] Optionally, the function to be tested is a cooling fan control function, and the target simulated working environment is that the operating temperature of the simulated engine of the target vehicle is higher than a preset temperature threshold. The above-mentioned test module 804 is also used to: execute the target test case to send a second service request to the controller to be tested, wherein the second service request is used to request the controller to be tested to turn on the simulated cooling fan; collect the working data of the simulated cooling fan to obtain test data.
[0106] Optionally, the above-mentioned second generation module 805 is also used to: in response to determining based on the working data that the simulated cooling fan cools the simulated engine, write a third test result in the test report, wherein the third test result is used to determine that the cooling fan control function test has passed; in response to determining based on the working data that the simulated cooling fan is working abnormally or the simulated cooling fan is not turned on, write a fourth test result in the test report, wherein the fourth test result is used to determine that the cooling fan control function test has failed.
[0107] Optionally, the function to be tested is a local network management function, the target simulation working environment is that the power supply voltage of the controller to be tested is the normal working voltage, and the initial states of multiple electronic control units in the controller to be tested are all in sleep state, and the above-mentioned test module 804 is also used for: for any local network cluster, executing the target test case to wake up multiple electronic control units in turn; collecting the communication messages of any electronic control unit to obtain test data.
[0108] Optionally, the above-mentioned second generation module 805 is also used to: in response to an abnormal communication message of any electronic control unit or any electronic control unit not being awakened, write a fifth test result in the test report, wherein the fifth test result is used to determine that the local functional test of the controller under test for any local network cluster has failed.
[0109] Optionally, the functional testing device of the vehicle domain controller further includes: a cyclic testing module 807 (not shown in the figure), which is used to test the local network management function of the controller to be tested for the next local network cluster according to a target test case in response to the communication messages of multiple electronic control units being normal; and generate a test report in response to determining based on the test data that the local network management functions of the controller to be tested for multiple local network clusters in the target vehicle have passed the test.
[0110] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0111] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the function testing method of a vehicle domain controller described in any one of the above is implemented.
[0112] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the aforementioned vehicle domain controller functional testing methods.
[0113] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0114] Step S1, constructing an initial simulation working environment of a controller to be tested in a target vehicle, wherein the controller to be tested is any type of domain controller under a network communication system of the target vehicle;
[0115] Step S2, generating fault communication data according to the function to be tested of the controller to be tested, wherein the function to be tested is any network management function of the controller to be tested;
[0116] Step S3, transmitting the fault communication data to the simulation board, so as to use the fault communication data to perform fault injection on the initial simulation working environment to obtain the target simulation working environment;
[0117] Step S4, testing the function to be tested in the target simulation working environment to obtain test data;
[0118] Step S5, generating a test report according to the test data, wherein the test report is used to determine whether the function to be tested has passed the test.
[0119] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0120] According to another aspect of an embodiment of the present invention, a vehicle is provided, comprising an on-board memory and an on-board processor, wherein a computer program is stored in the on-board memory, and the on-board processor is configured to run the computer program to execute any one of the aforementioned functional testing methods for a vehicle domain controller.
[0121] Optionally, in this embodiment, the vehicle-mounted processor may be configured to perform the following steps through a computer program:
[0122] Step S1, constructing an initial simulation working environment of a controller to be tested in a target vehicle, wherein the controller to be tested is any type of domain controller under a network communication system of the target vehicle;
[0123] Step S2, generating fault communication data according to the function to be tested of the controller to be tested, wherein the function to be tested is any network management function of the controller to be tested;
[0124] Step S3, transmitting the fault communication data to the simulation board, so as to use the fault communication data to perform fault injection on the initial simulation working environment to obtain the target simulation working environment;
[0125] Step S4, testing the function to be tested in the target simulation working environment to obtain test data;
[0126] Step S5, generating a test report according to the test data, wherein the test report is used to determine whether the function to be tested has passed the test.
[0127] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiment and its optional implementation modes, and this embodiment will not be described in detail here.
[0128] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0129] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0130] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, 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 units or modules, which can be electrical or other forms.
[0131] The units described 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 units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0132] In addition, each functional unit in each embodiment of the present invention 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.
[0133] 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 invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk or optical disk, etc., various media that can store program codes.
[0134] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A functional test system for a vehicle domain controller, characterized in that: include: A simulation board, used to construct an initial simulation working environment of a controller to be tested in a target vehicle, wherein the controller to be tested is any type of domain controller under a network communication system of the target vehicle; A bus communication data simulation device, used for generating fault communication data according to a function to be tested of the controller to be tested, wherein the function to be tested is any network management function of the controller to be tested; A data communication device, used for transmitting the fault communication data to the simulation board, so as to use the fault communication data to perform fault injection on the initial simulation working environment to obtain a target simulation working environment; An industrial computer is used to test the function to be tested in the target simulation working environment to obtain test data; The test management platform is used to generate a test report based on the test data, wherein the test report is used to determine whether the function to be tested has passed the test.
2. The functional test system of the vehicle domain controller according to claim 1, characterized in that: The functional testing system of the vehicle domain controller also includes: A program-controlled power supply is used to supply power to the simulation board, the bus communication data simulation device, the data communication device, the industrial computer, the test management platform and the controller to be tested.
3. A function test method for a vehicle domain controller, applied to the function test system for the vehicle domain controller according to any one of claims 1 to 2, characterized in that: include: Constructing an initial simulation working environment of a controller to be tested in a target vehicle, wherein the controller to be tested is any type of domain controller under a network communication system of the target vehicle; Generate fault communication data according to the function to be tested of the controller to be tested, wherein the function to be tested is any network management function of the controller to be tested; The fault communication data is transmitted to the simulation board, so as to inject the fault into the initial simulation working environment by using the fault communication data to obtain the target simulation working environment; Testing the function to be tested in the target simulation working environment to obtain test data; A test report is generated according to the test data, wherein the test report is used to determine whether the function to be tested has passed the test.
4. The functional testing method of a vehicle domain controller according to claim 3, characterized in that: The functional testing method of the vehicle domain controller also includes: According to the test requirements of the function to be tested, a target test case for the function to be tested is constructed.
5. The functional testing method of a vehicle domain controller according to claim 4, characterized in that: The function to be tested is a door state acquisition function, the target simulation working environment is a simulated door state of the target vehicle is an open state, and the function to be tested is tested in the target simulation working environment to obtain the test data including: Executing the target test case to send a first service request to the controller under test, wherein the first service request is used to request the controller under test to obtain the simulated door state; The response data of the controller to be tested to the first service request is collected to obtain the test data.
6. The functional testing method of a vehicle domain controller according to claim 5, characterized in that: Generating the test report according to the test data includes: In response to determining that the simulated door state is an open state based on the response data, writing a first test result in the test report, wherein the first test result is used to determine that the door state acquisition function test has passed; In response to determining that the simulated door state is closed or the controller under test does not respond to the first service request based on the response data, a second test result is written in the test report, wherein the second test result is used to determine that the door state acquisition function test has failed.
7. The functional testing method of a vehicle domain controller according to claim 4, characterized in that: The function to be tested is a cooling fan control function, the target simulation working environment is a simulated engine of the target vehicle whose operating temperature is higher than a preset temperature threshold, and the function to be tested is tested under the target simulation working environment, and the test data obtained includes: Executing the target test case to send a second service request to the controller under test, wherein the second service request is used to request the controller under test to turn on a simulated cooling fan; The working data of the simulated cooling fan is collected to obtain the test data.
8. The functional testing method of a vehicle domain controller according to claim 7, characterized in that: Generating the test report according to the test data includes: In response to determining that the simulated cooling fan cools down the simulated engine based on the working data, writing a third test result in the test report, wherein the third test result is used to determine that the cooling fan control function test has passed; In response to determining based on the operating data that the simulated cooling fan is operating abnormally or the simulated cooling fan is not turned on, a fourth test result is written in the test report, wherein the fourth test result is used to determine that the cooling fan control function test has failed.
9. The functional testing method of a vehicle domain controller according to claim 4, characterized in that: The function to be tested is a local network management function, the target simulation working environment is that the power supply voltage of the controller to be tested is a normal working voltage, and the initial states of multiple electronic control units in the controller to be tested are all in a sleep state. The function to be tested is tested under the target simulation working environment, and the test data obtained includes: For any local network cluster, executing the target test case to wake up the multiple electronic control units in sequence; The communication message of any electronic control unit is collected to obtain the test data.
10. The functional testing method of a vehicle domain controller according to claim 9, characterized in that: Generating the test report according to the test data includes: In response to an abnormal communication message of any one of the electronic control units or the failure of any one of the electronic control units to be awakened, a fifth test result is written into the test report, wherein the fifth test result is used to determine that the local functional test of the controller under test for any one of the local network clusters has failed.
11. The functional testing method of a vehicle domain controller according to claim 10, characterized in that: The functional testing method of the vehicle domain controller also includes: In response to the communication messages of the plurality of electronic control units being normal, testing the local network management function of the controller to be tested for the next local network cluster according to the target test case; In response to determining based on the test data that the local network management functions of the controller to be tested for multiple local network clusters in the target vehicle have all passed the test, the test report is generated.
12. A functional testing device for a vehicle domain controller, applied to the functional testing method for a vehicle domain controller according to any one of claims 3 to 11, characterized in that: include: A first construction module is used to construct an initial simulation working environment of a controller to be tested in a target vehicle, wherein the controller to be tested is any type of domain controller under a network communication system of the target vehicle; A first generating module, configured to generate fault communication data according to a function to be tested of the controller to be tested, wherein the function to be tested is any network management function of the controller to be tested; A fault processing module, used for transmitting the fault communication data to the simulation board, so as to use the fault communication data to perform fault injection on the initial simulation working environment to obtain a target simulation working environment; A test module, used for testing the function to be tested in the target simulation working environment to obtain test data; The second generating module is used to generate a test report according to the test data, wherein the test report is used to determine whether the function to be tested has passed the test.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the function testing method of the vehicle domain controller according to any one of claims 3 to 11 is implemented.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the computer-readable storage medium is located is controlled to execute the functional testing method of the vehicle domain controller of any one of claims 3 to 11.
15. A vehicle, characterized in that: The vehicle domain controller comprises an on-board memory and an on-board processor, wherein the on-board memory stores a computer program, and the on-board processor is configured to run the computer program to execute the functional testing method of the vehicle domain controller according to any one of claims 3 to 11.
Citation Information
Cited By
Controller awakening method and device, equipment, medium and program product
CN119828666A
