ECU Testing Device, Testing Method, and Testing System
A compact ECU testing device using MPU and MCU with Python scripts addresses the limitations of bulky and expensive VECTOR-based systems, enhancing portability and reducing professional requirements for efficient ECU testing.
Patent Information
- Application Number
- CN202210842897.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-07-18
AI Technical Summary
The existing ECU testing system is huge, expensive and has high professional requirements for testers, and cannot meet the needs of portability and popularity.
An ECU test device composed of a microprocessor MPU and a microcontroller MCU is connected through a serial port, and a test script written in Python language is used to realize functional tests of the ECU and generate test reports.
It realizes the miniaturization and versatility of the ECU test device, high efficiency in development of test scripts, wide application range, and low professional requirements for testers.
Smart Images

Figure CN115079675B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic testing technologies, and in particular, to an electronic control unit (ECU) testing device, a testing method, and a testing system. Background Art
[0002] An electronic control unit (ECU) is one of the core electronic components of a vehicle and can be used to monitor the operating state of the vehicle and execute various control functions of the vehicle. Therefore, before the ECU leaves the factory, functional testing of it is an important means to ensure vehicle safety.
[0003] Currently, the mainstream manufacturers usually use a functional automation testing system built with VECTOR boards to test the ECU.
[0004] However, the functional automation testing system built with VECTOR boards is large in volume, expensive, and can only write test scripts based on the software environment authorized by VECTOR, which requires relatively high professionalism of testers. Summary of the Invention
[0005] The embodiments of this application provide an ECU testing device, a testing method, and a testing system. Compared with the existing testing equipment, they have the characteristics of being small in volume, convenient to carry, and strong in versatility, and can receive test scripts written in the Python language, with a wide application range and low requirements for the professionalism of testers.
[0006] In a first aspect, the embodiments of this application provide an ECU testing device, including: a microprocessor unit (MPU) and a microcontroller unit (MCU), where the MPU is connected to the MCU through a serial port;
[0007] The MPU is configured to obtain a test script sent by a browser end, parse the test script to obtain control instructions, and send the control instructions to the MCU, where the test script is written in the Python language;
[0008] The MCU is configured to send the received control instructions to the ECU, and send the test signals fed back by the received ECU to the MPU;
[0009] The MPU is further configured to generate a test report based on the test signals and send the test report to the browser end.
[0010] Optionally, the device further includes a communication module, the communication module is connected to the MPU, and the communication module is configured to receive the test script sent by the browser and send the test script to the MPU.
[0011] Optionally, the communication module includes at least one of the following communication units: an Ethernet communication unit, a WIFI communication unit, or a USB communication unit.
[0012] Optionally, the device further includes a peripheral module, which is connected to the MCU. The peripheral module is configured to send the control instruction to the ECU and obtain a feedback test signal from the ECU.
[0013] Optionally, the peripheral module includes at least one of the following peripheral units: an adjustable voltage signal output unit, a CAN bus, a serial communication unit, a resistance signal output unit, an IO signal output unit, or a PWM signal output unit.
[0014] Optionally, the peripheral module includes at least two peripheral units;
[0015] The MCU is specifically configured to send the control instruction to the peripheral unit corresponding to the instruction type according to the instruction type of the received control instruction.
[0016] Optionally, the MCU is further configured to verify the control instruction and send the control instruction to the ECU when the verification of the control instruction passes.
[0017] Optionally, the MCU is further specifically configured to:
[0018] Obtain a first verification value and a second verification value of the control instruction. The first verification value is the verification value received by the MCU from the MPU, and the second verification value is obtained by the MCU calculating the control instruction according to a verification algorithm;
[0019] If the first verification value is the same as the second verification value, the verification of the control instruction passes.
[0020] In a second aspect, an ECU test method provided by an embodiment of the present application includes:
[0021] Obtain a test script sent by a browser side, where the test script is written in the python language;
[0022] Parse the test script to obtain a control instruction, where the control instruction is used to control the ECU to perform a corresponding action;
[0023] Send the control instruction to the ECU and obtain a test signal fed back by the ECU;
[0024] Generate a test report according to the test signal and send the test report to the browser side.
[0025] In a third aspect, the present application provides an ECU test system, including: a browser side and an ECU test device;
[0026] The browser side is configured to obtain a test script written by a user and send the test script to the ECU test device.
[0027] The ECU test device is configured to test the ECU to be tested according to the test script.
[0028] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method according to any one of the second aspect.
[0029] The ECU test device, test method and test system provided by the embodiments of the present application include: an MPU and an MCU, and the MPU is connected to the MCU through a serial port; the MPU is configured to obtain a test script sent by the browser side, parse the test script, obtain a control instruction and send it to the MCU, wherein the test script is written in the Python language; the MCU is configured to send the received control instruction to the ECU and send the test signal fed back by the received ECU to the MPU; the MPU is further configured to generate a test report according to the test signal and send the test report to the browser side. Through the cooperation of the MPU and the MCU, when the test script is received, the device can implement the test of the ECU. Compared with the existing test system, it is small in size, strong in versatility, the test script is written in the Python language, with high development efficiency, wide application range, and low professional requirements for testers. Description of the Drawings
[0030] Figure 1 is a schematic structural diagram of the ECU test device provided by the embodiment of the present application Figure 1 ;
[0031] Figure 2 is a schematic structural diagram of the ECU test device provided by the embodiment of the present application Figure 2 ;
[0032] Figure 3 is a schematic flow chart of the ECU test method provided by the embodiment of the present application;
[0033] Figure 4 is a schematic structural diagram of the ECU test system provided by the embodiment of the present application. Detailed Embodiments
[0034] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application.
[0035] In the embodiments of the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and effects, and their sequence is not limited. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, and "first", "second", etc. do not necessarily mean different.
[0036] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present application should not be construed as being more preferred or having more advantages than other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0037] Before introducing the embodiments of the present application, first, the background technology of the present application will be explained:
[0038] The ECU is one of the core electronic components of a vehicle and can be used to monitor the running state of the vehicle, such as braking, shifting, etc., and execute various control functions of the vehicle, such as steering, speed change, etc. Therefore, before the ECU leaves the factory, functional testing is an important means to ensure vehicle safety.
[0039] Currently, the testing of ECUs by mainstream manufacturers usually uses a functional automation testing system built with VECTOR boards. This system consists of an industrial control computer, a power supply board, a controller area network (CAN) communication board, a digital signal board, an analog signal board, a relay board, etc. The software and hardware environment is configured based on VECTOR's dedicated software, and test scripts are written using the communication access programming language (CAPL) to test the ECU.
[0040] However, the functional automation testing system built with VECTOR boards is large in size, expensive, and can only write test scripts based on the software environment authorized by VECTOR, and has relatively high requirements for the professionalism of testers.
[0041] In view of this, the present application proposes an ECU testing device, a testing method, and a testing system. The ECU testing device is small in size, has strong versatility, and the testing method is simple and easy to use, with relatively low requirements for the professionalism of testers.
[0042] The technical solution of the present application will be described in detail below with specific embodiments. These several specific embodiments can be implemented independently or in combination with each other. For the same or similar concepts or processes, they may not be repeated in some embodiments.
[0043] Figure 1 Structural schematic of the ECU test device provided by the embodiment of the present application Figure 1 , such as Figure 1 shown, the ECU test device 10 includes:
[0044] A microprocessor unit (MPU) 100 and a microcontroller unit (MCU) 200. Among them, the MPU 100 is connected to the MCU 200 through a serial port.
[0045] The MPU refers to a microprocessor that can execute data processing and control program operations, and can be obtained by integrating the CPU on a very large scale integrated circuit chip.
[0046] The MCU can also be called a single-chip microcomputer, which appropriately reduces the frequency and specifications of the CPU, and integrates interfaces such as memory, counter, USB, A / D conversion, etc. on a single chip to form a chip-level computer, which can provide different combined controls for different application scenarios.
[0047] The serial port, also known as the serial interface, is an extended interface that uses serial communication mode and can perform two-way data transmission.
[0048] In the embodiment of the present application, as Figure 1 shown, the ECU test device 10 is respectively connected to the ECU to be tested and the browser end. Among them, the browser end is used to provide a test script for testing the ECU to be tested, and the ECU test device 10 tests the ECU to be tested according to the test script provided by the browser end and generates a test report.
[0049] The browser end can be any terminal device that can provide browser services. For example, a computer, a mobile phone, a tablet, etc. The embodiment of the present application does not limit the specific manner of the browser end.
[0050] The test script refers to a series of instructions for a specific test. For example, testing the working current of the ECU in different states. These instructions can be executed by an automated test tool. The test script is written in the Python language according to the test case.
[0051] The test case refers to a description of the test task for a specific software or product, that is, the specific test plan, method, strategy, etc. of the product.
[0052] In the embodiments of the present application, the MPU 100 runs the Linux system. On this system, the MPU can be divided into the front end and the back end of the application layer. Based on the Bootstrap framework, the front end of the application layer designs a web interface through the cooperation of HTML, JavaScript, etc., and builds the front end using the MVC architecture. For the back end of the application layer, on the basis of Python, the Flask architecture is used to build the back end. Therefore, the browser side can be connected to the ECU test device 10 through the network, and the written test script can be imported into the ECU test device 10, so that the ECU test device 10 can test the ECU to be tested according to the test script.
[0053] Specifically, the MPU 100 is used to obtain the test script sent by the browser side, parse the test script to obtain control instructions, and send them to the MCU 200.
[0054] Parsing the test script means converting the test script into machine language that can be recognized by the MCU 200 and the ECU to be tested. For example, the test script is usually code written in Python, and parsing the test script is to compile the code written in Python into machine language.
[0055] Optionally, a test script may include multiple test instructions.
[0056] The MCU 200 is used to send the received control instructions to the ECU, and send the test signals fed back by the received ECU to the MPU 100.
[0057] The test signal refers to the signal generated after the ECU executes the control instruction. For example, when testing the lighting control function of the ECU, if the ECU successfully turns on the lighting control, it returns an "ON" to the MCU 200. If the lighting control is not turned on, it returns an "OFF" to the MCU 200.
[0058] After receiving the control instruction sent by the MPU 100, the MCU 200 can send the control instruction to the ECU through the peripheral module of the MCU 200. After receiving the control instruction, the ECU executes the corresponding action, and after the execution is completed, it feeds back the execution result to the MCU 200 in the form of a test signal. After receiving the test signal, the MCU 200 sends the test signal to the MPU 100 through the serial port.
[0059] The MPU 100 is also used to generate a test report according to the test signal and send the test report to the browser side.
[0060] A test report refers to a report used to show whether this function passes the test. For example, if the test signal is "ON", this test item is marked as "PASS"; if the test signal is "OFF", this test item is marked as "FAIL". After marking the test signal, a test report is generated.
[0061] After the MPU100 generates a test report based on the test signal, it sends the test report to the browser side so that the user can determine whether the ECU meets the requirements based on the test report on the browser side.
[0062] The ECU test device provided by the embodiment of the present application includes: an MPU and an MCU, and the MPU is connected to the MCU through a serial port; the MPU is used to obtain the test script sent by the browser side, parse the test script to obtain a control instruction and send it to the MCU, where the test script is written in the Python language; the MCU is used to send the received control instruction to the ECU and send the test signal fed back by the received ECU to the MPU; the MPU is also used to generate a test report based on the test signal and send the test report to the browser side. Through the cooperation of the MPU and the MCU, this device can implement the test of the ECU when receiving the test script. Compared with the existing test system, it is small in size, strong in versatility, and the test script is written in the Python language, with high development efficiency, wide application range, and low professional requirements for testers.
[0063] Next, based on the Figure 1 shown ECU test device, the ECU test device provided by the embodiment of the present application will be further described.
[0064] Figure 2 is the structural schematic Figure 2 of the ECU test device provided by the embodiment of the present application Figure 2 As shown, the ECU test device 10 includes:
[0065] The MPU100, the external module of the MPU100, the MCU200, and the peripheral unit of the MCU200.
[0066] The external module of the MPU100 includes:
[0067] A power input module 101, an Ethernet communication module 102, a WiFi communication module 103, a USB communication module 104, and a start / stop button module 105.
[0068] The peripheral unit of the MCU200 includes:
[0069] Current sampling unit 201, power output unit 202, adjustable voltage signal output unit 203, CAN bus unit 204, serial communication unit 205, resistance signal output unit 206, IO signal input / output unit 207, pulse width modulation (PWM) signal input / output unit 208, relay unit 209, and buzzer unit 210.
[0070] The power input module 101 can supply power to this device. The power input module 101 can be a DC power input module or an AC power input module. When the power input module 101 is a DC power input module, it can be a rechargeable battery or a disposable battery to reduce the requirements for the usage environment of this device. The specific implementation manner of the power input module in this application embodiment is not limited.
[0071] The MPU 100 can obtain the test script of the ECU under test from the browser side through the Ethernet communication module 102 or the WiFi communication module 103.
[0072] Optionally, the MPU 100 can also obtain the test script of the ECU under test through the USB communication module 104.
[0073] The start / stop button module 105 can be an electronic button for sending start or stop signals to the MPU 100 to start or stop the ECU test device 10.
[0074] After receiving the test script of the ECU under test, the MPU 100 parses the test script to obtain specific control instructions and sends the control instructions to the MCU 200.
[0075] The MCU 200 is connected to each peripheral unit of the MCU 200, and each peripheral unit of the MCU 200 is used to send the control instructions received by the MCU 200 to the ECU under test.
[0076] Specifically, the MCU 200 identifies the received control instructions, obtains the instruction type corresponding to the control instructions, and sends the control instructions to the corresponding peripheral unit according to the instruction type. After receiving the control instructions sent by the MCU 200, the peripheral unit of the MCU 200 sends the control instructions to the ECU under test. For example, when the MCU 200 identifies that the category of the control instruction is to test the PWM signal of the ECU under test, it sends the control instruction to the PWM signal input / output unit 208, and the PWM signal input / output unit 208 sends the control instruction to the ECU under test so that the ECU under test performs the corresponding actions according to the control instructions.
[0077] Optionally, each peripheral unit of the MCU 200 is further configured to receive a test signal fed back by the ECU under test and send the test signal to the MCU 200. For example, if the MCU 200 sends the control instruction to the ECU under test through the PWM signal input / output unit 208, the test signal fed back by the ECU under test is obtained through the PWM signal input / output unit 208.
[0078] Optionally, the MCU 200 is further configured to send the obtained test signal fed back by the ECU under test to the MPU 100, so that the MPU 100 generates a test report according to the test signal. The specific implementation manner of the MPU 100 generating a test report according to the test signal is Figure 1 similar to the implementation manner shown, and will not be elaborated here.
[0079] Optionally, the MPU 100 is further configured to send the test report to the client through the Ethernet communication module 102 and the WiFi communication module 103, so that the user can determine whether the ECU meets the requirements according to the test report on the browser side.
[0080] Optionally, the MCU 200 is further configured to verify the control instruction sent by the MPU 100, and send the control instruction to the ECU under test when the verification of the control instruction passes. This is to prevent the loss or tampering of the control instruction during data transmission.
[0081] Specifically, after obtaining the control instruction, the MPU 100 may calculate the control instruction using a verification algorithm to obtain a first verification value, and send the first verification value and the control instruction to the MCU 200. The verification algorithm may be a common verification algorithm, and the embodiments of the present application do not limit the verification algorithm.
[0082] After receiving the control instruction sent by the MPU 100, the MCU 200 calculates the control instruction using the same verification algorithm as the MPU 100 to obtain a second verification value. If the first verification value is the same as the second verification value, the control instruction passes the verification, and the control instruction is sent to the ECU under test.
[0083] If the first verification value is different from the second verification value, the control instruction fails the verification, and an error message may be fed back to the MPU 100. The MPU 100 may re-send the control instruction to the MCU 200 according to the received error message, or feed back the error message to the browser side.
[0084] Optionally, other verification methods may also be used for the MCU 200 to verify the control instruction sent by the MPU 100. For example, odd parity check, even parity check, sum check, CRC cyclic redundancy check, etc. The embodiments of the present application do not limit the verification method.
[0085] Optionally, if an error occurs during the test, the MCU 200 can emit a sound through the buzzer unit 210 to remind the user to check.
[0086] The ECU test device provided by the embodiments of the present application includes: an MPU, an MCU, an external module of the MPU, and an MCU peripheral unit. The MPU is connected to the MCU, the MPU is connected to the external module of the MPU, the MCU and the MCU peripheral unit. The ECU test device provided by the embodiments of the present application has the following advantages:
[0087] 1. The device has a simple structure, is small in size, easy to carry, and has a low cost. It can be equipped with one set for each test engineer or product engineer, improving the test verification efficiency.
[0088] 2. The MCU has a variety of peripheral units, can provide functional logics related to testing CAN message signals, and can also test hardwired interface signals, with richer functions and stronger applicability.
[0089] 3. The MPU is equipped with a WIFI module and an Ethernet module, and can be remotely controlled for test execution through a PC or a mobile phone, realizing 7x24-hour monitoring of the test execution situation at any time.
[0090] 4. It can receive and execute test scripts written in the Python language, with high development efficiency, wide application range, and strong scalability.
[0091] Based on the above ECU test device, the embodiments of the present application also provide an ECU test method.
[0092] Figure 3 It is a schematic flowchart of the ECU test method provided by the embodiments of the present application. The execution subject of the embodiments of the present application is the ECU test device, and the method includes:
[0093] S301. Obtain a test script sent by the browser end.
[0094] In the embodiments of the present application, the MPU in the ECU test device can obtain a test script for testing the ECU from the browser end through the external module of the MPU.
[0095] Optionally, the test script is written in the Python language according to test cases.
[0096] Optionally, the external module of the MPU includes an Ethernet communication module and a WiFi communication module.
[0097] Optionally, the external module of the MPU can also include a USB communication module, and the MPU can also obtain a test script through the USB communication module.
[0098] S302. Parse the test script to obtain control instructions.
[0099] In the embodiments of the present application, a control instruction refers to an instruction used to control the ECU to perform corresponding actions.
[0100] After obtaining the test script, the MPU can parse the test script to obtain control instructions for controlling the ECU.
[0101] Optionally, the MPU can also calculate the test script using a verification algorithm to obtain a first verification value.
[0102] S303. Send the control instructions to the ECU and obtain the test signals feedback by the ECU.
[0103] In the embodiments of the present application, the control instructions are sent to the ECU through the MCU in the ECU test device.
[0104] After obtaining the control instructions and the first verification value, the MPU can send the control instructions and the first verification value to the MCU through the serial port connected to the MCU. After receiving the control instructions and the first verification value, the MCU calculates the verification value of the control instructions using the same verification algorithm as the MPU to obtain a second verification value. After the first verification value and the second verification value are the same, the MCU identifies the control instructions to obtain the category of the control instructions.
[0105] The MCU sends the control instructions to the ECU through the corresponding external unit according to the category of the control instructions, and obtains the test signals feedback by the ECU according to the external unit.
[0106] S304. Generate a test report based on the test signals and send the test report to the browser side.
[0107] In the embodiments of the present application, after obtaining the test signals, the MCU can send the test signals to the MPU so that the MPU generates a test report according to the test signals.
[0108] Specifically, after receiving the test signals, the MPU marks the results of the test signals and determines whether the control instructions in the ECU test script are completed. If so, a test report is generated according to the test signals. If not, the next test is performed until the test is completed. And the test report is sent to the browser side.
[0109] Optionally, during the test, if there is a test that requires manual participation and it is confirmed, the test system can display a prompt window on the browser side for the tester to select and execute.
[0110] The ECU test method provided by the embodiment of the present application obtains a test script sent by the browser side, parses the test script to obtain control instructions, sends the control instructions to the ECU, obtains test signals fed back by the ECU, generates a test report according to the test signals, and sends the test report to the browser side. After obtaining the test script, the test script can be automatically executed and a test report can be generated, which can improve the efficiency of ECU testing.
[0111] Figure 4 It is a schematic structural diagram of the ECU test system provided by the embodiment of the present application. As Figure 4 shown, the ECU test system 40 provided in this embodiment may include:
[0112] A browser side 401 and an ECU test device 402.
[0113] The browser side 401 is used to obtain a test script written by a user and send the test script to the ECU test device.
[0114] The ECU test device 402 is used to test the ECU to be tested according to the test script, and its specific implementation manner may refer to the Figure 1 and Figure 2 shown embodiments. The implementation principle and technical effect are similar, and will not be elaborated here.
[0115] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the technical solutions of the above-mentioned ECU test method embodiment are implemented. The implementation principle and technical effect are similar, and will not be elaborated here.
[0116] In one possible implementation, the computer-readable medium may include random access memory (RAM), read-only memory (ROM), compact disc read-only memory (CD-ROM), or other optical disc storage, magnetic disk storage, or any other medium targeted at carrying or storing the required program code in the form of instructions or data structures and accessible by a computer. Moreover, any connection is properly termed a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. As used herein, magnetic disks and optical discs include optical discs, laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where magnetic disks typically reproduce data magnetically, while optical discs use lasers to optically reproduce data. Combinations of the above should also be included within the scope of computer-readable media.
[0117] In an embodiment of the present application, a computer program product is also provided, including a computer program, which implements the technical solutions of the above-described embodiment of the ECU test method when executed by a processor. The implementation principle and technical effects are similar and will not be elaborated herein.
[0118] In the specific implementation of the above terminal device or server, it should be understood that the processor may be a central processing unit (CPU for short), or other general-purpose processors, digital signal processors (DSP for short), application-specific integrated circuits (ASIC for short), etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in the processor.
[0119] Those skilled in the art can understand that all or part of the steps of any of the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium, and when the program is executed, all or part of the steps of the above method embodiments are executed.
[0120] If the technical solution of the present application is implemented in the form of software and sold or used as a product, it can be stored in a computer-readable storage medium. Based on such an understanding, all or part of the technical solution of the present application can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes a computer program or several instructions. This computer software product enables a computer device (which may be a personal computer, a server, a network device or a similar electronic device) to execute all or part of the steps of the method described in the embodiments of the present application.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A test device for an electronic control unit (ECU), characterized in that Including: A microprocessor MPU and a microcontroller MCU, where the MPU is connected to the MCU through a serial port; The MPU is used to obtain a test script sent by the browser side, parse the test script to obtain a control instruction, and send the control instruction to the MCU, where the test script is written in the python language; The MCU is used to send the received control instruction to the ECU, and send the test signal fed back by the received ECU to the MPU; The MPU is further used to generate a test report according to the test signal, and send the test report to the browser side; The device further includes a peripheral module, the peripheral module is connected to the MCU, and the peripheral module is used to send the control instruction to the ECU and obtain the test signal fed back from the ECU; The peripheral module includes at least one of the following peripheral units: an adjustable voltage signal output unit, a CAN bus, a serial communication unit, a resistance value signal output unit, an IO signal output unit, or a PWM signal output unit.
2. The device according to claim 1, wherein The device further includes a communication module, the communication module is connected to the MPU, and the communication module is used to receive the test script sent by the browser and send the test script to the MPU.
3. The device according to claim 2, characterized in that, The communication module includes at least one of the following communication units: an Ethernet communication unit, a WIFI communication unit, or a USB communication unit.
4. The device according to claim 1, characterized in that The peripheral module includes at least two peripheral units; The MCU is specifically used to send the control instruction to the peripheral unit corresponding to the instruction type according to the instruction type of the received control instruction.
5. The device according to claim 1, characterized in that, The MCU is further used to verify the control instruction, and when the control instruction passes the verification, send the control instruction to the ECU.
6. The device according to claim 5, characterized in that, The MCU is further specifically used for: Obtain a first verification value and a second verification value of the control instruction, where the first verification value is the verification value received by the MCU from the MPU, and the second verification value is obtained by the MCU calculating the control instruction according to a verification algorithm; If the first verification value is the same as the second verification value, the verification of the control instruction passes.
7. An ECU testing method for an electronic controller, using the device according to any one of claims 1-6, characterized in that, Including: Obtain a test script sent by the browser side, where the test script is written in the python language; Parse the test script to obtain a control instruction, where the control instruction is used to control the ECU to perform corresponding actions; Send the control instruction to the ECU and obtain the test signal fed back by the ECU; Generate a test report according to the test signal and send the test report to the browser side.
8. An electronic control unit (ECU) test system, characterized in that, Including a browser side and an electronic controller ECU test device according to any one of claims 1 to 6; The browser side is used to obtain a test script written by the user and send the test script to the electronic controller ECU test device.
Citation Information
Patent Citations
Vehicle-mounted equipment test method, device and system and computer equipment
CN112596972A