A method, system, and storage medium for automotive UDS automated testing based on a configuration table

Through the automotive UDS automated testing method based on configuration tables, the problem of low testing efficiency in the prior art is solved, automatic update and synchronization of test content is realized, and testing efficiency and adaptability are improved.

CN112667494BActive Publication Date: 2025-07-04SHANGHAI NAEN AUTOMOTIVE TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011443409.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-08
Publication Date
2025-07-04
Estimated Expiration
2040-12-08

AI Technical Summary

Technical Problem

The existing automotive UDS protocol is inefficient in testing, and the test cases and test environment need to be manually modified, making it difficult to adapt to changes in demand, resulting in more repetitive work and extending the test development time.

Method used

Automotive UDS automated testing method based on configuration tables can automatically update and synchronize test content by generating requirements configuration tables, generating test cases, automatically generating test scripts and automatically executing test scripts.

Benefits of technology

It improves testing efficiency, has adaptability to new requirements, simplifies the maintenance of the test environment, and meets the iterative testing needs of different stages and products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112667494B_ABST
    Figure CN112667494B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, and storage medium for automotive UDS automated testing based on a configuration table. This solution includes generating a requirements configuration table: extracting variable factors during the testing process according to the test specifications to form a requirements configuration table; generating test cases: building an automatic update model based on the requirements configuration table to automatically update the test cases after the requirements configuration table is updated; automatically generating test scripts: matching the test cases with the automated test scripts of different test platforms based on the automated platform configuration table, and automatically generating test scripts according to the automated platform configuration table; automatically executing the test scripts: automatically executing the generated test scripts. The automotive UDS automated testing solution based on the configuration table proposed by the present invention can achieve automatic update of associated test content, thereby keeping the automated scripts synchronized with the test requirements, saving the working time of repeated work, and improving the testing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to automotive technology, specifically to the UDS testing technology of automobiles. Background Art

[0002] With the increasing degree of automotive electronics, CAN network communication is widely used in automotive electronic control units, and the scenarios using the UDS (Unified Diagnostics Services) protocol are increasing, such as fault troubleshooting, offline learning, final inspection testing, and program flashing. Therefore, during the development of automotive component products, it is necessary to conduct detailed tests on the formulated protocol to ensure the use of these functions.

[0003] In the actual application of the UDS protocol, it involves a lot of services and customized content. Therefore, before testing, it is necessary to manually write test cases and test environments. And when the requirements change, it is necessary to manually modify the completed preparatory work repeatedly, which is not conducive to maintaining the improvement of diagnostic requirements.

[0004] Currently, due to the large differences in testing requirements on different products, the test cases and test environments have great uncertainties. Re-updating the test cases and developing automation scripts will consume a lot of time, resulting in low test efficiency.

[0005] Furthermore, during the product development process, the requirements are in a gradually frozen process. When conducting test development, it is necessary to conduct detailed and accurate tests on the protocol and the parts customized by the vehicle factory. The change of requirements makes there are many fixed and repetitive tasks in the re-development process, resulting in non-adaptability to new requirements and being not conducive to the maintenance of the test environment.

[0006] Furthermore, the same product also has differences in different development stages. Due to reasons such as the customer development progress, the testing content also has stage differences and needs to be modified and tested repeatedly.

[0007] As a result, in the existing UDS protocol testing process, from requirement analysis to actual test execution, it often needs to go through multiple manual modifications, with great repeatability and fixity, which prolongs the test development time. Summary of the Invention

[0008] Aiming at the problem of low test efficiency of the existing automotive UDS protocol, a new UDS protocol test scheme is needed.

[0009] For this reason, the purpose of the present invention is to provide an automotive UDS automated test method based on a configuration table, thereby improving the test efficiency of automotive UDS; on this basis, this embodiment further provides an automotive UDS automated test system based on a configuration table, and a corresponding storage medium.

[0010] To achieve the above object, the vehicle UDS automated test method based on a configuration table provided by the present invention includes:

[0011] Generate a requirements configuration table: Extract variable factors in the test process according to the test specification to form a requirements configuration table;

[0012] Generate test cases: Based on the requirements configuration table, construct an automatic update model to automatically update the test cases after the requirements configuration table is updated;

[0013] Automatically generate test scripts: Match the test cases with the automated test scripts of different test platforms based on the automated platform configuration table, and automatically generate test scripts according to the automated platform configuration table;

[0014] Automatically execute the test scripts: Automatically execute the generated test scripts.

[0015] Further, the requirements configuration table includes a basic information configuration table, a service configuration table, a DID configuration table, and a test case enablement configuration table.

[0016] Further, when generating test cases, the method extracts one or more rules included in the preset conditions and trigger actions in the test cases, and updates the expected results in the test cases in combination with the information in the configuration table, thereby realizing the establishment of the corresponding model.

[0017] Further, when generating test cases, the method obtains the information in the configuration table through the constructed automatic update model and automatically updates it into the test cases. The test cases are associated with the information of multiple configuration tables through formulas. The configuration table is the information source. When the information in the configuration table changes, the content in the test cases will be updated.

[0018] Further, when automatically generating test scripts, the method extracts information according to the names of the underlying keywords corresponding to the preset conditions, trigger actions, and expected results in the test cases, and thus generates test scripts for the preset conditions, trigger actions, and expected results.

[0019] Further, when automatically generating test scripts, for the selected operating platform of the test scripts, generate test scripts for the preset conditions, trigger actions, and expected results corresponding to the platform, and generate test scripts corresponding to the platform rules for the test cases according to the platform-specific rules. To achieve the above object, the vehicle UDS automated test system based on a configuration table provided by the present invention includes:

[0020] A requirements configuration table generation module, which extracts variable factors in the test process according to the test specification to form a requirements configuration table;

[0021] A test case generation module that obtains the information in the requirement configuration table formed by the requirement configuration table generation module and automatically updates it to the test cases;

[0022] A test script automatic generation module that matches the test cases generated by the test case generation module with the automated test scripts of the corresponding test platform based on the automated platform configuration table and automatically generates test scripts according to the automated platform configuration table;

[0023] A test script automatic execution module that obtains and executes the test scripts generated by the test script automatic generation module.

[0024] Further, the test case generation module associates the generated test cases with the information in the requirement configuration table formed by the requirement configuration table generation module. The same test case can be associated with multiple pieces of information in the configuration information table, enabling the test cases to be fully associated with the variable factors in the test requirements.

[0025] Further, the test script automatic generation module obtains the keyword names corresponding to the preconditions, trigger actions, and expected results in the test cases, extracts information according to the names of the underlying keywords corresponding to the preconditions, trigger actions, and expected results in the test cases, selects different platforms according to the platform configuration table, generates test scripts for the preconditions, trigger actions, and expected results corresponding to the platform, and generates the final test scripts according to the platform-specific rules.

[0026] To achieve the above object, the storage medium provided by the present invention includes a stored program that executes the above-mentioned automotive UDS automated test method.

[0027] The automotive UDS automated test solution based on the configuration table proposed by the present invention can realize the automatic update and association of the test content, thereby keeping the automated scripts synchronized with the test requirements, saving the time for repeated work, and improving the test efficiency.

[0028] The automotive UDS automated test solution based on the configuration table proposed by the present invention is portable for different products, has adaptability to new requirements, and is easy to maintain the test environment.

[0029] The automotive UDS automated test solution based on the configuration table proposed by the present invention also meets the iterative test requirements at different stages of product testing through an automated implementation method. Description of the Drawings

[0030] The present invention will be further described below in conjunction with the drawings and specific embodiments.

[0031] Figure 1This is a schematic diagram of the UDS automated test process in the embodiments of the present invention. Detailed implementation manners

[0032] In order to make the technical means, creative features, achieved purposes and effects of the present invention easy to understand, the present invention will be further described below with reference to specific illustrations.

[0033] Aiming at the problem of low efficiency in the existing automotive UDS test solutions, the present invention provides an automotive UDS test solution based on a configuration table to achieve automated testing of automotive UDS.

[0034] This test solution analyzes the continuously changing test requirements and fills the test-related content after analysis into the pre-designed configuration table. An automatic update model is designed between the configuration table and the test cases to achieve automatic update of the test cases after the content of the configuration table is updated, avoiding the manual update method.

[0035] Meanwhile, an improved configuration table is designed between the test cases and the automated scripts in this solution. This configuration table extracts the possible variable factors during the test according to the requirements of the test specifications. These variable information is classified according to the content to form multiple tables, which form different components of the requirements configuration table.

[0036] In this way, corresponding automated scripts are generated for different test platforms, shortening the development time of the automated scripts, improving the test efficiency, and also greatly meeting the continuously changing test requirements of the products.

[0037] Accordingly, the automotive UDS automatic test solution based on the configuration table provided by this solution mainly includes six parts: requirement analysis, forming a requirements configuration table, generating test cases, an automated platform configuration table, generating automated scripts, and automated execution.

[0038] When this solution conducts requirement analysis, test points are extracted from documents such as standard protocols and vehicle manufacturer diagnostic specifications to form test specifications.

[0039] After this solution completes the requirement analysis, a requirements configuration table is formed. Specifically, according to the test specifications, the variable factors during the test are extracted to form the requirements configuration table.

[0040] After this solution forms the corresponding requirements configuration table, test cases will be generated. Specifically, an association model is created between the requirements configuration table and the test cases. This association model associates the information in the configuration table in the test cases, and based on this association model, automatic update of the test cases is achieved after the requirements configuration table is updated.

[0041] Aiming at the differences in the scripts required for different test platforms in this solution, an automated platform configuration table is used to match the test cases with the automated scripts of different platforms, facilitating the meeting of cross-platform requirements.

[0042] Specifically, the automation platform configuration table here is used to construct the test environment that the test script needs to execute. Different test platforms can be added to this configuration table. Selecting different test platforms will generate test scripts corresponding to the platforms based on the corresponding formulas.

[0043] This solution generates automation scripts based on the automation platform configuration table. Specifically, after selecting the corresponding test platform, according to the automation platform configuration table, the automatic generation of test scripts is realized.

[0044] Specifically, the test environments corresponding to different platforms are different. After selecting the platform, test scripts for preset conditions, trigger actions, and expected results corresponding to the platform can be generated according to the formula, and the final test scripts are generated according to the specific rules of the platform.

[0045] After automatically generating the test scripts in this solution, they are automatically executed, thereby completing the test of the automotive UDS.

[0046] Based on the universality and strong scalability of the EXCEL software, an example of the automotive UDS test solution based on the configuration table given in this solution is illustrated on EXCEL here.

[0047] See Figure 1 As shown, the main components of the automotive UDS automation test solution based on the configuration table in this example are composed of the following parts in cooperation.

[0048] (1) Requirement analysis.

[0049] In this example, according to the protocol, product specifications or other custom documents, test information is extracted, relevant test points are sorted out, and a test specification is formed. According to the test specification, complete test cases are designed based on EXCEL.

[0050] (2) Design the requirement configuration table.

[0051] According to the test specification and the existing test cases, variable factors affecting the test cases are extracted, such as changes in preset conditions, trigger conditions, expected results, etc.

[0052] Since the information in the configuration table needs to be referenced by the test cases, when designing the requirement configuration table, according to the requirements of the test specification, variable factors in the test process are extracted, and similar information is flexibly and reasonably classified to form multiple relevant configuration tables, so that the information in the test can be comprehensively covered and classified into multiple tables to form different components of the requirement configuration table.

[0053] In the implementation of this example solution, all variable factors are reasonably classified and placed in corresponding positions, thus forming modules such as the basic information configuration table, service configuration table, DID configuration table, and test case enablement configuration table in the configuration table. In this way, when the requirements change, only the corresponding factors in the corresponding configuration table need to be updated.

[0054] Specifically, the basic information configuration table stores information such as the addressing ID of the ECU and time parameters;

[0055] The service configuration table stores whether the test points corresponding to the service are supported;

[0056] The DID configuration table stores DID information, including its specific DID, length, and whether it is readable and writable, etc.;

[0057] The test case enablement configuration table can set the enable flag of the test case under certain conditions to determine whether the test case is executed.

[0058] It should be noted here that when designing the requirements configuration table for this solution, relevant configuration tables can be added or reduced according to actual usage requirements to maximize the utilization of test information.

[0059] (3) Generate test cases.

[0060] Since the test cases in this example are implemented on EXCEL, this example uses formulas to establish a model to update the test cases and their results.

[0061] Specifically, this solution uses formulas in the test cases to associate them with the information in the configuration table to form an association model; the same test case may be associated with multiple pieces of information in the configuration information table, enabling the test case to be fully associated with the variable factors in the test requirements.

[0062] Furthermore, after designing the model using formulas, the information in the configuration table is obtained through this model and automatically updated to the test cases. When the configuration table information changes, the modules associated with this information will change, and the test cases will change.

[0063] It should be noted here that under normal circumstances, the model does not need to be changed after it is created. If a new test scheme is found, the model can be updated to update the test cases under this rule.

[0064] (4) Automated platform configuration table.

[0065] For different test platforms, there are corresponding test scripts. This example designs a model between the test cases and the test scripts. Through the implementation of the automated platform configuration table, the generated scripts are matched with the test platform.

[0066] The platform configuration table is used to construct the test environment required for the test script to run. The scripts for different test platforms have their specific rules. Select the platform on which the script needs to be executed according to the platform configuration table, and add the generation rules of the preset conditions, trigger actions, and expected results corresponding to the platform to the formula.

[0067] (5) Generate an automated script.

[0068] After the test cases are updated, according to the preset conditions, trigger conditions, and expected results of the test cases, using the designed model and the automated platform configuration table, an automated script can be generated.

[0069] There are corresponding underlying keywords for the preset conditions, trigger actions, and expected results in the test cases. The established model extracts information according to the names of the keywords, thereby realizing the generation of test scripts for the preset conditions, trigger actions, and expected results.

[0070] Furthermore, after selecting and determining the running platform of the test script, use the formula to generate test scripts for the preset conditions, trigger actions, and expected results corresponding to the platform, and generate the final test script according to the specific rules of the platform.

[0071] (6) Automated execution.

[0072] Execute the automatically generated test script through an automated execution method, which can meet the requirements of repeated testing of the product.

[0073] The formed automotive UDS automated test solution uses the configuration table to update the requirements for UDS diagnostic testing, enhances the adaptability to new requirements, and can be automatically updated after the configuration table information is updated, avoiding subsequent repetitive work. When this solution is specifically applied, when performing iterative testing during the product development process or porting to different products, only the configuration table needs to be updated to generate automated scripts, thereby establishing an automated test environment for UDS.

[0074] Based on the above solution, the formed automotive UDS automated test solution can constitute a corresponding automotive UDS automated test system when specifically applied. Based on the configuration table, it realizes the automated test of automotive UDS.

[0075] Specifically, for the above automotive UDS automated test solution, a corresponding software program can be constituted. This software program executes the above automotive UDS automated test method and is stored in a corresponding storage medium for the processor to retrieve and execute.

[0076] As an example, the formed automotive UDS automated test system is mainly composed of a requirement configuration table generation module, a test case generation module, a test script automatic generation module, and a test script automatic execution module that cooperate with each other.

[0077] The requirement configuration table generation module here extracts variable factors during the testing process according to the test specifications to form a requirement configuration table.

[0078] The test case generation module here obtains the information in the requirement configuration table formed by the requirement configuration table generation module and automatically updates it to the test cases.

[0079] This test case generation module associates the generated test cases with the information in the requirement configuration table formed by the requirement configuration table generation module using a formula. The same test case may be associated with multiple pieces of information in the configuration information table, enabling the test cases to be fully associated with the variable factors in the test requirements, thereby achieving automatic update of relevant information.

[0080] The test script automatic generation module here matches the test cases generated by the test case generation module with the automated test scripts of the corresponding test platform based on the automated platform configuration table and automatically generates test scripts according to the automated platform configuration table.

[0081] The preset conditions, trigger actions, and expected results set in the test cases all have their corresponding underlying keywords, and the expected results can be updated according to the preset conditions and trigger actions. This test script automatic generation module extracts information according to the names of the keywords to generate test scripts for the preset conditions, trigger actions, and expected results.

[0082] In this way, when the system is running, for the selected test script running platform, it uses a formula to generate test scripts for the corresponding preset conditions, trigger actions, and expected results of the platform and generates the final test scripts according to the specific rules of the platform.

[0083] The test script automatic execution module here obtains and executes the test scripts generated by the test script automatic generation module.

[0084] The automotive UDS automated test system thus constituted can generate automated test scripts corresponding to the test platform by using the test cases updated by the configuration table in combination with the automated platform configuration table, which is beneficial to shortening the test time and facilitating the maintenance of the test environment.

[0085] The above method of the present invention, or a specific system unit, or a part thereof, is a pure software architecture and can be deployed on a physical medium through program code, such as a hard disk, an optical disc, or any electronic device (such as a smart phone, a computer-readable storage medium). When the machine loads the program code and executes it (such as a smart phone loads and executes), the machine becomes a device for implementing the present invention. The above method and device of the present invention can also be transmitted in the form of program code through some transmission media, such as cables, optical fibers, or any transmission type. When the program code is received, loaded, and executed by a machine (such as a smart phone), the machine becomes a device for implementing the present invention.

[0086] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and the description in the specification are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and all these changes and improvements fall within the scope of the present invention claimed. The scope of the present invention claimed is defined by the appended claims and their equivalents.

Claims

1. An automotive UDS automated test method based on a configuration table, characterized in that, The UDS automated test method consists of the following steps: Step (1) First, generate a requirements configuration table: According to the test specifications, extract the variable factors in the test process to form a requirements configuration table. The variable factors are classified according to their content to form multiple tables, which are different components of the requirements configuration table. The information in the requirements configuration table needs to be referenced by test cases, including a basic information configuration table, a service configuration table, a DID configuration table, and a test case enablement configuration table; The basic information configuration table stores the addressing ID and time parameters of the ECU. The service configuration table stores whether the test points corresponding to the services are supported. The DID configuration table stores the information of the DID, including the specific DID, length, and whether it is readable and writable; The test case enablement configuration table can set the enable flag of the test case under certain conditions to determine whether the test case is executed; Step (2) Then, generate test cases: Generate test cases on EXCEL. Based on the requirements configuration table, use formulas to construct an automatic update model. In the test cases, use formulas to associate the test cases with the information in the requirements configuration table generated in step (1) to form an associated automatic update model; The same test case can be associated with multiple pieces of information in the requirements configuration table, enabling the test case to be fully associated with the variable factors in the test requirements; After forming the associated automatic update model using formulas, obtain the information in the requirements configuration table generated in step (1) through the formed automatic update model and automatically update it into the test cases; When the information in the requirements configuration table changes, the associated automatic update model will change, and the corresponding test cases will change; The formed automatic update model can update the test cases under this rule for a new test plan; Step (3) Then, automatically generate test scripts: Based on the automated platform configuration table, match the generated test cases with the automated test scripts of different test platforms, and automatically generate test scripts according to the automated platform configuration table; The automated platform configuration table is used to constitute the test environment that the test scripts need to execute, and different test platforms can be added to the configuration table; Select the test platform that the script needs to execute according to the automated platform configuration table, and add the generation rules of the preset conditions, trigger actions, and expected results corresponding to the test platform to the formula, so that the automatically generated scripts for different test platforms have their specific rules; After the test cases are updated, generate automated scripts according to the preset conditions, trigger conditions, and expected results of the test cases, using the designed model between the test cases and the test scripts and the automated platform configuration table; The preset conditions, trigger actions, and expected results in the test cases all have their corresponding underlying keywords, and the established model extracts information according to the names of the underlying keywords corresponding to the preset conditions, trigger actions, and expected results; After selecting and determining the operating platform of the test script, use formulas to generate test scripts for the preset conditions, trigger actions, and expected results corresponding to the platform, and generate the final test script according to the specific rules of the platform; Step (4) finally automatically executes the test script: Automatically execute the generated test script.

2. The automotive UDS automated test method according to claim 1, characterized in that When generating test cases, the method extracts one or more rules included in the preset conditions and triggering actions in the test cases, and updates the expected results in the test cases in combination with the information in the configuration table to form an automatic update model.

3. The automotive UDS automated test system based on the configuration table is characterized in that, It includes: A requirements configuration table generation module, which extracts variable factors in the test process according to the test specifications to form a requirements configuration table; The information in the requirements configuration table needs to be referenced by test cases, including a basic information configuration table, a service configuration table, a DID configuration table, and a test case enablement configuration table; In the basic information configuration table, the addressing ID and time parameters of the ECU are placed. In the service configuration table, whether the test points corresponding to the services are supported is placed. In the DID configuration table, the information of the DID is stored, including the specific DID, length, and whether it is readable and writable. The test case enablement configuration table can set the enable flag of the test case under certain conditions to determine whether the test case is executed; A test case generation module, which obtains the information in the requirements configuration table formed by the requirements configuration table generation module and automatically updates it to the test cases; the test case generation module generates test cases on EXCEL. Based on the requirements configuration table generated by the requirements configuration table generation module, it uses formulas to construct an automatic update model, and associates the test cases with the information in the requirements configuration table generated by the requirements configuration table generation module in the test cases to form an associated automatic update model; the same test case can be associated with multiple pieces of information in the requirements configuration table generated by the requirements configuration table generation module, so that the test cases are fully associated with the variable factors in the test requirements; after forming the associated automatic update model using formulas, it obtains the information in the requirements configuration table generated by the requirements configuration table generation module through this automatic update model and automatically updates it to the test cases; when the information in the requirements configuration table changes, the associated automatic update model will change, and the corresponding test cases will change; the formed automatic update model can update the test cases under this rule for a new test plan; A test script automatic generation module, which matches the test cases generated by the test case generation module with the automated test scripts of the corresponding test platform based on the automated platform configuration table, and automatically generates test scripts according to the automated platform configuration table; The automated platform configuration table is used to constitute the test environment that the test script needs to execute, and different test platforms can be added to the configuration table; according to the automated platform configuration table, select the test platform that the script needs to execute, and add the generation rules of the preset conditions, triggering actions, and expected results corresponding to the test platform to the formula, so that the automatically generated scripts for different test platforms have their specific rules; after the test cases are updated, according to the preset conditions, triggering conditions, and expected results of the test cases, use the designed model between the test cases and the test scripts and the automated platform configuration table to generate automated scripts; The preconditions, triggering actions, and expected results in the test cases all have their corresponding underlying keywords. The established model extracts information according to the names of the underlying keywords corresponding to the preconditions, triggering actions, and expected results. After selecting and determining the operating platform of the test script, use a formula to generate test scripts for the preconditions, triggering actions, and expected results corresponding to the platform, and generate the final test script according to platform-specific rules. A test script automatic execution module, which obtains and executes the test scripts generated by the test script automatic generation module.

4. A storage medium, the storage medium comprising a stored program, characterized in that, The program executes the automotive UDS automated test method according to claim 1 or 2.

Citation Information

Patent Citations

  • Method and system for realizing automatic software testing

    CN102693183A

  • Multi-platform-universal test method, device and system

    CN105205006A

  • Application interface test case generation method and a server

    CN109800149A

  • Automatic interface testing method and device

    CN110765018A