Software testing method of vehicle, vehicle and computer readable storage medium

By applying natural language processing models in vehicle software testing to identify test keywords and generate automated test files, the low efficiency of traditional manual testing is solved and an efficient and accurate software testing process is achieved.

CN120705066APending Publication Date: 2025-09-26CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511139652.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Traditional vehicle software testing methods rely on manual operations, resulting in low testing efficiency and prone to errors, making it difficult to fully cover test scenarios.

Method used

By obtaining the test problem information of the software to be tested, using the natural language processing model to identify test keywords, generating test files that conform to the input format of the test system, and automatically executing the test, human intervention is reduced.

Benefits of technology

It realizes the automation of vehicle software testing, significantly improves testing efficiency and accuracy, reduces human errors, and ensures the comprehensiveness and efficiency of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705066A_ABST
    Figure CN120705066A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a software testing method of a vehicle, the vehicle and a computer readable storage medium, and the method comprises the steps: obtaining test problem information of to-be-tested software installed in the vehicle, the test problem information being used for representing a test problem of the to-be-tested software in an initial test stage; identifying test keywords in the test problem information; based on the test keyword, determining a target test case matched with the test problem in a test case library; based on the target test case, a test file matched with the test system is generated, and the file format of the test file meets the file input format of the test system; the test file is input into a test system for testing, a test result is obtained, and the test result is used for representing the index state of the to-be-tested performance index of the to-be-tested function. The technical problem of low test efficiency of manually testing the to-be-tested software in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of vehicle technology, and in particular, to a vehicle software testing method, a vehicle, and a computer-readable storage medium. Background Art

[0002] In vehicle electronic systems, testing and verification of software applications is paramount to ensuring software quality, functional safety, and a consistently high driving experience. Traditional testing methods often rely on manual labor. Testers analyze software application testing issues based on their experience, identify software modules requiring retesting, and then manually select test cases to test these modules. This entire process relies on manual labor, resulting in low testing efficiency for the software under test.

[0003] There is currently no good solution to the above problems. Summary of the Invention

[0004] The embodiments of the present application provide a vehicle software testing method, a vehicle, and a computer-readable storage medium to at least solve the technical problem of low testing efficiency in the related art that relies on manual testing of the software to be tested.

[0005] According to one aspect of an embodiment of the present application, a vehicle software testing method is provided, the method comprising: obtaining test problem information of a software to be tested installed in a vehicle, wherein the test problem information is used to characterize test problems existing in the software to be tested during an initial testing phase; identifying test keywords in the test problem information, wherein the test keywords are used to characterize a function to be tested corresponding to the test problem in the software to be tested and a performance indicator to be tested of the function to be tested; based on the test keywords, determining a target test case that matches the test problem in a test case library, wherein the target test case is used to test the performance indicator to be tested of the function to be tested; based on the target test case, generating a test file that matches a test system, wherein a file format of the test file satisfies a file input format of the test system; inputting the test file into the test system for testing to obtain a test result, wherein the test result is used to characterize the indicator state of the performance indicator to be tested of the function to be tested.

[0006] Furthermore, identifying test keywords in the test question information includes: determining the text content corresponding to the test question information, wherein the text content is a text description corresponding to the test question information; using a word segmenter to perform word segmentation on the text content to obtain a word segmentation set, wherein the word segmentation set includes multiple text words in the text content; and identifying the test keywords in the test question information from the multiple text words included in the word segmentation set.

[0007] Furthermore, test keywords in the test question information are identified from multiple text words included in the word segmentation set, including: sorting the text words according to their positions in the text content corresponding to the test question information to obtain a sorting sequence corresponding to the word segmentation set; inputting the text words into a natural language processing model for analysis according to the sorting sequence to obtain embedded vectors corresponding to the text words, wherein the embedded vectors are used to represent contextual semantic information of the text words in the text content; identifying target keywords from multiple text words based on the embedded vectors corresponding to the text words in the sorting sequence; and determining the target keywords as test keywords in the test question information.

[0008] Furthermore, based on the embedded vectors corresponding to the text words in the sorted sequence, target keywords are identified from multiple text words, including: based on the embedded vectors corresponding to the text words in the sorted sequence, respectively determining the weight values ​​of the multiple text words in the test questions; respectively comparing the weight values ​​corresponding to the multiple text words with preset weight thresholds to obtain multiple first comparison results; based on the multiple first comparison results, identifying target keywords from the multiple text words.

[0009] Furthermore, based on multiple first comparison results, target keywords are identified from multiple text words, including: based on multiple first comparison results, text words with weight values ​​greater than or equal to a preset weight threshold are identified from multiple text words; and the identified text words are determined as target keywords.

[0010] Furthermore, based on the test keywords, target test cases matching the test questions are determined in the test case library, including: standardizing the test keywords to obtain standardized test keywords, wherein the text format of the standardized test keywords is the same as the text format of the test cases in the test case library; constructing a regularized expression based on the standardized test keywords, wherein the regularized expression includes multiple expression variants corresponding to the test keywords; based on the multiple expression variants included in the regularized expression, retrieving multiple initial test cases matching any test question in the test case library; based on the similarity between the multiple initial test cases and the test question, screening out the target test cases from the initial test cases.

[0011] Furthermore, based on the similarity between multiple initial test cases and test questions, target test cases are screened out from the initial test cases, including: determining the similarity between multiple initial test cases and test questions; comparing the similarity with a similarity threshold to obtain multiple second comparison results; and based on the multiple second comparison results, identifying target test cases from the initial test cases whose similarity is greater than or equal to the similarity threshold.

[0012] Furthermore, after obtaining the test results, the method further includes: generating a test report based on the test results, wherein the test report is at least used to indicate whether the indicator status of the performance indicator to be tested of the function to be tested of the software to be tested meets the target indicator status.

[0013] According to another aspect of an embodiment of the present application, a vehicle software testing device is also provided, including: an acquisition unit for acquiring test problem information of the software to be tested installed in the vehicle, wherein the test problem information is used to characterize the test problems existing in the software to be tested in the initial testing phase; an identification unit for identifying test keywords in the test problem information, wherein the test keywords are used to characterize the functions to be tested corresponding to the test problems in the software to be tested and the performance indicators to be tested of the functions to be tested; a determination unit for determining a target test case matching the test problem in a test case library based on the test keywords, wherein the target test case is used to test the performance indicators to be tested of the functions to be tested; a generation unit for generating a test file matching the test system based on the target test case, wherein the file format of the test file satisfies the file input format of the test system; a testing unit for inputting the test file into the test system for testing to obtain a test result, wherein the test result is used to characterize the indicator state of the performance indicators to be tested of the function to be tested.

[0014] According to another aspect of an embodiment of the present application, a vehicle is further provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the method of each embodiment of the present application is executed when the program is running.

[0015] According to another aspect of an embodiment of the present application, a computer-readable storage medium is also provided, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present application.

[0016] According to another aspect of the embodiments of the present application, a computer program product is further provided, including a computer program, which implements the methods in various embodiments of the present application when executed by a processor.

[0017] According to another aspect of an embodiment of the present application, a computer program product is further provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present application is implemented.

[0018] According to another aspect of the embodiments of the present application, a computer program is further provided, which implements the methods in various embodiments of the present application when executed by a processor.

[0019] In an embodiment of the present application, by obtaining the test problem information of the vehicle's software to be tested, and then identifying test keywords closely related to the test problem based on the test problem information, the test keywords not only reveal the test functions of the software to be tested, but also clarify the performance indicators that need to be paid attention to. After determining the test keywords, a test file that conforms to the input format of the test system is generated based on the test keywords, and then the test file is input into the test system for testing to obtain the test results. Through the automated testing process, the time cost and potential errors of human intervention are greatly reduced, the testing efficiency of the software to be tested is improved, and the technical problem of low testing efficiency in the related technology that relies on manual testing of the software to be tested is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0021] Figure 1 is a flow chart of a vehicle software testing method according to an embodiment of the present application;

[0022] Figure 2 This is a flowchart of a method for testing software to be tested in a related art according to an embodiment of the present application;

[0023] Figure 3 is a flowchart of a method for testing software to be tested based on a neural network according to an embodiment of the present application;

[0024] Figure 4 is a schematic diagram of a vehicle software testing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] According to an embodiment of the present application, a method embodiment of a vehicle software testing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0028] In this embodiment, a vehicle software testing method is provided. Figure 1 is a flow chart of a vehicle software testing method according to an embodiment of the present application, such as Figure 1 As shown, the process includes the following steps.

[0029] Step S101: Acquire test problem information of the software to be tested installed in the vehicle.

[0030] In the technical solution provided in step S101 above of this application, the software to be tested is a software application installed on the vehicle, such as in-vehicle infotainment software (music software, broadcast software, video software, etc.), autonomous driving assistance software (navigation software), etc., which are not specifically limited here. The test problem information is used to characterize the test problems existing in the software to be tested during the initial testing phase. The initial testing phase is used to test the software to be tested in multiple aspects such as functionality, performance, security, and user experience during the development process of the software to be tested, so as to identify potential problems, i.e., test problems, in the software to be tested.

[0031] In this embodiment, during the initial testing phase, the software's testing system tests the various performance indicators of each functional module of the software under test to comprehensively evaluate its performance in the vehicle. During the testing process, the testing system automatically records any anomalies encountered during the initial testing phase and generates test problem information after the initial testing phase. This test problem information includes descriptions of one or more test problems encountered during the initial testing phase. These one or more test problems can be generated into a test problem list to record the test problems encountered during the initial testing phase.

[0032] Step S102: Identify test keywords in the test question information.

[0033] In the technical solution provided in the above step S102 of the present application, the test keywords are used to represent the functions to be tested corresponding to the test questions in the software to be tested and the performance indicators to be tested of the functions to be tested.

[0034] In this embodiment, as described above, the test question information includes description information of one or more test questions. Based on this, after obtaining the test question information, a natural language processing model, such as a bidirectional encoder representations from transformers (BERT), can be used to identify the description information of the one or more test questions included in the test question information to obtain test keywords corresponding to the one or more test questions. The test keywords can determine the test functions that need to be retested in the test software and the test performance indicators of the test functions.

[0035] Optionally, the test keyword identification process is described using the description of a test question in the test question information as an example. When identifying the test keywords in the test question based on the test question description, the description information corresponding to the test question can first be preprocessed. The purpose of the preprocessing is to remove content in the description information that is not relevant to the test question and to standardize the cleaned description information so that the preprocessed description information meets the input requirements of the natural language processing model.

[0036] For example, when preprocessing the description information of a test question, the description information is first cleaned to remove irrelevant symbols, numbers, URLs, etc. in the description information, retaining only the parts that are helpful for understanding the test question. Afterwards, the format of the cleaned description information is unified, that is, the cleaned description information is converted into text content consistent with the input format of the natural language processing model.

[0037] Optionally, after preprocessing the description information of the test question to obtain the text content corresponding to the description information of the test question, word segmentation can be performed on the text content to obtain multiple text words, and stop words can be removed from the multiple text words. For example, some common words that contribute little to keyword recognition, such as stop words like "de", "le", "he", etc., are removed to improve the efficiency and accuracy of keyword extraction.

[0038] Optionally, after processing the multiple text words, the processed multiple text words can be input into a natural language processing model (such as, BERT model) in sequence to obtain the embedded vectors corresponding to the multiple text words, and then keywords in the multiple text words can be determined based on the embedded vectors corresponding to the multiple text words.

[0039] Optionally, after obtaining the embedded vectors corresponding to the multiple text words, the weight values of the multiple text words in the description information of the test question can be determined based on the embedded vectors corresponding to the multiple text words, where the weight value is used to represent the importance degree of the corresponding text word in the description information of the test question.

[0040] Optionally, after obtaining the weight values corresponding to the multiple text words respectively, text words with weight values greater than or equal to the weight threshold can be screened out from the multiple text words, and the screened text words can be determined as the test keywords of the test question.

[0041] Optionally, after identifying the test keywords of the test question, it can be further verified whether the test keywords can accurately reflect the test objective of the test question and whether they can effectively guide the selection of subsequent test cases. If the verification result shows that the test keywords can accurately reflect the test objective of the test question, the identified test keywords are used as the test keywords corresponding to the test question. If the verification result shows that the test keywords fail to accurately reflect the test objective of the test question, in this case, the test keywords in the description information corresponding to the test question can be re - determined until the test keywords can accurately reflect the test objective of the test question.

[0042] Optionally, according to the above method, one or more test keywords corresponding to the test questions included in the test question information can be identified.

[0043] In this step, through multiple automated steps such as preprocessing, word segmentation, and weight calculation, the test keywords of the test question are determined without manual participation, greatly improving the recognition efficiency and recognition accuracy of the test keywords.

[0044] Step S103, based on the test keywords, determine the target test cases matching the test question in the test case library.

[0045] In the technical solution provided in step S103 of this application, the test case library includes test scripts and cases for multiple functional modules and performance indicators of multiple functional modules in the software installed in the vehicle, aiming to ensure comprehensive and effective test coverage. The target test cases are used to test the performance indicators of the tested functions of the tested software.

[0046] In this embodiment, after obtaining the test keywords, the test keywords can be standardized so that the text format of the test keywords is consistent with the text format of the test cases in the test case library. In the test case library, a keyword index is constructed for each test case to improve the efficiency and accuracy of the search. Based on this, the standardized keywords can be used to search the index in the test case library to find test cases that match the keywords. This may include directly searching for keywords, or using advanced search techniques such as regular expressions for more complex matching. The searched test cases are scored for relevance to evaluate the degree of relevance between the retrieved test cases and the test questions. The relevance score can be obtained based on factors such as the frequency, location, context relevance of the keywords, and the historical execution results of the use cases.

[0047] Optionally, based on the relevance score, the test case with the highest matching degree is selected from the retrieved test cases as the target test case. For example, a score threshold is set, and test cases with a relevance score greater than or equal to the score threshold are determined as target test cases.

[0048] Optionally, after the target test case is determined, the target test case may be appropriately updated or adjusted according to the description information of the test problem and the test requirements to improve the test accuracy of the target test case.

[0049] Step S104: Generate a test file that matches the test system based on the target test case.

[0050] In the technical solution provided in step S104 of the present application, the test system is used to test the performance indicators of the functional modules of the software to be tested according to the test cases. The file format of the test file meets the file input format of the test system.

[0051] In this embodiment, to meet the input requirements of the test system, after obtaining the target test case, a test file can be generated based on the target test case. For example, a test file in Extensible Markup Language (XML) format is generated based on the target test case, or a test file in JavaScript Object Notation (JSON) format is generated based on the target test case. These examples are merely illustrative and do not limit the file format of the test file.

[0052] Step S105: input the test file into the test system for testing to obtain the test result.

[0053] In the technical solution provided in the above step S105 of the present application, the test result is used to characterize the indicator state of the performance indicator of the function to be tested of the software to be tested.

[0054] In this embodiment, after the test file is generated, the test file can be input into the test system for testing to obtain the test results.

[0055] In the above steps S101 to S105, by obtaining the test problem information of the vehicle's software to be tested, and then identifying test keywords closely related to the test problem based on the test problem information, the test keywords not only reveal the test functions of the software to be tested, but also clarify the performance indicators that need to be paid attention to. After determining the test keywords, a test file that conforms to the input format of the test system is generated based on the test keywords, and then the test file is input into the test system for testing to obtain the test results. Through the automated testing process, the time cost and potential errors of human intervention are greatly reduced, the testing efficiency of the software to be tested is improved, and the technical problem of low testing efficiency in the related technology that relies on manual testing of the software to be tested is solved.

[0056] The software testing method for the above-mentioned vehicle of this application is further introduced below.

[0057] As an optional implementation, step S102, identifying test keywords in the test question information, includes: determining the text content corresponding to the test question information, wherein the text content is a text description corresponding to the test question information; using a word segmenter to segment the text content to obtain a word segmentation set, wherein the word segmentation set includes multiple text words in the text content; and identifying the test keywords in the test question information from the multiple text words included in the word segmentation set.

[0058] In this embodiment, as described above, the test question information includes description information of one or more test questions. Based on this, the description information of the one or more test questions in the test question information can be converted into text content. For example, the text content can be "When the user enters the username and password on the login interface, the system occasionally crashes."

[0059] Optionally, after obtaining the text content corresponding to the description information of one or more test questions, a word segmenter can be used to perform word segmentation on the obtained text content. Word segmentation is the process of dividing a continuous text sequence into independent vocabulary units, which helps in subsequent semantic analysis and keyword recognition. For example, the above text content will be segmented into text words such as "when", "user", "in", "login interface", "input", "user name", "and", "password", "when", "system", "occasionally", "will", and "crash". What is obtained after word segmentation is a set containing all independent words, that is, the word segmentation set.

[0060] Optionally, after obtaining the word segmentation set, test keywords in the test question information can be identified from multiple text words included in the word segmentation set. The test keywords are text words that are highly relevant to the test question and can accurately describe the core of the test question. 6. Test keywords are text words that are highly important for understanding the test content of the test question.

[0061] As an optional implementation, test keywords in the test question information are identified from multiple text words included in the word segmentation set, including: sorting the text words according to their positions in the text content corresponding to the test question information to obtain a sorted sequence corresponding to the word segmentation set; inputting the text words into a natural language processing model for analysis according to the sorted sequence to obtain embedded vectors corresponding to the text words, wherein the embedded vectors are used to represent the contextual semantic information of the text words in the text content; identifying target keywords from multiple text words based on the embedded vectors corresponding to the text words in the sorted sequence; and determining the target keywords as the test keywords in the test question information.

[0062] In this embodiment, the text words can be sorted according to their position in the text content corresponding to the test question information to obtain a sorted sequence corresponding to the word segmentation set. For example, for a word segmentation set corresponding to a test question, the multiple text words included in the word segmentation set can be sorted according to their position in the original text to obtain a sorted sequence. This helps maintain the logical order of the sentence and ensures that the embedded vector can reflect the contextual relationship between the words.

[0063] Optionally, the sorted text words are fed into a pre-trained natural language processing model, such as a BERT model. The natural language processing model generates an embedded vector for each text word, which contains the semantic information of the text word and the context of the text word in the original text content.

[0064] Optionally, after obtaining the embedded vector corresponding to each text word, the weight value of each text word can be further determined, and then according to the importance of each text word in the corresponding test question, the target keyword can be identified from multiple text words, and then the target keyword can be used as the test keyword corresponding to the test question.

[0065] As an optional implementation, target keywords are identified from multiple text words based on the embedded vectors corresponding to the text words in the sorted sequence, including: determining the weight values ​​of multiple text words in the test questions based on the embedded vectors corresponding to the text words in the sorted sequence; comparing the weight values ​​corresponding to the multiple text words with preset weight thresholds to obtain multiple first comparison results; and identifying target keywords from multiple text words based on the multiple first comparison results.

[0066] In this embodiment, a pre-trained neural network model (e.g., BERT) is used to convert each ranked text word into an embedded vector. These vectors not only contain the semantic information of the word itself, but also take into account its contextual relationship in the text, thereby more accurately reflecting the meaning of the word in a specific context.

[0067] Optionally, based on the generated embedded vectors, a weight value of each text word in the test question information is calculated. For example, the weight value of each text word is determined by comparing the similarity (e.g., cosine similarity) between the word vector and the overall vector of the question description, where the higher the similarity, the greater the weight value.

[0068] Optionally, after obtaining the weight value of the text words, the weight value of each text word can be compared with a preset weight threshold to obtain multiple first comparison results, and then the target keyword can be identified from the multiple text words based on the multiple first comparison results.

[0069] As an optional implementation, based on multiple first comparison results, target keywords are identified from multiple text words, including: based on multiple first comparison results, text words with weight values ​​greater than or equal to a preset weight threshold are identified from multiple text words; and the identified text words are determined as target keywords.

[0070] In this embodiment, if the first comparison result indicates that the weight value of the text word is greater than or equal to the preset weight threshold, it means that the text word carries key information describing the test question, and the text word is selected as the target keyword. Conversely, if the first comparison result indicates that the weight value of the text word is less than the preset weight threshold, it means that the text word has little impact on the core content of the test question, and the text word is excluded from the possibility of being a target keyword.

[0071] Optionally, the words that are finally selected through screening will be considered as target keywords. These target keywords are the core components of the test question information and can help understand the specific context of the problem, the modules or functions involved, and possible solutions.

[0072] Alternatively, in software testing or fault diagnosis scenarios, identifying target keywords can help the system quickly locate the scope of the problem and select the correct test case or diagnostic path, thereby greatly shortening analysis and resolution time and improving efficiency.

[0073] As an optional implementation, step S103, based on the test keywords, determines the target test cases that match the test questions in the test case library, including: standardizing the test keywords to obtain standardized test keywords, wherein the text format of the standardized test keywords is the same as the text format of the test cases in the test case library; constructing a regularized expression based on the standardized test keywords, wherein the regularized expression includes multiple expression variants corresponding to the test keywords; based on the multiple expression variants included in the regularized expression, retrieving multiple initial test cases that match any test question in the test case library; based on the similarity between the multiple initial test cases and the test questions, screening out the target test cases from the initial test cases.

[0074] In this embodiment, after obtaining the test keywords, the test keywords can be standardized, for example, unifying terms, removing special characters, converting uppercase and lowercase letters, etc., to ensure that the test keywords are consistent with the test cases in the test cases in text format, thereby improving the search efficiency and matching quality of the test keywords in the test case library.

[0075] Optionally, after obtaining the standardized test keywords, a regularized expression containing multiple expression variants of the keywords can be constructed based on the standardized test keywords to more comprehensively match test cases related to the test problem in the test case library.

[0076] For example, a constructed regular expression is used to search in a test case library, wherein the regular expression may match multiple test cases, and the multiple test cases contain descriptions related to the keyword.

[0077] Optionally, the initially retrieved test cases are used as initial test cases. Target test cases are then selected from the initial test cases based on the similarity between the descriptions of the multiple initial test cases and the test problem. For example, based on the similarity scores, the most relevant and representative test cases from the initial test cases are selected; these are the target test cases. This selection of target test cases ensures targeted and effective testing and avoids irrelevant or duplicate testing.

[0078] Optionally, by standardizing test keywords, building regularized expressions covering multiple expression variants, retrieving preliminarily matching test cases and filtering by similarity, it is possible to accurately and efficiently identify use cases that are highly relevant to specific test problems in the test case library, provide precise guidance for automated testing, and significantly improve test efficiency and problem detection accuracy.

[0079] As an optional implementation, based on the similarity between multiple initial test cases and test questions, target test cases are screened out from the initial test cases, including: determining the similarity between multiple initial test cases and test questions; comparing the similarity with a similarity threshold to obtain multiple second comparison results; and based on the multiple second comparison results, identifying target test cases from the initial test cases whose similarity is greater than or equal to the similarity threshold.

[0080] In this embodiment, natural language processing techniques, such as word vectors, TF-IDF, cosine similarity, etc., can be used to calculate the similarity between each initial test case and the test question. A similarity threshold is pre-set as a benchmark for determining whether the test case is sufficiently relevant to cover the test question. The similarity threshold can be adjusted according to the strictness of the test and project requirements. The similarity value of each initial test case is compared with the similarity threshold to obtain a second comparison result.

[0081] Optionally, based on the second comparison result, test cases with a similarity greater than or equal to a similarity threshold are identified from the initial test case set. These test cases are designated as target test cases. The selection of target test cases ensures the accuracy and effectiveness of the final test set, avoids irrelevant or redundant tests, and thereby improves the efficiency of testing the functions of the software under test.

[0082] In this step, the similarity-based screening method aims to screen out target test cases that are sufficiently similar to the test problem to ensure that the target test cases can effectively detect or verify the specific functional modules corresponding to the test problem.

[0083] As an optional implementation, the method further includes: generating a test report based on the test results, wherein the test report is at least used to indicate whether the indicator status of the performance indicator to be tested of the function to be tested of the software to be tested meets the target indicator status.

[0084] In this embodiment, after the test results are obtained, a test report can be generated based on the test results, wherein the test report can systematically summarize the test process, test results, performance index compliance of the software to be tested, and any problems or anomalies found.

[0085] Optionally, after obtaining the test report, it can be fed back to the tester of the software under test so that the tester can take necessary measures to resolve any issues found. Based on the feedback from the test report, the automated test system or test cases can be adjusted and optimized to provide more accurate and comprehensive test results in future test cycles.

[0086] The above technical solutions of the embodiments of the present application are further introduced below with reference to the preferred embodiments of the present invention.

[0087] In vehicle electronic systems, especially complex software applications involving body control, driver assistance, and powertrain systems, testing and verification are critical to ensuring software quality, functional safety, and a consistently high driving experience. Traditional testing methods often rely on manual processes, including problem reporting, problem analysis, test case selection and execution, and test report generation. However, with the increasing number and complexity of vehicle electronic functions, this manually intensive testing process has gradually exposed a series of issues, including inefficiency, error-proneness, and difficulty in fully covering test scenarios.

[0088] Figure 2 is a flow chart of a testing method for software to be tested in a related technology according to an embodiment of the present application, such as Figure 2 As shown, the method includes the following steps:

[0089] Step S201 : Recording a list of test questions of the software to be tested in the initial test phase.

[0090] In this embodiment, software testers record test issues encountered during the initial testing phase of the software under test to form a test issue list. The record content typically includes the specific manifestation of the error, the occurrence environment (such as hardware configuration, software version, operating conditions), reproduction steps, possible impact range, etc., providing a data foundation for subsequent problem tracking and analysis.

[0091] Step S202: Repair the test problems in the test problem list to obtain repair results.

[0092] In this embodiment, after receiving the test problem list, the software developer can repair each test problem in the test problem list and obtain a repair result.

[0093] Step S203: Based on the repair result, determine the functional modules that need to be retested in the software to be tested.

[0094] In this embodiment, the software tester determines the functional modules that need to be retested in the software to be tested based on the repair results.

[0095] Step S204: retest the functional modules that need to be retested.

[0096] In this embodiment, the software testers perform a retesting process, which includes running automated test scripts, manually testing critical paths, and verifying the effectiveness of the fixes under different environments and conditions. The purpose of retesting is to ensure that the test issues that existed during the initial testing phase have been correctly resolved.

[0097] In the above steps S201 to S204, the test problems existing in the software to be tested during the initial testing phase are manually recorded by the testers. However, key details may be missed due to the testers' distraction, memory errors, or negligence in recording. This results in insufficient information for the subsequent development team to fix the problem, and they may not be able to fully understand the nature of the problem and all its influencing factors. Moreover, when testers determine the functional modules that need to be retested, they usually make judgments based on personal experience and intuition. This subjective decision may vary from person to person, and it is difficult to conduct a comprehensive and accurate assessment of the module dependencies in a complex software system, thereby affecting the comprehensiveness and effectiveness of the retest. In addition, manual operations are time-consuming, resulting in low testing efficiency of the software to be tested.

[0098] However, an embodiment of the present application provides a testing method for software to be tested, which includes the following steps: using a pre-trained natural language processing model (such as a BERT model) to analyze the test question list of the software to be tested in the initial testing phase, and extracting keywords from the test question list; based on the extracted keywords, automatically identifying the modules in the software to be tested that need to be retested; constructing regular expressions through keywords, and using regular expressions to retrieve and load relevant test cases from the test case library into an XML file, automatically creating a test project, and running the test; after the test is completed, automatically generating a test report. That is, in an embodiment of the present application, through the automated testing process, the test efficiency and accuracy are significantly improved, the need for manual operation is reduced, and the testing process is accelerated, which is suitable for the test automation needs in the vehicle software development process.

[0099] Figure 3 is a flowchart of a method for testing software to be tested based on a neural network according to an embodiment of the present application, such as Figure 3As shown, the method may include the following steps.

[0100] Step S301: Obtain a problem list of the software to be tested.

[0101] In this embodiment, a problem list is generated based on the test problems reported during the testing of the software to be tested. The problem list includes at least one test problem, which is used to indicate errors, abnormal behaviors, or unexpected functional performance encountered by the software to be tested during the testing phase.

[0102] Step S302: pre-process each test question in the question list to obtain a pre-processed question list.

[0103] In this embodiment, the obtained question list is preprocessed, including but not limited to text standardization (e.g., unifying capitalization and removing punctuation marks), word segmentation, removal of stop words, and processing of non-standard expressions, to ensure that subsequent keyword extraction is performed on clean, structured, and consistently formatted data.

[0104] Step S303: extract keywords from each test question in the pre-processed question list based on the keyword extraction module.

[0105] In this embodiment, based on the preprocessed question list, a pre-trained neural network model (such as the BERT model) is used to perform an in-depth analysis of the description of each test question, extract keywords related to the essence of the question, and provide a data basis for subsequent identification of test modules and matching of test cases.

[0106] Optionally, the BERT model uses a tokenizer to tokenize the text corresponding to the test questions in the question list, generating multiple text terms. Word vectors are then calculated for each text term, and these word vectors are used to calculate weights for each text term. Keywords are then extracted from the multiple text terms based on their word vectors.

[0107] Step S304: Based on the API interface module, the keywords in each test question are sent to the test case system.

[0108] In this embodiment, the keywords extracted in step S303 are sent to the test case management system through an application programming interface (API) interface module, providing a basis for retrieval and selection of test cases in the next step.

[0109] Step S305: construct regular expressions corresponding to each test question based on the keywords.

[0110] In this embodiment, a corresponding regular expression is constructed based on the extracted keywords. The regular expression is used to subsequently search for functional modules and the functions to be tested of the functional modules related to the test problem in the requirement specification document.

[0111] Step S306 : Based on the regular expression, determine the functional modules corresponding to the respective test questions and the functions to be tested of the functional modules in the requirement specification document.

[0112] In this embodiment, the regular expression constructed in step S305 is used to search the requirement specification document to identify functional modules and their specific functions to be tested that match the test question keywords. This step ensures the selection of test cases and the pertinence of the test questions.

[0113] Step S307 : acquiring test cases from the test case document based on the functional modules and the functions to be tested of the functional modules.

[0114] In this embodiment, according to the functional modules and their functions to be tested determined in step S306, relevant test cases are retrieved from the test case document. These test cases cover various test scenarios of the functional modules and provide specific steps and expected results for the next test execution.

[0115] Step S308: Generate a test file from the test case according to a preset file format.

[0116] In this embodiment, the test case selected in step S307 is converted into a test file in a preset file format (e.g., XML). The test file contains detailed information about the test case, as well as the parameters and environment configuration required to execute the test case, and is the input of the automated testing tool.

[0117] Step S309 : testing the functions to be tested of the functional modules of the software to be tested based on the test file to obtain test results.

[0118] In this embodiment, based on the generated test file, the test is automatically run to test the functions to be tested of the functional modules of the software to be tested and obtain the test results.

[0119] Step S310: Generate a test report based on the test results.

[0120] In this embodiment, after the test results are obtained, a test report is automatically generated. The report details the test results, including passed and failed tests, and any remaining issues in the software. The test report may also include an overall assessment of software quality, an overview of test case execution, and a detailed explanation of any anomalies encountered during testing, providing the development team with clear guidance on how to fix software issues.

[0121] In steps S301 to S310, the neural network-based testing method automates the entire process, from initial problem description to automated test execution. This not only significantly improves test efficiency and accuracy, but also reduces the burden on testers, allowing them to focus more on optimizing test strategies and improving software quality. This approach is particularly suitable for vehicle software development that requires frequent iterations and complex scenario testing, helping to improve software stability and reliability, ensuring vehicle safety and performance under various driving conditions.

[0122] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0123] According to an embodiment of the present application, an embodiment of a vehicle software testing device is provided. It should be noted that the device can be used to execute the above-mentioned vehicle software testing method.

[0124] Figure 4 FIG is a schematic diagram of a vehicle software testing device according to an embodiment of the present application. Figure 4 As shown, the vehicle software testing device 400 may include: an acquisition unit 401 , an identification unit 402 , a determination unit 403 , a generation unit 404 and a testing unit 405 .

[0125] The acquisition unit 401 is configured to acquire test problem information of the software to be tested installed in the vehicle, wherein the test problem information is used to characterize test problems existing in the software to be tested during an initial test phase.

[0126] The identification unit 402 is configured to identify test keywords in the test question information, wherein the test keywords are used to represent the function to be tested corresponding to the test question in the software to be tested and the performance indicator to be tested of the function to be tested.

[0127] The determining unit 403 is configured to determine a target test case that matches the test question in the test case library based on the test keyword, wherein the target test case is used to test a performance indicator to be tested of the function to be tested.

[0128] The generating unit 404 is configured to generate a test file that matches the test system based on the target test case, wherein the file format of the test file meets the file input format of the test system.

[0129] The testing unit 405 is used to input the test file into the test system for testing to obtain a test result, wherein the test result is used to represent the indicator status of the performance indicator of the function to be tested.

[0130] Optionally, the identification unit 402 is also used to: determine the text content corresponding to the test question information, wherein the text content is a text description corresponding to the test question information; use a word segmenter to perform word segmentation on the text content to obtain a word segmentation set, wherein the word segmentation set includes multiple text words in the text content; and identify test keywords in the test question information from the multiple text words included in the word segmentation set.

[0131] Optionally, the recognition unit 402 is also used to: sort the text words according to their positions in the text content corresponding to the test question information to obtain a sorting sequence corresponding to the word segmentation set; input the text words into a natural language processing model for analysis according to the sorting sequence to obtain embedded vectors corresponding to the text words, wherein the embedded vectors are used to represent the contextual semantic information of the text words in the text content; identify target keywords from multiple text words based on the embedded vectors corresponding to the text words in the sorting sequence; and determine the target keywords as test keywords in the test question information.

[0132] Optionally, the recognition unit 402 is also used to: determine the weight values ​​of multiple text words in the test question based on the embedded vectors corresponding to the text words in the sorting sequence; compare the weight values ​​corresponding to the multiple text words with the preset weight thresholds to obtain multiple first comparison results; and identify target keywords from the multiple text words based on the multiple first comparison results.

[0133] Optionally, the identification unit 402 is further configured to: identify, based on the multiple first comparison results, text words having weight values ​​greater than or equal to a preset weight threshold from the multiple text words; and determine the identified text words as target keywords.

[0134] Optionally, the determination unit 403 is also used to: standardize the test keywords to obtain standardized test keywords, wherein the text format of the standardized test keywords is the same as the text format of the test cases in the test case library; construct a regularized expression based on the standardized test keywords, wherein the regularized expression includes multiple expression variants corresponding to the test keywords; based on the multiple expression variants included in the regularized expression, retrieve multiple initial test cases matching any test question in the test case library; based on the similarity between the multiple initial test cases and the test question, filter out the target test case from the initial test cases.

[0135] Optionally, the determination unit 403 is also used to: determine the similarity between multiple initial test cases and test questions; compare the similarity with a similarity threshold to obtain multiple second comparison results; and based on the multiple second comparison results, identify target test cases from the initial test cases whose similarity is greater than or equal to the similarity threshold.

[0136] Optionally, the apparatus 400 is further configured to generate a test report based on the test result, wherein the test report is at least configured to indicate whether an indicator state of a performance indicator to be tested of a function to be tested of the software to be tested meets a target indicator state.

[0137] In the vehicle software testing device of this embodiment, by obtaining the test problem information of the vehicle's software to be tested, and then identifying test keywords closely related to the test problem based on the test problem information, the test keywords not only reveal the test functions of the software to be tested, but also clarify the performance indicators that need to be paid attention to. After determining the test keywords, a test file that conforms to the input format of the test system is generated based on the test keywords, and then the test file is input into the test system for testing to obtain the test results. Through the automated testing process, the time cost and potential errors of human intervention are greatly reduced, the testing efficiency of the software to be tested is improved, and the technical problem of low testing efficiency in the related art that relies on manual testing of the software to be tested is solved.

[0138] An embodiment of the present application further provides a vehicle, comprising: a memory storing an executable program; and a processor for running the program, wherein the method of each embodiment of the present application is executed when the program is running.

[0139] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present application.

[0140] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in various embodiments of the present application when executed by a processor.

[0141] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present application is implemented.

[0142] The embodiments of the present application further provide a computer program, which, when executed by a processor, implements the methods in the above-mentioned embodiments of the present application.

[0143] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0144] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0145] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0146] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0147] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0148] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A vehicle software testing method, characterized in that: include: Acquiring test problem information of the software to be tested installed in the vehicle, wherein the test problem information is used to characterize test problems existing in the software to be tested during an initial testing phase; Identifying test keywords in the test question information, wherein the test keywords are used to represent the function to be tested corresponding to the test question in the software to be tested and the performance indicators to be tested of the function to be tested; Based on the test keyword, determining a target test case that matches the test question in a test case library, wherein the target test case is used to test the performance indicator to be tested of the function to be tested; Based on the target test case, a test file matching the test system is generated, wherein the file format of the test file satisfies the file input format of the test system; The test file is input into the test system for testing to obtain a test result, wherein the test result is used to characterize the indicator state of the performance indicator to be tested of the function to be tested.

2. The method according to claim 1, characterized in that Identifying test keywords in the test question information includes: Determining text content corresponding to the test question information, wherein the text content is a text description corresponding to the test question information; Using a word segmenter, the text content is segmented to obtain a word segmentation set, wherein the word segmentation set includes multiple text words in the text content; A test keyword in the test question information is identified from the plurality of text words included in the word segmentation set.

3. The method according to claim 2, characterized in that Identifying test keywords in the test question information from the plurality of text words included in the word segmentation set includes: Sorting the text words according to positions of the text words in the text content corresponding to the test question information to obtain a sorted sequence corresponding to the word segmentation set; Inputting the text words into a natural language processing model for analysis according to the sorting sequence to obtain embedded vectors corresponding to the text words, wherein the embedded vectors are used to represent contextual semantic information of the text words in the text content; identifying a target keyword from a plurality of the text words based on the embedded vectors respectively corresponding to the text words in the sorted sequence; The target keyword is determined to be the test keyword in the test question information.

4. The method according to claim 3, characterized in that Identifying a target keyword from a plurality of the text words based on the embedded vectors respectively corresponding to the text words in the sorted sequence includes: Determining weight values ​​of a plurality of the text words in the test question based on the embedded vectors corresponding to the text words in the sorted sequence; Comparing the weight values ​​corresponding to the plurality of text words with a preset weight threshold value respectively to obtain a plurality of first comparison results; Based on the plurality of first comparison results, the target keyword is identified from the plurality of text words.

5. The method according to claim 4, characterized in that Based on the plurality of first comparison results, identifying the target keyword from the plurality of text words comprises: Based on the multiple first comparison results, identifying the text words whose weight values ​​are greater than or equal to the preset weight threshold from the multiple text words; The identified text words are determined as the target keywords.

6. The method according to claim 1, wherein Based on the test keywords, determining a target test case matching the test question in a test case library includes: Standardizing the test keywords to obtain standardized test keywords, wherein the text format of the standardized test keywords is the same as the text format of the test cases in the test case library; Constructing a regularized expression based on the standardized test keyword, wherein the regularized expression includes multiple expression variants corresponding to the test keyword; Retrieving a plurality of initial test cases matching the test question from the test case library based on the plurality of expression variants included in the regularized expression; Based on the similarities between the multiple initial test cases and the test question, the target test case is screened out from the initial test cases.

7. The method according to claim 6, characterized in that Filtering the target test case from the initial test cases based on similarities between the multiple initial test cases and the test question includes: determining the similarity between the plurality of initial test cases and the test question; Comparing the similarity with a similarity threshold to obtain a plurality of second comparison results; Based on the plurality of second comparison results, the target test cases having the similarity greater than or equal to the similarity threshold are identified from the initial test cases.

8. The method according to any one of claims 1 to 7, characterized in that After obtaining the test results, the method further includes: A test report is generated based on the test result, wherein the test report is at least used to indicate whether the indicator status of the performance indicator to be tested of the function to be tested of the software to be tested meets the target indicator status.

9. A vehicle, characterized in that: include: a memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 8 when running.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 8.