A method and system for automating ADAS simulation testing
By providing automated methods and systems for ADAS simulation testing, the problems of high dependence on commercial software tools in the existing technology and high technical threshold are solved, and the ability to quickly generate a large number of new functional test cases is realized, and the automation rate and testing efficiency are improved.
Patent Information
- Application Number
- CN202510117468.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-01-24
AI Technical Summary
The existing ADAS simulation testing methods have high dependence on commercial software tools and high technical barriers, and cannot quickly generate a large number of new functions test cases, resulting in low automation rate and low manual testing efficiency.
It provides an automated method and system for ADAS simulation testing. It extracts signal value configuration files and test case configuration files by generating preset format simulation test scenarios, automatically processes test case metadata files, uses the test library of DYNA4 software to perform simulation tests, and judges that the use case passes or fails based on the test results.
It realizes the automation of ADAS simulation tests, and can complete the setup and execution of a large number of test cases in a short time, reducing operational complexity and time cost, and improving automation rate and testing efficiency.
Smart Images

Figure CN119576798B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of simulation testing technology, and in particular to an automated method and system for ADAS simulation testing. Background Art
[0002] Some existing independently developed automated testing methods are highly dependent on a variety of commercial software tools such as vehicle model software (such as carsim, carmaker, etc.), scenario simulation software (such as VTD, Prescan, etc.), and real-time systems (such as NI, dspace, etc.). The software tools need to be purchased, and testers are required to be proficient in using the software tools and have a certain code foundation, resulting in a high technical threshold for entry and a slow start for newcomers.
[0003] ADAS test scenarios are rich and varied, the number of test cases is huge, manual testing is inefficient, and execution takes a long time, making it even more difficult to quickly increase the automation rate. In order to adapt to the rapid iteration of development methods, a large number of test cases for new functions need to be generated quickly. The time is tight and the task is heavy. It is costly to complete all the work manually, and the test case style is not uniform.
[0004] Therefore, in view of the above situation, there is an urgent need to provide an automated method and system for ADAS simulation testing to overcome the shortcomings in current practical applications. Summary of the invention
[0005] The technical purpose of this application is to provide an automated method and system for ADAS simulation testing to address the technical problems that current automated testing methods have a high reliance on commercial software tools, have high technical barriers, and are unable to quickly generate a large number of test cases for new functions.
[0006] In order to achieve the above technical objectives, this application adopts the following technical solutions.
[0007] In a first aspect, an embodiment of the present application provides an automated method for ADAS simulation testing, including: an automated method for ADAS simulation testing, characterized in that it includes:
[0008] Generate a simulation test scenario extraction signal value configuration file and a test case configuration file in a preset format according to the test case metadata file;
[0009] Generate a test case set file according to the test case configuration file;
[0010] Load the test case set file in the test library DYNA4 project of the DYNA4 software; perform simulation testing based on the simulation test scenario configuration file in the test library DYNA4 project and the test case set file to generate a simulation test result file;
[0011] A signal value configuration file is extracted according to the simulation test scenario, an expected signal real-time value and an expected signal value are extracted from the simulation test result file, and a pass or fail of the test case is determined according to the comparison result.
[0012] Furthermore, the test case metadata file includes a test case name, a test task name, a simulation test scenario file name, a parameter name and parameter value in an ADAS simulation test scenario, an expected signal value, and an ADAS behavior trigger signal value.
[0013] Furthermore, the simulation test scenario extraction signal value configuration file includes the simulation test scenario name and the corresponding expected signal name and ADAS behavior trigger signal name; the test case configuration file includes the test case name, test task name, simulation test scenario name, ADAS simulation test DYN4 project configuration file name, configuration parameter name, configuration parameter value, expected signal value and ADAS behavior trigger signal value.
[0014] Further, according to the test case metadata file, a simulation test scenario extraction signal value configuration file and a test case configuration file in a preset format are generated, specifically including:
[0015] Generate a test configuration folder, using the file name of the test case metadata file as the name of the test configuration folder, and the test configuration folder is used to store the simulation test scenario extraction signal value configuration file and the test case configuration file;
[0016] Traverse each data subset in the test case metadata file, for each data subset, use the simulation test scenario name as an index, generate the simulation test scenario signal value extraction configuration file according to all the simulation test scenario names and the corresponding expected signal names and ADAS behavior trigger signal names, and use the name of the corresponding data subset as the file name of the simulation test scenario signal value extraction configuration file; use the test case name as an index, and generate the test case configuration file according to the test task name, simulation test scenario name, ADAS simulation test DYN4 project configuration file name, configuration parameter name, configuration parameter value, expected signal value and ADAS behavior trigger signal value corresponding to the test case name; use the preset test set name plus the first preset string as the file name of the test case configuration file.
[0017] Furthermore, the test case metadata file is an Excel format file, and the data subset is a sheet work page.
[0018] Furthermore, the method further comprises:
[0019] If the test library DYNA4 project lacks the required simulation test scenario file, a new simulation test scenario file is added to the test library DYNA4 project to meet the ADAS simulation test target.
[0020] Further, generating a test case set file according to the test case configuration file includes:
[0021] Parse the test case configuration file to obtain the test set name and each test case in the file name of the test case configuration file;
[0022] Generate a test case collection folder, the test case collection folder includes a test case collection file, and the preset test collection name combined with a second preset character is used as the name of the test case collection folder;
[0023] In the test case set file, according to each of the test cases obtained by parsing, each of the test case names combined with the second preset characters are used as the test function name to generate a test function including the specified test steps.
[0024] Furthermore, after the test library DYNA4 project of the DYNA4 software loads the test case set file, the method further includes:
[0025] According to the specified test steps of the test function, the corresponding configuration parameters in the simulation test scenario file in the test library DYNA4 project are modified according to the configuration parameter values using Matlab API.
[0026] Furthermore, the simulation test scenario extraction signal value configuration file and the test case configuration file are both yaml files.
[0027] In a second aspect, an embodiment of the present application further provides an automated system for ADAS simulation testing, the system comprising:
[0028] A test case configuration module is used to generate a simulation test scenario extraction signal value configuration file and a test case configuration file in a preset format according to the test case metadata file;
[0029] A test case generation module, used to generate a test case set file according to the test case configuration file;
[0030] A test case execution module is used to load the test case set file in the test library DYNA4 project of the DYNA4 software; perform simulation testing based on the simulation test scenario file in the test library DYNA4 project and the test case set file, and generate a simulation test result file;
[0031] The test data analysis module is used to extract the signal value configuration file according to the simulation test scenario, extract the expected signal real-time value and the expected signal value from the simulation test result file, and judge whether the test case passes or fails according to the comparison result.
[0032] Compared with the prior art, the automated method and system for ADAS simulation testing provided by the embodiments of the present application can achieve beneficial technical effects that include at least: being able to realize the automation of the ADAS simulation test process, and being able to complete the setting and execution of a large number of test cases in a short time; testers do not need to manually write complex configuration scripts, but only need to focus on the setting of key information such as test scenarios and parameters in the metadata file, which greatly simplifies the operation process. When there is a new function, it is only necessary to add the test scenarios, parameters, expected results and other related information corresponding to the new function in the metadata file in the established format, and the corresponding test case configuration files and test case collection files can be automatically generated, so it has the ability to quickly generate a large number of new function test cases. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The drawings described herein are for explanation purposes only and are not intended to limit the scope of the present application in any way. In addition, the shapes and proportional dimensions of the components in the drawings are only for illustration purposes and are used to help understand the present application. They do not specifically limit the shapes and proportional dimensions of the components of the present application. Under the guidance of the present application, those skilled in the art can select various possible shapes and proportional dimensions to implement the present application according to specific circumstances. In the drawings:
[0034] Figure 1 A schematic flow chart of an automated method for ADAS simulation testing provided in an embodiment of the present application;
[0035] Figure 2 A schematic diagram of the structural framework of an automated system for ADAS simulation testing provided in an embodiment of the present application;
[0036] Reference numerals:
[0037] 10- Use case configuration module, 11- Test case generation module, 12- Test case execution module, 13- Test data analysis module. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0039] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more features.
[0040] In view of the technical problems of existing testing methods, such as high technical threshold, low efficiency, long time consumption, lack of unified format, and difficulty in automation, the embodiments of the present application propose an automated method and system for simulation testing of an Advanced assisted driving system (ADAS) to solve at least one of the above technical problems.
[0041] Combination Figure 1 , this embodiment provides an automated method for ADAS simulation testing, including:
[0042] Step 210: Generate a simulation test scenario extraction signal value configuration file and a test case configuration file in a preset format according to the test case metadata file.
[0043] Step 220: Generate a test case set file according to the test case configuration file.
[0044] Step 230: Load the test case collection file in the test library DYNA4 project of the DYNA4 software; perform simulation testing based on the simulation test scenario file and the test case collection file in the test library DYNA4 project, and generate a simulation test result file.
[0045] Step 240: extract the signal value configuration file according to the simulation test scenario, extract the expected signal real-time value and the expected signal value from the simulation test result file, and determine whether the test case passes or fails based on the comparison result.
[0046] In some implementations, step 200 is also included before step 210: according to the ADAS simulation test requirements, the tester writes the test case metadata file. If the required simulation test scenario file is missing in the test library DYNA4 project according to the ADAS simulation test target, step 200 may also include adding a new simulation test scenario file to the test library DYNA4 project to meet the ADAS simulation test target. The adding method can be referred to the DYNA4 user manual, and this application will not be repeated.
[0047] In the embodiment, the test case metadata file may be an Excel format file, which includes at least one sheet work page, and one sheet work page may be regarded as a data subset.
[0048] In other embodiments, the test case metadata file may also be generated by other means, such as reading data from a database, or manually writing, etc. The subtable in the database is used to store data, and the data is arranged in rows (records) and columns (fields) in a structured manner, which can also be regarded as a data subset.
[0049] In an embodiment, the test case metadata may include the following data items: test case name, test task name, simulation test scenario file name, ADAS simulation test DYN4 project configuration file name, configuration parameter name, configuration parameter value, expected signal name, expected signal value, ADAS behavior trigger signal name, and ADAS behavior trigger signal value.
[0050] Among them, the test case name is used to clearly identify each specific test case; the test task name is used to clarify the task scope to which the test case belongs; the simulation test scenario file name is used to identify the scenario file name of the simulation test; the simulation scenario parameters required by the ADAS simulation test target are used to identify the simulation scenario-related parameters required for the test; the expected signal name is used to identify the signal name expected to appear in the test; the expected signal value is used to identify the specific value of the corresponding expected signal; the ADAS behavior trigger signal name is used to identify the signal name related to the ADAS behavior trigger; the ADAS behavior trigger signal value is used to identify the specific value corresponding to the ADAS behavior trigger signal.
[0051] In some embodiments, the simulation test scenario extraction signal value configuration file includes the simulation test scenario name and the corresponding expected signal name and ADAS behavior trigger signal name; the test case configuration file includes the test case name, test task name, simulation test scenario name, ADAS simulation test simulation scenario parameter name, ADAS simulation test DYN4 project configuration file name, configuration parameter name, configuration parameter value, expected signal value and ADAS behavior trigger signal value.
[0052] In some embodiments, the simulation test scenario extraction signal value configuration file and the test case configuration file are both yaml files, which can provide the necessary configuration basis for the subsequent automatic batch generation of test case sets. The test case outline excel file may contain various types of test case related information, and the structure is relatively complex. Converting it into a yaml file can organize this information in a standardized format. The yaml file can be easily parsed by various programming languages, such as Python's Pyyaml library, which can easily load yaml data.
[0053] As an example, step 210 specifically includes: generating a test configuration folder, using the file name of the test case metadata file as the name of the test configuration folder, the test configuration folder is used to store the simulation test scenario signal value extraction configuration file and the test case configuration file; traversing each data subset (sheet work page) in the test case metadata file (such as an Excel format file), for each data subset, using the simulation test scenario name as an index, and generating a simulation test scenario signal value extraction configuration file based on all simulation test scenario names and corresponding expected signal names and ADAS behavior trigger signal names, and using the name of the corresponding data subset as the file name of the simulation test scenario signal value extraction configuration file.
[0054] For example, the name of the test configuration folder is the file name of the Excel file, such as "ADAS Test Case Outline.xlsx", and the name of the test configuration folder is "ADAS Test Case Outline". The name of the corresponding sheet work page is the file name of the simulation test scenario signal value extraction configuration file. For example, if the sheet work page is called "Scene 1 Test", the name of the simulation test scenario signal value extraction configuration file is "Scene 1 Test.yaml". The contents of different sheet work pages can be used to generate corresponding simulation test scenario signal value extraction configuration files, which is convenient for distinction and management by function or scenario category.
[0055] As an example, in each sheet work page, there may be multiple simulation test scenarios, and each sheet worksheet scenario has a corresponding expected signal name and ADAS behavior trigger signal name. For example, in the sheet work page "Scenario 1 Test", there is a simulation test scenario called "High-speed Driving Scenario", the expected signal name in this scenario may be "Brake Pedal", and the ADAS behavior trigger signal name may be "Front Obstacle Distance Signal".
[0056] Using these expected signal names and ADAS behavior trigger signal names, generate a simulation test scenario extraction signal value configuration file. The structure of the simulation test scenario extraction signal value configuration file in yaml format may be as follows:
[0057] yaml
[0058] High-speed driving scene:
[0059] Expected signal name:
[0060] -AEB brake pedal
[0061] ADAS behavior trigger signal name:
[0062] - Signal of distance to obstacles ahead.
[0063] Such a configuration file can clearly indicate which signal values need to be paid attention to and extracted for each simulation test scenario, providing clear guidance for subsequent simulation test data processing.
[0064] In the embodiment, the test case name is used as an index, and a test case configuration file is generated according to the test task name, simulation test scenario name, ADAS simulation test DYN4 project configuration file name, configuration parameter name, configuration parameter value, expected signal value and ADAS behavior trigger signal value corresponding to the test case name, and the preset test set name plus the first preset string (such as adding "_case") is used as the file name of the test case configuration file.
[0065] Assuming that the test set is named "ADAS Function Test Set", the generated test case configuration file name is "ADAS Function Test Set_case.yaml". This naming method helps to make it clear that the file is a test case configuration file for a specific test set.
[0066] In the excel file, each test case has its own unique name, for example, "Test Case 1: ACC function test in normal driving scenario".
[0067] The structure of a test case configuration file in yaml format may be as follows:
[0068] yaml
[0069] Test case 1: ACC function test in normal driving scenario:
[0070] Test task name: ADAS function test
[0071] Simulation test scenario name: Normal driving scenario
[0072] The test requires simulation scenario configuration parameter information (configuration parameter name and configuration parameter value): vehicle speed = 60km / h, vehicle distance = 50m
[0073] Expected signal value: 80
[0074] ADAS behavior trigger signal value: distance to the vehicle ahead <50m
[0075] Through such a test case configuration file, the detailed information of each test case is clearly recorded, which is very important for the subsequent automatic batch generation of test case sets and the execution of simulation tests, and provides a specific configuration basis for the entire test process.
[0076] In an embodiment, each data subset (such as each sheet work page) corresponds to a simulation test scenario extraction signal value configuration file and a test case configuration file. This setting is particularly suitable when the test scenarios covered by each sheet work page are complex and independent of each other. For example, in the automotive ADAS system test, one sheet work page may be specifically for various complex scenario tests of the adaptive cruise control (ACC) function, and another sheet work page for different working conditions of the automatic emergency braking (AEB) function. Since the test scenarios, parameter settings and expected results of these two functions are quite different, generating independent test case configuration yaml files for them can enable each configuration file to focus on the testing of specific functions, with a clearer structure and easier maintenance and management.
[0077] Each yaml file is closely related to the test content of a sheet page. When a test scenario needs to be adjusted, only the corresponding yaml file needs to be modified, which will not affect the configuration of other test scenarios, reducing the risk of modification and maintenance costs. For example, if you want to adjust the test parameters of the ACC function, you can directly modify the yaml file generated by the sheet page corresponding to the ACC function.
[0078] In some embodiments, step 220 specifically includes: parsing the test case configuration file, obtaining the test set name and each test case in the file name of the test case configuration file; generating a test case set folder, the test case set folder includes each test case set file, and the name of the test case set folder is a combination of a preset test set name and a second preset character (such as a combination of test_ to concatenate "ADAS function test set" as the name of the test case set folder); in the test case set file, according to each test case obtained by parsing, each test case name is combined with a second preset character as a test function name (such as a combination of test_ to concatenate "ACC function test in normal driving scenario" as the test case set file name), generating a test function including specified steps, such as a test function including pre-processing, configuring simulation scenario parameters, activating test tasks, executing test tasks, obtaining expected signal values, generating test results, post-processing, etc. The test case set file contains multiple test functions, covering all test cases in the test case metadata file.
[0079] In an embodiment, the DYNA4 software is installed on a local computer, and step 230 loads the test case collection file and the related simulation test scenario file into the locally running DYNA4 application. In a specific embodiment, the DYNA4 software can be interacted with by writing a script, for example, using the API (application programming interface) provided by DYNA4. DYNA4 supports Python API, and Python scripts can be written in which API functions are used to load project files, set simulation parameters (these parameters may be obtained from the test case collection file), and then start the simulation test.
[0080] When performing simulation tests based on DYNA4 software, the real test scenario extraction signal value configuration file provides guidance for extracting key signals from the simulation model. The script can use the API of DYNA4 software to accurately locate and mark these signals in the output data of the simulation model according to these configurations. In this way, during the simulation run, the software will focus on recording the data of these signals changing over time.
[0081] The test case configuration file is used to guide the generation of test cases and the execution settings of simulation tests, and to clarify the specific requirements and scenarios of each test case.
[0082] In one embodiment, the DYNA4 API interface is used to load the entire test library DYNA4 project, and according to the steps of the test function in the test set, the Matlab API is used to modify the configuration parameters in the simulation test scenario file according to the configuration parameter values; Python can be used as a bridge to achieve indirect interaction between the DYNA4 API interface and the Matlab API interface.
[0083] After modifying the parameters, call the DYNA4 API interface to reload the entire test database project, activate the corresponding test task and execute it; after the test task is executed, extract the real-time value of the expected signal and the corresponding timestamp from the .mf4 test result file generated by DYNA4.
[0084] In the embodiment, step S240 automatically compares the real-time value of the signal extracted in step S230 with the expected value (including logical operations and numerical operations), determines whether the test case passes or fails based on the comparison result, and draws a line graph of the signal value based on the timestamp.
[0085] In one embodiment, at a certain point in time, when the real-time value of the ADAS behavior trigger signal reaches a set value, it is expected to trigger ADAS related operations to determine whether the expected signal (single or multiple) values at this moment meet the expected comparison logic, and if so, the test case is passed, otherwise, the test case is failed.
[0086] In one embodiment, step S240 uses the allure-pytest module to automatically generate a test report in HTML format according to the test case execution result.
[0087] In one embodiment, the sampling timestamp is calculated based on the execution time of the test task and the sampling frequency (in step S230, the sampling frequency of the scenario test configuration file in the test database project can be modified by calling the Matlab API), and a line graph is drawn using the Matlab API, with the horizontal axis being the sampling timestamp and the vertical axis being the signal value. If multiple signals are in the same line graph, a legend is displayed to allow for a more intuitive viewing of the results.
[0088] Based on the same inventive concept as the above embodiment, the embodiment of the present application also provides an automated system for ADAS simulation testing. The automated system for ADAS simulation testing provided by the embodiment of the present invention is introduced below. The automated system for ADAS simulation testing described below can be considered as an automated system for implementing the ADAS simulation testing provided by the embodiment of the present application, in the functional module architecture; the content described below can be cross-referenced with the above.
[0089] See also Figure 2 The system provided in the embodiment includes a use case configuration module 10, a test case generation module 11, a test case execution module 12 and a test data analysis module 13. Among them, the use case configuration module 10 is used to generate a simulation test scenario extraction signal value configuration file and a test case configuration file in a preset format according to the test case metadata file; the test case generation module 11 is used to generate a test case collection file according to the test case configuration file; the test case execution module 12 is used to load the test case collection file in the test library DYNA4 project of the DYNA4 software; based on the simulation test scenario file and the test case collection file in the test library DYNA4 project, a simulation test is performed to generate a simulation test result file; the test data analysis module 13 is used to extract the signal value configuration file according to the simulation test scenario, extract the expected signal real-time value and the expected signal value from the simulation test result file, and judge whether the test case passes or fails according to the comparison result.
[0090] In some embodiments, the use case configuration module 10 parses the Excel file by calling the Python library file, uses the Excel file name as the name of the test configuration folder, and generates corresponding simulation test scenario extraction signal value configuration file and test case configuration file according to different sheet page names in Excel.
[0091] In one embodiment, the test case generation module 11 reads the test case configuration file by calling the Python library file, and generates a test collection file in the pytest test framework format according to a unified test step standard. The test step standard includes test pre-processing, configuration of simulation scenario parameters, activation of test tasks, execution of test tasks, acquisition of expected signal values, generation of test results, and test post-processing. Test pre-processing is to back up the simulation scenario configuration file that needs to be modified in the test case, and the test post-processing operation is to restore the simulation scenario configuration file in the test database to the simulation scenario configuration file backed up by the pre-processing.
[0092] In one embodiment, the test case execution module 12 includes the specific implementation of all test steps in the test case generation module 11, and can be divided into a DYNA4 submodule, a Matlab submodule, a file processing submodule, and a test set algorithm submodule.
[0093] In one embodiment, the DYNA4 submodule implements functions such as loading the test database project, loading the test database ADAS model configuration file, redirecting the DYNA4 execution log, activating the test task, executing the test task, calling the DYNA4-Matlab API, and obtaining the real-time value of the signal in the test task by calling the DYNA4 API.
[0094] In one embodiment, the Matlab submodule reads, backs up, modifies, and saves the configuration .m file of the simulation test scenario in DYNA4 by calling the Matlab API.
[0095] In one embodiment, the file processing submodule implements the functions of traversing folders, reading yaml files, saving logs, and drawing line graphs by calling Python library files.
[0096] In one embodiment, the test set algorithm submodule calls the DYNA4 submodule to load the test database project, load the test database ADAS model configuration file, and redirect the DYNA4 execution log; calls the Matlab submodule to read, backup, modify, and save the configuration .m file of the simulation test scene in DYNA4; calls the DYNA4 submodule again to load the test database project, load the test database ADAS model configuration file, activate the test task, execute the test task, and obtain the real-time value of the signal in the test task; calls the Python library file to compare the real-time signal data with the expected value; and finally calls the file processing submodule to draw a line graph.
[0097] Generate test case configuration files based on the test case outline Excel; quickly generate test case collection files based on the test case configuration files; improve the efficiency of test case generation and automation, greatly simplify the workload of test case construction, and cover the test requirements generated by rapid iterative development, so that testers with no code foundation or weak code foundation can also participate in test automation work.
[0098] It is understandable that the specific definition of the automated system for ADAS simulation testing provided in this application can be found in the definition of the automated method for ADAS simulation testing above, which will not be repeated here. Each module in the automated system for ADAS simulation testing can be implemented in whole or in part by software, hardware, and a combination thereof. Each of the above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0099] The automated method and system for ADAS simulation testing provided in the embodiments of the present application can automatically generate a test case collection file based on a yaml configuration file, and the test case rules are unified; if the test case needs to be modified, the yaml configuration file can be directly modified, and the test case collection file will be automatically updated during the test execution; simplifying the test case maintenance work and reducing the test case maintenance cost. Automatically trigger execution according to the test case collection file and record test data; compare expected results based on test data, generate test results and data line graphs; the entire test execution process does not require human participation, and automatically generates icon table test results, making test data analysis more intuitive, simplifying the test result analysis process, and saving labor costs. In addition, the embodiment only relies on the DYNA4 simulation tool and matlab, and does not rely on any other commercial testing software, saving test investment costs.
[0100] The above is a detailed introduction to the automated method and system for ADAS simulation testing provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the concept of the present application and should not be construed as limiting the scope of protection of the present application.
Claims
1. An automated method for ADAS simulation testing, characterized in that: include: Generate a simulation test scenario extraction signal value configuration file and a test case configuration file in a preset format according to the test case metadata file; Generate a test case set file according to the test case configuration file; Load the test case set file in the test library DYNA4 project of the DYNA4 software; Perform simulation testing based on the simulation test scenario file in the test library DYNA4 project and the test case set file to generate a simulation test result file; Extracting a signal value configuration file according to the simulation test scenario, extracting an expected signal real-time value and an expected signal value from the simulation test result file, and judging whether the test case passes or fails according to the comparison result; Each data subset in the test case metadata file corresponds to a simulation test scenario extraction signal value configuration file and a test case configuration file.
2. The automated method for ADAS simulation testing according to claim 1, characterized in that: The test case metadata file includes the test case name, test task name, simulation test scenario file name, ADAS simulation test DYN4 project configuration file name, configuration parameter name, configuration parameter value, expected signal name, expected signal value, ADAS behavior trigger signal name and ADAS behavior trigger signal value.
3. The automated method for ADAS simulation testing according to claim 1, characterized in that: The simulation test scenario extraction signal value configuration file includes the full simulation test scenario name and the corresponding expected signal name and ADAS behavior trigger signal name; the test case configuration file includes the test case name, test task name, ADAS simulation test scenario name, ADAS simulation test DYN4 project configuration file name, configuration parameter name, configuration parameter value, ADAS simulation test behavior trigger signal value and ADAS simulation test expected signal value.
4. The automated method for ADAS simulation testing according to claim 2, characterized in that: Generate a simulation test scenario extraction signal value configuration file and a test case configuration file in a preset format according to the test case metadata file, including: Generate a test configuration folder, using the file name of the test case metadata file as the name of the test configuration folder, and the test configuration folder is used to store the simulation test scenario extraction signal value configuration file and the test case configuration file; Traverse each data subset in the test case metadata file, for each data subset, use the simulation test scenario name as an index, generate the simulation test scenario signal value extraction configuration file according to all the simulation test scenario names and the corresponding expected signal names and ADAS behavior trigger signal names, and use the name of the corresponding data subset as the file name of the simulation test scenario signal value extraction configuration file; use the test case name as an index, and generate the test case configuration file according to the test task name, simulation test scenario name, ADAS simulation test DYN4 project configuration file name, configuration parameter name, configuration parameter value, expected signal value and ADAS behavior trigger signal value corresponding to the test case name; use the preset test set name plus the first preset string as the file name of the test case configuration file.
5. The automated method for ADAS simulation testing according to claim 1, characterized in that: The test case metadata file is an Excel format file, and the data subset is a sheet work page.
6. The automated method for ADAS simulation testing according to claim 1, characterized in that: The method further comprises: If the test library DYNA4 project lacks the required simulation test scenario file, a new simulation test scenario file is added to the test library DYNA4 project to meet the ADAS simulation test target.
7. The automated method for ADAS simulation testing according to claim 3, characterized in that: Generate a test case set file according to the test case configuration file, including: Parse the test case configuration file to obtain the test set name and each test case in the file name of the test case configuration file; Generate a test case collection folder, the test case collection folder includes a test case collection file, and the preset test collection name combined with a second preset character is used as the name of the test case collection folder; In the test case set file, according to each of the test cases obtained by parsing, each of the test case names combined with the second preset characters are used as the test function name to generate a test function including the specified test steps.
8. The automated method for ADAS simulation testing according to claim 7, characterized in that: After the test library DYNA4 project of the DYNA4 software loads the test case set file, the method further includes: According to the specified test steps of the test function, the corresponding configuration parameters in the simulation test scenario file in the test library DYNA4 project are modified according to the configuration parameter values using Matlab API.
9. The automated method for ADAS simulation testing according to claim 1, characterized in that: The simulation test scenario extraction signal value configuration file and the test case configuration file are both yaml files.
10. An automated system for ADAS simulation testing, characterized in that: The system comprises: A test case configuration module is used to generate a simulation test scenario extraction signal value configuration file and a test case configuration file in a preset format according to the test case metadata file; A test case generation module, used to generate a test case set file according to the test case configuration file; A test case execution module is used to load the test case set file in the test library DYNA4 project of the DYNA4 software; perform simulation testing based on the simulation test scenario configuration file in the test library DYNA4 project and the test case set file, and generate a simulation test result file; A test data analysis module is used to extract a signal value configuration file according to the simulation test scenario, extract the expected signal real-time value and the expected signal value from the simulation test result file, and judge whether the test case passes or fails according to the comparison result; Each data subset in the test case metadata file corresponds to a simulation test scenario extraction signal value configuration file and a test case configuration file.
Citation Information
Patent Citations
Interface testing method and device, equipment and storage medium
CN116126672A
Automatic driving simulation test case generalization method and system
CN119336633A