Test system and method for automobile electronic control unit design verification

By pre-writing test cases in the automotive electronic control unit and using the user interaction interface and custom plug-in library to process test event messages, it solves the long development cycle and non-universal problems caused by the host computer participating in the test logic in the existing technology, and realizes the upper level Decoupling the machine and electronic control unit and improving test efficiency.

CN118732650APending Publication Date: 2024-10-01CHIPSET SECURITY WE THINGS (SHANGHAI)MICROELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410739824.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The existing design verification software of automotive electronic control units requires the host computer to participate in the test logic, which results in a long development cycle and is not universal. It requires customized development according to different electronic control units, resulting in the host computer software and the electronic control unit DV software not being decoupled.

Method used

The test cases are pre-written and saved in the automotive electronic control unit. The host computer only needs to obtain the test case list and select the name to send instructions. The automotive electronic control unit executes the test cases, realizing the decoupling of the host computer and electronic control unit programs, and providing users with Interface and custom plugin library to handle test event messages.

Benefits of technology

It achieves the versatility of the host computer software, eliminating the need for customized development according to different electronic control units, improving adaptability and testing efficiency, and simplifying the data communication process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118732650A_ABST
    Figure CN118732650A_ABST
Patent Text Reader

Abstract

The invention provides a test system and method for automobile electronic control unit design verification, and relates to the technical field of internet-of-vehicles testing, and the method comprises the steps: an upper computer obtains a test case list stored in an automobile electronic control unit, then selects a test case in the test case list to control the automobile electronic control unit to start testing, the upper computer monitors a test event message reported by the automobile electronic control unit and generates a test report according to the test event message; the self-defined plug-in library controls the automatic tool hardware to perform a corresponding test according to the test event message to obtain a corresponding test result, or controls the automatic tool hardware to test the automobile electronic control unit according to the test event message to obtain a corresponding test result; and then each test result is used as a test event message to be returned to the upper computer. The method has the beneficial effects that the upper computer software can be universally used for the automobile electronic control unit, the upper computer software does not need to be developed in a customized manner, and the adaptability is relatively high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle networking testing, and in particular to a testing system and method for design verification of an automotive electronic control unit. Background Art

[0002] When developing automotive ECUs (electronic control units), it is often necessary to conduct design verification experiments on the hardware to verify the reliability of the hardware in various environments. In order to obtain experimental results, it is generally necessary to design and implement special DV (design verification) test software. Use the software to visually observe the experimental data and analyze the experimental data to determine whether the experiment has passed. Current DV software is generally composed of host computer software and electronic control unit embedded test software. The host computer and the electronic control unit communicate through a private test protocol. The host computer needs to implement all test cases. At the beginning of each test case, the host computer must send coded instructions to the electronic control unit. The electronic control unit software parses and executes the corresponding test and then returns the test results to the host computer.

[0003] The existing DV software is implemented by writing test cases on the host computer. This implementation will cause the following disadvantages:

[0004] The host computer needs to know the test details, which prolongs the host computer development cycle;

[0005] The host computer software is not universal, and the DV test items of different electronic control units are different, so the host computer needs to be redesigned.

[0006] Therefore, this implementation method will result in the host computer software and the DV software of the electronic control unit not being decoupled, and the host computer software needs to be customized according to different electronic control units, which is very time-consuming and labor-intensive. Summary of the invention

[0007] In view of the problems existing in the prior art, the present invention provides a test system for design verification of an automotive electronic control unit, comprising a host computer and an automotive electronic control unit connected to the host computer;

[0008] The host computer queries the test case list pre-stored in the automotive electronic control unit, and then selects at least one test case in the test case list based on a selection instruction input by a tester to control the automotive electronic control unit to start executing the test case.

[0009] Preferably, the host computer also provides a user interaction interface, and the host computer includes:

[0010] A control module, used for sending a query instruction to the automotive electronic control unit according to a start instruction of a tester, querying and obtaining the test case name of each test case stored in the automotive electronic control unit and forming the test case list;

[0011] A user interaction module is connected to the control module and is used to display the test case list on the user interaction interface, and select at least one test case name according to the tester's selection instruction, and then generate corresponding test instructions to control the automotive electronic control unit to execute the corresponding test case.

[0012] Preferably, the automotive electronic control unit includes:

[0013] A test case module, used to store a plurality of pre-written test cases;

[0014] A test execution module is connected to the test case module and is used to query all the test cases stored in the test case module when receiving a query instruction issued by the host computer, and return all the test case names to the host computer, and execute the corresponding test case according to the test instruction when receiving the test instruction issued by the host computer.

[0015] Preferably, the test instruction includes a test case name and a test cycle number, and the test execution module includes:

[0016] A loop execution unit is used to execute the corresponding test case according to the test case name contained in the test instruction, and execute the test case multiple times according to the number of loop tests.

[0017] Preferably, the host computer monitors the test event message reported by the automobile electronic control unit during the test process, and generates a test report according to the test event message;

[0018] The automotive electronic control unit also includes:

[0019] A test event monitoring module is used to monitor the execution process of the test case in real time during the test process, and receive the node event message reported when the test node of the test case is executed and send it to the host computer as the test event message;

[0020] Then the host computer also includes:

[0021] The test monitoring module is used to receive each of the test event messages reported by the automotive electronic control unit during the test process, and then display each of the test event messages to the tester through the user interaction interface.

[0022] Preferably, the test event message further includes a first test event message indicating that the test needs to be completed with the aid of external hardware and a second test event message indicating that the automotive electronic control unit needs to be tested using external hardware;

[0023] The host computer also includes a custom plug-in library, which is connected to the automotive electronic control unit through external automation tool hardware, and is used to control the automation tool hardware to perform corresponding tests according to the first test event message to obtain corresponding test results, and to control the automation tool hardware to test the automotive electronic control unit according to the second test event message to obtain corresponding test results, and then return each test result to the host computer.

[0024] Preferably, the test event message includes a message header and a data unit;

[0025] The message header is composed of a message start flag, a message type and a message body length;

[0026] The data unit is a data key-value pair in JSON format.

[0027] The present invention also provides a test method for design verification of an automotive electronic control unit, which is applied to the above-mentioned test system and comprises:

[0028] Step S1, the host computer queries the test case list stored in the automotive electronic control unit;

[0029] Step S2: the host computer selects at least one test case in the test case list based on a selection instruction input by a tester to control the vehicle electronic control unit to start executing the test case.

[0030] Preferably, the automotive electronic control unit stores a plurality of pre-written test cases; then step S1 comprises:

[0031] Step S11, the host computer sends a query instruction to the vehicle electronic control unit according to the start instruction of the tester;

[0032] Step S12, the automobile electronic control unit queries all the stored test cases upon receiving the query instruction sent by the host computer, and returns all the test case names to the host computer;

[0033] Step S13: the host computer forms the test case list according to the test case name of each test case.

[0034] Preferably, the host computer also provides a user interaction interface, and step S2 includes:

[0035] Step S21, the host computer displays the test case list on the user interaction interface, selects at least one test case name according to the tester's selection instruction, and then generates a corresponding test instruction;

[0036] Step S22: When the vehicle electronic control unit receives the test instruction sent by the host computer, it executes the corresponding test case according to the test instruction.

[0037] The above technical solution has the following advantages or beneficial effects:

[0038] The test cases are pre-written and saved in the automotive electronic control unit. During the test, the host computer only needs to obtain the test case list and select the corresponding name to send instructions to control the automotive electronic control unit for testing. The host computer does not participate in the specific test logic to achieve the decoupling between the host computer test program and the electronic control unit program, which can realize the universality of the host computer software for automotive electronic control units. The host computer software does not need to be customized according to different electronic control units and has high adaptability. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 The structure diagram of a test system for design verification of an automotive electronic control unit in a preferred embodiment of the present invention is as follows;

[0040] Figure 2 This is a physical connection diagram of a TBOX when performing a DV test in a preferred embodiment of the present invention;

[0041] Figure 3 In a preferred embodiment of the present invention, the display interface of the host computer;

[0042] Figure 4 A flow chart of a test method for design verification of an automotive electronic control unit in a preferred embodiment of the present invention;

[0043] Figure 5 This is a flow chart of step S1 in a preferred embodiment of the present invention;

[0044] Figure 6 This is a flow chart of step S2 in a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0045] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The present invention is not limited to this embodiment, and other embodiments may also fall within the scope of the present invention as long as they conform to the gist of the present invention.

[0046] In a preferred embodiment of the present invention, based on the above problems existing in the prior art, a test system for design verification of an automotive electronic control unit is provided, comprising a host computer 1 and an automotive electronic control unit 2 connected to the host computer;

[0047] The host computer 1 obtains the test case list stored in the automotive electronic control unit 2, and then selects at least one test case in the test case list based on the selection instruction input by the tester to control the automotive electronic control unit to start executing the test case.

[0048] Specifically, in the prior art, automotive electronic control unit testing is performed by writing test cases in a host computer and then sending them to the automotive electronic control unit for execution. The host computer needs to know the test details, which lengthens the host computer development cycle. In addition, different electronic control units have different DV test items, and the host computer needs to redesign the host computer software for testing different electronic control units. This implementation method will cause the host computer software and the DV software of the electronic control unit to be undecoupled.

[0049] In this embodiment, the test cases are pre-written and saved in the automobile electronic control unit. During the test, the host computer only needs to obtain the test case list and select the corresponding name to send instructions to control the automobile electronic control unit for testing. The host computer does not participate in the specific test logic to achieve the decoupling between the host computer test program and the electronic control unit program, which can realize the universality of the host computer software for automobile electronic control units. The host computer software does not need to be customized according to different electronic control units and has high adaptability.

[0050] The host computer 1 monitors the test event message reported by the automobile electronic control unit 2 during the test process, and generates a test report according to the test event message;

[0051] The host computer 1 includes a custom plug-in library 11, which is connected to the automobile electronic control unit 2 through an external automation tool hardware 3, and is used to control the automation tool hardware to perform corresponding tests according to test event messages to obtain corresponding test results, or to control the automation tool hardware 3 to test the automobile electronic control unit 2 according to test event messages to obtain corresponding test results, and then return each test result to the host computer 1 as a test event message.

[0052] Specifically, in this embodiment, the test cases are pre-written and saved in the automotive electronic control unit 2. When testing, the host computer 1 only needs to obtain the test case list and select the corresponding name to send instructions to control the automotive electronic control unit 2 for testing. The automotive electronic control unit 2 uses the Google test test framework to independently write all test cases. Each test case is independent of each other. In the test case, it knows how to complete the test and how to judge whether the test is successful. The host computer 1 does not participate in the specific test logic to achieve the decoupling between the host computer 1 test program and the automotive electronic control unit 2, which can realize the universality of the host computer 1 software for automotive electronic control units. The host computer 1 software does not need to be customized according to different electronic control units and has high adaptability.

[0053] Although the test logic and process are implemented in the automotive electronic control unit 2, external cooperation is often required when testing interface communication. For example, when testing CAN communication, in order to test the normal transceiver function of CAN, it is often necessary for the external to provide certain CAN signal input during the test. Also, when testing the sleep current of the electronic control unit, the host computer 1 is often required to make test judgments and give test results. For these test cases that the automotive electronic control unit cannot implement alone, they can be left empty. The host computer 1 implements the test cases that the automotive electronic control unit 2 cannot complete alone through the custom plug-in library and the external automation tool hardware 3 according to the test event message fed back by the electronic control unit, ensuring the normal progress of the test link.

[0054] Compared with the prior art method in which all test cases are configured on the host computer 1 , the present invention makes the host computer program more universal and can adapt to DV design verification experiments of various automotive electronic control units 2 .

[0055] In a preferred embodiment of the present invention, the host computer also provides a user interaction interface, and the host computer 1 includes:

[0056] The control module 12 is used to send a query instruction to the automobile electronic control unit according to the start instruction of the tester, query and obtain the test case name of each test case stored in the automobile electronic control unit and form a test case list;

[0057] The user interaction module 13 is connected to the control module 12 and is used to display the test case list on the user interaction interface, select at least one test case name according to the tester's selection instruction, and then generate a corresponding test instruction to control the automobile electronic control unit to execute the corresponding test case;

[0058] The test monitoring module 14 is used to receive various test event messages reported by the automobile electronic control unit during the test process, and then display each test event message to the tester through a user interaction interface.

[0059] The report generating module 15 is connected to the test monitoring module 14 and is used to generate a test report according to each test event message received by the test monitoring module.

[0060] In a preferred embodiment of the present invention, the automotive electronic control unit 2 includes:

[0061] A test case module 21 is used to store a plurality of pre-written test cases;

[0062] The test execution module 22 is connected to the test case module 21 and is used to query all test cases stored in the test case module when receiving a query instruction from the host computer, and return all test case names to the host computer, and execute the corresponding test case according to the test instruction when receiving a test instruction from the host computer;

[0063] The test event monitoring module 23 is connected to the test execution module 22 and is used to monitor the execution process of the test case in real time during the test process, and receive the node event message reported by the test execution module when executing the test node and send it to the host computer as a test event message.

[0064] Specifically, in this embodiment, a plurality of modules are respectively configured in the host computer and the automobile electronic control unit in the form of software to achieve decoupling between the host computer test program and the electronic control unit program.

[0065] The software in the host computer and the software in the automotive electronic control unit are respectively used as Client and Server to realize data communication. Client and Server are the two main roles in communication in computer networks. The main task of the client is to send requests to the server, requesting data or services. The server receives the request sent by the client, processes the request and returns the corresponding data or service.

[0066] The host computer only needs to send selection instructions and test instructions to the automotive electronic control unit, and the automotive electronic control unit only needs to return the test case name and test event message to the host computer, which simplifies the data communication process, data transmission protocol, and data transmission volume between the host computer and the automotive electronic control unit. In the traditional method, the communication protocol between the host computer and the electronic control unit is relatively complex, and the PDU (protocol data unit) that needs to be parsed will vary depending on the test item.

[0067] The custom plug-in library 11 is connected to the test monitoring module 14 of the host computer 1, and it has two interfaces, one is the sending interface and the other is the receiving interface. The messages transmitted by the two interfaces are the test event messages defined above, that is, the message format defined in JSON. The test monitoring module 14 in the host computer is responsible for forwarding all received test event messages to the custom plug-in library 11. Through the received test event messages, the custom plug-in library 11 can obtain the time point when the test is carried out to any link. The test event message includes a first test event message indicating that the test needs to be completed with the help of external hardware and a second test event message indicating that the automotive electronic control unit needs to be tested using external hardware.

[0068] At this time, the custom plug-in library 11 can perform certain interventions, such as an event in which a test case starts. According to the first test event message received, the custom plug-in needs to control an external tool (such as a CAN transceiver) after the test starts to reply with a CAN message after receiving a CAN message to obtain the corresponding test result, or external hardware is required to feed external physical signals to the automotive electronic control unit to assist the automotive electronic control unit in completing the test and obtaining the corresponding test result.

[0069] There are also some test cases where the electronic control unit cannot give a test judgment on whether the test is passed. At this time, it is necessary to use external hardware to test the electronic control unit. For example, the second test event message received indicates that the sleep current of the electronic control unit needs to be tested. At this time, a custom test plug-in is required to monitor the test current after the test starts, and then give a test result judgment. The result of the judgment should be sent to the event listening module in the form of the test result notification event defined previously. The message format is exactly the same as the JSON format of the test result notification event sent by the electronic control unit. In addition, based on these test events, it is very easy for us to use the program to output the test results to a text file. This text file can use the csv general format, which includes the test time, test case name and test results. The csv file can then be opened in the EXCEL office software.

[0070] In a preferred embodiment of the present invention, the test event message includes a message header and a data unit;

[0071] The message header is composed of the message start flag, message type and message body length;

[0072] The data unit is a data key-value pair in JSON format.

[0073] Specifically, in this embodiment, in the design of the communication protocol, we can abstract the interface of the transport layer of the communication between the host computer 1 and the electronic control unit 2, and allow a variety of hardware interfaces to implement the transport layer. For example, UART, USB, Ethernet, CAN and other hardware interfaces can be used as the underlying hardware interface of the transport layer. The transport layer realizes the two-way transmission of messages to ensure the reliable and stable transmission of messages. Above the transport layer is the application message we want to define. For application messages, we use the form of message header plus PDU (data unit), and PDU is represented by JSON. We can use a simple design for the message header, and the message header is designed as follows:

[0074] Message start flag (0x550xaa) + message type + message body length

[0075] The message start flag is to quickly find the message start byte, and the message type is to quickly sort the message. The message type is divided into three types: request, response, and notification. After receiving the response message, the host computer transfers it to the control module 12 for processing. The notification type message is transferred to the test monitoring module 14 for processing. The design of the JSON message is a series of key-value pairs, and here we specify 7 key values.

[0076] URI key value, URI is a string, which is a combination of a specific command or event name and a message type. There are three message types: Request, Response, and Notification.

[0077] The test group name key-value pair is used to indicate the test group name involved in the message.

[0078] Test case key-value pair, used to indicate the name of the test case involved in the message.

[0079] Test result key-value pair, used to indicate the test result.

[0080] Monitoring data key-value pairs, where the value corresponds to an object, and the object is a series of key-value pairs, which users can add arbitrarily.

[0081] Test log key-value pairs, you can upload some log information in the test.

[0082] Test case list key-value pairs, this is used to return all supported test case names.

[0083] Test cases can be divided into different groups according to different functions, and the test cases are isolated from each other. This makes it very convenient to write test cases.

[0084] All test case names can be queried by passing in command parameters, so that we can report all test case names to host computer 1.

[0085] The test case testing process mainly includes the following test event messages, all of which use the above key-value pairs to indicate which message type they belong to and what they mean:

[0086] The test start event indicates that the vehicle electronic control unit enters the test mode;

[0087] The test end event indicates that the vehicle electronic control unit exits the test mode;

[0088] Test cycle test start event, indicating the start of the test cycle;

[0089] Test loop test end event, indicating the end of the loop execution test;

[0090] The test group test start event indicates the start of a group of test cases;

[0091] The test group test end event indicates that a group of test cases have been tested.

[0092] Test case test start event, indicating that the current test case is executed to the test start node;

[0093] Test case test result notification event, indicating that the current test case execution has obtained the test result;

[0094] The test case test end event indicates that the current test case has been executed to the test end node.

[0095] Using Google test, we can easily implement the test cycle test. In addition to uploading the test results to the host computer 1, we can also upload some monitoring quantities (such as voltage values) involved in each test case to the host computer in the test end event message of each test case, so that the host computer can display the change curve of a certain physical quantity. Using the characteristics of JSON key-value pairs, we can easily transmit some states or values ​​to be monitored to the host computer. As long as the host computer traverses the key-value pairs in the JSON message, it can easily display these states and values ​​on the interface or record them in the log file in a user-readable form. At the same time, in order to analyze the reasons for some test cases, we may sometimes need to record the log information in the test case program. This log can be converted into json format and then transmitted to the DV monitoring program through the internal socket. The test software in the automotive electronic control unit 2 consists of two parts, one is the DV monitoring process (implementing the function of the test execution module), and the other is the DV test case process (implementing the function of the test event monitoring module). These are two independent processes. The DV monitoring process is a resident service process that starts automatically when the computer is turned on. The DV monitoring process is responsible for establishing a TCP / IP communication channel with the host computer and receiving control commands from the host computer. The DV monitoring process has a control module that parses control commands and then starts the DV test case process according to the commands. The DV test case process uses an internal socket to communicate with the DV monitoring process. The DV monitoring process is the server end of the internal socket. After receiving the event report message, it forwards the message to the host computer.

[0096] In a preferred embodiment of the present invention, the test instruction includes a test case name and a test cycle number, and the test execution module 22 includes:

[0097] The loop execution unit 221 is used to execute the corresponding test case according to the test case name contained in the test instruction, and execute the test case multiple times according to the number of loop tests.

[0098] The present invention achieves decoupling between the test program of the host computer 1 and the program of the automotive electronic control unit 2 by sinking the test cases into the electronic control unit for storage, and the host computer does not participate in the specific test logic. At the same time, the definition of communication messages is more universal through the design of a good communication protocol, and will not increase according to the increase of test cases. At the same time, the message exchange is organized by JSON to achieve a simplified communication encoding and serialization design. At the same time, we traverse JSONThe key-value pair can display any number of monitoring objects on the user interface without the host computer 1 designing the interface according to the content to be displayed. Through the design of the present invention, the host computer 1 test program does not need to be modified according to the change of the test content, and supports multiple physical test communication channels.

[0099] The following is an example to illustrate the overall testing process:

[0100] As an electronic control unit of a car's Internet of Vehicles, Tbox plays a very important role, so DV implementation is also essential. According to the above design method, we implemented the DV software design of TBOX.

[0101] Figure 2 This is the physical connection diagram of TBOX when conducting DV test. We use QT to design the interface and program logic of the host computer. The host computer uses Ethernet to communicate with TBOX. At the same time, the host computer also communicates with TBOX through Zhou Ligong CAN tool. There is also a USB connection with TBOX. TBOX is usually composed of MCU and a soc chip. The SOC side runs the Linux system, and the MCU runs the Autosar software.

[0102] When implementing TBOX DV testing, both the test case process and the DV monitoring process are placed on the soc side. This is because Google Test is more convenient to implement in the Linux system. First, the test cases of TBOX are divided into two categories, one is the test results that TBOX can judge, and the other is the test results that need to be detected by the host computer. For the test cases that need to be tested by the host computer, when implementing, you only need to write an empty test case for Google Test to schedule the event to be sent to the monitoring process, and then the monitoring process will transfer it to the host computer. For the test cases of TBOX detection results, they can be divided into different test groups according to their functions, and the test cases of the same group are implemented in one file. Each test case makes assertions based on different hardware detected and different judgment criteria. Implement a custom plug-in library for TBOX in the host computer; the host computer passes all the test events received from TBOX to this custom plug-in library, and the custom plug-in library gives the test results. In TBOX, many hardware are controlled by MCU, so the monitoring results of the hardware are on the MCU side. Since the Google test test cases cannot run in the MCU, the CAN diagnostic protocol is used in the host computer test plug-in library to communicate with the MCU. After receiving the test start instruction sent by the host computer, a diagnostic command is first sent to the MCU to let the MCU enter the DV test mode. Then, after receiving the test command containing the test case name sent by the host computer, and judging that it is a test case that needs to be executed by the MCU, a command to read DID (data identifier, the ID identifier of the automotive industry diagnostic data) is sent to the MCU, and then the MCU executes the corresponding hardware detection according to the DID. When the test result passes, the test result is fed back to the custom plug-in library through the positive response of the diagnosis. The custom plug-in library forms a JSON message of the test result based on the feedback result and forwards it to the host computer event monitoring module. The host computer interface is as follows Figure 3 shown.

[0103] At the beginning of the test, you need to click Connect first. At this time, the host computer will establish a network connection with TBOX, load the TBOX custom plug-in library, and initialize the Zhou Ligong can tool. After the connection is completed, you can click the Start Test button to start the test, or you can check the cycle test. After clicking Start Test, the Start Test button becomes the Stop Test button. During the test, the received test event messages will be displayed in the interface in sequence.

[0104] The present invention also provides a test method for design verification of an automotive electronic control unit, which is applied to the above-mentioned test system, such as Figure 4 Shown include:

[0105] Step S1, the host computer queries the test case list stored in the automobile electronic control unit;

[0106] Step S2: The host computer selects at least one test case in the test case list based on the selection instruction input by the tester to control the automobile electronic control unit to start executing the test case.

[0107] In a preferred embodiment of the present invention, a plurality of pre-written test cases are stored in the automotive electronic control unit; Figure 5 As shown, step S1 includes:

[0108] Step S11, the host computer sends a query command to the vehicle electronic control unit according to the start command of the tester;

[0109] Step S12, when the automobile electronic control unit receives the query instruction sent by the host computer, it queries all the stored test cases and returns all the test case names to the host computer;

[0110] Step S13: the host computer forms a test case list according to the test case name of each test case.

[0111] In a preferred embodiment of the present invention, the host computer also provides a user interaction interface. Figure 6 As shown, step S2 includes:

[0112] Step S21, the host computer displays the test case list on the user interaction interface, selects at least one test case name according to the tester's selection instruction, and then generates a corresponding test instruction;

[0113] Step S22, when the vehicle electronic control unit receives the test instruction sent by the host computer, it executes the corresponding test case according to the test instruction.

[0114] In a preferred embodiment of the present invention, the test event message includes a message header and a data unit;

[0115] The message header is composed of the message start flag, message type and message body length;

[0116] The data unit is a data key-value pair in JSON format.

[0117] In a preferred embodiment of the present invention, the test instruction includes a test case name and a test cycle number, and step S22 includes:

[0118] The automotive electronic control unit executes the corresponding test case according to the test case name contained in the test instruction, and executes the test case multiple times according to the number of cycle tests.

[0119] The above are only preferred embodiments of the present invention, and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the contents of this specification and illustrations should be included in the protection scope of the present invention.

Claims

1. A test system for automotive electronic control unit design verification, characterized in that: It includes a host computer and an automotive electronic control unit connected to the host computer; The host computer queries the test case list pre-stored in the automotive electronic control unit, and then selects at least one test case in the test case list based on a selection instruction input by a tester to control the automotive electronic control unit to start executing the test case.

2. The test system according to claim 1, characterized in that: The host computer also provides a user interaction interface, and the host computer includes: A control module, used for sending a query instruction to the automotive electronic control unit according to a start instruction of a tester, querying and obtaining the test case name of each test case stored in the automotive electronic control unit and forming the test case list; A user interaction module is connected to the control module and is used to display the test case list on the user interaction interface, and select at least one test case name according to the tester's selection instruction, and then generate corresponding test instructions to control the automotive electronic control unit to execute the corresponding test case.

3. The test system according to claim 2, characterized in that: The automotive electronic control unit comprises: A test case module, used to store a plurality of pre-written test cases; A test execution module is connected to the test case module and is used to query all the test cases stored in the test case module when receiving a query instruction issued by the host computer, and return all the test case names to the host computer, and execute the corresponding test case according to the test instruction when receiving the test instruction issued by the host computer.

4. The test system according to claim 3, characterized in that: The test instruction includes a test case name and a test cycle number, and the test execution module includes: A loop execution unit is used to execute the corresponding test case according to the test case name contained in the test instruction, and execute the test case multiple times according to the number of loop tests.

5. The test system according to claim 1, characterized in that: The host computer monitors the test event message reported by the automobile electronic control unit during the test process, and generates a test report according to the test event message; The automotive electronic control unit also includes: A test event monitoring module is used to monitor the execution process of the test case in real time during the test process, and receive the node event message reported when the test node of the test case is executed and send it to the host computer as the test event message; Then the host computer also includes: The test monitoring module is used to receive each of the test event messages reported by the automotive electronic control unit during the test process, and then display each of the test event messages to the tester through the user interaction interface.

6. The test system according to claim 5, characterized in that: The test event message also includes a first test event message indicating that the test needs to be completed with the help of external hardware and a second test event message indicating that the automotive electronic control unit needs to be tested using external hardware; The host computer also includes a custom plug-in library, which is connected to the automotive electronic control unit through external automation tool hardware, and is used to control the automation tool hardware to perform corresponding tests according to the first test event message to obtain corresponding test results, and to control the automation tool hardware to test the automotive electronic control unit according to the second test event message to obtain corresponding test results, and then return each test result to the host computer.

7. The test system according to claim 5, characterized in that: The test event message includes a message header and a data unit; The message header is composed of a message start flag, a message type and a message body length; The data unit is a data key-value pair in JSON format.

8. A test method for design verification of automotive electronic control units, characterized in that: A test system as claimed in any one of claims 1 to 7, comprising: Step S1, the host computer queries the test case list stored in the automotive electronic control unit; Step S2: the host computer selects at least one test case in the test case list based on a selection instruction input by a tester to control the vehicle electronic control unit to start executing the test case.

9. The testing method according to claim 8, characterized in that: The automotive electronic control unit stores a plurality of pre-written test cases; then step S1 comprises: Step S11, the host computer sends a query instruction to the vehicle electronic control unit according to the start instruction of the tester; Step S12, the automobile electronic control unit queries all the stored test cases upon receiving the query instruction sent by the host computer, and returns all the test case names to the host computer; Step S13, the host computer forms the test case list according to the test case name of each test case.

10. The testing method according to claim 8, characterized in that: The host computer also provides a user interaction interface, and the step S2 includes: Step S21, the host computer displays the test case list on the user interaction interface, selects at least one test case name according to the tester's selection instruction, and then generates a corresponding test instruction; Step S22: When the vehicle electronic control unit receives the test instruction sent by the host computer, it executes the corresponding test case according to the test instruction.