Automated testing method for software of intelligent networked vehicle
By building a communication structure in intelligent connected vehicle software testing and using static and dynamic optimization algorithms, an efficient and low-cost testing method is realized, solving the problem of low testing efficiency and adapting to the iterative needs during the software life cycle.
Patent Information
- Application Number
- PCT/CN2024/137308
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-29
- Filing Date
- 2024-12-06
- Publication Date
- 2025-07-03
AI Technical Summary
The existing technology is inefficient and costly in intelligent connected vehicle software testing, making it difficult to meet the continuous iteration needs during the software life cycle.
Through local area network communication and Internet communication, the basic communication structure of the Internet of Vehicles cloud platform, test server and test bench unit is built, and the task allocation and optimization are used for static optimization algorithm and dynamic optimization algorithm to achieve parallel testing and dynamic adjustment.
It improves testing efficiency, reduces testing costs, ensures real-time and efficient testing process, and adapts to iterative needs during the software life cycle.
Smart Images

Figure CN2024137308_03072025_PF_FP_ABST
Abstract
Description
An automated testing method for intelligent connected vehicle software Technical Field
[0001] The present invention belongs to the technical field of intelligent connected vehicles, and particularly relates to an automated testing method for intelligent connected vehicle software. Background Art
[0002] With the development of intelligent connected vehicles (ICVs), in the era of software-defined cars, ICV software exhibits two major characteristics: its increasing scale, and its extended lifecycle from the previous 90 days from R&D to mass production to the entire lifecycle of the vehicle. Consequently, automotive software requires continuous iterative development throughout the vehicle's lifecycle. As software scale grows, the workload for software testing surges. Therefore, improving the efficiency and reducing the cost of ICV software testing have become challenges that the industry needs to address.
[0003] Invention application number CN201210382231.4 discloses a "UPPAAL model-based automotive software source code simulation and testing method." The system's input is a queue of triplets consisting of a set of data variables, a set of event variables, and a set of clock constraints. The output is a set of data variables. To achieve automation and real-time performance in the source code simulation and testing system, the UPPAAL model is converted into C++ code. After the software source code and the converted UPPAAL model have processed all input data, if their outputs match, the source code is considered correct; otherwise, an error exists.
[0004] The invention application, application number CN202210533934.6, discloses an "automated automotive software testing system and method," which includes a configuration terminal; a demand terminal for inputting requirements, reviewing the requirements, and transmitting the requirements to the encoding and testing terminals after passing the review; an encoding terminal for parsing the requirements, encoding them into test cases based on the requirements, and verifying the test cases. After passing the verification, the test cases are transmitted to the testing terminal; and a testing terminal for testing according to the test cases and requirements and outputting test reports. The present invention can be applied to multiple products for simultaneous automated test analysis, ultimately outputting test results, and locating and tracking problems.
[0005] The invention application with application number: CN202310092194.1 discloses "a method, system, computer and readable storage medium for developing automotive software". The method includes: obtaining historical automotive software application data in real time, and determining the boundary conditions of the target automotive project to be developed based on the historical automotive software application data; formulating a target engineering plan corresponding to the target automotive project based on the boundary conditions, and extracting various work indicators in the target engineering plan, which include engineering goals, attribute goals and quality goals; designing the corresponding original automotive software based on the engineering goals, attribute goals and quality goals, and performing robustness testing on the original automotive software according to preset test standards to obtain the corresponding target automotive software.
[0006] The invention application with application number: CN 202310096014.7 discloses "a testing method, device and equipment for automotive software". The testing method for automotive software includes: obtaining the quality level of the test task based on the test item information of the test task; determining the test mode information of the test task based on the quality level; and allocating the test task to the corresponding test resources for testing based on the test mode information to obtain the test results.
[0007] The invention application with application number: CN202310822237.7 discloses "a method and system for continuous integration testing of automotive software". In this method, a test status variable is added to the test case, and in the process of executing the test case, a new test node sets the test status variable to the first value in the pre-processing stage, and sets the test status variable to the second value in the post-processing stage. In this way, when an exception occurs in the test node during the execution of the test task, the server sends a breakpoint resumption task, and the test node reconnects to the test tool. After the reconnection is successful, the test cases where the test status variable is not the second value are packaged into a new test task and tested. Summary of the Invention
[0008] The purpose of the present invention is to improve test efficiency and reduce test costs.
[0009] To achieve the above technical objectives, the present invention provides an automated testing method for intelligent connected vehicle software, the technical solution of which is as follows:
[0010] An automated testing method for intelligent connected vehicle software.
[0011] First, the basic communication structure based on the Internet of Vehicles cloud platform, test server, and test bench units is set up through local area network communication and Internet communication. The test bench units are set up as multiple groups and set to work in parallel.
[0012] Secondly, based on historical data, the test server initializes task allocation according to the static optimization algorithm set;
[0013] Finally, each test bench unit runs the test work according to the initialization task allocation until all tests are completed; during the time period from the start of each test bench unit running the test work to the completion of all tests, if no test operation abnormality occurs, the test results are summarized to the test server; if a test operation abnormality occurs, the test task of each test bench unit is interrupted with the time point of the fault occurrence as the interruption point, and the dynamic optimization algorithm set is triggered at the time point of the test operation abnormality to perform calculations, and the remaining test tasks are redistributed based on the dynamic optimization algorithm according to the calculation results, and each test bench unit runs the test work according to the reallocated plan until all tests are completed, and then the test results are summarized to the test server.
[0014] Further,
[0015] The aforementioned “if a test operation abnormality occurs, the test tasks of each test bench unit are interrupted with the time point of the fault occurrence as the interruption point, and the dynamic optimization algorithm set is triggered to perform calculations at the time point of the test operation abnormality” specifically includes the following steps:
[0016] S1: After receiving the abnormal signal, the test server locates the test bench unit where the abnormality occurs and the time corresponding to the time sequence of its initialization task allocation;
[0017] S2: Based on the location of the moment of the exception occurrence in the time sequence of its initialization task allocation, determine the corresponding moments of the remaining test bench units in the time sequence of their initialization task allocation, thereby determining the remaining time required for the remaining test bench units to complete their currently executed tasks; and determine the time with the longest remaining time;
[0018] S3: The remaining time required for the remaining test bench units to complete their currently executed tasks is used as the respective time monitoring, and when the respective test bench units complete their current tasks, task interruption of the respective test benches is triggered;
[0019] S3: When the test bench unit with the longest remaining time completes the current test task, determine whether the fault of the abnormal test bench unit has been resolved. If it has been resolved, trigger all test bench units to continue executing the test tasks according to the initialization task allocation; otherwise, set the abnormal end time for the abnormal test bench unit, and use this end time as the time required for a fixed task of the current test bench, triggering the set dynamic optimization algorithm to perform calculations.
[0020] Further,
[0021] The static optimization algorithm is implemented by the following steps:
[0022] SS1: Complete the sorting of test tasks according to the sorting method,
[0023] SS2: Determine the theoretical mean value based on the total time and the number of test bench units;
[0024] SS3: Using the theoretical mean as a constraint, the test tasks are assigned to form a variety of task allocation schemes;
[0025] SS4: Perform variance calculation on the multiple task allocation plans formed, and use the minimum variance as the screening criterion to screen out the final task allocation plan.
[0026] Further,
[0027] The sorting method in step SS1 is the bubble sorting method.
[0028] Further,
[0029] The dynamic optimization algorithm is implemented by the following steps:
[0030] SD1: Sort the dataset consisting of the remaining test tasks according to the Hill sort method;
[0031] SD2: Determine the theoretical mean value based on the total time of the remaining test tasks and the number of test bench units;
[0032] SD3: Using the theoretical mean as a constraint, the test tasks are assigned to form a variety of task allocation schemes;
[0033] SD4: Perform variance calculation on the multiple task allocation plans formed, and use the minimum variance as the screening criterion to screen out the final task allocation plan.
[0034] Further,
[0035] The dynamic optimization algorithm is implemented through the following steps:
[0036] SD1: Sort the dataset consisting of the remaining test tasks according to the Hill sort method;
[0037] SD2: Determine the theoretical mean value based on the total time of the remaining test tasks and the number of test bench units;
[0038] SD3: Using the theoretical mean as a constraint, the test tasks are assigned to form a variety of task allocation schemes;
[0039] SD4: Perform variance calculation on the multiple task allocation schemes formed, and use the minimum variance as the screening criterion to select the final task allocation scheme;
[0040] SD5: According to the screened task allocation scheme, the sequence task group containing the time required for the fixed task is allocated to the abnormal test bench unit.
[0041] Further,
[0042] The test results stored in the test server are summarized as sample data to optimize the static optimization algorithm. The present invention provides an automated testing method for intelligent connected vehicle software. First, based on local area network communication and Internet communication, a communication and processing structure that can perform parallel test tasks is built, establishing a foundation for efficient testing. Then, a static optimization algorithm that serves the initial test and a dynamic optimization algorithm that serves the test process are combined to establish a test method for real-time tracking and dynamic optimization from the beginning to the end of the test. Among them, the structural theoretical structure based on the static optimization algorithm and the dynamic optimization algorithm is simple and easy to implement, and occupies a small amount of memory. Since the static optimization algorithm does not need to consider time factors, the bubble method is used to complete the sorting first, while the dynamic optimization algorithm part takes the amount of data to be processed as a premise and constraint, and takes into account the amount of code, memory space and calculation response time. The selected sorting method not only reflects the adaptability to the amount of data, but also reflects the characteristics of small code size and the need to use additional memory space. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] FIG1 is a schematic diagram of a communication structure in the present invention;
[0044] FIG2 is a schematic diagram of information interaction of the communication structure in FIG1 during the test process. DETAILED DESCRIPTION
[0045] Below, an automated testing method for intelligent connected vehicle software of the present invention is further described in detail based on the accompanying drawings, working principles, and processes.
[0046] For ease of understanding, the following explanation is divided into two parts: communication structure and information interaction part and optimization part.
[0047] Communication structure and information interaction part:
[0048] In order to improve the efficiency of testing, we first set up the basic communication structure based on the Internet of Vehicles cloud platform, test server and test bench unit based on the setting of LAN communication, Internet communication and multiple test bench units, so that multiple test bench units can run in parallel.
[0049] The completed basic communication structure is shown in Figure 1.
[0050] The test bench units consist of test terminals and a network of nodes in the controller under test. The test terminals are capable of controlling power supplies, switches, and communications with the node network of the controller under test. They perform the real-time interaction and data collection required for the test tasks. The test terminals in these test bench units are connected to the test server via a test local area network. During testing, the in-vehicle terminals in the controller node network under test interact with the IoV cloud platform under test via a wireless communication network.
[0051] The test server is connected to all test bench units through the test local area network, and is also connected and interacted with the tested vehicle networking platform through the Internet.
[0052] The tasks of the test server are divided into the following parts:
[0053] 1. Dynamically schedule and assign test tasks to different test bench units;
[0054] 2. The collaborative test terminal completes the data interaction between the tested vehicle network cloud platform and the tested vehicle network cloud platform during the test task;
[0055] 3. Receive and process test data uploaded by each test terminal, generate test reports, etc.
[0056] The specific information interaction is shown in Figure 2, as follows:
[0057] During testing, the test terminal primarily performs real-time interaction with the network of controller nodes under test, while the test server is responsible for data exchange with the IoV cloud platform and interacting with the test terminal. This collaborative effort between the test server and the test terminal ensures both real-time interaction with the controller network under test and a closed-loop data exchange with the cloud platform, as well as the ability to analyze and process large amounts of test data.
[0058] The specific tasks performed on the test terminal are as follows:
[0059] 1) Inject vehicle simulation data into the controller node network under test in real time
[0060] 2) Real-time collection of network data of the controller node under test
[0061] 3) Real-time interaction with the controller node network under test
[0062] 4) Real-time processing of small computational test data
[0063] 5) Upload complex test data to the test server
[0064] The tasks performed on the test server are as follows:
[0065] 1) Interact with the test terminal to perform test tasks
[0066] 2) Data interaction with the Internet of Vehicles cloud platform
[0067] 3) Receive data uploaded by the test terminal
[0068] 4) Calculate and process the test data
[0069] 5)Store test results
[0070] 6) Generate a test report.
[0071] Optimization part:
[0072] For ease of understanding, the following sections will explain the static optimization algorithm, dynamic optimization algorithm, and iterative optimization separately. The specific execution and calculation of these three methods are all performed on a test server. It should be noted that both the static and dynamic optimization algorithms follow a two-step approach of sorting first and then determining the optimal allocation solution. This structural setup avoids the complexity of direct optimization while also considering both the time-sensitive and time-insensitive states, and implementing corresponding technical settings. In the sorting process where time is a factor, the amount of code, memory space, and computational response time are considered equally.
[0073] Static optimization algorithm:
[0074] This algorithm serves the initial testing process and provides a better allocation path for each test bench unit. It first sorts the test task set and then screens and forms the final initialization task allocation based on the theoretical mean and variance minimum principle. The details are as follows:
[0075] Since the static optimization process does not need to consider time factors, the sorting can be completed using the bubble sort method. For the test set that has been sorted, the total time consumption is first calculated. Then, based on the number of test bench units, the theoretical mean is calculated. Then, with the theoretical mean as a constraint, the test tasks are assigned to form a variety of task allocation schemes. The formation process of the multiple tasks here can first use the mean as the screening standard to determine the position of the value in the array whose sum of two adjacent values is closest to the mean. Based on this, the array is divided into two parts, and then completed using the hash table method or the double pointer method; finally, the variance operation is performed on the multiple task allocation schemes formed, and the minimum variance is used as the screening standard to screen out the final task allocation scheme.
[0076] Dynamic optimization algorithm:
[0077] This algorithm serves the test process and provides a better dynamic allocation path for each test bench unit in the test process. It first sorts the remaining test task sets and then screens and forms the final dynamic task allocation based on the theoretical mean and variance minimum principle. The specific steps are as follows:
[0078] S1: After receiving the abnormal operation signal, the test server locates the test bench unit where the abnormality occurs and the time corresponding to the time sequence of its initialization task allocation;
[0079] S2: Based on the location of the moment of the exception occurrence in the time sequence of its initialization task allocation, determine the corresponding moments of the remaining test bench units in the time sequence of their initialization task allocation, thereby determining the remaining time required for the remaining test bench units to complete their currently executed tasks; and determine the time with the longest remaining time;
[0080] S3: The remaining time required for the remaining test bench units to complete their currently executed tasks is used as the respective time monitoring, and when the respective test bench units complete their current tasks, task interruption of the respective test benches is triggered;
[0081] S3: When the test bench unit with the longest remaining time completes its current test task, it determines whether the abnormal test bench unit's abnormality has been resolved. If so, all test bench units are triggered to continue executing their test tasks according to the initial task allocation. Otherwise, a fault end time is set for the abnormal test bench unit, and this end time is used as the time required for a fixed task of the current test bench, triggering the set dynamic optimization algorithm to perform calculations. The specific process of the corresponding dynamic optimization algorithm is as follows:
[0082] SD1: Sort the dataset consisting of the remaining test tasks according to the Hill sort method;
[0083] SD2: Determine the theoretical mean value based on the total time of the remaining test tasks and the number of test bench units;
[0084] SD3: Using the theoretical mean as a constraint, the test tasks are assigned to form multiple task allocation schemes. The formation of the multiple task allocation schemes here is the same as the static part mentioned above, that is, first use the mean as the screening criterion to determine the position of the value in the array whose sum is closest to the mean. Based on this, the array is divided into two parts, and then the hash table method or the double pointer method is used to complete the task allocation scheme.
[0085] SD4: Perform variance calculation on the multiple task allocation schemes formed, and use the minimum variance as the screening criterion to select the final task allocation scheme;
[0086] SD5: According to the selected task allocation scheme, the sequence task group including the time required for the fixed task is allocated to the fault test bench unit.
[0087] It should be noted that: regardless of whether the exception occurs singly or in multiple overlapping cases, it is handled according to the above method. However, when multiple exceptions occur in an overlapping manner, the sequence task group containing the time required for the fixed task in the above step SD5 is assigned to the abnormal test bench unit. Here, it is not a single one, but may be two or even more.
[0088] It's important to note that the dynamic optimization algorithm takes the amount of data to be processed as a prerequisite and constraint, taking into account the amount of code, memory space, and computational response time. The sorting method employed not only demonstrates adaptability to data volume but also requires less code and less memory.
[0089] Iterative optimization:
[0090] This part realizes the optimization of the sample data set in the static optimization algorithm. The above-mentioned exceptions refer to two types: timeout pseudo-exception and program accident exceptions. The test server first completes the collection. After the test task is completed, the corresponding exception is analyzed to determine whether it is a timeout pseudo-exception or a program accident exception. The data of the timeout pseudo-exception and its corresponding test task category are collected. When the amount of collected data reaches a certain level, the time required for the test task can be optimized based on the accumulated historical data of this test task. The data set formed by the optimization of all test task categories can better represent the actual situation. Based on this, the iterative optimization of the sample data set is realized. The specific determination can be completed by using the median method or the mean method.
Claims
1. An automated test method for intelligent connected vehicle software, characterized in that: First, through local area network communication and Internet communication, the basic communication structure based on the vehicle networking cloud platform, the test server, and the test bench unit is set up. The test bench units are set in multiple groups and the working mode is set to run in parallel; Second, based on historical data, the test server initializes task allocation according to the set static optimization algorithm; Finally, each test bench unit runs the test work according to the initialized task allocation until all tests are completed. During the period from when each test bench unit starts running the test work until all tests are completed, if no test operation anomaly occurs, the test results are summarized to the test server; If a test operation anomaly occurs, the test tasks of each test bench unit are interrupted with the fault occurrence time point as the breakpoint, and the set dynamic optimization algorithm is triggered to perform calculations at the time point when the test operation anomaly occurs. According to the calculation results, a re-allocation based on the dynamic optimization algorithm is established for the remaining test tasks, and each test bench unit runs the test work according to the re-allocated plan until all tests are completed, and then the test results are summarized to the test server.
2. The automated test method for intelligent connected vehicle software according to claim 1, characterized in that: The statement of "if a test operation anomaly occurs, the test tasks of each test bench unit are interrupted with the fault occurrence time point as the breakpoint, and the set dynamic optimization algorithm is triggered to perform calculations at the time point when the test operation anomaly occurs" specifically includes the following steps: S1: After the test server receives the anomaly signal, it locates the test bench unit where the anomaly occurs and the corresponding time on the time series of its initialized task allocation; S2: According to the location on the time series of its initialized task allocation at the time when the anomaly occurs, the corresponding times of the remaining test bench units on the time series of their initialized task allocations are determined, so as to determine the remaining time required for the remaining test bench units to complete their current ongoing tasks; and the longest remaining time is determined; S3: Taking the calculated remaining time required for the remaining test bench units to complete their current ongoing tasks as their respective time monitoring, the task interruption of their respective test benches is triggered when their respective test bench units complete their current tasks; S3: When the test bench unit with the longest remaining time completes its current test task, it is judged whether the fault of the abnormal test bench unit has been eliminated. If it has been eliminated, all test bench units are triggered to continue to execute the test tasks according to the initialized task allocation; otherwise, an abnormal end time is set for the abnormal test bench unit, and this end time is used as the time required for a fixed task of the current test bench, and the set dynamic optimization algorithm is triggered to perform calculations.
3. The automated test method for intelligent connected vehicle software according to claim 1, characterized in that: The static optimization algorithm is implemented through the following steps: SS1: Sort the test tasks according to the sorting method, SS2: Determine the theoretical mean according to the total elapsed time and the number of test bench units; SS3: With the theoretical mean as a constraint, perform task allocation for the test tasks to form multiple task allocation schemes; SS4: Perform variance calculation on the multiple task allocation schemes formed, and select the final task allocation scheme with the smallest variance as the screening criterion.
4. An intelligent connected vehicle software automated testing method according to claim 3, wherein: The sorting method in step SS1 is the bubble sorting method.
5. An intelligent connected vehicle software automated testing method according to claim 1, wherein: The dynamic optimization algorithm is implemented through the following steps: SD1: Sort the data set composed of the remaining test tasks according to the Shell sorting method; SD2: Determine the theoretical mean according to the total elapsed time of the remaining test tasks and the number of test bench units; SD3: With the theoretical mean as a constraint, perform task allocation for the test tasks to form multiple task allocation schemes; SD4: Perform variance calculation on the multiple task allocation schemes formed, and select the final task allocation scheme with the smallest variance as the screening criterion.
6. An intelligent connected vehicle software automated testing method according to claim 2, wherein: The dynamic optimization algorithm is implemented through the following steps: SD1: Sort the data set composed of the remaining test tasks according to the Shell sorting method; SD2: Determine the theoretical mean according to the total elapsed time of the remaining test tasks and the number of test bench units; SD3: With the theoretical mean as a constraint, perform task allocation for the test tasks to form multiple task allocation schemes; SD4: Perform variance calculation on the multiple task allocation schemes formed, and select the final task allocation scheme with the smallest variance as the screening criterion; SD5: According to the selected task allocation scheme, assign the sequence task group containing the time required for the fixed task to the abnormal test bench unit.
7. An intelligent connected vehicle software automated testing method according to claim 1, wherein: The static optimization algorithm is also optimized with the test results summarized and stored in the test server as sample data.
Citation Information
Patent Citations
Storage automation testing method and device capable of dynamically adjusting resources
CN114647593A
Unmanned aerial vehicle flight control computer distributed test method and device based on DAG
CN116414671A
Automobile software continuous integration test method and system
CN116541312A
Automation unit test method of multi-task based software and system for the same
KR102201845B1