An automated testing method, device, equipment and storage medium of a vehicle

By mapping test cases to test channels of the test model and determining their validity, the problem of low testing efficiency for vehicle controllers in existing technologies is solved, and efficient automated testing is achieved.

CN115586019BActive Publication Date: 2026-06-09DEEPAL AUTOMOBILE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DEEPAL AUTOMOBILE TECH CO LTD
Filing Date
2022-09-30
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing vehicle controller testing methods are inefficient, and the efficiency reduction during automated testing is caused by manually configuring matching files.

Method used

By obtaining the correspondence between test cases and test channels in the test model, parameter values ​​are assigned and validity is judged. Test channels are imported and test tasks are executed only when the parameter values ​​are valid. Parameter mapping and import are performed using matching files and communication protocol files.

Benefits of technology

It improves testing efficiency, reduces manual intervention, lowers the probability of errors, and achieves highly efficient automated testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115586019B_ABST
    Figure CN115586019B_ABST
Patent Text Reader

Abstract

The application relates to a kind of vehicle automation test method, device, equipment and storage medium, by obtaining test case for testing vehicle controller, test model;Test case is corresponding with the test channel of test model;The test channel corresponding to test case is valued, and the validity of the parameter value in the test channel corresponding to test case is judged, and a judgment result is obtained;When the judgment result is the parameter value in the test channel corresponding to test case, test case is imported into the test channel of the test model corresponding to test case to execute test task, and a test result is obtained.The test parameter in the test parameter table is one-to-one corresponding with the test channel first, then the test channel is valued according to the test parameter, the validity of the test parameter in the test channel is preliminarily judged, the test parameter is imported into the corresponding test channel for automatic test when the test parameter is valid, and the test result is automatically recorded simultaneously.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of testing technology, and specifically to an automated testing method, apparatus, equipment, and storage medium for vehicles. Background Technology

[0002] With the increasing severity of environmental pollution and energy issues, coupled with the innovative transformation of the traditional automotive industry, new energy vehicles are gaining popularity among major automakers.

[0003] The rapid development of the electric vehicle industry has led to increasingly rich and complex functions of various controllers in new energy vehicles. The development of each controller is inseparable from testing. The more detailed the testing, the more comprehensive the test scenarios, the higher the testing efficiency, and the safer the functions of each controller. Existing testing methods have many shortcomings. For example, Chinese patent CN03064403B, "An Automated Testing Method and System for ECU Hardware-in-the-Loop Simulation," discloses converting tabular test cases into executable test case files through code translation. However, the executable test case files still need to establish a relationship with the HIL (Hardware-in-the-Loop) bench model. Another example is patent CN114546873A, "An Automatic Testing Method and System for Battery Management System HIL," which requires manual configuration of matching files based on changes to test cases, reducing the efficiency of automated testing. Summary of the Invention

[0004] One of the objectives of this invention is to provide an automated testing method, apparatus, equipment, and storage medium for vehicles, in order to solve the technical problem of low testing efficiency in the prior art.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] An automated testing method for vehicles, the method comprising:

[0007] Obtain test cases and test models for testing the vehicle controller;

[0008] The test cases are mapped to the test channels of the test model;

[0009] Assign values ​​to the test channels corresponding to the test cases, and perform validity checks on the parameter values ​​in the test channels corresponding to the test cases to obtain the check results;

[0010] When the judgment result indicates that the parameter value in the test channel corresponding to the test case is valid, the test case is imported into the test channel corresponding to the test case to execute the test task and obtain the test result.

[0011] In one embodiment of the present invention, after obtaining test cases for testing the vehicle controller, the method further includes:

[0012] When the test case includes test time, channel number, channel threshold, and remarks, a test parameter table is constructed using the test time, channel number, channel threshold, and remarks. Each row of the test parameter table includes a test time, a test number, a channel threshold, and remarks. The columns of the test parameter table are one of the test time, channel number, channel threshold, and remarks.

[0013] In one embodiment of the present invention, mapping the test cases to the test channels of the test model includes:

[0014] Get the matching file;

[0015] Based on the matching file, the test time, test number, channel threshold, and remarks in each row of the test parameter table are matched with the test channels of the test model.

[0016] In one embodiment of the present invention, obtaining the matching file includes:

[0017] Obtain the communication protocol file of the test channel of the test model and the channel number of the test channel of the test model;

[0018] When the test case includes a channel number, the channel sequence number is mapped to the channel number to obtain the mapping relationship data between the channel sequence number and the channel number;

[0019] A matching file is constructed using the correspondence data between the channel sequence number and the channel number, and the communication protocol file.

[0020] In one embodiment of the present invention, a value is assigned to the test channel corresponding to the test case, and the validity of the parameter values ​​in the test channel corresponding to the test case is determined to obtain a determination result, including:

[0021] The test time in the test parameter table is recorded as the first test time, the channel number in the test parameter table is recorded as the first channel number, and the channel threshold in the test parameter table is recorded as the first channel threshold; and the first test time, the first channel number, and the first channel threshold are mapped to the test channel corresponding to the test case to obtain the second test time, the second channel number, and the second channel threshold.

[0022] When the second test time, the second channel number, and the second channel threshold meet the target conditions, the second test time, the second channel number, and the second channel threshold are determined to be valid; otherwise, the second test time, the second channel number, and the second channel threshold are determined to be invalid. The target conditions include:

[0023] When the test channel corresponding to the test case includes multiple second test times, the multiple second test times are equal, or the multiple second test times increase or decrease in the mapping order;

[0024] The second channel number is within a preset numbering range;

[0025] The threshold of the second channel is within a preset threshold range.

[0026] In one embodiment of the present invention, importing the test case into the test channel corresponding to the test case to execute the test task includes:

[0027] Obtain the number of rows in the test parameter table;

[0028] When the number of rows is less than a preset threshold, the test parameters in the test parameter table are imported line by line into the test channel corresponding to the test case according to the communication protocol file, and the test tasks are executed sequentially according to the import order.

[0029] In one embodiment of the present invention, after importing the test parameters in the test parameter table line by line into the test channel corresponding to the test case according to the communication protocol file, the method further includes:

[0030] Obtain an external control command. If the control command is a termination command and its priority is greater than the priority of the test task, terminate the test task.

[0031] The present invention also provides an automated testing device for vehicles, the device comprising:

[0032] The data acquisition module is used to acquire test cases and test models for testing the vehicle controller.

[0033] The matching module is used to match the test cases with the test channels of the test model;

[0034] The validity judgment module is used to assign values ​​to the test channels corresponding to the test cases, and to judge the validity of the parameter values ​​in the test channels corresponding to the test cases to obtain the judgment result;

[0035] The testing module is used to import the test case into the test channel corresponding to the test case to execute the test task and obtain the test result when the judgment result indicates that the parameter value in the test channel corresponding to the test case is valid.

[0036] The present invention also provides an electronic device, comprising:

[0037] One or more processors;

[0038] A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement an automated vehicle testing method as described above.

[0039] The present invention also provides a computer-readable storage medium storing computer-readable instructions thereon, which, when executed by a computer processor, cause the computer to perform an automated vehicle testing method as described above.

[0040] The beneficial effects of this invention are as follows: The automated testing method, apparatus, equipment, and storage medium for vehicles disclosed in this invention acquire test cases and test models for testing vehicle controllers; map the test cases to the test channels of the test models; assign values ​​to the test channels corresponding to the test cases; and determine the validity of the parameter values ​​in the test channels corresponding to the test cases, obtaining a determination result; when the determination result indicates that the parameter values ​​in the test channels corresponding to the test cases are valid, the test cases are imported into the test channels of the test models corresponding to the test cases to execute the test tasks and obtain test results. This invention first maps the test parameters in the test parameter table to the test channels one-to-one, then assigns values ​​to the test channels according to the test parameters, makes a preliminary determination of the validity of the test parameters in the test channels, and when the test parameters are valid, imports the test parameters into the corresponding test channels for automatic testing, while automatically recording the test results. This method is highly efficient and less prone to errors. Attached Figure Description

[0041] Figure 1 An application scenario diagram illustrating an automated vehicle testing method as an exemplary embodiment of this application;

[0042] Figure 2 A flowchart illustrating an automated testing method for a vehicle, as shown in an exemplary embodiment of this application;

[0043] Figure 3 This is a schematic diagram illustrating the validity determination process of an exemplary embodiment of this application;

[0044] Figure 4 A flowchart illustrating a specific implementation of an automated vehicle testing method, as an exemplary embodiment of this application;

[0045] Figure 5 A structural diagram of an automated testing apparatus for a vehicle is shown as an exemplary embodiment of this application;

[0046] Figure 6 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation

[0047] The embodiments of the present invention will be described below 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 content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed 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 and not for limiting the scope of protection of the present invention.

[0048] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0049] Figure 1 This is an exemplary embodiment of the present application illustrating an application scenario of an automated vehicle testing method, such as... Figure 1 As shown, test cases are constructed using the test parameters of the electric vehicle controller. A test case is a description of a testing task for a specific software product, reflecting the test plan, methods, techniques, and strategies. Test cases are stored in a pre-set test database. The test host retrieves test cases from the database, processes them, and sends the processed test cases to the HIL (Hardware-In-the-Loop) bench model via the CAN interface. When processing the test cases, the test host maps the test parameters in the test cases to the test channels in the HIL bench model, thereby assigning test tasks to the test channels. After completing the test, the HIL bench model automatically returns the test results to the test host, thus completing the test.

[0050] like Figure 2 As shown, in an exemplary embodiment, an automated testing method for a vehicle includes at least steps S210 to S240, which are described in detail below:

[0051] S210, Obtain test cases and test models for testing the vehicle controller;

[0052] The various parameters used for vehicle controllers are generally referred to as test cases. In some embodiments, test cases can be written in a dedicated test case writing tool and then directly exported as a table to obtain the test parameter table.

[0053] S220, Match the test cases with the test channels of the test model;

[0054] Since the HIL bench model includes multiple test channels and the test parameters in the test cases include multiple types, it is necessary to use a matching file to map the test parameters to the test channels before using the test cases for testing.

[0055] S230, assign values ​​to the test channels corresponding to the test cases, and perform validity checks on the parameter values ​​in the test channels corresponding to the test cases to obtain the check results;

[0056] Because test parameters in test cases may conflict with the functionality of the test channel, the validity of the test parameters in the test channel needs to be determined before sending them to the test channel. Specifically, this is done by assigning values ​​to the test parameters in the test cases to the corresponding test channel, and then validating the parameter values ​​in the test channel. This allows for validity checks on the test parameters in the test channel without actually sending them; the results include: the parameter value in the test channel is valid, or the parameter value in the test channel is invalid.

[0057] S240, when the judgment result indicates that the parameter value in the test channel corresponding to the test case is valid, the test case is imported into the test channel corresponding to the test case to execute the test task and obtain the test result.

[0058] When the parameter values ​​in the test channel are valid, it indicates that the corresponding test parameters can be used to perform test tasks in that test channel. At this point, the test parameters from the test cases are imported into the corresponding test channel to execute the test task, which is then automatically executed by the HIL bench, and the test results are automatically obtained. This improves testing efficiency and the accuracy of test result recording.

[0059] In one embodiment of the present invention, the process after obtaining test cases for testing the vehicle controller may include step S310, which is described in detail below:

[0060] S310, when the test case includes test time, channel number, channel threshold and remarks, construct a test parameter table using the test time, channel number, channel threshold and remarks; each row of the test parameter table includes a test time, a test number, a channel threshold and remarks; the columns of the test parameter table are one of the test time, channel number, channel threshold and remarks.

[0061] The test time is the time required to perform a single test on the controller. The channel number is a provisional test channel required for a single test on the controller. The channel threshold is the judgment standard for the test. For example, 3.5V means that the reference voltage threshold of the controller is 3.5V. The remarks information is used to explain the test in detail. For example, "0.01S Channel 1# single voltage threshold is 3.5V" means that the test time is 0.01 seconds, the test channel is channel 1#, and the reference voltage threshold for the test is 3.5V.

[0062] The specific test parameters are shown in Table 1:

[0063] Table 1. Test Parameter Table

[0064] A B C D time Channel number Channel threshold Remark 0.01 1 3.5 The single-cell voltage threshold for channel 0.01S1# is 3.5V. 0.02 2 1 The threshold for the CAN protocol signal in channel 0.02S2# is 1. 0.02 3 3.5 The single-cell voltage threshold for channel 0.02S3# is 3.5V. 0.02 4 3.5 The individual cell voltage threshold for channel 0.02S4# is 3.5V. 0.02 5 3.5 The individual cell voltage threshold for channel 0.02S5# is 3.5V. 1 1 4.5 The single-cell voltage threshold for channel 1S1# is 4.5V.

[0065] In Table 1, each row represents a test sub-item, and the matching file is used to map test channels to test sub-items.

[0066] In one embodiment of the present invention, the process of mapping the test cases to the test channels of the test model may include steps S410 to S420, which are described in detail below:

[0067] S410, retrieve the matching file;

[0068] The mapping file is used to match the test parameters and the test channels of the HIL bench model; the test model is the HIL bench model used to test the vehicle controller.

[0069] S420, Match the test time, test number, channel threshold and remarks information in each row of the test parameter table with the test channel of the test model according to the matching file.

[0070] The matching file includes a communication protocol file and corresponding relationship data. The corresponding relationship data is established in advance according to the test requirements. Therefore, the test parameters can be quickly matched with the test channels through the pre-established corresponding relationship data, that is, the test time, test number, channel threshold and remarks information of each row in the test parameter table are matched with the test channels.

[0071] In one embodiment of the present invention, the process of obtaining the matching file may include steps S510 to S530, which are described in detail below:

[0072] S510, Obtain the communication protocol file of the test channel of the test model and the channel number of the test channel of the test model;

[0073] In one embodiment of this application, when sending test cases to the test channels in the HIL test bench, CAN bus is used for data transmission, so the communication protocol file is the CAN communication protocol file; the channel number of the test channel can be obtained from the list of real board channels in the HIL test bench, and the channel number of the test channel can be obtained from the channel list.

[0074] S520, when the test case includes a channel number, the channel sequence number is mapped to the channel number to obtain the correspondence data between the channel sequence number and the channel number;

[0075] In this embodiment, the test case includes multiple test sub-items. Each test sub-item includes test time, channel number, channel threshold and remarks. By matching the channel number in each test sub-item with the channel sequence number of the test channel, the test time, channel threshold and remarks in the sub-item can be matched with the test channel.

[0076] S530, construct a matching file using the correspondence data between the channel sequence number and the channel number, and the communication protocol file.

[0077] Constructing the matching file can utilize existing dedicated tools. For example, the corresponding CAN communication protocol file and corresponding relationship data can be imported into the dedicated tool, and then a Mapping file can be generated (the Mapping file is a file that corresponds the input and output signals of the HIL bench test model to the actual signal input and output channels on the HIL test bench). In one embodiment of the present invention, the test channels corresponding to the test cases are assigned values, and the validity of the parameter values ​​in the test channels corresponding to the test cases is judged. The process of obtaining the judgment result may include steps S610 to S620, which are described in detail below:

[0078] S610, the test time in the test parameter table is recorded as the first test time, the channel number in the test parameter table is recorded as the first channel number, and the channel threshold in the test parameter table is recorded as the first channel threshold; and the first test time, the first channel number, and the first channel threshold are mapped to the test channel corresponding to the test case to obtain the second test time, the second channel number, and the second channel threshold;

[0079] After matching is complete, the validity of the test parameters needs to be determined first (i.e., whether the test can be completed through the corresponding test channel). Therefore, a method is adopted to map the test time value, channel number value, and channel threshold value to the corresponding test channel, and then perform the determination in advance. Specifically, a general test model for the platform is built based on test cases. The HIL bench test model assigns the channel parameters of each test case to the actual output channel of the HIL bench according to the Mapping file. Specifically, each line of parameters in the test case is assigned to the corresponding test channel interface in the model.

[0080] In this embodiment, the mapping relationship is in tabular order, that is, mapping from bottom to top row by row, and mapping from left to right in the same row (from column A to column D in Table 1).

[0081] S620, when the second test time, the second channel number, and the second channel threshold simultaneously meet the target conditions, the second test time, the second channel number, and the second channel threshold are determined to be valid; otherwise, the second test time, the second channel number, and the second channel threshold are determined to be invalid. The target conditions include:

[0082] When the test channel corresponding to the test case includes multiple second test times, the multiple second test times are equal, or the multiple second test times increase or decrease in the mapping order;

[0083] The second channel number is within a preset numbering range;

[0084] The threshold of the second channel is within a preset threshold range.

[0085] Figure 3 This is a schematic diagram of the validity determination process shown in an exemplary embodiment of this application. In the absence of an external termination command, the test parameters in the test parameter table are assigned to test channels In[1], In[2], and In[3], i.e., I = In[1], J = In[3], and K = In[3]. That is, the test parameters in rows I, J, and K are assigned to test channels In[1], In[2], and In[3] respectively, and then the validity of the parameters in test channels In[1], In[2], and In[3] is determined in turn.

[0086] In one embodiment of the present invention, the process of importing the test cases into the corresponding test channel to execute the test task may include steps S710 to S720, which are described in detail below:

[0087] S710, obtain the number of rows in the test parameter table;

[0088] In this embodiment, test cases are presented in the form of test parameter tables, so importing test cases is actually importing test parameter tables;

[0089] S720, when the number of rows is less than a preset threshold, the test parameters in the test parameter table are imported line by line into the test channel corresponding to the test case according to the communication protocol file, and the test tasks are executed sequentially according to the import order.

[0090] In this embodiment, to avoid infinite loops or other unexpected failures, the number of rows in the test parameter table cannot be too large. Therefore, a preset quantity threshold is used to limit the total number of rows in the test parameter table, thereby avoiding infinite loops or other unexpected failures.

[0091] In one embodiment of the present invention, the process of importing the test parameters in the test parameter table line by line into the test channel corresponding to the test case according to the communication protocol file may further include step S810, which is described in detail below:

[0092] S810: Obtain an external control command. If the control command is a termination command and its priority is greater than the priority of the test task, terminate the test task.

[0093] In this embodiment, in order to prevent infinite loops or other unexpected failures, an external termination command needs to be obtained before or during the test. The termination command has the highest priority, and its purpose is to alert the user to other adverse factors and quickly exit the automatic test, thereby avoiding infinite loops or other unexpected failures during the test.

[0094] Figure 4 This is a flowchart illustrating a specific implementation of an automated vehicle testing method as an exemplary embodiment of this application; in another embodiment of this application, such as... Figure 4 As shown, the specific implementation process includes steps S101-S104;

[0095] Step S101: Write test cases. Specifically, write test cases on dedicated software and export them as an Excel file as shown in Table 1. Column A represents the execution time of the test cases, i.e., the execution time of each channel of the HIL test bench and the corresponding threshold for each channel; Column B represents the channel number of the HIL test bench used in the test cases; Column C represents the specific threshold corresponding to each channel; and Column D represents the explanation of each row of test cases.

[0096] Step 102: Export the Mapping (matching) file; Specifically, in the dedicated software for writing test cases, import the corresponding CAN communication protocol file and the list of actual test channels on the HIL bench. After the test cases are written, the Mapping (matching) file is automatically generated according to the actual channel used in the test cases, and then exported for later use (the Mapping file is the file that corresponds the input and output signals of the HIL bench test model to the actual signal input and output channels on the HIL test bench. In this embodiment, the actual signal input and output channels are the same test channels).

[0097] Step 103: Build a general HIL bench test model for the platform. Specifically: Assign the parameters of each channel of the test cases to the pre-prepared actual output channels of the HIL bench according to the Mapping file, completing the construction of the general HIL bench test model. Specifically, assign the parameters of each row in the test cases to the corresponding interfaces (channels) in the model; simultaneously, perform validity checks on the information of each column of parameters: 1. Check if the time signal period is equal or increasing; otherwise, reading the test case will fail; 2. Check if all selected channel numbers are within the range supported by the HIL bench; 3. Check if all entered thresholds are within a reasonable range for the channels. It is also necessary to limit the total number of rows of test cases to avoid infinite loops or other unexpected failures; during the test case reading process, it is necessary to check in real time whether there is a termination command, with the highest priority, so that the automatic test can be quickly exited when other adverse external factors occur.

[0098] Step 104: Automatically execute test cases, compare test results, and generate a test report. The test results are compared with standard results to determine whether the test passed or failed, and a test report is generated.

[0099] This invention discloses an automated vehicle testing method. The method involves acquiring test cases and a test model for testing the vehicle controller; mapping the test cases to test channels of the test model; assigning values ​​to the test channels corresponding to the test cases; and validating the parameter values ​​in the test channels to obtain a judgment result. If the judgment result indicates that the parameter values ​​in the test channels corresponding to the test cases are valid, the test cases are imported into the test channels of the test model corresponding to the test cases to execute the test task and obtain the test results. This invention first maps test parameters in a test parameter table to test channels one-to-one, then assigns values ​​to the test channels according to the test parameters, performs a preliminary judgment on the validity of the test parameters in the test channels, and when the test parameters are valid, imports the test parameters into the corresponding test channels for automatic testing, while automatically recording the test results. This method is highly efficient and less prone to errors.

[0100] like Figure 4As shown, the present invention also provides an automated testing device for vehicles, the device comprising:

[0101] The data acquisition module is used to acquire test cases and test models for testing the vehicle controller.

[0102] The matching module is used to match the test cases with the test channels of the test model;

[0103] The validity judgment module is used to assign values ​​to the test channels corresponding to the test cases, and to judge the validity of the parameter values ​​in the test channels corresponding to the test cases to obtain the judgment result;

[0104] The testing module is used to import the test case into the test channel corresponding to the test case to execute the test task and obtain the test result when the judgment result indicates that the parameter value in the test channel corresponding to the test case is valid.

[0105] This invention discloses an automated vehicle testing device that acquires test cases and test models for testing vehicle controllers; maps test cases to test channels of the test models; assigns values ​​to the test channels corresponding to the test cases; and performs validity checks on the parameter values ​​in the test channels corresponding to the test cases, obtaining a check result. If the check result indicates that the parameter values ​​in the test channels corresponding to the test cases are valid, the test cases are imported into the test channels of the test models corresponding to the test cases to execute the test tasks and obtain test results. This invention first maps test parameters in a test parameter table to test channels one-to-one, then assigns values ​​to the test channels according to the test parameters, performs a preliminary judgment on the validity of the test parameters in the test channels, and if the test parameters are valid, imports the test parameters into the corresponding test channels for automatic testing, while automatically recording the test results. This method is highly efficient and less prone to errors.

[0106] It should be noted that the automated vehicle testing device and the automated vehicle testing method provided in the above embodiments belong to the same concept. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the automated vehicle testing device provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0107] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement an automated vehicle testing method provided in the above embodiments.

[0108] Figure 5 A schematic diagram of a computer system suitable for implementing the embodiments of this application is shown. It should be noted that... Figure 5 The computer system 500 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0109] like Figure 5 As shown, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 502 or programs loaded from storage portion 508 into Random Access Memory (RAM) 503. The RAM 503 also stores various programs and data required for system operation. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An Input / Output (I / O) interface 505 is also connected to the bus 504.

[0110] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. Removable media 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 510 as needed so that computer programs read from them can be installed into storage section 508 as needed.

[0111] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs various functions defined in the system of this application.

[0112] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0113] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0114] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0115] Another aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a computer's processor, causes the computer to perform an automated vehicle testing method as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not incorporated into the electronic device.

[0116] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform an automated vehicle testing method provided in the various embodiments described above.

[0117] The above embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention.

Claims

1. An automated testing method for vehicles, characterized in that, The method includes: Obtain test cases and test models for testing the vehicle controller; The test cases are mapped to the test channels of the test model; The process involves assigning values ​​to the test channels corresponding to the test cases and validating the parameter values ​​in the test channels to obtain a judgment result. This includes: constructing a test parameter table based on the test cases, recording the test time in the test parameter table as the first test time, the channel number in the test parameter table as the first channel number, and the channel threshold in the test parameter table as the first channel threshold; mapping the first test time, the first channel number, and the first channel threshold to the test channels corresponding to the test cases to obtain the second test time, the second channel number, and the second channel threshold; determining that the second test time, the second channel number, and the second channel threshold are valid when they meet target conditions, otherwise determining that they are invalid. The target conditions include: when the test channels corresponding to the test cases include multiple second test times, the multiple second test times are equal, or the multiple second test times increase or decrease in mapping order; the second channel number is within a preset number range; and the second channel threshold is within a preset threshold range. When the judgment result indicates that the parameter value in the test channel corresponding to the test case is valid, the test case is imported into the test channel corresponding to the test case to execute the test task and obtain the test result.

2. The automated testing method for vehicles according to claim 1, characterized in that: After obtaining the test cases for testing the vehicle controller, the following is also included: When the test case includes test time, channel number, channel threshold, and remarks, a test parameter table is constructed using the test time, channel number, channel threshold, and remarks. Each row of the test parameter table includes a test time, a test number, a channel threshold, and remarks. The columns of the test parameter table are one of the test time, channel number, channel threshold, and remarks.

3. The automated testing method for a vehicle according to claim 2, characterized in that: Mapping the test cases to the test channels of the test model includes: Get the matching file; Based on the matching file, the test time, test number, channel threshold, and remarks in each row of the test parameter table are matched with the test channels of the test model.

4. The automated testing method for a vehicle according to claim 3, characterized in that, Retrieve matching files, including: Obtain the communication protocol file of the test channel of the test model and the channel number of the test channel of the test model; When the test case includes a channel number, the channel sequence number is mapped to the channel number to obtain the mapping relationship data between the channel sequence number and the channel number; A matching file is constructed using the correspondence data between the channel sequence number and the channel number, and the communication protocol file.

5. The automated testing method for a vehicle according to claim 4, characterized in that: Importing the test cases into the test channel corresponding to the test cases to execute test tasks includes: Obtain the number of rows in the test parameter table; When the number of rows is less than a preset threshold, the test parameters in the test parameter table are imported line by line into the test channel corresponding to the test case according to the communication protocol file, and the test tasks are executed sequentially according to the import order.

6. The automated testing method for a vehicle according to claim 5, characterized in that: After importing the test parameters from the test parameter table into the test channel corresponding to the test case line by line according to the communication protocol file, the process further includes: Obtain an external control command. If the control command is a termination command and its priority is greater than the priority of the test task, terminate the test task.

7. An automated testing device for vehicles, characterized in that, The device includes: The data acquisition module is used to acquire test cases and test models for testing the vehicle controller. The matching module is used to match the test cases with the test channels of the test model; The validity judgment module is used to assign values ​​to the test channels corresponding to the test cases and to judge the validity of the parameter values ​​in the test channels corresponding to the test cases to obtain a judgment result. This includes: constructing a test parameter table based on the test cases, recording the test time in the test parameter table as the first test time, the channel number in the test parameter table as the first channel number, and the channel threshold in the test parameter table as the first channel threshold; mapping the first test time, the first channel number, and the first channel threshold to the test channels corresponding to the test cases to obtain the second test time, the second channel number, and the second channel threshold; determining that the second test time, the second channel number, and the second channel threshold are valid when the second test time, the second channel number, and the second channel threshold meet the target conditions; otherwise, determining that the second test time, the second channel number, and the second channel threshold are invalid. The target conditions include: when the test channels corresponding to the test cases include multiple second test times, the multiple second test times are equal, or the multiple second test times increase or decrease in a mapping order; the second channel number is within a preset number range; and the second channel threshold is within a preset threshold range. The testing module is used to import the test case into the test channel corresponding to the test case to execute the test task and obtain the test result when the judgment result indicates that the parameter value in the test channel corresponding to the test case is valid.

8. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement an automated testing method for a vehicle as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by the computer's processor, cause the computer to perform an automated testing method for any one of the vehicles described in claims 1 to 6.