Vehicle controller test method, device, equipment, system and medium

By establishing data interaction between the upper computer and the server in ECU testing, remote control testing is implemented, the problem of low testing efficiency of existing ECUs is solved and the convenience and efficiency of testing is improved.

CN119396124APending Publication Date: 2025-02-07CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411532856.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The current ECU testing methods are relatively inefficient. Testers need to stick to the laboratory bench for testing, and the analysis of test data needs to be carried out after testing.

Method used

Remote control testing is realized by establishing data interaction between the upper computer and the server. The host computer responds to the test interface operation input by the user, sends a test case acquisition request to the server, receives and sorts the test cases, corrects the test script, and runs the test script to test it with the console to obtain the test results.

Benefits of technology

It improves the convenience and efficiency of vehicle controller testing, realizes remote testing operations, reduces on-site participation of testers, and improves the flexibility and automation of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396124A_ABST
    Figure CN119396124A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle controller test method, device, equipment, system and medium, in the method, data interaction between an upper computer end and a server end is established, for an upper computer, input operation of a user for a vehicle controller test interface is responded, and a test case obtaining request is sent to a server; receiving a plurality of target test cases returned by the server; according to a preset execution sequence, sorting and assembling the plurality of target test cases to generate a first test script; according to test parameters input by the user and a preset mapping relation, correcting the first test script to generate a second test pin; and operating the second test script, controlling the target rack to test the to-be-tested vehicle controller corresponding to the target rack, and obtaining a test result. According to the technical scheme, remote accurate testing of the vehicle controller is achieved, and the efficiency and flexibility of testing of the vehicle controller are improved.
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 controller testing, and in particular to a vehicle controller testing method, device, equipment, system and medium. Background Art

[0002] The electronic control unit (ECU) is the core electronic component of the vehicle and can be used to monitor the vehicle status and perform various vehicle control functions. With the continuous development of automobiles, the functions of automobiles are increasing, and there are also more and more ECUs with more functions. Therefore, it is an important means to ensure vehicle safety when verifying the functions and performance of the ECU before it is integrated into the vehicle.

[0003] At present, for ECU testing, testers mainly build automated test solutions for stand-alone systems based on the Hardware-in-the-Loop (HIL) bench, write different automated test scripts, and need to stay in front of the bench in the laboratory during testing. After the test, the test results are analyzed based on the test data.

[0004] In summary, the existing ECU testing method has low testing efficiency. Summary of the invention

[0005] The present invention provides a vehicle controller testing method, device, equipment, system and medium, which realize the function of remote control testing of the vehicle controller and improve the convenience and efficiency of the vehicle controller testing.

[0006] In a first aspect, the present invention provides a vehicle controller testing method, which is applied to a host computer, and the method comprises:

[0007] In response to the user's input operation on the vehicle controller test interface, a test case acquisition request is sent to the server, the test case acquisition request is used to obtain the target test case corresponding to the target bench information and the test requirement information, and the vehicle controller test interface is displayed through the browser;

[0008] Receive multiple target test cases returned by the server;

[0009] Sorting and assembling multiple target test cases according to a preset execution order to generate a first test script;

[0010] According to the test parameters input by the user and the preset mapping relationship, the first test script is modified to generate a second test script, and the preset mapping relationship is used to represent the association relationship between the test bench, the observation name and the variable name in the test case;

[0011] Run the second test script, control the target test bench to test the to-be-tested vehicle controller corresponding to the target test bench, and obtain the test result.

[0012] Optionally, according to the test parameters input by the user and the preset mapping relationship, the first test script is modified to generate a second test script, including:

[0013] According to the test parameters input by the user, the first test script is modified to generate a third test script;

[0014] According to the preset mapping relationship and the target test bench, the target variable name in the third test script is associated with the target observation name of the corresponding target test bench to generate a second test script.

[0015] Optionally, running the second test script to control the target test bench to test the vehicle controller to be tested corresponding to the target test bench and obtaining the test result includes:

[0016] Run the second test script through the target thread;

[0017] Through the target test software, the target test bench is controlled to test the vehicle controller to be tested and obtain the test results;

[0018] Among them, different threads can process their respective tasks concurrently.

[0019] Optionally, before running the second test script, controlling the target test bench to test the vehicle controller to be tested corresponding to the target test bench, and obtaining the test result, the method further includes:

[0020] Receive the rack configuration returned by the server;

[0021] Configure the target gantry according to the gantry configuration.

[0022] Optionally, the method further comprises:

[0023] Upload a heartbeat packet to the server. The heartbeat packet is used to indicate the online status of each test bench, the test software corresponding to each test bench, and the vehicle controller to be tested corresponding to each test bench.

[0024] Optionally, the method further comprises:

[0025] Send the test results to the server.

[0026] In a second aspect, the present invention provides a vehicle controller testing method, which is applied to a server, and the method comprises:

[0027] Obtaining a test case acquisition request sent by the host computer, the test case acquisition request is used to obtain target test cases corresponding to target test bench information and test requirement information, the test case acquisition request is generated in response to a user input operation on a vehicle controller test interface, and the vehicle controller test interface is displayed through a browser of the host computer;

[0028] According to the target bench information and test requirement information, multiple target test cases are obtained;

[0029] Send multiple target test cases to the host computer, so that the host computer controls the target test bench to test the vehicle controller to be tested corresponding to the target test bench through the multiple target test cases, and obtains the test results.

[0030] Optionally, the method further comprises:

[0031] Determine the rack configuration according to the target rack information;

[0032] Send the gantry configuration to the host computer.

[0033] Optionally, send a target test case to the host computer, including:

[0034] Receive the heartbeat packet uploaded by the host computer. The heartbeat packet is used to indicate the online status of each test bench, the test software corresponding to each test bench, and the vehicle controller to be tested corresponding to each test bench;

[0035] If the heartbeat packet indicates that the target test bench, the target test software and the vehicle controller to be tested corresponding to the target test bench are all in an online state, multiple target test cases are sent to the host computer.

[0036] In a third aspect, the present invention provides a vehicle controller test device, which is applied to a host computer, and the device includes:

[0037] A request sending module, used to send a test case acquisition request to a server in response to a user's input operation on a vehicle controller test interface, wherein the test case acquisition request is used to acquire target test cases corresponding to target test bench information and test requirement information, and the vehicle controller test interface is displayed through a browser;

[0038] A receiving module is used to receive multiple target test cases returned by the server;

[0039] A first test script generation module, used to sort and assemble multiple target test cases according to a preset execution order to generate a first test script;

[0040] A second test script generation module is used to modify the first test script and generate a second test script according to the test parameters input by the user and the preset mapping relationship, wherein the preset mapping relationship is used to represent the association relationship between the test bench, the observation name and the variable name in the test case;

[0041] The test result acquisition module is used to run the second test script, control the target test bench to test the vehicle controller to be tested corresponding to the target test bench, and obtain the test result.

[0042] In a fourth aspect, the present invention provides a vehicle controller testing device, which is applied to a server, and the device comprises:

[0043] A first acquisition module is used to acquire a test case acquisition request sent by a host computer, the test case acquisition request is used to acquire target test cases corresponding to target test bench information and test requirement information, the test case acquisition request is generated in response to a user input operation on a vehicle controller test interface, and the vehicle controller test interface is displayed through a browser of the host computer;

[0044] The second acquisition module is used to acquire multiple target test cases according to the target test bench information and the test requirement information;

[0045] The sending module is used to send multiple target test cases to the host computer, so that the host computer controls the target test bench to test the vehicle controller to be tested corresponding to the target test bench through the multiple target test cases, and obtains the test results.

[0046] In a fifth aspect, the present invention provides a host computer, comprising: a processor, and a memory communicatively connected to the processor;

[0047] Memory stores computer-executable instructions;

[0048] The processor executes the computer-executable instructions stored in the memory to implement any method of the first aspect.

[0049] In a sixth aspect, the present invention provides a server, comprising: a processor, and a memory communicatively connected to the processor;

[0050] Memory stores computer-executable instructions;

[0051] The processor executes the computer-executable instructions stored in the memory to implement any method of the second aspect.

[0052] In a seventh aspect, the present invention provides a vehicle controller test system, comprising a host computer, a server, and at least one test bench;

[0053] The host computer is used to implement the vehicle controller testing method as described in any one of the first aspects;

[0054] The server is used to implement a vehicle controller testing method as described in any one of the second aspects.

[0055] In an eighth aspect, the present invention proposes a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, they are used to implement a vehicle controller testing method as described in any one of the first and second aspects.

[0056] The present invention proposes a vehicle controller testing method, device, equipment, system and medium. The method establishes data interaction between a host computer and a server. For the host computer, in response to a user input operation on a vehicle controller test interface, a test case acquisition request is sent to the server; multiple target test cases returned by the server are received; multiple target test cases are sorted and assembled according to a preset execution sequence to generate a first test script; the first test script is modified according to the test parameters input by the user and a preset mapping relationship to generate a second test script; the second test script is run to control the target test bench to test the vehicle controller to be tested corresponding to the target test bench to obtain the test results. By obtaining multiple test cases from the server, automatically sorting and modifying the test script, the test script is made to better meet the user's test requirements, and accurate remote test operations are achieved, which improves the convenience and efficiency of vehicle controller testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 A schematic diagram of the architecture of a vehicle controller test system provided by the present invention;

[0058] Figure 2 A schematic diagram of the architecture of a host computer in a vehicle controller test system provided by the present invention;

[0059] Figure 3 A schematic flow chart of a first embodiment of a method for testing a vehicle controller provided by the present invention;

[0060] Figure 4 A schematic flow chart of a second embodiment of a method for testing a vehicle controller provided by the present invention;

[0061] Figure 5 A schematic flow chart of a third embodiment of a vehicle controller testing method provided by the present invention;

[0062] Figure 6 A schematic structural diagram of a first embodiment of a vehicle controller testing device provided by the present invention;

[0063] Figure 7 A schematic diagram of the structure of a second embodiment of a testing device for a vehicle controller provided by the present invention;

[0064] Figure 8 A schematic diagram of the structure of a host computer provided by the present invention;

[0065] Fig. 9 A schematic diagram of the structure of a server provided by the present invention. DETAILED DESCRIPTION

[0066] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.

[0067] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0068] With the continuous development of the automobile industry, automobiles have more and more functions, and ECUs have integrated more and more functions. Therefore, in order to ensure that the performance of the automobile meets the requirements, it is necessary to verify the functions and performance of the vehicle controller unit ECU of the automobile to ensure that the automobile can be safely allowed.

[0069] At present, the testing method for ECU is mainly based on the automated testing solution of the stand-alone system built on the HIL bench. Testers write different automated testing scripts according to each HIL bench, and need to stay in front of the bench in the laboratory during the test. After the test, the test results are analyzed based on the test data. The testing efficiency and flexibility are low.

[0070] In view of the above technical problems, the inventors realized that it was necessary to propose a remote control test method to solve the problem that testers need to stay in front of the test bench. Based on this, the inventors thought that the remote sorting of test scripts and the remote calling of test benches can be realized through information interaction between the host computer and the server, so as to remotely control different benches to test and verify ECUs, and remotely analyze test results, thereby improving the testing efficiency and flexibility of ECUs.

[0071] Figure 1 The schematic diagram of the structure of the vehicle controller test system provided by the present invention is as follows. Figure 1As shown, the test system of the vehicle controller includes a host computer, a server, a HIL bench and an ECU to be tested.

[0072] Among them, the server includes an application layer and a service layer. The application layer includes a loading module, a case editing module, a workbench module, a step management module, an application programming interface (API) management module, a test report module, a test configuration module, a bench configuration module, a file management module, a resource management module, and a permission management module. The service layer includes a storage module, a parsing module, an encryption module, a packaging module, a communication module, etc. The service layer mainly serves as a storage database for test cases, providing test case support for various test tasks required by users, including saving various resources, such as model files, bus database files, mapping files, global constant files, device data, tool data, and providing various basic services.

[0073] The host computer mainly includes the host computer layer and the execution framework layer. The host computer layer includes the heartbeat service module, configuration loading module, message transmission module, file storage module and debugging module. The host computer layer is connected to the server, and can provide the heartbeat service of the host computer and test bench status to the server in real time, and feedback the user's test request and test structure to the server in real time.

[0074] The execution framework layer includes the overall control layer and the functional logic layer. The overall control layer includes the test engine module, RPC Server management module, RPC Server startup module, control instruction transmission module, heartbeat management module and test data upload module. The functional logic layer includes the test step management module, test report module, signal management module, test variable module, test project module, test parameter module, tracking analysis module, external extension module, device management module, configuration management module, mapping management module and test script module.

[0075] Figure 2 The schematic diagram of the architecture of the host computer in the vehicle controller test system provided by the present invention. Figure 2 As shown, in Figure 1 On this basis, between the overall control layer and the functional logic layer of the host computer, there may also be an XML-Remote Procedure Call (RPC) client (English: Client) layer and an XML-RPC client (English: Server) layer.

[0076] Specifically, the overall control layer is used to report the status of the host computer to the server through the heartbeat management module. Among them, the RPCServer management module is responsible for program exception management and process daemonization of the XML-RPC Server to ensure that the XML-RPC Server runs normally without being disconnected. After the first run or XML-RPC Server exception, the RPC Server startup module is called to run the XML-RPC Server. The test engine module is responsible for starting the corresponding test case and controlling the test process. It is responsible for managing the control instruction transmission module and the test data upload module. The control instruction transmission module is used to transmit the test instructions obtained from the server to the HIL bench or the ECU under test, and analyze the instruction data returned by the HIL bench or the ECU under test to generate test data and test results. The test data upload module uploads the test result data, test log information and test report generated by the test to the server for storage for viewing and analysis.

[0077] The XML-RPC Client layer is used to establish a service connection, assemble a service request message and send it to the XML-RPC Server layer, and receive response data from the XML-RPC Server layer. Among them, the service connection module in the XML-RPC Client layer establishes a service request and sends a service request to the XML-RPC Server layer. Specifically, the service connection module sets the service request Internet Protocol (IP) and port, establishes a service request agent, and initiates a service request to the XML-RPC Server layer according to demand. Further, the request data assembly module assembles the corresponding service request message according to the test instructions of the overall control layer and the test sequence data, and then transmits the service request message to the service connection module, and initiates a test service request to the XML-RPC Server layer through the service connection module. Finally, the response data processing module monitors the XML-RPC Server layer, receives the service response data from the XML-RPC Server layer, performs data analysis and result processing on the response data, and finally sends the processed data and test results to the server.

[0078] It should be understood that the service connection module, the request data assembly module and the response data processing module are modules deployed in the XML-RPC Client layer.

[0079] The XML-RPC Server layer is used to register the test function sequence as a functional service and realize the multi-threaded and multi-tasking test service. It receives the test instructions from the XML-RPC Client and converts the instructions into the test functions of the functional logic layer, and responds the test results, test data and test reports to the XML-RCP Client layer. Among them, the service registration module registers it as an XML-RPC Server service according to the test sequence and test management function provided by the functional logic layer. The XML-ServerClient layer will make a remote call based on the registered XML-RPC Server service, realizing the remote verification function of the ECU. The service configuration module reads the set service configuration information (such as service IP and port) from the configuration file, initializes the service according to the read configuration information, and realizes the configuration deployment. Then, the multi-thread control module realizes a task thread pool, divides different tasks into different business threads and processes them concurrently, and improves the efficiency of ECU remote verification. Finally, the service operation module receives the test instructions from the XML-Server Client layer, and then starts running the registered service functions and service sequences according to the received instructions, and starts the ECU remote verification test process.

[0080] The service registration module, service configuration module, multi-thread control module and service operation module are modules deployed in the XML-RPC Server layer.

[0081] The functional logic layer is used to perform tests according to the test instructions received from the XML-RPC Server, mobilize the HIL bench and the ECU under test, analyze the test data, obtain the ECU remote verification test results, and assemble the test results and test data into a test report, and send the test data to the server through the XML-RPC Server. Specifically, the test step module provides the test steps required for the ECU verification test. The functional logic layer will correspond to the test sequence and test instructions issued by the server to the test step sequence provided by the test step module, and assemble them into test scripts to provide verification tests. Then, the test project module combines the test scripts formed in the previous step into a test suite (English: SUITE), fills in the assembly test parameters, and quantitatively manages the test parameters. Then, according to the configuration management information, the test script is selected for batch ECU remote verification testing. Secondly, since the observation information of different HIL benches is different, but they have the same function, the mapping management module establishes an association between the observations of different HIL benches and the standard test variable names, and applies them in the test sequence script. Through such a mapping relationship, the same set of test sequence scripts can be used for verification tests on different HIL benches, that is, the unified and reasonable use of different HIL benches and different test resources improves the utilization rate of HIL benches and test resources. After the ECU remote verification test is started, a large amount of test data and test results will be generated. The tracking and analysis module will analyze and process the generated test data and test results, and then send the analyzed test data and test results to the test report module. The test report module generates the corresponding test report based on these test data and test results. In the actual ECU remote verification test, since it is difficult to fully take into account the test functions required by all users, an external extension module is provided. The external extension module can use a third-party development language to develop a new test function sequence, supplement the existing test function sequence, and improve the test function sequence.

[0082] Based on the above analysis and explanation of each module in the host computer, the process of remote testing of the vehicle controller can be as follows: (1) The server starts the ECU remote verification program. (2) The host computer reports the host computer status (including the HIL test bench, the ECU under test and the host computer software) to the server according to the heartbeat management module in the overall control layer. (3) If the host computer (including the HIL test bench, the ECU under test and the host computer software) is online, the server starts the test engine. (4) The test engine module in the overall control layer starts the operation verification service through the RPC Server management module and the RPC Server startup module, and sends the test sequence script and test instructions. (5) The control instruction transparent transmission module receives the test instructions sent from the server and transparently transmits them to the XML-RPCClient layer. (6) The XML-RPC Client layer obtains the service IP and port through the configuration management module, establishes a service connection with the XML-RPCServer layer, and sends the test instruction assembly layer request message to the XML-RPC Server layer to initiate a test request. (7) The test function steps in the test sequence are provided by the functional logic layer. After receiving the startup test sequence script, the functional logic layer maps the test sequence script to specific test steps through the mapping management module to perform ECU function verification. (8) The test verification process involves observations of different test benches. The mapping management module will establish an association relationship between the observations of different HIL test benches and the same observation name, and map the observation path according to the same observation name in the running test sequence. (9) The equipment management module performs data operation verification tests on different HIL test benches, test equipment and ECUs under test according to the test sequence. (10) The tracking and analysis module collects and analyzes the test data and test results, obtains the verification results, and generates a test report. (11) The test report module sends the generated test report to the server for storage through the data upload module, completing the ECU remote verification closed loop.

[0083] Figure 3 FIG. 1 is a flow chart of a first embodiment of a method for testing a vehicle controller provided by the present invention. Figure 3 As shown, applied to a host computer, the method includes:

[0084] S301. In response to a user input operation on a vehicle controller test interface, a test case acquisition request is sent to a server.

[0085] In this step, when the user needs to remotely test the vehicle controller, the target bench information and test case requirement information can be determined according to the needs of the test scenario, and then the target bench information and test case requirement information can be entered in the test interface of the vehicle controller. After that, the host computer can send a test case acquisition request to the server side based on the above information.

[0086] The purpose of the test case acquisition request is to obtain the target test case that matches the current test bench configuration and test requirements; the target test case refers to a standardized document used to guide the test operation, which defines the test process and steps. The target test bench information refers to the specific hardware or simulation test bench information, such as the model, specifications and connection method of the test bench; the test requirement information refers to the function or performance requirements that the user wants to test, which may include specific test scenarios, conditions and operating parameters that the controller needs to go through.

[0087] S302: Receive multiple target test cases returned by the server.

[0088] For the server, it will determine whether there is a corresponding target test case based on the test case acquisition request sent by the host computer. For example, based on the use case information, test bench configuration information, test configuration information, mapping information and global variable information selected by the user, it will query each test case in its own storage module to determine the target test case corresponding to the user's test case query request, and return the target test case to the host computer.

[0089] Among them, the target test case returned by the server to the host computer includes specific test steps and required resources.

[0090] For the host computer, it receives multiple target test cases returned by the server.

[0091] S303: Sort and assemble multiple target test cases according to a preset execution order to generate a first test script.

[0092] During the test process, there may be execution order requirements for multiple target test cases. In order to ensure the smooth progress of the test process, it is necessary to sort the received multiple target test cases according to the preset execution order. Among them, the preset execution order may be formed based on the dependency relationship between the test cases. For example, a certain target test case may need to be tested after other target test cases are executed. After sorting the target test cases, the upper computer will assemble the sorted target test cases into a complete test script, that is, the first test script, which contains the execution order of multiple target test cases to ensure that the subsequent automated testing can be carried out according to the above execution order.

[0093] It should be understood that the preset execution sequence is used to define the execution sequence between different test cases and different test steps, which needs to be consistent with the actual business process.

[0094] In a possible implementation, the functional logic layer of the host computer itself includes a test step module, which can provide a test function, assemble various target test cases obtained from the server into a test sequence, and generate a first test script.

[0095] S304: According to the test parameters input by the user and the preset mapping relationship, the first test script is modified to generate a second test script.

[0096] In this step, after the user observes each target test case in the vehicle controller test interface, he needs to enter specific test parameters in the above vehicle controller test interface according to the specific test requirements, such as the initial values ​​of certain variables, test boundary conditions, running time, etc. These test parameters are the key to further customize the test script.

[0097] In addition, the functional logic layer of the upper computer itself includes a mapping management module. Since the observation names of different test bench devices are different but have the same functions, a set of mapping rules are pre-defined in the mapping management module to define the mapping relationship between the test bench, the observation name of the test bench, and the variable name in the test case. This mapping relationship ensures that the test script can interact with the test bench correctly, realizes the unified and reasonable use of different test bench devices and different test resources, and improves the utilization rate of test bench equipment and test resources.

[0098] Among them, the test bench refers to the hardware facility for performing tests, including a physical test bench or a simulation test bench; the name of the observation quantity refers to the specific information or measurement point that needs to be observed on the test bench, such as sensor data, controller output voltage and current, etc.

[0099] The variable names in the test case refer to the variable names used in the test script.

[0100] Furthermore, in a specific implementation, the first test script can be modified according to the test parameters input by the user to generate a third test script. After that, according to the preset mapping relationship and the target test bench, the target variable name in the third test script is associated with the target observation name of the corresponding target test bench to generate a second test script.

[0101] In this step, the functional logic layer of the host computer itself includes a test project module. The host computer will combine multiple separate test scripts into an overall test SUITE according to the requirements in the test project module. The test SUITE refers to a collection of multiple test scripts, which is usually used for batch execution and management of complex test scenarios.

[0102] Specifically, for the host computer, the relevant test scripts will be combined into a complete test SUITE according to the test requirements and the requirements of the management module. For example, for different functional modules of the vehicle controller ECU, the corresponding functional test scripts will be assembled into the same SUITE for centralized management and batch execution. Among them, the test SUITE, as a complete set, can run all related test scripts at once, reducing the complexity of executing scripts one by one.

[0103] Then, after the test SUITE is assembled, the test parameters of each script will be further configured and managed, including: (1) Filling in the assembled test parameters: When the user enters the test requirements in the vehicle controller test interface, it is usually necessary to define some key test parameters, such as the input signal range of the ECU, the boundary conditions in the test scenario, and the time control parameters. Each test script in the test SUITE may have different parameter requirements, so at this stage the user will fill in the specific test parameters in the vehicle control test interface to ensure that each test script has accurate input. (2) Parameter quantification management: When the test parameters entered by the user are determined, the test project management module in the host computer will quantify these parameters. Quantification management refers to converting the test parameters entered by the user into specific values ​​or ranges to ensure that these parameters are standardized during execution. For example, if a test scenario needs to simulate temperature changes, the user may enter parameters from 30° to 80°. At this time, it will be quantified into specific temperature change values ​​in different test stages, and the application of the parameters will be automatically adjusted in the script. By quantitatively managing these parameters, we can ensure that in batch testing, each test script can be run based on the correct input parameters, avoiding manual input errors or inconsistent configurations.

[0104] In addition, the preset mapping relationship can ensure that the variables in the test script can be automatically associated with the actual hardware test point or the control end of the test bench. For example, the "sensorTemperature" variable in the script may correspond to a temperature sensor on the test bench, and the host computer associates it with the specific sensor ID (such as "temperatureSensor01") on the test bench through the mapping relationship. Then, the third test script is automatically corrected according to the mapping relationship, and the variable name in the script is replaced with the actual name associated with the target test bench and the observation name, and finally the second test script is generated.

[0105] S305 , running the second test script, controlling the target test bench to test the to-be-tested vehicle controller corresponding to the target test bench, and obtaining the test result.

[0106] In this step, after generating the second test script, the host computer will run the second test script. The running process includes: passing the test instructions in the second test script to the target test bench, and then executing the corresponding test tasks through the target test software. Specifically, the target test bench will perform various tests on the vehicle controller according to the second test script, including simulating operating conditions, executing control instructions, and collecting controller outputs. After the test is completed, the host computer will collect sensor data, controller responses, and other test output information from the test bench to form a complete test result.

[0107] Furthermore, before S305, the rack configuration returned by the server may be received, and then the target rack is configured according to the rack configuration.

[0108] Before executing the second test script, it is necessary to ensure that the configuration of the target test bench matches the requirements defined in the test script. Therefore, after generating and modifying the test script, the host computer sends a request to the server, asking the server to return the test bench configuration information. The test bench configuration information includes hardware connection information, communication protocol and interface information, specific configuration of the test bench equipment, and software version or solid configuration information.

[0109] For the server, the server will analyze the corresponding target test bench configuration requirements based on the user's test requirements uploaded by the host computer, and send detailed test bench configuration information to the host computer to ensure that the host computer can correctly configure the test bench.

[0110] After receiving the test bench configuration information returned by the server, the host computer will automatically configure the target test bench based on this information, including: initializing the equipment on the target test bench, including starting the sensor, preparing the actuator, etc. According to the communication protocol and interface requirements, set up the communication channel between the test bench and the vehicle controller. Perform necessary calibration on the sensors and actuators on the test bench to ensure that the sensors can correctly collect data and the actuators can work correctly as required. Check the health status of the test bench hardware to confirm that each device is well connected and there are no errors or warnings.

[0111] After the test bench configuration is completed, the host computer will check the test bench status to ensure that all devices are configured correctly, the communication channels are normal, and the hardware devices are in working condition. Once the test bench configuration is completed and passes the inspection, the host computer is ready to execute the next step, that is, run the second test script to test the vehicle controller.

[0112] It should be understood that the server may also send down the test bench configuration while returning multiple target test cases to the host computer.

[0113] Furthermore, the test results may also be sent to the server.

[0114] After the host computer executes the second test script, it generates a test report, obtains the verification test results, and uploads the test data, test results and test reports to the server to complete the ECU verification test closed loop. Through ECU remote verification, the utilization rate of the test bench and test resources is effectively improved, the test efficiency is greatly improved, and the test scripts are reduced.

[0115] In the above embodiment, the user inputs the target bench and test requirement information through the vehicle controller test interface of the host computer, so that the host computer sends a request containing the bench information and test requirements to the server, and obtains multiple target test cases returned by the server; then sorts each target test case according to the preset execution order, and corrects and updates it according to the parameters entered by the user and the preset mapping relationship, and generates an accurate second test script; finally, executes the second test script, controls the bench for testing, and collects the test results. By obtaining multiple test cases from the server, automatically sorting and correcting the test script, and performing accurate remote testing operations, the accuracy and flexibility of the vehicle controller test are improved, and the close integration between the test and the actual bench equipment is ensured through the preset mapping relationship.

[0116] Figure 4 FIG. 2 is a flow chart of a second embodiment of the vehicle controller testing method provided by the present invention. Figure 4 As shown, based on the previous embodiment, for the server, multiple target test cases are sent to the host computer. The method includes:

[0117] S401, receiving the heartbeat packet uploaded by the host computer.

[0118] In this step, the heartbeat packet refers to a small data packet that the host computer regularly sends to the server, and the purpose is to indicate the state of the current host computer. Specifically, the overall control layer of the host computer includes a heartbeat management module, which is used to indicate the state of each test bench, the state of the test software corresponding to each test bench, and the state of the vehicle controller to be tested corresponding to each test bench. Among them, the test bench state is used to indicate whether the physical test bench connected to the host computer is in an online state, whether it can run normally, and whether the test task can be performed. The test software state is used to indicate whether the test software for controlling the test bench and executing the test has been started and is in a state where the test can be performed. Specifically, the test software may be an interactive tool between the control vehicle controller and the test bench. The vehicle controller state is used to indicate whether the vehicle controller to be tested has been connected to the target test bench and is in a working or test state.

[0119] For example, for the host computer, the heartbeat management module in the overall control layer of the host computer will send a heartbeat packet to the server at a certain time interval (for example, every 10 seconds). This process can ensure that the host computer can continuously monitor the state changes of the test equipment. For the server, after receiving the heartbeat packet sent by the host computer, the server will update the current status of each test bench, test software and vehicle controller connected to the host computer in real time.

[0120] S402: If the heartbeat packet indicates that the target test bench, the target test software, and the vehicle controller to be tested corresponding to the target test bench are all in an online state, multiple target test cases are sent to the host computer.

[0121] In this step, after receiving the heartbeat packet sent by the host computer, the server will parse the information in the heartbeat packet, including: (1) The online status of the target test bench: confirm whether the physical equipment of the test bench is correctly connected, whether it is in the state to be tested, and whether the hardware is working properly. (2) The online status of the test software: check whether the test software has been started and can interact with the test bench and vehicle controller to ensure that the test process can be carried out correctly. (3) The online status of the vehicle controller: confirm whether the vehicle controller to be tested is connected to the test bench and can receive instructions from the test bench. Then a logical judgment is made. If the information in the heartbeat packet shows that the target test bench, test software and vehicle controller are all online, the server will prepare to send multiple target test cases to the host computer.

[0122] After the server confirms that the test bench, test software and vehicle controller are all online, the server will extract multiple target test cases that match the current test requirements from its own storage module. Among them, the server's storage module mainly contains two resource libraries, one is a personal resource library, and the other is a public resource library. The public resource library contains common test case resources and test cases, which are applicable to all users. These resources are usually basic resource components shared by multiple users; the personal resource library is associated with the user ID, and contains the test case resources and test cases uploaded or previously created by the user. These test case resources may be more personalized and applicable to the user's specific test needs. After receiving the "test case acquisition request" sent by the host computer, the server first performs a query operation in the public resource library and the personal resource library. After determining the target test cases that match the test case acquisition, the target test cases are packaged and sent to the host computer.

[0123] After receiving these target test cases, the host computer will prepare to batch test the vehicle controller according to the instructions in the target test cases. During the execution process, the host computer will interact with the test bench and vehicle controller through the test software, execute the instructions in the test cases, and obtain the test results according to the response of the vehicle controller.

[0124] In addition, if any device in the test bench, test software and vehicle controller is not online, the server will not send the target test case to the host computer, but wait for the next heartbeat packet to re-judge.

[0125] The vehicle controller testing method provided in the above embodiment sends a heartbeat packet containing online status information of the test bench, test software and vehicle control to the server through the host computer, so that the server can parse the various status information in the heartbeat packet and determine whether the target test bench, test software and vehicle controller are online. If all three devices are online, the server will select multiple target test cases that match the test requirements currently input by the user from its own storage module, and package each target test case and send it to the host computer, so that the host computer performs batch testing, realizes remote batch testing of vehicle controllers, improves the degree of automation of the test, and ensures the reliability and accuracy of the test process. It is suitable for batch and remote vehicle controller (ECU) testing environments.

[0126] Figure 5 FIG. 1 is a flow chart of the third embodiment of the vehicle controller testing method provided by the present invention. Figure 4 As shown, based on the first embodiment, the second test script is run to control the target test bench to test the vehicle controller to be tested corresponding to the target test bench, and the test result is obtained. The method also includes:

[0127] S501. Run the second test script through the target thread.

[0128] In this step, the target thread refers to the process of executing the second test script, and different test tasks or steps are assigned independent threads to improve the execution efficiency of the test. Among them, different target threads can process their respective tasks concurrently. The multi-threaded method can realize multi-task concurrent processing, allowing multiple test tasks to be carried out simultaneously without disturbing each other. Specifically, when the host computer allows the second test script to be executed, different tasks in the second test script (such as different test steps, sensor monitoring, actuator control, etc.) can be assigned to different threads for execution. For example, one thread can focus on applying test conditions to the input signal of the vehicle controller, another thread can concurrently collect the output data of the vehicle controller or monitor other hardware tests on the target bench, and other threads can copy and record data, monitor abnormal conditions, or control the logical order of the test process.

[0129] Optionally, the target thread may execute the tasks corresponding to the second test script, and other threads may execute other tasks at the same time, so that the concurrent execution of the test task and other tasks can be effectively guaranteed.

[0130] Through multi-threaded parallel processing, different test tasks can be executed simultaneously, thus shortening the overall test time and effectively utilizing test resources, especially the capabilities of processors and bench equipment, thereby improving the performance of the test process.

[0131] S502: Control the target test bench to test the vehicle controller to be tested through the target test software and obtain the test results.

[0132] In this step, the target test software is a tool responsible for executing the test script, which can interact with the interface of the test bench and vehicle controller to execute the instructions in the test script and control the entire test process. Specifically, the target test software can send control signals to the target test bench according to the steps in the second test script, and obtain real-time data from the target test bench or vehicle controller.

[0133] Exemplarily, the target test software converts the instructions of the second test script into specific operation instructions, and controls the target test bench through a physical interface. For example, a simulation signal is sent to the target test bench to simulate the permitted environment of the vehicle; the output signal of the vehicle controller is collected in real time through the sensor of the target test bench to detect its response; a specific load or pressure is applied through the actuator of the target test bench to observe the reaction of the vehicle controller. Finally, the target test software can obtain test result data from the target test bench and the vehicle controller, such as the output signal of the vehicle controller (such as voltage, current and status bit, etc.), the response time and output characteristics of the vehicle controller under different input conditions, and the feedback data of the sensors or actuators on the test bench. At the same time, these result data will be recorded in real time, and can be processed and saved concurrently in a multi-threaded manner to ensure the integrity and accuracy of the data.

[0134] The vehicle controller test method provided in the above embodiment allows the host computer to test the target test bench and vehicle controller with higher efficiency and flexibility when running the second test script through multi-threaded concurrent processing. Different threads independently handle their respective tasks and execute test scripts concurrently, ensuring the real-time performance of the test and the accuracy of data processing, greatly improving the automation level and execution efficiency of the test process.

[0135] Figure 6 This is a schematic diagram of the structure of the first embodiment of the vehicle controller test device provided by the present invention. Figure 6 As shown, the vehicle controller test device 60 is applied to a host computer and includes:

[0136] The request sending module 601 is used to send a test case acquisition request to the server in response to the user's input operation on the vehicle controller test interface. The test case acquisition request is used to obtain the target test case corresponding to the target test bench information and the test requirement information. The vehicle controller test interface is displayed through the browser.

[0137] The receiving module 602 is used to receive multiple target test cases returned by the server.

[0138] The first test script generating module 603 is used to sort and assemble multiple target test cases according to a preset execution sequence to generate a first test script.

[0139] The second test script generation module 604 is used to modify the first test script and generate a second test script according to the test parameters input by the user and the preset mapping relationship. The preset mapping relationship is used to represent the association relationship between the test bench, the observation name and the variable name in the test case.

[0140] The test result acquisition module 605 is used to run the second test script, control the target test bench to test the to-be-tested vehicle controller corresponding to the target test bench, and acquire the test result.

[0141] Furthermore, the second test script generating module 604 is also used for:

[0142] According to the test parameters input by the user, the first test script is modified to generate a third test script;

[0143] According to the preset mapping relationship and the target test bench, the target variable name in the third test script is associated with the target observation name of the corresponding target test bench to generate a second test script.

[0144] Among them, the first test script generation module 603 is Figure 2 The test step module in .

[0145] The second test script generation module 604 is Figure 2 Test project module and mapping management module within the functional logic layer.

[0146] Furthermore, the test result acquisition module 605 is specifically used to:

[0147] Run the second test script through the target thread;

[0148] Through the target test software, the target test bench is controlled to test the vehicle controller to be tested and obtain the test results;

[0149] Among them, different threads can process their respective tasks concurrently.

[0150] Furthermore, before running the second test script, controlling the target test bench to test the vehicle controller to be tested corresponding to the target test bench, and obtaining the test result, the vehicle controller test device 60 further includes:

[0151] The receiving module 602 is further used to receive the rack configuration returned by the server;

[0152] The configuration module is used to configure the target rack according to the rack configuration.

[0153] Furthermore, the vehicle controller test device 60 also includes a sending module for uploading a heartbeat packet to the server, wherein the heartbeat packet is used to indicate the online status of each test bench, the test software corresponding to each test bench, and the vehicle controller to be tested corresponding to each test bench.

[0154] Furthermore, the sending module is also used to send the test result to the server.

[0155] The vehicle controller testing device provided in the embodiment of the present application can be used to execute the vehicle controller testing method on the host computer side in any of the above embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0156] Figure 7 This is a schematic diagram of the structure of the second embodiment of the vehicle controller test device provided by the present invention. Figure 7 As shown, the vehicle controller test device 70 is applied to a server and includes:

[0157] The first acquisition module 701 is used to acquire a test case acquisition request sent by the host computer, the test case acquisition request is used to acquire the target test case corresponding to the target test bench information and the test requirement information, and the test case acquisition request is generated in response to the user's input operation on the vehicle controller test interface, and the vehicle controller test interface is displayed through the browser of the host computer;

[0158] The second acquisition module 702 is used to acquire multiple target test cases according to the target test bench information and the test requirement information;

[0159] The sending module 703 is used to send multiple target test cases to the host computer, so that the host computer controls the target test bench to test the vehicle controller to be tested corresponding to the target test bench through the multiple target test cases, and obtains the test results.

[0160] Furthermore, the vehicle controller test device 70 further includes:

[0161] A determination module, used to determine the rack configuration according to the target rack information;

[0162] The sending module 703 is also used to send the rack configuration to the host computer.

[0163] Furthermore, the sending module 703 is specifically configured to:

[0164] Receive the heartbeat packet uploaded by the host computer. The heartbeat packet is used to indicate the online status of each test bench, the test software corresponding to each test bench, and the vehicle controller to be tested corresponding to each test bench;

[0165] If the heartbeat packet indicates that the target test bench, the target test software and the vehicle controller to be tested corresponding to the target test bench are all in an online state, multiple target test cases are sent to the host computer.

[0166] The vehicle controller testing device provided in the embodiment of the present application can be used to execute the vehicle controller testing method on the server side in any of the above embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0167] Figure 8 This is a schematic diagram of the structure of a host computer provided by the present invention. Figure 8 As shown, the host computer 80 includes:

[0168] Processor 81, memory 82, and communication interface 83;

[0169] The memory 82 is used to store executable instructions of the processor 81;

[0170] Among them, the processor 81 is configured to execute the technical solution on the host computer side in any of the aforementioned method embodiments by executing executable instructions.

[0171] Optionally, the memory 82 can be independent or integrated with the processor 81.

[0172] Optionally, when the memory 82 is a device independent of the processor 81, the host computer 80 may further include:

[0173] A bus is used to connect the above devices.

[0174] The host computer is used to execute the technical solution of the host computer side in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.

[0175] Fig. 9 A schematic diagram of the structure of a server provided by the present invention. Fig. 9 As shown, the server 90 includes:

[0176] Processor 91, memory 92, and communication interface 93;

[0177] The memory 92 is used to store executable instructions of the processor 91;

[0178] The processor 91 is configured to execute the technical solution on the server side in any of the aforementioned method embodiments by executing executable instructions.

[0179] Optionally, the memory 92 may be independent or integrated with the processor 91 .

[0180] Optionally, when the memory 92 is a device independent of the processor 91, the server 200 may further include:

[0181] A bus is used to connect the above devices.

[0182] The server is used to execute the technical solution on the server side of any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.

[0183] An embodiment of the present invention also provides a vehicle controller testing system, which includes a host computer, a server and at least one test bench, wherein the host computer, when executed, is used to implement the technical solution on the host computer side in the vehicle controller testing method provided in any of the above embodiments, and the server, when executed, is used to implement the technical solution on the server side in the vehicle controller testing method provided in any of the above embodiments.

[0184] An embodiment of the present invention further provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the technical solution of the host computer or server side provided in any of the aforementioned embodiments is implemented.

[0185] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0186] The above embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Any equivalent substitution or change made by a person skilled in the art based on the present invention is within the protection scope of the present invention.

Claims

1. A method for testing a vehicle controller, characterized in that: Applied to a host computer, the method includes: In response to a user input operation on a vehicle controller test interface, a test case acquisition request is sent to a server, wherein the test case acquisition request is used to acquire target test cases corresponding to target test bench information and test requirement information, and the vehicle controller test interface is displayed through a browser; Receiving multiple target test cases returned by the server; Sorting and assembling the multiple target test cases according to a preset execution order to generate a first test script; According to the test parameters input by the user and the preset mapping relationship, the first test script is modified to generate a second test script, wherein the preset mapping relationship is used to represent the association relationship between the test bench, the observation name and the variable name in the test case; The second test script is run to control the target test bench to test the to-be-tested vehicle controller corresponding to the target test bench, and obtain the test result.

2. The method according to claim 1, characterized in that The step of modifying the first test script according to the test parameters input by the user and the preset mapping relationship to generate the second test script includes: According to the test parameters input by the user, modify the parameters of the first test script to generate a third test script; According to the preset mapping relationship and the target bench, the target variable name in the third test script is associated with the target observation name corresponding to the target bench to generate the second test script.

3. The method according to claim 1 or 2, characterized in that: The running of the second test script, controlling the target test bench to test the to-be-tested vehicle controller corresponding to the target test bench, and obtaining the test result includes: Run the second test script through the target thread; Through the target test software, the target test bench is controlled to test the vehicle controller to be tested and obtain the test results; Among them, different threads can process their respective tasks concurrently.

4. The method according to claim 1 or 2, characterized in that: Before running the second test script, controlling the target test bench to test the vehicle controller to be tested corresponding to the target test bench, and obtaining the test result, the method further includes: receiving the rack configuration returned by the server; The target rack is configured according to the rack configuration.

5. The method according to claim 1 or 2, characterized in that: The method further comprises: A heartbeat packet is uploaded to the server, wherein the heartbeat packet is used to indicate the online status of each test bench, the test software corresponding to each test bench, and the vehicle controller to be tested corresponding to each test bench.

6. The method according to claim 1 or 2, characterized in that: The method further comprises: The test result is sent to the server.

7. A method for testing a vehicle controller, characterized in that: Applied to a server, the method comprises: Acquire a test case acquisition request sent by a host computer, wherein the test case acquisition request is used to acquire target test cases corresponding to target test bench information and test requirement information, and the test case acquisition request is generated in response to a user input operation on a vehicle controller test interface, and the vehicle controller test interface is displayed through a browser of the host computer; Acquire multiple target test cases according to the target test bench information and the test requirement information; The multiple target test cases are sent to the host computer, so that the host computer controls the target test bench to test the vehicle controller to be tested corresponding to the target test bench through the multiple target test cases, and obtains the test result.

8. The method according to claim 7, characterized in that The method further comprises: Determine the rack configuration according to the target rack information; The gantry configuration is sent to the host computer.

9. The method according to claim 7 or 8, characterized in that: The sending the multiple target test cases to the host computer includes: Receive a heartbeat packet uploaded by the host computer, wherein the heartbeat packet is used to indicate the online status of each test bench, the test software corresponding to each test bench, and the vehicle controller to be tested corresponding to each test bench; If the heartbeat packet indicates that the target test bench, the target test software, and the to-be-tested vehicle controller corresponding to the target test bench are all in an online state, the multiple target test cases are sent to the host computer.

10. A vehicle controller testing device, characterized in that: Applied to a host computer, the device comprises: A request sending module, used for sending a test case acquisition request to a server in response to a user's input operation on a vehicle controller test interface, wherein the test case acquisition request is used to acquire target test cases corresponding to target test bench information and test requirement information, and the vehicle controller test interface is displayed through a browser; A receiving module, used for receiving a plurality of target test cases returned by the server; A first test script generation module, used to sort and assemble the multiple target test cases according to a preset execution order to generate a first test script; A second test script generation module, used to modify the first test script to generate a second test script according to the test parameters input by the user and a preset mapping relationship, wherein the preset mapping relationship is used to represent the association relationship between the test bench, the observation name and the variable name in the test case; The test result acquisition module is used to run the second test script, control the target test bench to test the to-be-tested vehicle controller corresponding to the target test bench, and obtain the test result.

11. A vehicle controller testing device, characterized in that: Applied to a server, the device comprises: A first acquisition module is used to acquire a test case acquisition request sent by a host computer, wherein the test case acquisition request is used to acquire target test cases corresponding to target test bench information and test requirement information, and the test case acquisition request is generated in response to a user input operation on a vehicle controller test interface, and the vehicle controller test interface is displayed through a browser of the host computer; A second acquisition module is used to acquire multiple target test cases according to the target test bench information and the test requirement information; The sending module is used to send the multiple target test cases to the host computer, so that the host computer controls the target test bench to test the vehicle controller to be tested corresponding to the target test bench through the multiple target test cases, and obtains the test results.

12. A host computer, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.

13. A server, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 7 to 9.

14. A vehicle controller testing system, characterized in that: It includes a host computer, a server and at least one rack; The host computer is used to implement the vehicle controller testing method according to any one of claims 1 to 6; The server is used to implement the testing method of the vehicle controller as described in any one of claims 7-9.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the vehicle controller testing method as described in any one of claims 1-9.