Intelligent networked automobile software automatic testing method
By building a parallel test structure in intelligent connected vehicle software testing and combining static and dynamic optimization algorithms, the allocation of test tasks is optimized, and the problems of low testing efficiency and high cost are solved, and an efficient and low-cost testing process is achieved.
Patent Information
- Application Number
- CN202311854317.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-07-11
AI Technical Summary
In the prior art, the software testing of intelligent connected vehicles is low in efficiency and high in cost, making it difficult to meet the continuous iteration needs during the software life cycle.
The parallel testing structure is built using LAN communication and Internet communication, and combined with static optimization algorithms and dynamic optimization algorithms, the initialization and dynamic optimization of test tasks are realized, and task allocation is optimized through bubble sorting and Hill sorting, reducing memory usage and calculation response time.
It improves testing efficiency, reduces testing costs, ensures real-time and efficient testing process, and adapts to the continuous iteration needs during the software life cycle.
Smart Images

Figure HDA0004641810220000011 
Figure HDA0004641810220000012
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent connected vehicles, and particularly relates to a method for automatically testing intelligent connected vehicle software. Background Art
[0002] With the development of intelligent connected vehicles, in the era of software-defined vehicles, the software of intelligent connected vehicles presents two major characteristics. One is that the scale is getting larger and larger, and the other is that the software life cycle has been extended from the previous R & D to mass production + 90 days to the entire life cycle of vehicle use. Thus, during the entire life cycle of the vehicle, the vehicle software needs to be continuously iteratively developed. With the growth of the software scale, the workload of software testing has increased sharply. Therefore, how to improve the efficiency of intelligent connected vehicle software testing and reduce the cost of software testing has become a problem that the industry needs to solve.
[0003] The invention application with the application number: CN201210382231.4 discloses "a method for simulating and testing automotive software source code based on the UPPAAL model". The input of this system is a queue of triples composed of a set of data variables, a set of event variables, and a set of clock constraints, and the output is a set of data variables. To achieve the automation and real-time performance of the source code simulation test system, the UPPAAL model is transformed into C++ code. After the software source code and the UPPAAL model after code transformation process all the input data, if their output results are consistent, it can be determined that the source code is correct; otherwise, there are errors.
[0004] The invention application with the application number: CN202210533934.6 discloses "an automated automotive software testing system and testing method", including a configuration terminal; a requirements terminal, used to input requirements and review the requirements. After the review is passed, the requirements are transmitted to the coding terminal and the testing terminal; the coding terminal is used to parse the requirements, encode test cases according to the requirements, and verify the test cases. After the verification is passed, the test cases are transmitted to the testing terminal; the testing terminal is used to perform tests according to the test cases and requirements and output a test report. The present invention can be applicable to automatically testing and analyzing multiple products simultaneously, and finally output test results, locate problems, and track problems.
[0005] The invention application with the application number: CN202310092194.1 discloses "a method, system, computer and readable storage medium for automotive software development". 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 according to the historical automotive software application data; formulating a target engineering plan corresponding to the target automotive project according to the boundary conditions, and extracting various work indicators in the target engineering plan. The work indicators include engineering objectives, attribute objectives, and quality objectives; designing a corresponding original automotive software based on the engineering objectives, attribute objectives, and quality objectives, and performing a robustness test on the original automotive software according to a preset test standard to obtain the corresponding target automotive software.
[0006] The invention application with the application number: CN 202310096014.7 discloses "a method, device and equipment for testing automotive software". The method for testing the automotive software includes: obtaining the quality level of the test task according to the test item information of the test task; determining the test method information of the test task according to the quality level; and allocating the test task to the corresponding test resources for testing according to the test method information to obtain a test result.
[0007] The invention application with the 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, steps are added that the new test node sets the test status variable to a first value in the pre-processing stage and sets the test status variable to a second value in the post-processing stage. In this way, when an exception occurs during the execution of the test task by the test node, the server issues a breakpoint resume test task, and the test node reconnects to the test tool. After the reconnection is successful, the test cases with the test status variable not being 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 the test efficiency and reduce the test cost.
[0009] To achieve the above technical objectives, the present invention provides an automated test method for intelligent connected vehicle software, and its technical solution is as follows:
[0010] An automated test method for intelligent connected vehicle software,
[0011] First, through local area network communication and Internet communication, the setting of the basic communication structure based on the vehicle networking cloud platform, the test server, and the test bench unit is completed. Among them, multiple groups of test bench units are set and the working mode is set to parallel operation;
[0012] Secondly, based on historical data, the test server initializes task allocation according to the set static optimization algorithm;
[0013] 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 exception occurs, the test results are summarized to the test server; if a test operation exception occurs, the test tasks of each test bench unit are interrupted with the moment of the exception occurrence as the breakpoint, and the set dynamic optimization algorithm is triggered to perform calculations at the moment of the test operation exception occurrence. 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.
[0014] Furthermore,
[0015] The statement of "if a test operation exception occurs, the test tasks of each test bench unit are interrupted with the moment of the exception occurrence as the breakpoint, and the set dynamic optimization algorithm is triggered to perform calculations at the moment of the test operation exception occurrence" specifically includes the following steps:
[0016] S1: After the test server receives the exception signal, it locates the test bench unit where the exception occurs and the corresponding moment in the time series of its initialized task allocation.
[0017] S2: According to the location of the moment of the exception occurrence in the time series of its initialized task allocation, determine the corresponding moments of the remaining test bench units in the time series of their initialized task allocations, so as to determine the remaining time required for the remaining test bench units to complete their current tasks being executed; and determine the longest remaining time.
[0018] S3: Use the calculated remaining time required for the remaining test bench units to complete their current tasks being executed as their respective time monitoring, and trigger the task interruption of their respective test benches when their respective test bench units complete their current tasks.
[0019] S3: When the test bench unit with the longest remaining time completes its current test task, determine whether the exception of the test bench unit with the execution exception has been resolved. If it has been resolved, trigger all test bench units to continue executing the test tasks according to the initialized task allocation; otherwise, set an exception end time for the test bench unit with the running exception, and use this end time as the time required for a fixed task of the current test bench, and trigger the set dynamic optimization algorithm to perform calculations.
[0020] Furthermore,
[0021] The described static optimization algorithm is implemented through the following steps:
[0022] SS1: Sort the test tasks according to the sorting method.
[0023] SS2: Determine the theoretical mean according to the total elapsed time and the number of test bench units.
[0024] SS3: With the theoretical mean as a constraint, allocate the test tasks to form multiple task allocation schemes.
[0025] 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.
[0026] Furthermore,
[0027] The sorting method in step SS1 is the bubble sort method.
[0028] 5. According to the intelligent networked vehicle software automated testing method described in claim 1, it is characterized in that:
[0029] The described dynamic optimization algorithm is implemented through the following steps:
[0030] SD1: Sort the data set composed of the remaining test tasks according to the Shell sort method.
[0031] SD2: Determine the theoretical mean according to the total elapsed time of the remaining test tasks and the number of test bench units.
[0032] SD3: With the theoretical mean as a constraint, allocate the test tasks to form multiple task allocation schemes.
[0033] 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.
[0034] Furthermore,
[0035] The described dynamic optimization algorithm is implemented through the following steps:
[0036] SD1: Sort the data set composed of the remaining test tasks according to the Shell sort method.
[0037] SD2: Determine the theoretical mean according to the total elapsed time of the remaining test tasks and the number of test bench units.
[0038] SD3: With the theoretical mean as a constraint, allocate the test tasks to form multiple task allocation schemes.
[0039] SD4: Perform variance calculation on the formed multiple task allocation schemes, and select the final task allocation scheme with the smallest variance as the screening criterion.
[0040] SD5: According to the selected task allocation scheme, allocate the sequence task group containing the time required for the fixed task to the abnormal test bench unit.
[0041] Furthermore,
[0042] Also, use the test results summarized in the test server as sample data to optimize the static optimization algorithm.
[0043] An intelligent networked vehicle software automated testing method of the present invention first builds a communication and processing structure capable of parallel testing tasks based on local area network communication and Internet communication, establishing the basis for efficient testing; then combines the static optimization algorithm serving the initial stage of testing and the dynamic optimization algorithm serving the testing process to establish a testing method with full-process real-time tracking and dynamic optimization from the start to the end of the test. Among them, the theoretical structure based on the static optimization algorithm and the dynamic optimization algorithm is simple and easy to implement, and has a small memory footprint; since the static optimization algorithm does not need to consider time factors, the bubble sort method is selected to complete the sorting first, and for the dynamic optimization algorithm part, the code amount, memory space, and calculation response time are considered in consideration of the data volume to be processed. The selected sorting method not only reflects the adaptability to the data volume, but also shows the characteristics of small code amount and no need to use additional memory space. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a schematic diagram of the communication structure in the present invention;
[0045] Figure 2 is Figure 1 a schematic diagram of information interaction of the communication structure in the testing process. DETAILED DESCRIPTION OF THE INVENTION
[0046] Next, a detailed description of an intelligent networked vehicle software automated testing method of the present invention will be further described according to the accompanying drawings of the specification, working principles, and processes.
[0047] For easy understanding, the following description is divided into two parts: the communication structure and information interaction part and the optimization part.
[0048] Communication Structure and Information Interaction Part:
[0049] To improve the efficiency of testing, first, based on the settings of local area network communication, Internet communication, and multiple test bench units, the basic communication structure of the vehicle networking cloud platform, test server, and test bench units was set up, enabling multiple test bench units to run in parallel.
[0050] The established basic communication structure is as Figure 1 shown.
[0051] Among them, the test bench unit consists of a test terminal and the network of the controller node under test. The test terminal has the ability to control the power supply, switch, and communicate with the node network of the controller under test. The test terminal can perform real-time interaction and data collection on the node network of the controller under test required in the test task. The test terminals in these test bench units are connected to the test server through the test local area network. During the test, the in-vehicle terminal in the node network of the controller under test will interact with the vehicle networking cloud platform under test through the wireless communication network.
[0052] The test server among them connects all test bench units through the test local area network, and also connects and interacts with the vehicle networking platform under test through the Internet.
[0053] The work tasks of the test server are divided into the following parts:
[0054] 1. Dynamically schedule and allocate test tasks to different test bench units;
[0055] 2. Collaborate with the test terminal to complete data interaction with the vehicle networking cloud platform under test during the test task;
[0056] 3. Receive and process the test data uploaded by each test terminal, generate test reports, etc.
[0057] And the specific information interaction formed, such as Figure 2 shown, is specifically as follows:
[0058] During the test, the main task executed by the test terminal is to perform real-time interaction with the node network of the controller under test, while the test server is responsible for data interaction with the vehicle networking cloud platform and interaction with the test terminal. The test task is jointly completed through the cooperation of the test server and the test terminal, ensuring both the real-time nature of the interaction with the controller network under test and the data interaction closed-loop and the analysis and processing performance of a large amount of test data with the cloud platform.
[0059] The tasks specifically executed on the test terminal are as follows:
[0060] 1) Inject vehicle simulation data into the node network of the controller under test in real time
[0061] 2) Collect the data of the node network of the controller under test in real time
[0062] 3) Interact with the network of the controller node under test in real time
[0063] 4) Process test data with small computational workload in real time
[0064] 5) Upload complex test data to the test server
[0065] The tasks executed on the test server are as follows:
[0066] 1) Interact with the test terminal to execute test tasks
[0067] 2) Conduct data interaction with the vehicle networking cloud platform
[0068] 3) Receive data uploaded by the test terminal
[0069] 4) Perform computational processing on the test data
[0070] 5) Store the test results
[0071] 6) Generate test reports.
[0072] Optimization part:
[0073] For the convenience of understanding, the following will separately elaborate on the static optimization algorithm, dynamic optimization algorithm, and iterative optimization. The specific execution and calculation of these three are all completed through the test server. It should be noted that: whether it is the static optimization algorithm part or the dynamic optimization algorithm part below, they both follow a two-step pattern of first sorting and then determining the optimal allocation plan. Such a structural setting avoids the complexity of direct optimization on the one hand, and on the other hand, respectively considers the two states of needing to pay attention to time factors and not needing to pay attention to time factors, and conducts corresponding technical settings. In the sorting that needs to consider time factors, the code volume, memory space, and computational response time are taken into account.
[0074] Static optimization algorithm:
[0075] This algorithm serves at the initial stage of the test, providing an optimal allocation path for each initial test bench unit. By first sorting the test task set, and then screening and forming the final initial task allocation according to the principle of the smallest theoretical mean and variance. Specifically as follows:
[0076] Since the process of the static optimization method does not need to consider time factors, the sorting can be completed by the bubble sort method. For the test set to be sorted, first calculate the total elapsed time, then calculate the theoretical mean according to the number of test bench units, and then, with the theoretical mean as a constraint, perform task allocation for the test tasks to form multiple task allocation schemes. The process of forming multiple tasks here can first use the mean as a screening criterion to determine the position of the value whose sum of two adjacent values in the array is closest to the mean, and divide the array into two parts accordingly, and then complete it according to the hash table method or the two-pointer method; finally, perform variance calculation on the formed multiple task allocation schemes, and select the final task allocation scheme with the smallest variance as the screening criterion.
[0077] Dynamic optimization algorithm:
[0078] This algorithm serves the test process and provides an optimal dynamic allocation path for each test bench unit in the test process. Specifically, it first sorts the remaining test task set, and then screens and forms the final dynamic task allocation according to the principles of the theoretical mean and the smallest variance. The specific steps are as follows:
[0079] S1: After the test server receives the operation exception signal, locate the test bench unit where the exception occurs and the corresponding moment in the time series of its initial task allocation.
[0080] S2: According to the location of the moment when the exception occurs in the time series of its initial task allocation, determine the corresponding moments of the other test bench units in the time series of their initial task allocations, so as to determine the remaining time required for the other test bench units to complete their current tasks; and determine the longest remaining time.
[0081] S3: Use the calculated remaining time required for the other test bench units to complete their current tasks as their respective time monitors, and trigger the task interruption of their respective test benches when their respective test bench units complete their current tasks.
[0082] S3: When the test bench unit with the longest remaining time completes the current test task, judge whether the exception of the abnormal test bench unit has been resolved. If it has been resolved, trigger all the test bench units to continue executing the test tasks according to the initial task allocation; otherwise, set a failure 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, and trigger the set dynamic optimization algorithm to perform calculations. And the corresponding dynamic optimization algorithm, the specific process is as follows:
[0083] SD1: Sort the data set composed of the remaining test tasks according to the Shell sort method.
[0084] SD2: Determine the theoretical mean according to the total elapsed time of the remaining test tasks and the number of test bench units;
[0085] SD3: With the theoretical mean as a constraint, perform task allocation on the test tasks to form multiple task allocation schemes; the formation of these multiple task allocation schemes is the same as the method in the static part above, that is: first, use the mean as the screening criterion to determine the position of the value whose sum of two adjacent values in the array is closest to the mean, divide the array into two parts accordingly, and then complete it according to the hash table method or the two-pointer method.
[0086] SD4: Perform variance calculation on the formed multiple task allocation schemes, and select the final task allocation scheme with the smallest variance as the screening criterion;
[0087] SD5: According to the selected task allocation scheme, allocate the sequence task group containing the time required for the fixed task to the fault test bench unit.
[0088] It should be noted that: regardless of whether the anomaly is single or multiple overlaps occur, it is processed according to the above method. It's just that when multiple anomalies overlap, in step SD5 above, the sequence task group containing the time required for the fixed task is allocated to the anomaly test bench unit, and here it may not be single, but may be two or even more.
[0089] It should be explained that: the dynamic optimization algorithm part takes the amount of data to be processed as a premise and constraint, and takes into account the code volume, memory space, and calculation response time. In addition to reflecting the adaptability to the data volume, the sorting method adopted also reflects the characteristics of small code volume and the need to use additional memory space.
[0090] Iterative optimization:
[0091] This part realizes the optimization of the sample data set in the static optimization algorithm. The anomalies mentioned above refer to two types: timeout pseudo-anomalies and program accident anomalies; they are first collected by the test server; after the test tasks are completed, it is analyzed and distinguished whether the corresponding anomaly belongs to a timeout pseudo-anomaly or a program accident anomaly; and data collection is carried out on the timeout pseudo-anomalies and their corresponding test task categories. When the amount of collected data reaches a certain level, the time required for the test task can be optimized according to the historical data volume accumulated for this type of test task. The data set formed by optimizing all test task categories can better represent the actual situation. Accordingly, the iterative optimization of the sample data set is realized. The specific determination can be carried out by the median method or can be completed according to the mean method.
Claims
1. An intelligent networked vehicle software automated testing method, 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 anomaly occurrence time point as the breakpoint, and the set dynamic optimization algorithm is triggered to perform operations at the time point when the test operation anomaly occurs. According to the operation 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 intelligent networked vehicle software automated testing method according to claim 1, characterized in that: The "if a test operation anomaly occurs, the test tasks of each test bench unit are interrupted with the anomaly occurrence time point as the breakpoint, and the set dynamic optimization algorithm is triggered to perform operations 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 in the time series of its initialized task allocation; S2: According to the location of the anomaly occurrence time in the time series of its initialized task allocation, determine the corresponding time in the time series of the initialized task allocation of the other test bench units, so as to determine the remaining time required for the other test bench units to complete their current tasks being executed; and determine the longest remaining time; S3: Use the calculated remaining time required for the other test bench units to complete their current tasks being executed as their respective time monitors, and trigger the task interruption of their respective test benches 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, judge whether the anomaly of the abnormal test bench unit has been eliminated. If it has been eliminated, trigger all test bench units to continue to execute the test tasks according to the initialized task allocation; otherwise, set an abnormal end time for the abnormal test bench unit in operation, and use this end time as the time required for a fixed task of the current test bench, and trigger the set dynamic optimization algorithm to perform operations.
3. The intelligent networked vehicle software automated testing method according to claim 1, characterized in that: The static optimization algorithm is implemented through the following steps: SS1: Complete the sorting of 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 calculations 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 networked vehicle software automated testing method according to claim 3, characterized in that: The sorting method in step SS1 is the bubble sorting method.
5. An intelligent networked vehicle software automated testing method according to claim 1, characterized in that: 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 calculations 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 networked vehicle software automated testing method according to claim 2, characterized in that: 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 calculations 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, allocate the sequence task group containing the time required for the fixed tasks to the abnormal test bench units.
7. An intelligent networked vehicle software automated testing method according to claim 1, characterized in that: 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
Automobile software source code simulation test method based on UPPAAL model
CN102866952A
Automatic automobile software test system and test method
CN114840430A
Automobile software testing method, device and equipment
CN116069644A
Automobile software development method and system, computer and readable storage medium
CN116204161A
Automobile software continuous integration test method and system
CN116541312A