Large-model-based auxiliary vehicle-mounted test case writing method and device

By using a large model-based approach to generate and optimize in-vehicle test cases, the problems of low efficiency and insufficient coverage in traditional in-vehicle test case design are solved, and efficient and safe in-vehicle software testing is achieved.

CN120780593APending Publication Date: 2025-10-14CHINA FAW CO LTD +1

Patent Information

Application Number
CN202510824833.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-10-14

AI Technical Summary

Technical Problem

Traditional in-vehicle test case design relies on manual experience, is inefficient and difficult to cover all possible abnormal situations, especially in the face of highly dynamic driving environments. Existing technologies fail to effectively utilize artificial intelligence tools, resulting in insufficient efficiency and coverage of in-vehicle software testing, and the generated test cases lack explainability and safety.

Method used

A large-model-based approach is adopted to generate and optimize in-vehicle test cases through steps such as data collection and preprocessing, installation and deployment, test case generation, adjustment and confirmation, execution and feedback, report generation and report tuning. Multimodal large models such as CogVLM, Yi-VL, Qwen-VL, etc. are combined with knowledge bases and language large models to ensure that they cover normal and abnormal scenarios.

Benefits of technology

It achieves automation and efficient coverage of in-vehicle software testing, improves the efficiency and interpretability of test case generation, ensures the security and comprehensiveness of test cases, and forms a reliable testing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120780593A_ABST
    Figure CN120780593A_ABST
Patent Text Reader

Abstract

The invention discloses a large-model-based auxiliary vehicle-mounted test case compiling method and device, and relates to the field of vehicle-mounted testing, and the method comprises a preparation stage and a testing stage; the preparation stage comprises a data acquisition and preprocessing step and an installation and deployment step; in the test stage, the method comprises the steps of generating a test case, adjusting and confirming the test case, executing and feeding back, generating a report and adjusting and optimizing the report. Wherein in the installation and deployment step, the preparation for generating the test case is in a standby state; and test case generation: calling the model to generate a preliminary test case. Through the above scheme, based on cloud deployment or / and local deployment, the client side or / and the server side are arranged, and an automatic processing mode of the vehicle-mounted test is formed. A large model is used as an important data processing means, data is efficiently processed, and a reliable test case is formed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the field of vehicle testing, in particular to a large model assisted vehicle test case writing method, a large model assisted vehicle test case writing device, an electronic device, a storage medium and a test platform. BACKGROUND

[0002] With the rapid development of automotive electronics technology, the complexity of modern vehicles is increasing, especially with the addition of functions such as autonomous driving and intelligent interconnection, making the software size and complexity of vehicle systems reach an unprecedented level. In order to ensure the stability and safety of vehicle systems, software testing has become an essential part. However, traditional test case design relies on human experience, which is inefficient and difficult to cover all possible abnormal situations, especially in the face of highly dynamic driving environments.

[0003] In recent years, artificial intelligence technology, especially large pre-training models in the field of deep learning, has shown strong performance in natural language processing, computer vision and other fields. These models can automatically learn rich feature representations from massive data, have good generalization ability and innovative thinking, and provide new possibilities for automated test case generation.

[0004] After searching the existing technology documents, it is found that patent CN202311790925.6 obtains test case related data and preprocesses the test case related data to obtain the method of target test data, but this method does not make customized design for the characteristics of car machine testing. After further investigation, patent CN201911411139.4 proposes a vehicle entertainment navigation test case automatic generation system, including a test database management module, a test parameter input module and a test case management module, but it does not use artificial intelligence tools to ensure convenience and comprehensiveness of test cases.

[0005] Therefore, a large model assisted vehicle test case writing scheme is needed to overcome the limitations of existing technology using advanced AI technology, improve the efficiency and coverage of vehicle software testing, and ensure that the generated test cases have high explainability and security. SUMMARY

[0006] The purpose of the present application is to provide a large model assisted vehicle test case writing method, a large model assisted vehicle test case writing device, an electronic device, a storage medium and a test platform, which at least solve the problem of how to use advanced AI technology to overcome the limitations of existing technology, solve the problem of how to improve the efficiency and coverage of vehicle software testing, and solve the problem of how to ensure that the generated test cases have high explainability and security.

[0007] The present application provides the following solutions:

[0008] According to one aspect of the present application, a large model assisted vehicle test case writing method is provided, which comprises:

[0009] a preparation stage and a test stage;

[0010] In the preparation stage, the steps of data collection and preprocessing and the steps of installation and deployment are included;

[0011] In the test stage, the steps of test case generation, test case adjustment and confirmation, execution and feedback, report generation and report optimization are included;

[0012] The step of installation and deployment is used for the preparation of test case generation in standby state;

[0013] The step of test case generation is used for calling the model to generate preliminary test cases.

[0014] Further, the steps of data collection and preprocessing and the steps of installation and deployment in the preparation stage include:

[0015] The step of data collection and preprocessing includes collecting relevant data from multiple data sources, data cleaning and labeling, and building a knowledge base;

[0016] Synchronously, the test behavior data recorded in the man-machine terminal;

[0017] Among them, the test actual operation corresponding to the test behavior of the man-machine terminal is used as the evaluation of the large model operation instruction, which is used as the basis for training and optimization.

[0018] Further, the step of installation and deployment for the preparation of test case generation in standby state includes:

[0019] Connect the client deployment device with the tested car machine to enable it to export task logs;

[0020] Synchronously, record the operation process and the UI interface information in picture format through the camera or picture download;

[0021] Also includes ensuring that the server end is in the starting state;

[0022] According to the ensuring that the server end is in the starting state, the related functions of test case generation and test report generation are in standby state, and the test case generation is prepared.

[0023] Further, the test phase includes the steps of test case generation, test case adjustment and confirmation, execution and feedback, report generation, and report optimization, which include:

[0024] The step of test case generation includes inputting a description of the software under test.

[0025] Correspondingly, the device is placed in a position where the camera display or the test equipment connected to the test equipment is displayed.

[0026] Call the algorithm generated based on the large model of vision or / and language to generate the preliminary test case.

[0027] Wherein, calling the algorithm generated based on the large model of vision or / and language to generate the preliminary test case includes generating test cases covering normal and abnormal scenarios according to the function modules, UI interface and test purpose of the vehicle-mounted software.

[0028] Further, the step of test case adjustment and confirmation includes:

[0029] View and adjust the test case through the man-machine terminal interface;

[0030] According to the man-machine terminal interface, view and adjust the test case, input the preset authority module, and judge whether it meets the error-free standard;

[0031] If it is error-free, execute the test case for testing.

[0032] Further, the step of execution and feedback includes:

[0033] According to the test case, split the execution strategy of the virtual test environment and the physical test environment;

[0034] According to the execution strategy of the virtual test environment and the physical test environment, execute the test case in the virtual test environment or / and the physical test environment, and collect the test results;

[0035] According to the execution of the test case, observe and judge whether the test purpose is achieved on the UI interface;

[0036] If not, repeat the execution of the test case and observe and judge whether the test purpose is achieved on the UI interface;

[0037] If not, adjust the test case and repeat the execution of the test case;

[0038] Adjusting the test case and repeating the execution of the test case includes adjusting the steps of test case generation, test case adjustment and confirmation, and execution and feedback based on the test purpose.

[0039] The repeated execution of the test case after the adjustment of the test case further comprises adjusting the steps of test case generation, test case adjustment and confirmation, and execution and feedback based on the test purpose, and feeding back to the model training module of the large model to iteratively optimize the model.

[0040] Further, it also includes:

[0041] The step of generating a report includes deriving a test report corresponding to the process and results of executing the test case;

[0042] The step of report optimization includes using the test actual operation corresponding to the test behavior of the man-machine terminal as the evaluation of the large model operation instruction for training optimization, inputting the test report into the preset authority module, and supplementing and modifying the details of the report until the large model cannot generate a test case that meets the auxiliary vehicle test case writing, and then exiting.

[0043] Further, the step of generating a test case further comprises:

[0044] The large model includes a multi-modal large model;

[0045] Using a multi-modal large model to understand UI information and generate test operation prompt words;

[0046] Among them, the multi-modal large model is one or more of CogVLM, Yi-VL, and Qwen-VL;

[0047] Among them, the test report records test item information;

[0048] Based on the multi-round question and answer form, the test items in the test report are asked one by one, and the UI interface information is input;

[0049] According to the multi-round question and answer, the multi-modal large model judges the test result;

[0050] According to the multi-modal large model judgment test result, generate test guidance suggestion.

[0051] Further, the step of generating a report further comprises: obtaining a test report generator for report generation;

[0052] Among them, the test report generator is composed of a knowledge base and a language large model;

[0053] The UI interface picture information, test content, log information and retrieval content in the knowledge base are input into the test report generator;

[0054] Call the API provided by OPENAI to determine whether each test case achieves the expected test goal, and generate the corresponding test report;

[0055] The knowledge base comprises historical data of executing test cases after vectorization processing to form a database;

[0056] Further comprising, building a knowledge base through LangChain and providing retrieval capability.

[0057] According to two aspects of the present application, a device for assisting vehicle-mounted test case writing based on a large model is provided, which comprises a client and a server:

[0058] The client is used to connect with the tested vehicle machine, so as to export task logs; and is also used to record operation processes and UI interface information in picture format through camera or picture download.

[0059] According to the client, test behavior data on the man-machine terminal is recorded.

[0060] The server is used to provide computing power required by large model reasoning, deploy modules for realizing test case generation steps and modules for realizing report generation steps.

[0061] Based on cloud deployment or / and local deployment, the client or / and the server is set.

[0062] According to three aspects of the present application, an electronic device is provided, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus.

[0063] The memory stores a computer program, and when the computer program is executed by the processor, the processor executes steps of the method for assisting vehicle-mounted test case writing based on a large model.

[0064] According to four aspects of the present application, a computer readable storage medium is provided, which stores a computer program executable by an electronic device, and when the computer program runs on the electronic device, the electronic device executes steps of the method for assisting vehicle-mounted test case writing based on a large model.

[0065] According to five aspects of the present application, a test platform is provided, which comprises:

[0066] The electronic device is used to realize steps of the method for assisting vehicle-mounted test case writing based on a large model.

[0067] The processor runs a program, and when the program runs, data output from the electronic device executes steps of the method for assisting vehicle-mounted test case writing based on a large model.

[0068] A storage medium for storing a program that, when executed, performs the steps of the method for assisting in writing a vehicle-mounted test case based on a large model on data output from an electronic device.

[0069] Through the above scheme, the following beneficial technical effects are obtained:

[0070] The present application forms an automatic processing mode for vehicle-mounted testing by deploying based on the cloud or / and deploying locally, setting a client or / and a server.

[0071] The present application efficiently processes data by using a large model as an important data processing means, and forms reliable test cases.

[0072] The present application completes the application and review of test cases through close human-computer interaction, and fully ensures efficiency and safety. BRIEF DESCRIPTION OF DRAWINGS

[0073] Figure 1 is a flowchart of a method for assisting in writing a vehicle-mounted test case based on a large model provided by one or more embodiments of the present application.

[0074] Figure 2 is a structural diagram of a device for assisting in writing a vehicle-mounted test case based on a large model provided by one or more embodiments of the present application.

[0075] Figure 3 is a schematic diagram of a system architecture for assisting in writing a vehicle-mounted test case based on a visual language large model provided by one specific embodiment of the present application.

[0076] Figure 4 is a schematic diagram of a natural language large model text writing function system architecture provided by one specific embodiment of the present application.

[0077] Figure 5 is a schematic diagram of a UI analysis function architecture provided by one specific embodiment of the present application.

[0078] Figure 6 is a schematic diagram of a deployment architecture provided by one specific embodiment of the present application.

[0079] Figure 7 is a structural block diagram of an electronic device for assisting in writing a vehicle-mounted test case based on a large model provided by one or more embodiments of the present application. DETAILED DESCRIPTION

[0080] The technical solutions of the present application will be described clearly and completely below in conjunction with the drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0081] Figure 1 is a flowchart of a large model assisted vehicle test case writing method provided by one or more embodiments of the present application.

[0082] As Figure 1 The large model assisted vehicle test case writing method comprises a preparation stage and a test stage.

[0083] Step S1, in the preparation stage, comprising the steps of data acquisition and preprocessing and the steps of installation and deployment;

[0084] Step S2, in the test stage, comprising the steps of test case generation, test case adjustment and confirmation, execution and feedback, report generation and report optimization;

[0085] The step of installation and deployment is used for the preparation of test case generation to be in standby state.

[0086] The step of test case generation is used for calling the model to generate preliminary test cases.

[0087] In this embodiment, in the preparation stage, the steps of data acquisition and preprocessing and the steps of installation and deployment comprise:

[0088] The step of data acquisition and preprocessing comprises collecting relevant data from multiple data sources, performing data cleaning and labeling, and constructing a knowledge base.

[0089] Synchronously, the test behavior data recorded in the man-machine terminal;

[0090] Among them, the test actual operation corresponding to the test behavior of the man-machine terminal is taken as the evaluation of the large model operation instruction, which is used as the basis for training and optimization.

[0091] In this embodiment, the step of installation and deployment is used for the preparation of test case generation to be in standby state, which comprises:

[0092] The client deployment device is connected with the tested car machine, so that it can export task logs;

[0093] Synchronously, through camera or picture download, record the operation process and picture format UI interface information;

[0094] It also includes ensuring that the server side is in a started state;

[0095] According to ensuring that the server side is in a starting state, the related functions of test case generation and test report generation are in a standby state, and the test case generation is prepared.

[0096] Specifically, in the preparation phase of one specific embodiment, step one, data collection and preprocessing: collect relevant data from multiple data sources, perform data cleaning and labeling, and build a knowledge base. At the same time, the test behavior data of the test personnel is recorded, and the actual operation of the test is taken as the evaluation of the operation instruction of the large model, which is used as the basis for subsequent training and optimization.

[0097] Step two, installation and deployment, the client deployment device should be connected to the tested car machine, can export task logs, and can record operation process and UI interface information in picture format through camera or picture download; the server side should ensure that the test case generation and test report generation related software are in a starting state.

[0098] In this embodiment, in the test phase, the steps of test case generation, test case adjustment and confirmation, execution and feedback, report generation, and report optimization include:

[0099] The step of test case generation includes inputting the description of the software under test;

[0100] Correspondingly, the device is placed in the position of shooting the car machine display or connected with the test device;

[0101] Call the algorithm generated based on the visual or / and language large model to generate preliminary test cases;

[0102] Among them, calling the algorithm generated based on the visual or / and language large model to generate preliminary test cases includes generating test cases covering normal and abnormal scenarios according to the function modules, UI interface and test purpose of the vehicle-mounted software.

[0103] In this embodiment, the step of test case adjustment and confirmation includes:

[0104] View and adjust the test case through the man-machine terminal interface;

[0105] According to the man-machine terminal interface, input the preset authoritative module to determine whether it meets the error-free standard;

[0106] If it is error-free, execute the test case for testing.

[0107] In this embodiment, the step of execution and feedback includes:

[0108] According to the test case, split the execution strategy of the virtual test environment and the physical test environment;

[0109] According to the execution strategy of splitting the virtual test environment and the physical test environment, the test cases are executed in the virtual test environment or / and the physical test environment respectively, and the test results are collected;

[0110] According to the execution of the test case, it is observed on the UI interface whether the test purpose is achieved;

[0111] If not, repeat the execution of the test case, and observe on the UI interface whether the test purpose is achieved;

[0112] If not, repeat the execution of the test case after adjusting the test case;

[0113] The repeated execution of the test case after adjusting the test case includes adjusting the steps of test case generation, test case adjustment and confirmation, and execution and feedback based on the test purpose;

[0114] The repeated execution of the test case after adjusting the test case also includes adjusting the steps of test case generation, test case adjustment and confirmation, and execution and feedback based on the test purpose, feeding back to the model training module of the large model to iteratively optimize the model.

[0115] In this embodiment, it also includes:

[0116] The report generation step includes deriving a test report corresponding to the process and results of executing the test case;

[0117] The report optimization step includes inputting the test report into a preset authoritative module according to the test actual operation corresponding to the test behavior of the man-machine terminal as the evaluation of the large model operation instruction, and supplementing and modifying the details of the report until the large model cannot generate a test case that meets the auxiliary vehicle test case writing, and then exiting.

[0118] Specifically, in the test phase of one specific embodiment, step one, test case generation: input software description, and place the device in a position that can shoot the car machine display or can be connected with the test equipment, call the model to generate the preliminary test case, and guide the test personnel to operate.

[0119] Step two, test case adjustment and confirmation: the test engineer checks and adjusts the test case through the user interface, and performs the execution after confirming the correctness.

[0120] Step three, execution and feedback: execute the test case in the virtual or physical test environment, collect the test results, and feed back to the model training module if necessary to iteratively optimize the model.

[0121] If the current UI interface does not complete the test purpose, repeat steps one to three until the function test is completed.

[0122] Step 4: Report generation: The report writer issues instructions to the test report generation system, and the system exports the test report based on the above operation process and results.

[0123] Step 5: Report Tuning: Report writers supplement and modify report details through dialogue, until the model fails to generate satisfactory text, at which point manual revisions are made. This authoritative module includes, but is not limited to, human writers and also includes obtaining conclusions on report details through other more reliable channels, such as more advanced artificial intelligence.

[0124] In this embodiment, the step of generating a test case further includes:

[0125] Large models include multimodal large models;

[0126] Use a multimodal large model to understand UI information and generate test operation prompts;

[0127] Among them, the multimodal large model is one or more of CogVLM, Yi - VL, and Qwen - VL;

[0128] Among them, the test report records the test item information;

[0129] Based on a multi-round question-and-answer format, questions are asked in sequence according to the test items in the test report, and UI interface information is input;

[0130] Obtain the multimodal large model judgment test results based on multiple rounds of questions and answers;

[0131] Judge the test results based on the multimodal large model and generate test guidance suggestions.

[0132] Specifically, in one embodiment, Figure 3 The system architecture shown, which is based on a large model to assist in writing in-vehicle test cases, reflects the functions of the test case generator, including automatically generating test cases covering various normal and abnormal scenarios based on the functional modules, UI interfaces, and test objectives of the in-vehicle software, guiding the tester's operation, and providing feedback on whether the UI display results and log information after the operation are abnormal.

[0133] The UI analysis function structure involved in the test case generator is as follows Figure 5The UI analysis function architecture is shown, in which the word segmenter extracts entities in the text and removes conjunctions, symbols, particles, etc. The embedding model takes character encoding as input and outputs embedding vectors. The embedding model is a neural network model based on a self-attention structure, such as GPT, which is pre-trained by self-encoding. The VLM is a multi-model large model, which takes pictures and corresponding text information as input, and often outputs text descriptions of target elements in the pictures.

[0134] The multi-modal large model used in this application is an open-source large model for image-text understanding, including but not limited to CogVLM, Yi-VL, Qwen-VL, etc. During testing, the program uses multiple rounds of question-answering, asks questions in turn according to the test items in the test report, and inputs UI interface information, so that the multi-modal large model judges the test results and generates the next step test guidance.

[0135] In this embodiment, the step of generating a report further comprises: obtaining a test report generator for report generation;

[0136] The test report generator is composed of a knowledge base and a language large model;

[0137] The UI interface picture information, test content, log information, and search content in the knowledge base are used as inputs to the test report generator;

[0138] The API provided by OPENAI is called to determine whether each test case achieves the expected test goal and generate a corresponding test report;

[0139] The knowledge base includes historical data after vectorization processing to form a database;

[0140] It also includes building a knowledge base and providing search capabilities through LangChain.

[0141] Specifically, in one specific embodiment, as shown in Figure 4 The natural language large model text writing function system architecture is composed of a knowledge base and a language large model.

[0142] The interaction between the test report generator and the test case generator is shown in Figure 4 The language model refers to a generative natural language large model, such as Llama2, which can take a number of words as input and supplement them to complete sentences through its text continuation capability. In this application, UI interface picture information, test content, log information, and search content in the knowledge base are used as inputs, and the API provided by OPENAI is called to determine whether each test case achieves the expected goal and generate a corresponding test report, making it easier for testers to understand and reproduce.

[0143] Knowledge base and its retrieval function: the main content of the knowledge base is the test report written during the vehicle test in the past period of time after vectorization. The vectorization process refers to the process of forming a vector group after segmenting, tokenizing and embedding the text in the text. Similar to the embedding process described in the test case generator. The knowledge base relies on the commonly used open source tool LangChain to build. The retrieval ability of the knowledge base is also provided by LangChain, which compares the vectorized problem text with the content in the knowledge base and returns the most similar ones.

[0144] The workflow is: the test purpose, the text description of the test case generator for the UI interface, and the system log embedding are used as the original input to retrieve the content in the knowledge base. The original input and the retrieval result are input into the natural language large model to obtain the returned structure, i.e. the test report.

[0145] Figure 2 is a structural diagram of a device for assisting vehicle test case writing based on a large model provided by one or more embodiments of the present application.

[0146] As shown in Figure 2 , the device for assisting vehicle test case writing based on a large model includes a client and a server:

[0147] The client is used to connect with the tested vehicle machine to enable it to export task logs; it is also used to record operation processes and UI interface information in picture format through camera or picture download;

[0148] According to the client, test behavior data is recorded on the human-machine terminal;

[0149] The server is used to provide the computing power required for large model reasoning, deploy modules for implementing test case generation steps, and modules for implementing report generation steps;

[0150] Based on cloud deployment or / and local deployment, the client or / and the server is set.

[0151] Specifically, in one specific embodiment, a vehicle test case generation device integrating the above technical solutions is proposed, as shown in Figure 6 the deployment architecture includes a client and a server: the client device includes but is not limited to cameras, CPUs, storage devices required for recording, storing and processing data, and speaker devices required for broadcasting instructions; the server device includes but is not limited to CPUs, graphics cards and storage, network card devices required for data processing.

[0152] The device supports two modes of cloud deployment and local deployment, which can be flexibly selected according to actual needs to adapt to different scales of test teams and projects.

[0153] In another embodiment, a large model-based auxiliary vehicle test case writing system is involved. The large model-based vehicle test auxiliary method relies on hardware devices, which need to be divided into two parts: client and server.

[0154] The server side should have the computing power support required for large model inference. The deployment method can be cloud-native or physical machine-based. The server provides test guidance generation API interfaces for the client: taking UI interface, log, and test content as input, and returning operation guidance as text as the return result.

[0155] The client should have a display device for test personnel operation, a speaker device for broadcasting guidance, a camera device for recording the test process and results, and a storage device.

[0156] The software is composed of three key components: UI interface, test case generation module, and test report writing module. The UI interface is deployed on the client, and the test case generation module and test report writing module are deployed on the server side. Their interaction is as shown in Figure 5 The test case generation module receives UI interface, software module description, interface document, and known defect list as input, applies the trained model to generate a series of test cases covering normal operation, boundary conditions, and exception handling scenarios. Through interaction with the test personnel, it guides them to complete the test work. The test report writing module attaches detailed generation logic and expected output to each generated test case, and uses explainable AI technology to ensure that the test personnel can understand the purpose and expected results of the test case. The user interface provides an intuitive graphical interface that allows test engineers to upload software documents, view generated test cases, modify, and execute test plans.

[0157] In another embodiment, a large model-based auxiliary vehicle test case writing method is disclosed, which includes:

[0158] Data collection and preprocessing step: collect relevant data from multiple data sources, perform data cleaning and labeling, build a knowledge base, and record test personnel test behavior data. The actual operation of the test is used as an evaluation of the operation instruction of the large model, which is used for subsequent training and optimization;

[0159] Installation and deployment step: the client deployment device is connected to the tested vehicle machine, enabling it to export task logs and record operation processes and picture format UI interface information through camera or picture download method. The server side ensures that the test case generation and test report generation related software are in a started state;

[0160] Test case generation step: input software description, place the device in a position where the in-vehicle display can be photographed or connected to the test device, call the generation algorithm based on the visual language large model to generate preliminary test cases, and the generation algorithm automatically generates test cases covering various normal and abnormal scenarios according to the function modules, UI interface and test purpose of the vehicle-mounted software;

[0161] Test case adjustment and confirmation step: test engineers view and adjust test cases through the user interface, and confirm that they are correct before execution;

[0162] Execution and feedback step: execute test cases in a virtual or physical test environment, collect test results, and if necessary, feed back to the model training module to iteratively optimize the model. If the current UI interface does not complete the test purpose, repeat the test case generation, test case adjustment and confirmation, execution and feedback steps until the function test is completed.

[0163] Report generation step: report writers issue instructions to the test report generation system, and the system exports test reports according to the operation process and results;

[0164] Report optimization step: report writers supplement and modify report details through dialogue until the model cannot generate text that meets the conditions, and then manually modify.

[0165] Further, in the test case generation step, a multi-modal large model is used to understand UI information and generate test operation prompt words. The multi-modal large model is one or more of CogVLM, Yi-VL, and Qwen-VL. Through multiple rounds of question and answer, the test items in the test report are asked one by one, and the UI interface information is input to make the multi-modal large model judge the test results and generate the next test guidance.

[0166] Further, in the report generation step, the test report generator is composed of a knowledge base and a language large model. The UI interface picture information, test content, log information and retrieved content in the knowledge base are input, the API provided by OPENAI is called to judge whether each test case meets the expected goal, and the corresponding test report is generated. The content in the knowledge base is composed of test reports written in the past period of in-vehicle testing after vectorization, and LangChain is used to build the knowledge base and provide retrieval capabilities.

[0167] In another embodiment, a device for assisting in-vehicle test case writing based on a large model is disclosed, comprising:

[0168] The client includes cameras, CPUs, storage devices required for recording, storing and processing data, and speaker devices required for broadcasting instructions, used to connect with the tested car machine, export task logs, record operation processes and UI interface information, and provide an intuitive graphical interface allowing test engineers to upload software documents, view generated test cases, modify and execute test plans;

[0169] The server side includes CPUs, graphics cards, and storage and network card devices required for data processing, used to provide computing power support required for large model inference, deploy test case generation modules and test report writing modules, the test case generation module receives UI interfaces, software module descriptions, interface documents and known defect lists as inputs, applies the trained model to generate a series of test cases, and the test report writing module attaches detailed generation logic and expected output to each generated test case, using explainable AI technology to ensure that test personnel can understand the purpose and expected results of the test cases;

[0170] The device supports both cloud deployment and local deployment modes.

[0171] Further, the generation algorithm based on the visual language large model in the test case generation module can automatically generate test cases covering various normal and abnormal scenarios according to the functional modules of the vehicle-mounted software, the UI interface and the test purpose, and the visual language large model uses a multi-modal large model to understand the UI information and generate test operation prompt words.

[0172] Further, the test report generator in the test report writing module is composed of a knowledge base and a language large model, taking UI interface picture information, test content, log information and retrieved content in the knowledge base as input, calling the API provided by OPENAI to determine whether each test case achieves the expected goal, and generating the corresponding test report; the content in the knowledge base is composed of test reports written in the past period of vehicle-mounted testing process after vectorization, and the knowledge base is constructed using LangChain and provides retrieval capabilities.

[0173] It is worth noting that although the system discloses various modules, it does not mean that the device is limited to the above basic function modules. On the contrary, the meaning expressed by the present application is that on the basis of the above basic function modules, those skilled in the art can add one or more function modules to form an infinite number of embodiments or technical solutions in combination with existing technology, that is, the system is open rather than closed, and the protection scope of the present application claimed cannot be limited to the above disclosed basic function modules because the present embodiment only discloses individual basic function modules.

[0174] Figure 7An electronic device structure block diagram of a large model-based vehicle test case writing method provided by one or more embodiments of the present application.

[0175] As shown in Figure 7 The present application provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus.

[0176] The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of a large model-based vehicle test case writing method.

[0177] The present application also provides a computer readable storage medium storing a computer program executable by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the steps of a large model-based vehicle test case writing method.

[0178] The present application also provides a development platform, comprising:

[0179] The electronic device is used to implement the steps of a large model-based vehicle test case writing method.

[0180] The processor runs a program, and when the program runs, the data output from the electronic device executes the steps of a large model-based vehicle test case writing method.

[0181] The storage medium is used to store the program, and when the program runs, the data output from the electronic device executes the steps of a large model-based vehicle test case writing method.

[0182] The communication bus mentioned above can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0183] The electronic device includes a hardware layer, an operating system layer running above the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory. The operating system can be any one or more computer operating systems that implement control of the electronic device through a process, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a windows operating system. In embodiments of the present application, the electronic device can be a handheld device such as a smartphone or a tablet computer, or an electronic device such as a desktop computer or a portable computer, and is not particularly limited in embodiments of the present application.

[0184] The execution subject of the electronic device control in embodiments of the present application can be an electronic device or a functional module in the electronic device that can call and execute a program. The electronic device can obtain firmware corresponding to the storage medium, which is provided by a vendor. The firmware corresponding to different storage media can be the same or different, and is not limited herein. After the electronic device obtains the firmware corresponding to the storage medium, the electronic device can write the firmware corresponding to the storage medium into the storage medium, specifically by burning the firmware corresponding to the storage medium into the storage medium. The process of burning the firmware into the storage medium can be implemented using existing technology, and is not described in detail in embodiments of the present application.

[0185] The electronic device can also obtain a reset command corresponding to the storage medium, which is provided by a vendor. The reset command corresponding to different storage media can be the same or different, and is not limited herein.

[0186] At this time, the storage medium of the electronic device is a storage medium into which the corresponding firmware is written, and the electronic device can respond to the reset command corresponding to the storage medium in the storage medium into which the corresponding firmware is written, so that the electronic device resets the storage medium into which the corresponding firmware is written according to the reset command corresponding to the storage medium. The process of resetting the storage medium according to the reset command can be implemented using existing technology, and is not described in detail in embodiments of the present application.

[0187] For the convenience of description, the above device is described as various units and modules in terms of functions. Of course, the functions of the units and modules can be implemented in one or more software and / or hardware in the implementation of the present application.

[0188] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art in the field of the present application. It should also be understood that terms such as those defined in a generally used dictionary should be interpreted as having a meaning consistent with the meaning in the context of the relevant art and should not be interpreted in an idealized or overly formal sense unless specifically so defined.

[0189] For the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the embodiments of the present application are not limited by the action sequence described, because according to the embodiments of the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present application.

[0190] From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and the necessary general hardware platform. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments of the present application.

[0191] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some or all of the technical features; and such modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for writing vehicle test cases based on a large model, characterized in that: The method for writing vehicle test cases based on a large model includes: Preparation and testing phases; The preparation phase includes data collection and preprocessing steps and installation and deployment steps; During the testing phase, it includes the steps of test case generation, test case adjustment and confirmation, execution and feedback, report generation and report tuning; Among them, the installation and deployment steps are in a standby state for the preparation of test case generation; The test case generation step is used to call the model to generate preliminary test cases.

2. The method for writing vehicle test cases based on a large model according to claim 1, characterized in that: The preparation phase includes steps of data collection and preprocessing and installation and deployment, including: The steps of data collection and preprocessing include collecting relevant data from multiple data sources, cleaning and labeling the data, and building a knowledge base; Synchronous, test behavior data recorded on the human-machine terminal; Among them, the actual test operation corresponding to the test behavior of the human-machine terminal is used as the evaluation of the large model operation instruction and the basis for training and tuning.

3. The method for writing vehicle test cases based on a large model according to claim 1 or 2, characterized in that: The steps of installation and deployment, which are in a standby state for test case generation, include: Connect the client deployment device to the vehicle under test to enable it to export task logs; Synchronously, through camera or picture download, record the operation process and UI interface information in picture format; Also includes, ensuring that the server is in the started state; By ensuring that the server is in the startup state, ensuring that the related functions of test case generation and test report generation are in the standby state, prepare for test case generation.

4. The method for writing vehicle test cases based on a large model as claimed in claim 3, characterized in that: The testing phase includes the following steps: test case generation, test case adjustment and confirmation, execution and feedback, report generation, and report tuning: The steps of test case generation include, inputting a description of the software under test; Accordingly, place the device in a position to shoot the vehicle display or connect to the test equipment; Call the algorithm generated under the large model based on vision and / or language to generate preliminary test cases; Among them, calling the algorithm generated under the large model based on vision and / or language to generate preliminary test cases includes generating test cases covering normal and abnormal scenarios according to the functional modules, UI interface and test purpose of the in-vehicle software.

5. The method for writing vehicle test cases based on a large model as claimed in claim 4, characterized in that: The steps of adjusting and confirming the test case include: View and adjust test cases through the human-machine terminal interface; Check and adjust test cases according to the human-machine terminal interface, input the preset authoritative module, and determine whether it meets the error-free standards; If yes, then execute the test case for testing.

6. The method for writing vehicle test cases based on a large model as claimed in claim 5, characterized in that: The execution and feedback steps include: Split the execution strategy of virtual test environment and physical test environment according to test cases; According to the execution strategy of splitting the virtual test environment and the physical test environment, execute test cases in the virtual test environment and / or the physical test environment respectively, and collect test results; Based on the execution of test cases, observe on the UI interface to determine whether the test objectives have been achieved; If not completed, repeat the test case and observe on the UI interface whether the test purpose is achieved; If,it is not completed, then adjust the test case and repeat the test case; Repeating the test case after adjustment includes making adjustments to the test case generation steps, test case adjustment and confirmation steps, and execution and feedback steps based on the test objectives; Repeating the test case after adjustment also includes making adjustments to the test case generation steps, test case adjustment and confirmation steps, and execution and feedback steps based on the test purpose, and feeding back to the model training module of the large model to iteratively optimize the model.

7. The method for writing vehicle test cases based on a large model as claimed in claim 6, characterized in that: Also includes: The steps of report generation include: corresponding to the process and results of executing the test case, and exporting the test report; The steps of report tuning include: using the actual test operation of the corresponding human-machine terminal as the evaluation of the large model operation instructions, which is used as the basis for training and tuning; inputting the test report into the preset authoritative module; supplementing and modifying the report details; and exiting when the large model cannot generate the test cases that meet the auxiliary vehicle test case writing requirements.

8. The method for writing vehicle test cases based on a large model as claimed in claim 7, characterized in that: The test case generation step further includes: The large model includes a multimodal large model; Use a multimodal large model to understand UI information and generate test operation prompts; Among them, the multimodal large model is one or more of CogVLM, Yi - VL, and Qwen - VL; The test report contains test item information. Based on a multi-round question-and-answer format, questions are asked in sequence according to the test items in the test report, and UI interface information is input; Obtain the multimodal large model judgment test results based on multiple rounds of questions and answers; Judge the test results based on the multimodal large model and generate test guidance suggestions.

9. The method for writing vehicle test cases based on a large model as claimed in claim 7, characterized in that: The report generation step further includes: obtaining a test report generator for report generation; Among them, the test report generator consists of a knowledge base and a large language model; The UI interface image information, test content, log information and search content in the knowledge base are used as inputs to the test report generator; Call the API provided by OPENAI to determine whether each test case achieves the expected test objectives and generate a corresponding test report; The knowledge base includes a database composed of historical data of test case execution after vectorization processing; It also includes building a knowledge base and providing retrieval capabilities through LangChain.

10. A large model-based assisted vehicle test case writing device, characterized in that: The device for assisting vehicle test case writing based on a large model includes a client and a server: The client is used to connect to the tested vehicle computer to enable it to export task logs; it is also used to record the operation process and UI interface information in image format through camera or image download; According to the client, record the test behavior data on the human-machine terminal; The server is used to provide the computing power required for large model reasoning and deploy modules that implement test case generation steps and modules that implement report generation steps; Set up the client and / or server based on cloud deployment and / or local deployment.

Citation Information

Patent Citations

  • An automatic generation system for in-vehicle entertainment navigation test cases

    CN111177006B

  • Test case generation method and device based on large model, equipment and storage medium

    CN118152261A

Cited By

  • Network interface card testing method and device

    CN121000648A