Test case generation method and apparatus, test management method and system, and storage medium

By building a test model based on the ‘scenario-interaction-service’ paradigm in graphical tools and creating assertions in the model, the challenge of automated testing under the intelligent scenario in-vehicle software architecture is solved, and an efficient testing process and in-vehicle software design is achieved.

WO2025098159A1PCT designated stage expired Publication Date: 2025-05-15GUANGZHOU AUTOMOBILE GROUP CO LTD

Patent Information

Application Number
PCT/CN2024/127233
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-06
Filing Date
2024-10-25
Publication Date
2025-05-15

AI Technical Summary

Technical Problem

The distributed and multifunctional entity characteristics of the intelligent scenario vehicle-mounted software architecture make automated testing, especially test case design, face major challenges.

Method used

Provides a test case generation method based on graphical use case editing tools. By creating scene, interaction and service operation icons, establishing logical process relationships, generating test models, and creating assertions in the model, connecting them to the logical process, configuring the execution environment, compiling and executing the test model, and adding it to the test case library after success.

Benefits of technology

Automatic testing of intelligent scenarios of on-board software has been realized, improving the efficiency of the test process and on-board software design, and reducing the testing time and labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024127233_15052025_PF_FP_ABST
    Figure CN2024127233_15052025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention is a test case generation method, comprising the steps of: in a graphical tool, editing to form a test model, wherein a scenario, an interaction, and service content are edited, and creating a logic process relationship among the scenario, the interaction, and the service content; in the test model, respectively creating corresponding assertions for the scenario, the interaction, and the service content, and adding the corresponding assertions into the logic process relationship in series; performing test resource scheduling, and configuring a matched use case execution environment for the test model; and compiling the test model into a script which can be automatically executed and executing the script, and after all the assertions are successful, adding the test model into a test case library. Further disclosed in the present invention are a corresponding test management method and system, an apparatus, and a storage medium. By implementing the present invention, the development and automatic test of vehicle-mounted software in an intelligent scenario can be realized, improving the efficiency of a test process and vehicle-mounted software design.
Need to check novelty before this filing date? Find Prior Art

Description

Test case generation method, test management method, device, system and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on November 6, 2023, with application number 202311464251.0, and invention name “A test case generation method, test management method, device, system and storage medium”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present invention relates to the technical field of intelligent connected vehicles, and in particular to a test case generation method, a test management method, a device, a system and a storage medium. Background Art

[0003] Software-defined vehicles (SDVs) have become a new direction for the development of intelligent vehicles. Intelligent scenario-based in-vehicle software products are the mainstream entry point for SDV implementation among automakers. Currently, in-vehicle software architecture is transitioning from a highly coupled hardware-software architecture to a service-oriented architecture (SOA). Compared to traditional in-vehicle software development, SOA-based intelligent scenario-based in-vehicle software relies more on standardized service interfaces between the vehicle and the cloud, loosely coupled service mechanisms, and composable and extensible service features. This allows developers to respond to iterative and changing customer needs with minimal software changes.

[0004] However, the unique distributed nature of the intelligent vehicle software architecture and its composition of multiple independent functional entities will bring more challenges to subsequent automated testing, especially the design of test cases.

[0005] Summary of the Invention

[0006] The technical problem to be solved by this invention is to provide a test case generation method, test management method, device, system, and storage medium. Based on a graphical test case editing tool, this tool can realize automated testing of vehicle-mounted software development in intelligent scenarios, making it more intuitive and simple for users to design and modify use cases, thereby improving the efficiency of the testing process and vehicle-mounted software design.

[0007] To solve the above technical problems, as one aspect of the present invention, a method for generating a test case is provided, which comprises the following steps:

[0008] In the graphical tool, a test model is created for each vehicle model's selected functions in the vehicle software. This includes editing the corresponding scenarios, interactions, and service content, and establishing a logical flow relationship between the three.

[0009] In the test model, corresponding assertions are created for the scenarios, interactions, and service contents, and are serially added to the logical process relationship;

[0010] Perform test resource scheduling and configure a use case execution environment that matches the test model;

[0011] The test model is compiled into an automatically executable script and executed. After all assertions are successful, the test model is added to the test case library.

[0012] In the graphical tool, for each vehicle model's selected function in the in-vehicle software, a test model is edited based on a ternary approach, which at least includes editing the corresponding scenarios, interactions, and service content of the test model and establishing a logical process relationship between the three, further including:

[0013] Parse the selected function and obtain the editing content corresponding to the function, including the corresponding scene, interaction and service content;

[0014] Generate a scene operation icon for the scene corresponding to the selected function, associate the corresponding scene acquisition interface with the scene operation icon, and edit the scene target content;

[0015] Generate an interactive operation icon for the interaction corresponding to the selected function, associate the corresponding interactive interface with the scene operation icon, and edit the interactive state and content value;

[0016] Generate a service operation icon for the service corresponding to the selected function, associate the corresponding service interface with the scene operation icon, and edit the service target content;

[0017] The scene operation icon, the interactive operation icon and the service operation icon are connected by lines to create a logical process relationship between the three.

[0018] In the test model, corresponding assertions are created for scenarios, interactions, and service contents, and are serially added to the logical process relationship. Each assertion includes meta-methods, operation methods, and parameters, further including:

[0019] For each scenario, interaction, and service content, create corresponding assertions. Each assertion contains meta-methods, operation methods, and parameters.

[0020] The meta-method is the implementation method of the vehicle status signal, various interaction states and contents corresponding to the scenario, interaction and service content; the operation mode is the logical judgment operation between the signal obtained by the meta-method and the parameter group; the parameter is the parameter value combination based on the signal obtained by the meta-method;

[0021] Connect the created corresponding assertions in series after the scenario operation icon, the interaction operation icon and the service operation icon to update the use case logic flow.

[0022] The test model is compiled into an automatically executable script and executed, and after all assertions are successful, the test model is added to the test case library, further comprising:

[0023] After the test passes, the test result collection function is used to collect information about each component in the test model and each assertion separately;

[0024] Return the collected information in the form of a structure.

[0025] Accordingly, as another aspect of the present invention, a test management method is provided for performing automated testing on vehicle-mounted software in a smart scenario, comprising the following steps:

[0026] Obtain a test plan, select a test vehicle model, open the corresponding test case library, and select test cases with the same test environment requirements and associate them with the test plan; wherein the test cases are obtained using the method described above;

[0027] Obtain the scripts corresponding to the test cases under the test plan and arrange them;

[0028] Execute the scripts corresponding to each test case in sequence and collect relevant information during the execution process in sequence;

[0029] A test report is generated and displayed according to the script structure.

[0030] Accordingly, as another aspect of the present invention, a test case generation device is provided, comprising:

[0031] A test model creation unit is used to edit and form a test model for the selected functions in the vehicle software of each vehicle model, including editing the scenarios, interactions and service contents corresponding to the test model and establishing a logical process relationship between the three;

[0032] An assertion creation processing unit, configured to create corresponding assertions for scenarios, interactions, and service contents in the test model, and add them serially to the logical process relationship;

[0033] A test resource configuration unit, configured to perform test resource scheduling and configure a matching use case execution environment for the test model;

[0034] The test case detection unit is used to compile the test model into an automatically executable script and execute it. After all assertions are successful, the test model is added to the test case library.

[0035] Wherein, the test model creation unit further includes:

[0036] A parsing processing unit, configured to parse the selected function and obtain editing content corresponding to the function, including corresponding scenes, interactions, and service content;

[0037] A scene operation icon generating unit, configured to generate a scene operation icon for the scene corresponding to the selected function, associate the scene operation icon with the corresponding scene acquisition interface, and edit the scene target content;

[0038] An interactive operation icon generating unit, configured to generate an interactive operation icon for the interaction corresponding to the selected function, associate a corresponding interactive interface with the scene operation icon, and edit the interactive state and content value;

[0039] A service operation icon generating unit is used to generate a service operation icon for the service corresponding to the selected function, associate the corresponding service interface with the scene operation icon, and edit the service target content;

[0040] The logic flow establishing unit is used to connect the scene operation icon, the interactive operation icon and the service operation icon in a line manner to establish a logic flow relationship between the three.

[0041] The assertion creation processing unit further includes:

[0042] The assertion generation unit is used to create corresponding assertions for each scenario, interaction, and service content. Each assertion contains the meta-method, operation method, and parameters.

[0043] The meta-method is the implementation method of the vehicle status signal, various interaction states and contents corresponding to the scenario, interaction and service content; the operation mode is the logical judgment operation between the signal obtained by the meta-method and the parameter group; the parameter is the parameter value combination based on the signal obtained by the meta-method;

[0044] The concatenation processing unit is used to concatenate the created corresponding assertions after the scenario operation icon, the interactive operation icon and the service operation icon, and update the use case logic flow.

[0045] Wherein, the test case detection unit further includes:

[0046] A compiling and executing unit, configured to compile the test model into an automatically executable script and execute the script;

[0047] An execution information collection unit is used to collect information about each component in the test model and each assertion separately after the test passes, using a test result collection function, and return the collected information in the form of a structure;

[0048] The test case determination unit is used to add the test model to the test case library after all assertions are successful.

[0049] Accordingly, as another aspect of the present invention, a test management system is provided for performing automated testing on vehicle-mounted software for smart scenarios, comprising:

[0050] Interaction management subsystem, used to provide a visual interface for human-computer interaction and low-code modeling tools;

[0051] The test management subsystem includes a test management module, a system management module, and a data management module. The test management module is responsible for defining, editing, and initiating test processes, and automatically generating test reports based on test results. The system management module is responsible for managing system users, roles, and permissions. The data management module is responsible for managing the service parameter groups and assertion data groups involved in the use case, as well as their logical relationships with various vehicle models, systems, and products.

[0052] The vehicle service management subsystem is responsible for synchronizing the vehicle SOA service interface or the bus interface corresponding to the vehicle function signal mapping. It supports connection with the CANoe (CAN open environment, CAN bus development environment) for hardware-in-the-loop (HIL) testing or directly connecting to the software-in-the-loop (SIL) testing environment;

[0053] Wherein, the test case generation device is deployed in the test management module.

[0054] As another aspect of the present invention, a computer-readable storage medium is provided, in which computer instructions are stored. When the computer instructions are executed by a processor, the method as described above is implemented.

[0055] The implementation of the embodiments of the present invention has the following beneficial effects:

[0056] This invention provides an automated test management method for in-vehicle software based on intelligent scenarios. Within a graphical tool, a test model creation unit constructs a test model based on the "scenario-interaction-service" paradigm. Simultaneously, an assertion creation processing unit creates corresponding assertions based on the "metamethod-operation-parameter" structure for the core nodes and parameter groups described by the ternary structure test model, and appends them to each operation in the test model. This creates an automated test environment that is easy to manage, assists in design, enables rapid execution, and allows for data reuse, reducing testing time and labor costs.

[0057] In an embodiment of the present invention, use case design, execution process and data management, case writing and testing process are combined, and a graphical use case editing tool is used to enable users to design and change use cases more intuitively and simply. The comprehensive test data collection function allows testers to fully grasp the information flow during the test process, which is conducive to locating problems and making targeted design changes.

[0058] In the embodiment of the present invention, when configuring the test environment, use cases in the same test environment can be associated to form an automated test plan. By executing the test plan, the automated execution of a series of use cases and the automatic generation of reports can be achieved, which can reduce a lot of repetitive work.

[0059] At the same time, testers can make differentiated settings for the parameters of the models to be tested and assertions in the graphical interface, which can realize use case management of software of different versions and different models. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, without paying any creative work, other drawings obtained based on these drawings still fall within the scope of the present invention.

[0061] FIG1 is a schematic diagram of an application environment of a test management system provided by the present invention;

[0062] FIG2 is a schematic structural diagram of an embodiment of a test case generation device provided by the present invention;

[0063] FIG3 is a schematic diagram of the structure of the test model creation unit in FIG2 ;

[0064] FIG4 is a schematic diagram of a structure for establishing a test model in a graphical tool according to an embodiment of the present invention;

[0065] FIG5 is a schematic diagram of the structure of the assertion creation processing unit in FIG2 ;

[0066] FIG6 is a schematic diagram of a structure for adding assertion information to a test model according to an embodiment of the present invention;

[0067] FIG7 is a schematic diagram of the structure of the test case detection unit in FIG2;

[0068] FIG8 is a schematic diagram of the main flow of an embodiment of a method for generating a test case provided by the present invention;

[0069] FIG9 is a more detailed schematic diagram of the process in FIG8 ;

[0070] FIG10 is a schematic diagram of the main flow of an embodiment of a test management generation method provided by the present invention;

[0071] FIG11 is a more detailed schematic diagram of the process in FIG10 . DETAILED DESCRIPTION

[0072] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be described in further detail below with reference to the accompanying drawings.

[0073] First, some terms involved in the present invention are explained as follows:

[0074] User Experience Software Product (UESP): This refers to user-perceived automotive features that require software to implement, such as smart keys and smart welcome systems. A UESP software product consists of a three-element structure: scenario-interaction-service. This structure can be used to analyze existing in-cabin features.

[0075] Scenario: refers to multiple status signals of the vehicle, vehicle user or external conditions and the regular combination of status signals through logical relationships. For example: when the vehicle speed is greater than 100km / h, the vehicle's state at this time is considered to be a scenario.

[0076] Interaction: refers to the information transmission and feedback method between vehicles and people, which is composed of interaction cycles and interaction levels, including interaction logic, interaction specifications, interaction methods, etc., such as TTS broadcasts, text messages, H5 pop-ups, etc.

[0077] Service: refers to two major categories including in-vehicle functional services and third-party ecological services; among them, the in-vehicle functional services: specifically refer to services that can be controlled and executed by various types of in-vehicle controllers (ECUs), which can be divided into cockpit domain, intelligent driving domain, body domain, chassis domain, power domain and other types of services according to domain controllers. The present invention mainly targets cockpit domain and part of body domain vehicle control services, including: window control, seats, air conditioning, car computer operation, etc. The third-party ecological services: refer to "oil and electricity maintenance, food, clothing, housing and transportation" services provided by third-party ecological service providers, including: music services, navigation services, refueling / charging services, etc.

[0078] FIG1 is a schematic diagram showing an application environment of a test management system provided by the present invention. In this embodiment, the test management system provided by the present invention is used to perform automated testing on vehicle-mounted software in smart scenarios, and includes:

[0079] Interaction management subsystem, used to provide a visual interface for human-computer interaction and low-code modeling tools;

[0080] The test management subsystem includes a test management module, a system management module, and a data management module. The test management module is responsible for defining, editing, and initiating test processes, and automatically generating test reports based on test results. The system management module is responsible for managing system users, roles, and permissions. The data management module is responsible for managing the service parameter groups and assertion data groups involved in the use case, as well as their logical relationships with various vehicle models, systems, and products.

[0081] The vehicle service management subsystem is responsible for synchronizing the vehicle SOA service interface (for vehicles with SOA) or the interface corresponding to the vehicle function signal mapping on the bus (for general vehicles). It supports connection with CANoe for HIL (hardware-in-the-loop) testing or direct connection to the SIL (software-in-the-loop) testing environment.

[0082] The following will provide a more detailed description of the details of a test management system provided by the present invention in conjunction with the contents of FIG. 2 to FIG. 5 .

[0083] FIG2 is a schematic diagram illustrating the structure of an embodiment of a test case generation device provided by the present invention. In conjunction with FIG2 to FIG7 , in this embodiment, the test case generation device is deployed in the test management module described in FIG1 , more specifically, in the test case management submodule thereof. More specifically, the test case generation device 1 includes:

[0084] The test model creation unit 10 is used to edit and form a test model for the selected function in the vehicle software of each vehicle model based on a ternary method in a graphical tool, including editing the scenario, interaction and service content corresponding to the test model and establishing a logical process relationship between the three;

[0085] An assertion creation processing unit 11 is used to create corresponding assertions for scenarios, interactions, and service contents in the test model, and add them in series to the logical process relationship, wherein each assertion includes a meta-method, an operation method, and parameters;

[0086] A test resource configuration unit 12 is used to schedule test resources and configure a matching use case execution environment for the test model;

[0087] The test case detection unit 13 is used to compile the test model into an automatically executable script and execute it. After all assertions are successful, the test model is added to the test case library.

[0088] As shown in FIG3 , in a specific example, the test model creation unit 10 further includes:

[0089] The parsing processing unit 100 is used to parse the selected function and obtain the editing content corresponding to the function, including the corresponding scene, interaction, and service content. For example, in an intelligent scene, the selected function is "When the temperature inside the car is higher than 26 degrees, a voice prompt is given to the user whether to turn on the air conditioner, and the air conditioner is turned on after the user's voice confirms the command." The scene can be parsed to obtain the scene "The temperature inside the car is higher than 26 degrees", the interaction is "The voice prompt is given to the user to turn on the air conditioner", and the service is "Turn on the air conditioner";

[0090] The scenario operation icon generation unit 101 is used to generate a scenario operation icon for the scenario corresponding to the selected function in the graphical tool, associate the corresponding scenario collection interface with the scenario operation icon, and edit the scenario target content. In the example of Figure 4, the generation needs to generate a scenario operation icon (obtaining the vehicle interior temperature operation icon). By right-clicking the icon, the vehicle service management subsystem can be used to obtain the service editing interface for collecting the vehicle interior temperature, and a target value "temperature parameter" editing menu is created at the same time.

[0091] The interactive operation icon generation unit 102 is used to generate an interactive operation icon for the interaction corresponding to the selected function in the graphical tool, associate the corresponding interactive interface with the scene operation icon, and edit the interaction status and content value; in the example of Figure 4, it is necessary to generate an interactive operation icon (voice setting icon). By right-clicking the icon, you can use the vehicle service management subsystem to obtain the TTS voice interaction interface, and at the same time create a monitoring voice prompt status and content menu, for example, set the voice prompt status to "trigger" and set the voice content to "Do you want to turn on the air conditioner?"

[0092] The service operation icon generation unit 103 is used to generate a service operation icon for the service corresponding to the selected function in the graphical tool. The corresponding service interface is associated with the scene operation icon, and the service target content is edited; in the example of Figure 4, a service operation icon (turn on the air conditioner icon) needs to be generated. By right-clicking the icon, the vehicle service management subsystem can be used to obtain the air conditioner service editing interface and create a target value "air conditioner on status" editing menu.

[0093] The logic flow establishment unit 104 is used to connect the scene operation icons, interactive operation icons, and service operation icons using lines to establish a logical flow relationship between the three. As shown in Figure 4, the lines are used to represent the logical sequence between the get car temperature operation icon, the voice setting icon, and the air conditioning start icon.

[0094] FIG4 is a schematic diagram showing a test model established by the test model creation unit 10 .

[0095] As shown in FIG5 , in a specific example, the assertion creation processing unit 11 further includes:

[0096] Assertion generation unit 110, for each scenario, interaction, and service content, creating corresponding assertions based on the "metamethod-operation-parameter" paradigm;

[0097] The meta-methods are the implementation methods for the vehicle status signals, various interaction states, and contents corresponding to the scenarios, interactions, and service contents. More specifically, the meta-methods refer to the implementation methods for obtaining various vehicle status signals (including service information of third-party ecological services), various interaction states, and contents. For example, when obtaining vehicle speed or vehicle pop-up window status, this can be achieved by calling the in-vehicle SOA service interface or reading and writing bus signals corresponding to the bus based on external devices such as CanOE.

[0098] The operation mode is a logical judgment operation between the signal and the parameter group obtained based on the meta-method; more specifically, the operation mode generally includes logical operations such as "equal to", "greater than", "less than", and "contains";

[0099] The parameters are parameter value combinations based on meta-methods to obtain signals; it can be understood that by combining with the operation mode, the asserted parameter combinations can be horizontally expanded to implement various judgment logics on the core nodes of the model to be tested and the parameter groups behind them.

[0100] As shown in Figure 6, for the example in Figure 4, corresponding assertions can be created for the three core elements of scenario, interaction, and service based on the "metamethod-operation method-parameter" paradigm. For example, the scenario assertion (determining the temperature in the figure) can be set to "temperature - lower than -26 degrees" or "temperature - range - 26 to 30 degrees"; the interaction assertion (determining the interaction state and content in the figure) can be set to "voice state - yes - trigger" or "voice content - yes - whether the air conditioner is turned on"; and the service assertion (determining the air conditioner state) can be set to "air conditioner state - yes - turned on" or "air conditioner state - yes - turned on" for example. Multiple assertions can be generated for a single model element.

[0101] The concatenation processing unit 111 is used to concatenate the corresponding assertions created after the scene operation icons, interaction operation icons, and service operation icons in the graphical tool to update the use case logic flow. For example, in Figure 6, the assertion for determining temperature is concatenated after the icon for obtaining the vehicle temperature, the assertion for determining the interaction status and content is concatenated after the voice settings icon, and the assertion for determining the air conditioning status is concatenated after the icon for turning on the air conditioning.

[0102] In an embodiment of the present invention, the test resource configuration unit 12 configures the use case execution environment. If it is used in a SIL environment, the corresponding simulator needs to be configured (one-to-many); if it is used in a HIL environment, in addition to configuring some signal simulators, the configuration parameters of CANoe also need to be configured (one-to-many) to ensure that the use case matches the vehicle model to be tested.

[0103] As shown in FIG7 , in a specific example, the test case detection unit 13 further includes:

[0104] A compiling and executing unit 103 is used to compile the test model into an automatically executable script and execute the script;

[0105] The execution information collection unit 131 is used to use the test result collection function to collect information separately for each component in the test model and each assertion after the test passes, and return the collected information in the form of a structure; specifically, in this embodiment, after execution, through the test result collection function, by opening up the data collection function of CANoe itself, the tracking system of the system or part to be tested itself, and the data collection function of TSP (including logs, service call chains, bus signals, fault information, and third-party ecological service status), it is possible to collect information separately for each component in the test model and each assertion. The collected information is returned in the form of a structure to facilitate testers to understand all information about the full cycle operation of the intelligent scene;

[0106] The test case determination unit 132 is configured to add the test model to the test case library after all assertions succeed.

[0107] It can be understood that in the embodiments of the present invention, a test model is constructed within a graphical tool using a test model creation unit based on the "scenario-interaction-service" paradigm. Simultaneously, an assertion creation processing unit creates corresponding assertions based on the "metamethod-operation-parameter" structure for the core nodes and parameter groups described by the ternary structure test model, and adds these assertions to each operation in the test model. This allows for the construction of an automated testing environment that is easy to manage, assists in design, enables rapid execution, and allows for data reuse, reducing testing time and labor costs.

[0108] In an embodiment of the present invention, use case design, execution process and data management, case writing and testing process are combined, and a graphical use case editing tool is used to enable users to design and change use cases more intuitively and simply. The comprehensive test data collection function allows testers to fully grasp the information flow during the test process, which is conducive to locating problems and making targeted design changes.

[0109] In an embodiment of the present invention, when configuring a test environment, testers can compile multiple general and targeted test cases for each intelligent scenario product based on test standards or business experience. Test cases in the same test environment can be associated to form an automated test plan. By executing the test plan, the automated execution of a series of test cases and the automatic generation of reports can be achieved, thus reducing a large amount of repetitive work.

[0110] At the same time, testers can make differentiated settings for the parameters of the models to be tested and assertions in the graphical interface, add custom attributes to test cases, and implement use case management for software of different versions and different models.

[0111] As shown in FIG8 , a schematic diagram of the main process of an embodiment of a method for generating a test case provided by the present invention is shown. Combined with FIG9 , in this embodiment, the method for generating a test case includes the following steps:

[0112] Step S10: In a graphical tool, for each vehicle model, a test model is created based on a ternary approach for the selected function in the vehicle software. This includes editing the scenarios, interactions, and service content corresponding to the test model, and establishing a logical flow relationship between the three.

[0113] More specifically, the step S10 further includes:

[0114] Step S100: parsing the selected function to obtain editing content corresponding to the function, including corresponding scenes, interactions, and service content;

[0115] Step S101: In a graphical tool, a scene operation icon is generated for the scene corresponding to the selected function, a corresponding scene acquisition interface is associated with the scene operation icon, and scene target content is edited;

[0116] Step S102: In the graphical tool, an interactive operation icon is generated for the interaction corresponding to the selected function, a corresponding interactive interface is associated with the scene operation icon, and the interactive state and content value are edited;

[0117] Step S103: In the graphical tool, a service operation icon is generated for the service corresponding to the selected function, the corresponding service interface is associated with the scene operation icon, and the service target content is edited;

[0118] Step S104: connect the scene operation icon, the interactive operation icon, and the service operation icon by lines, and establish a logical flow relationship between the three.

[0119] Step S11: In the test model, corresponding assertions are created for the scenarios, interactions, and service contents, respectively, and are serially added to the logical process relationship, wherein each assertion includes a meta-method, an operation method, and parameters;

[0120] More specifically, in a specific example, step S11 further includes:

[0121] Step S110: For each scenario, interaction, and service content, create corresponding assertions based on the “metamethod-operation-parameter” paradigm;

[0122] The meta-method is the implementation method of the vehicle status signal, various interaction states and contents corresponding to the scenario, interaction and service content; the operation mode is the logical judgment operation between the signal obtained by the meta-method and the parameter group; the parameter is the parameter value combination based on the signal obtained by the meta-method;

[0123] Step S111 : In the graphical tool, the corresponding assertions created are connected in series after the scenario operation icon, the interaction operation icon, and the service operation icon to update the use case logic flow.

[0124] Step S12: scheduling test resources and configuring a matching use case execution environment for the test model;

[0125] Step S13: compile the test model into an automatically executable script and execute it. After all assertions are successful, add the test model to the test case library.

[0126] In a specific example, the step S13 further includes:

[0127] Compiling the test model into an automatically executable script and executing the script;

[0128] After the test passes, the test result collection function is used to collect information about each component in the test model and each assertion separately, and the collected information is returned in the form of a structure;

[0129] After all assertions are successful, the test model is added to the test case library.

[0130] Referring to FIG. 9 , in a more detailed embodiment of the present invention, the test case generation method includes the following steps:

[0131] 1.1, obtain the corresponding editing permissions through the system management module.

[0132] 1.2. Log in to the interactive management system through the web and select the vehicle model for which test case to compile. The test management system data management module will then search and load the corresponding vehicle model service instruction set (SOA vehicle model) or call the mapping logic relationship list of the bus service signal.

[0133] 1.3. Use the Test Case Management feature in the Test Management module to create or edit an existing test case library. A test case library is essentially a collection of test cases categorized by users, each tagging the same automotive system or component under test. Therefore, creating a test case library is equivalent to creating a test case tag. Opening an existing test case library is equivalent to batch filtering test cases with the same tag. A single test case can have multiple tags.

[0134] 1.4. Use the use case management function in the use case management module and graphical tools to edit the test model based on the ternary elements (define the test scenario, service, and interaction separately). For example, for an intelligent scenario "When the temperature inside the car is higher than 26 degrees, the user is prompted by voice whether to turn on the air conditioner, and the air conditioner is turned on after the user confirms the voice command", the test model compilation process is as follows:

[0135] 1.4.1 Editing Scenes

[0136] The scenario in the example is "the temperature inside the car is higher than 26 degrees", so it is necessary to generate a scenario operation icon, and use the vehicle service management subsystem to obtain the service editing interface for collecting the temperature inside the car, and at the same time create an editing menu for the target value "temperature parameters".

[0137] 1.4.2 Editing Interaction

[0138] The interaction in the example is "automatically initiate voice prompts", so it is necessary to generate an interactive operation icon, use the vehicle service management subsystem to obtain the TTS voice interaction interface, and create a monitoring voice prompt status and content menu.

[0139] 1.4.3 Editing Services

[0140] The service in the example is "turn on the air conditioner", so it is necessary to generate a service operation icon, and use the vehicle service management subsystem to obtain the air conditioning service editing interface, and at the same time create the target value "air conditioning on status" editing menu.

[0141] 1.4.4 Use graphical tools to create the above ternary model and add connections to create a logical flow, as shown in the yellow part of the figure below.

[0142] 1.5. Create new assertions. For the above example, you can create corresponding assertions for the three core elements of the scenario, interaction, and service based on the "metamethod-operation-parameter" paradigm. For example, scenario assertions can be set as "Temperature - Below - 26°C" or "Temperature - Range - 26-30°C"; interaction assertions can be set as "Voice Status - Yes - Trigger" or "Voice Content - Yes - xxxxxx"; and service assertions can be set as "Air Conditioner Status - Yes - On." Multiple assertions can be generated for a single model element, and graphical tools can be used to string assertions together within the use case logic flow.

[0143] 1.6. Configure the use case execution environment through the test resource scheduling function. If used in a SIL environment, you need to configure the corresponding simulator (one-to-many). If used in a HIL environment, in addition to configuring some signal simulators, you also need to configure CANoe configuration parameters (one-to-many) to ensure that the use case matches the vehicle model to be tested.

[0144] 1.7. Through the test task management function, use cases can be compiled into corresponding scripts. After execution, the test result collection function connects CANoe's own data collection function, the tracking system of the system or part under test, and the data collection function of TSP (including logs, service call chains, bus signals, fault information, and third-party ecological service status) to achieve separate information collection for each component in the test model and each assertion. The collected information is returned in the form of a structure, making it convenient for testers to understand all information about the full cycle operation of the intelligent scenario.

[0145] 1.8. Through the test report management function, you can write test reports for use case execution according to user-defined report templates.

[0146] For more details, please refer to and combine the above descriptions of Figures 1 to 7, which will not be repeated here.

[0147] FIG10 is a schematic diagram showing the main flow of an embodiment of a test management method provided by the present invention. Combined with FIG8 , in this embodiment, the test management method is used to perform automated testing on vehicle-mounted software in a smart scene, and includes the following steps:

[0148] Step S20: Obtain a test plan, select a test vehicle model, open the corresponding test case library, and select test cases with the same test environment requirements and associate them with the test plan; wherein the test cases are obtained using the method described in Figures 5 and 6. For more details, please refer to the method described in Figures 5 and 6 above and will not be repeated here;

[0149] Step S21, obtaining the scripts corresponding to the test cases under the test plan and arranging them;

[0150] Step S22, sequentially executing the scripts corresponding to the test cases, and sequentially collecting relevant information during the execution process;

[0151] Step S22: Generate and display a test report based on the script structure.

[0152] Referring also to FIG11 , in a more detailed embodiment of the present invention, the test management method includes the following steps:

[0153] 2.1. Use the test plan management function in the test management module to create / edit an existing test plan and select a test vehicle model. The test case management will filter and display the test cases according to the vehicle model label. Open the corresponding test case library and select test cases with the same test environment requirements to associate with the test plan.

[0154] 2.2. The test task management function arranges the execution scripts behind the test cases in the test plan. Before executing the plan, the test resource scheduling function confirms whether the test environment is idle and whether the test resources are sufficient. During the execution process, the progress of the test plan execution is recorded synchronously.

[0155] 2.3. Execute the test plan. The test management system will execute each use case script sequentially in the background. The test result collection function will sequentially collect relevant information (see the description of 1.7 in Figure 9 above). Through the test report management function, you can write a test report for the use case execution according to the user-defined report template and data dashboard display template, and display the test overview information through the interactive management system.

[0156] For more details, please refer to and combine the above descriptions of Figures 1 to 7, which will not be repeated here.

[0157] As another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions. When the computer instructions are executed by a processor, the method described in Figures 5 to 8 is implemented. For more details, please refer to and combine the above description of Figures 5 to 8, which will not be repeated here.

[0158] Optionally, in some embodiments, the memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal or server, etc. In addition, the memory may include high-speed random access memory and may also include non-transient memory, such as at least one disk storage device, flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the terminal or server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0159] The implementation of the embodiments of the present invention has the following beneficial effects:

[0160] This invention provides an automated test management method for in-vehicle software based on intelligent scenarios. Within a graphical tool, a test model creation unit constructs a test model based on the "scenario-interaction-service" paradigm. Simultaneously, an assertion creation processing unit creates corresponding assertions based on the "metamethod-operation-parameter" structure for the core nodes and parameter groups described by the ternary structure test model, and appends them to each operation in the test model. This creates an automated test environment that is easy to manage, assists in design, enables rapid execution, and allows for data reuse, reducing testing time and labor costs.

[0161] In an embodiment of the present invention, use case design, execution process and data management, case writing and testing process are combined, and a graphical use case editing tool is used to enable users to design and change use cases more intuitively and simply. The comprehensive test data collection function allows testers to fully grasp the information flow during the test process, which is conducive to locating problems and making targeted design changes.

[0162] In the embodiment of the present invention, when configuring the test environment, use cases in the same test environment can be associated to form an automated test plan. By executing the test plan, the automated execution of a series of use cases and the automatic generation of reports can be achieved, which can reduce a lot of repetitive work.

[0163] At the same time, testers can make differentiated settings for the parameters of the models to be tested and assertions in the graphical interface, which can realize use case management of software of different versions and different models.

[0164] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatus, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0165] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0166] The above disclosure is only a preferred embodiment of the present invention and certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A method for generating a test case, characterized in that: The steps include: In the graphical tool, for each vehicle model, a test model is edited for the selected function in the vehicle software, including editing the scene, interaction and service content corresponding to the test model, and establishing a logical process relationship between the three; In the test model, corresponding assertions are created for the scenarios, interactions, and service contents, respectively, and are serially added to the logical process relationship; Perform test resource scheduling and configure a matching use case execution environment for the test model; The test model is compiled into an automatically executable script and executed. After all assertions succeed, the test model is added to the test case library.

2. The method according to claim 1, characterized in that In the graphical tool, for each vehicle model, a test model is edited for the selected function in the vehicle software, including editing the scene, interaction and service content corresponding to the test model, and establishing a logical flow relationship between the three, further including: Parse the selected function and obtain the editing content corresponding to the function, including the corresponding scene, interaction and service content; Generate a scene operation icon for the scene corresponding to the selected function, associate the corresponding scene acquisition interface with the scene operation icon, and edit the scene target content; Generate an interactive operation icon for the interaction corresponding to the selected function, associate the corresponding interactive interface with the scene operation icon, and edit the interactive state and content value; Generate a service operation icon for the service corresponding to the selected function, associate the corresponding service interface with the scene operation icon, and edit the service target content; The scene operation icon, the interactive operation icon and the service operation icon are connected by lines to create a logical flow relationship between the three.

3. The method according to claim 2, characterized in that In the test model, corresponding assertions are created for the scenarios, interactions, and service contents respectively, and are serially added to the logical process relationship, further comprising: For each scenario, interaction, and service content, create corresponding assertions. Each assertion contains meta-methods, operation methods, and parameters. The meta-method is the implementation method of the vehicle status signal, various interaction status and content corresponding to the scene, interaction and service content; the operation mode is the logical judgment operation between the signal and the parameter group obtained based on the meta-method; the parameter is the parameter value combination based on the signal obtained by the meta-method; The created corresponding assertions are connected in series after the scenario operation icon, the interaction operation icon and the service operation icon to update the use case logic flow.

4. The method according to claim 3, characterized in that Compiling the test model into an automatically executable script and executing it, and after all assertions succeed, adding the test model to a test case library, further comprising: After the test is passed, the test result collection function is used to collect information about each component in the test model and each assertion separately; Return the collected information in the form of a structure.

5. A test management method for automated testing of vehicle-mounted software in smart scenarios, characterized in that: The steps include: Obtain a test plan, select a test vehicle model, open a corresponding test case library, and select test cases with the same test environment requirements and associate them with the test plan; wherein the test cases are obtained by the method according to any one of claims 1 to 4; Obtain the scripts corresponding to the test cases under the test plan and arrange them; Execute the scripts corresponding to each test case in sequence and collect relevant information during the execution process in sequence; A test report is generated and displayed according to the script structure.

6. A test case generation device, characterized in that: include: A test model creation unit, for editing a test model for the selected function in the vehicle software of each vehicle model in a graphical tool, including editing the scene, interaction and service content corresponding to the test model, and establishing a logical flow relationship between the three; Assertion creation processing unit, used to create corresponding assertions for scenarios, interactions, and service contents in the test model. Assert and add it in series to the logical flow relationship; A test resource configuration unit, used for scheduling test resources and configuring a matching use case execution environment for the test model; The test case detection unit is used to compile the test model into an automatically executable script and execute it. After all assertions are successful, the test model is added to the test case library.

7. The device according to claim 6, characterized in that The test model creation unit further comprises: A parsing processing unit, used to parse the selected function and obtain the editing content corresponding to the function, including the corresponding scene, interaction and service content; A scene operation icon generating unit, used to generate a scene operation icon for the scene corresponding to the selected function, associate the corresponding scene acquisition interface with the scene operation icon, and edit the scene target content; An interactive operation icon generating unit, for generating an interactive operation icon for the interaction corresponding to the selected function, associating a corresponding interactive interface on the scene operation icon, and editing the interactive state and content value; A service operation icon generating unit, used to generate a service operation icon for the service corresponding to the selected function, the scene operation icon is associated with a corresponding service interface, and the service target content is edited; The logic flow establishing unit is used to connect the scene operation icons, the interactive operation icons and the service operation icons by means of lines, so as to establish a logic flow relationship between the three.

8. The device according to claim 7, characterized in that The assertion creation processing unit further comprises: Assertion generation unit, used to create corresponding assertions for each scenario, interaction, and service content. Each assertion contains meta-methods, operation methods, and parameters. The meta-method is the implementation method of the vehicle status signal, various interaction status and content corresponding to the scene, interaction and service content; the operation mode is the logical judgment operation between the signal and the parameter group obtained based on the meta-method; the parameter is the parameter value combination based on the signal obtained by the meta-method; The concatenation processing unit is used to concatenate the corresponding assertions created after the scene operation icon, the interactive operation icon and the service operation icon, and update the use case logic flow.

9. The device according to claim 8, characterized in that The test case detection unit further comprises: A compiling and executing unit, used to compile the test model into an automatically executable script and execute it; An execution information collection unit is used to collect information of each component in the test model and each assertion separately by using the test result collection function after the test passes, and return the collected information in the form of a structure; The test case determination unit is used to add the test model to the test case library after all assertions succeed.

10. A test management system for automated testing of vehicle-mounted software in smart scenarios, characterized in that: include: Interaction management subsystem, used to provide a visual interface for human-computer interaction and low-code modeling tools; The test management subsystem includes a test management module, a system management module, and a data management module. The test management module is responsible for defining, editing, and initiating the test process, and automatically generates a test report based on the test results. The system management module is responsible for managing system users, roles, and permissions. The data management module is used to manage the service parameter groups and assertion data groups involved in the use case and their logical relationships with various vehicle models, systems, and products. The vehicle service management subsystem is responsible for synchronizing the interface of the vehicle SOA service or the interface corresponding to the vehicle function signal mapping on the bus, and supports connection with CANoe for HIL testing or direct connection to the SIL test environment; Wherein, a test case generation device as described in any one of claims 6 to 9 is deployed in the test management module.

11. A computer-readable storage medium having computer instructions stored therein, characterized in that: When the computer instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Vehicle-mounted network product cloud test method and system based on Jenkins

    CN111290934A

  • Test system and test method based on microkernel

    CN114090459A

  • Intelligent networking vehicle intelligent driving function cloud simulation test system and method based on DevOps

    CN114647585A

  • Vehicle-mounted software generation method and system and storage medium

    CN116107554A

  • Test case generation method, test management method, device and system and storage medium

    CN117472765A

Cited By

  • Simulation test method and system based on adaptive test environment

    CN120763070A

  • Software testing method and device, equipment, medium and program product

    CN120803958A

  • System and method for testing hybrid gearbox controller

    CN121218084A

  • Test tool service management method and system in combination with full life cycle

    CN121255649A