Automatic test assertion generation method based on large model
Through the automated test assertion generation method based on large models, the problems of improper use of assertions and excessive manual intervention in software testing are solved, and efficient and accurate automated testing is achieved to adapt to the rapid changes of the software.
Patent Information
- Application Number
- CN202510345333.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-24
AI Technical Summary
During the software testing process, the existing technology has defects such as insufficient personnel capabilities, improper assertion use, incomplete assertion logic, and the need for a large number of manual intervention to judge assertions, resulting in low testing efficiency and poor accuracy.
Using a large-model-based automated test assertion generation method, we collect historical assertion test data and network text data, use language big models for learning and training, generate automated test assertions, and perform tests in combination with an automated test framework, and dynamically adjust the test strategy to optimize assertions.
It realizes the generation and execution of automated test assertions, reduces manual intervention, improves testing efficiency and accuracy, and can more comprehensively and accurately verify program execution results, adapting to the continuous updates and changes of the software.
Smart Images

Figure CN119883936A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automatic test assertion generation, and in particular to a large model-based automatic test assertion generation method. Background Art
[0002] During software testing, programmers set assertions in the code to test whether the program execution results are consistent with expectations. There may be one or more expected output values. In functional testing scenarios, the results returned or rendered by the interface can be compared with the product requirement description and UI design. If they meet the requirement description and UI design, the test case is considered to have passed. In interface testing scenarios, different request parameters have different return messages. Assertion mode can be used for manual inspection or by setting assertions through tools or writing code to judge the returned results. The so-called assertion is a means of judging the results, that is, a way to judge whether the results are yes or no. Whether in R&D or testing positions, you must judge your work results. The role of assertions is to make judgments through machines (tools / codes) as much as possible to avoid omissions and other problems that may be caused by manual inspection; However, in the development and testing work, there are defects such as improper use of assertions due to insufficient personnel capabilities, incomplete assertion judgment logic, and the need for a large amount of manual intervention to judge assertions. Therefore, an automated test assertion generation method based on a large model is proposed. Summary of the invention
[0003] The purpose of the present invention is to provide a method for generating automatic test assertions based on a large model to solve the problems raised in the above background technology.
[0004] To achieve the above purpose, a method for generating automatic test assertions based on a large model is provided, comprising the following steps: S1. Collect historical assertion test data and network text data from different users, and then use the language big model to learn and train the historical assertion test data and network text data; S2. Collect the user's demand test files, perform test module planning analysis on the demand test files, generate the demand test files into multiple test modules, and perform key value and associated value analysis on the planning modules; S3. Analyze the test cases for each test module, then adjust the test scenario planning for all test cases in combination with key values and associated values, and merge the adjusted test cases according to the associated values; S4. Generate assertions for the test cases of each module and the merged test cases based on the language big model, and then integrate the generated assertions with the corresponding test cases into the automated test framework to execute the test; S5. Collect the test results of S4, and use the test results corresponding to the merged test cases to perform assertion analysis on the test results corresponding to the unmerged test cases. Optimize the assertions based on the analysis results, and re-automate the test.
[0005] As a further improvement of the present technical solution, S1 accesses the test management terminal, extracts historical assertion test data at the test management terminal, extracts historical users at the same time, and individually identifies the historical users, and then matches the historical assertion test data according to the user identification, thereby obtaining the historical assertion test data corresponding to each user.
[0006] As a further improvement of the present technical solution, S1 builds a large language model and then collects network text data related to assertion testing on the Internet. The collected network text data is then combined with the historical assertion test data of all users for learning and training, providing a basis for subsequent assertion generation steps.
[0007] As a further improvement of the technical solution, the steps of S2 are as follows: S2.1. Set up a file submission channel on the test management end. Users send files to the file submission channel. After the file provision channel receives the files, the collected files are used as the required test files. S2.2. Perform test module planning and analysis on the demand test file. First, perform static analysis and dynamic analysis on the demand test file, and plan the entire demand test file into multiple test modules according to the analysis results. S2.3. Perform key value analysis on each test module in combination with the requirement test file to obtain the key value of each test module during the test. At the same time, perform correlation value analysis between the test modules to obtain the correlation value of each test module compared with other test modules.
[0008] As a further improvement of the technical solution, the S2.3 further includes the following steps: S2.3.1. Analyze the number of key modules based on the total number of test modules and the complexity of the required test files. Then determine the key test modules based on the number of key modules determined by the analysis results and the key values of each test module. Select the test module with the highest key value ranking as the key test module. S2.3.2. When performing correlation numerical analysis between test modules, obtain the file distance between each test module, and set the weights of file distance and module parameters according to the complexity of the required test file. Then, calculate the correlation numerical values between the test modules based on the set weights combined with the file distance and module parameters.
[0009] As a further improvement of the technical solution, the steps of S3 are as follows: S3.1. Perform a new user test on the user. If the user is a new user, collect demand information from the user. Otherwise, if the user is not a new user, extract historical demand information from the historical assertion test data, and then combine the historical demand information with the current demand test file to generate demand information. S3.2, analyze the test cases by combining the test modules with the demand information, generate the test cases corresponding to each test module according to the analysis results, and then combine and analyze the key test modules with other test modules to obtain the key test modules corresponding to each test module; S3.3. According to the corresponding key test modules, the test scenario planning and adjustment are performed on the associated test modules, and at the same time, the test cases of the key test modules are combined with the test cases of the associated test modules to merge the scenarios, thereby generating a test scenario representing the module merger.
[0010] As a further improvement of the present technical solution, S3.3 does not delete the test cases corresponding to each test module during the process of generating merged test cases, so that two types of test cases are retained at the same time, namely, the test cases corresponding to a single test module and the test cases corresponding to the merger of multiple test modules.
[0011] As a further improvement of the technical solution, the step of S4 is as follows: S4.1, automatically generate assertions based on the test dimensions of each test case through the language big model; S4.2. Establish an automated testing framework in the pipeline, and then input the generated assertions into the automated testing framework in combination with the corresponding test cases. The automated testing framework automatically starts the testing process after receiving the data.
[0012] As a further improvement of the technical solution, the step of S5 is as follows: S5.1. Monitor the test results of the automated test framework. When the test results indicate that the test execution failed, mark the corresponding assertion as a failed assertion. Then, optimize and analyze the failed assertion in combination with the assertion that the test execution succeeded. Otherwise, go to step S5.2. S5.2. Set the assertion accuracy threshold, analyze the accuracy value of the assertion of successful execution of a single module and the assertion of multiple modules, and optimize and compare the accuracy value with the assertion accuracy threshold. When the accuracy value of the assertion of successful execution of a single module and the assertion of multiple modules is less than the assertion accuracy threshold, the assertion of successful execution of the single module is optimized. Conversely, when the accuracy value of the assertion of successful execution of a single module and the assertion of multiple modules is greater than the assertion accuracy threshold, the test is completed.
[0013] Compared with the prior art, the present invention has the following beneficial effects: 1. In this method of generating automatic test assertions based on a large model, through in-depth analysis of the requirement test file, multiple test modules are divided, and key values and associated value analysis are performed on each module, which can comprehensively cover various functions and scenarios of the software. When determining the key test modules, the file complexity and module key values are comprehensively considered, and the modules with the greatest impact on performance are tested first to avoid missing important functional points in the test. The assertions generated by the language large model are based on a large amount of programming knowledge and testing experience, covering a variety of assertion methods, such as response codes, key field value verification, etc., which can verify the program execution results more comprehensively and accurately.
[0014] 2. In this method of generating assertions for automated testing based on large models, the test strategy can be dynamically adjusted through optimization analysis based on test results and assertions. When the accurate value of the assertion of successful execution of a single module and the assertion of multiple modules combined is less than the assertion accuracy threshold, the assertion of successful execution of a single module will be optimized, and the test cases and assertions will be continuously improved to make the test more in line with the actual needs of the software and adapt to the continuous updating and changes of the software.
[0015] 3. In this method of automatic test assertion generation based on a large model, starting from the user submitting the file, a series of operations such as file collection, test module planning, key value analysis, and test case generation are automatically completed. There is no need to manually divide the test modules. It can be automatically planned through static and dynamic analysis of the required test files, saving a lot of manpower and time costs. The language large model can also automatically generate assertions according to the test dimensions of the test case, without the need for testers to manually write them, which greatly shortens the test preparation time and makes the test process more efficient and quick. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is the overall flow chart of the present invention; Figure 2 A flowchart of the present invention for obtaining the associated value of each test module compared to other test modules; Figure 3 Obtain a flowchart of a key test module corresponding to each test module for the present invention; Figure 4 A flowchart of the present invention for automatically starting a test process; Figure 5 The present invention is a flowchart of monitoring the test results of the automated test framework. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] See also Figure 1 - Figure 5 As shown, the purpose of this embodiment is to provide a method for generating automatic test assertions based on a large model, including the following steps: S1. Collect historical assertion test data and network text data from different users, and then use the language big model to learn and train the historical assertion test data and network text data; The S1 accesses the test management terminal, extracts historical assertion test data at the test management terminal, extracts historical users, and identifies the historical users separately, and then matches the historical assertion test data according to the user identifier, thereby obtaining the historical assertion test data corresponding to each user; Extract all historical assertion test data and historical user information from the test management end. Each user has a unique identifier (such as a user ID), and associate each test data with the corresponding user ID. According to each user's identifier (such as user ID), the historical assertion test data is matched according to the user, so as to obtain the relevant historical test data for each user. This step ensures the accurate association between the test data and the corresponding user behavior.
[0019] S1 builds a large language model, then collects network text data related to assertion testing on the Internet, and then combines the collected network text data with the historical assertion test data of all users for learning and training, providing a basis for subsequent assertion generation steps; Collect online text data: Collect text data related to assertion testing through the Internet. This data may include test documents, forum posts, technical articles, etc. All of these text data contain relevant discussions or actual application scenarios of assertion testing. Combine user historical assertion test data: Combine the collected network text data with the user's historical assertion test data. This historical data contains the assertion test records performed by different users in the past, reflecting the user's test patterns and behaviors. Training the language model: The combined data is input into the large language model for training, so that it can learn the relevant patterns and rules of assertion testing, and ultimately provide a training basis for subsequent assertion generation.
[0020] S2. Collect the user's demand test files, perform test module planning analysis on the demand test files, generate the demand test files into multiple test modules, and perform key value and associated value analysis on the planning modules; The steps of S2 are as follows: S2.1. Set up a file submission channel on the test management end. Users send files to the file submission channel. After the file provision channel receives the files, the collected files are used as the required test files. By setting up a file submission channel, files uploaded by users will be collected into the system and used as requirement test files for subsequent analysis and testing.
[0021] S2.2. Perform test module planning and analysis on the demand test file. First, perform static analysis and dynamic analysis on the demand test file, and plan the entire demand test file into multiple test modules according to the analysis results. Perform static analysis (check file structure, document format, data consistency, etc.) and dynamic analysis (simulate the behavior, testing and performance of the file in actual operation) on the requirement test file. Based on the results of static and dynamic analysis, divide the entire requirement test file into multiple independent test modules, each of which represents an independent test unit in the file.
[0022] S2.3. Perform key value analysis on each test module in combination with the requirement test file to obtain the key value of each test module during the test. At the same time, perform correlation value analysis between the test modules to obtain the correlation value of each test module compared with other test modules.
[0023] The S2.3 also includes the following steps: S2.3.1. Analyze the number of key modules based on the total number of test modules and the complexity of the required test files. Then determine the key test modules based on the number of key modules determined by the analysis results and the key values of each test module. Select the test module with the highest key value ranking as the key test module. The specific steps are as follows: Analysis of the number of key modules: First, analyze the number of key modules based on the complexity of the required test file and the total number of test modules. Files with high complexity will have more key modules, while files with low complexity may be concentrated on a few key modules. Determine key test modules: Based on the number of key modules and the key values of each test module (such as performance indicators), sort the test modules and select the modules with the highest key values as key test modules. This allows you to test the modules that have the greatest impact on system performance first. The specific formula is as follows: ; Where Q is the number of key modules, f is a function that adjusts the number of key modules according to complexity. If the complexity is high, the number of key modules will increase, and if the complexity is low, the number of key modules will decrease. C is the complexity of the requirement test file, and X is the total number of test modules. S2.3.2, when performing correlation numerical analysis between test modules, obtain the file distance between each test module, and set the weight of the file distance and module parameters according to the complexity of the required test file, and then calculate the correlation numerical value between the test modules according to the set weight combined with the file distance and module parameters. The specific steps are as follows: Correlation numerical analysis: When performing correlation numerical analysis between modules, first calculate the file distance between each test module. The file distance can reflect the relationship between modules and the degree of impact on the system. The file distance includes function correlation distance, data interaction distance, code dependency distance, and business process distance. Select the test file type according to the requirements. Set weights: Set different weights for file distance and module parameters based on the complexity of the required test file. For files with high complexity, the mutual influence between modules is large, and the weights need to be adjusted to better reflect this influence. Calculate the correlation value: Combine the set weight, file distance and module parameters to calculate the correlation value between test modules. This step helps to further determine which modules have a closer relationship, thereby optimizing the allocation of test resources. The specific formula is as follows: ; Among them, A(M, N) is the correlation value, w d is the weight of the file distance, which is used to adjust the impact of the file distance on the correlation value. s is the weight of the module parameter, which is used to adjust the influence of specific features between modules on the correlation value. D(M, N) is the file distance between module M and module N, which reflects the dependency or influence between modules. P(M, N) is the parameter of module M and module N. S3. Analyze the test cases for each test module, then adjust the test scenario planning for all test cases in combination with key values and associated values, and merge the adjusted test cases according to the associated values; The steps of S3 are as follows: S3.1. Perform a new user test on the user. If the user is a new user, collect demand information from the user. Otherwise, if the user is not a new user, extract historical demand information from the historical assertion test data, and then combine the historical demand information with the current demand test file to generate demand information. S3.2, analyze the test cases by combining the test modules with the demand information, generate the test cases corresponding to each test module according to the analysis results, and then combine and analyze the key test modules with other test modules to obtain the key test modules corresponding to each test module; First, we analyze the test modules in detail in combination with the demand information. The result of the analysis is to generate a set of targeted test cases for each test module. These test cases are designed based on the core content of the demand information to ensure that the requirements of each test module can be verified. After the test cases are generated, the key test modules will become the core of the next analysis. By combining the key test modules with other modules, we can determine the core functional requirements of each module, and through this analysis, we can identify which modules are most critical to the overall test. Through this combined analysis, we can find out the key test modules of each test module, and further improve the test efficiency. S3.3. According to the corresponding key test modules, the test scenario planning and adjustment are performed for the associated test modules. At the same time, the test cases of the key test modules are combined with the test cases of the associated test modules to merge the scenarios, thereby generating a test scenario representing the module merger. The steps are as follows: Analyze the characteristics of key test modules: For each key test module, analyze its functional characteristics, execution logic, boundary conditions, etc. For example, if it is an order payment module, its characteristics may include supported payment methods, payment amount range, payment timeout, etc.; Adjust the test scenario planning of the associated test modules: According to the characteristics of the key test modules, adjust the test scenario planning of the test modules associated with it. For example, if a new payment method is added to the key test module, the test scenario of the associated test module (such as the order generation module) needs to add the test scenario of order generation under the corresponding payment method; Analyze the association between test cases: Analyze the logical association between test cases, such as data dependency, execution order, etc. For example, the test cases of the order payment module may depend on the execution results of the test cases of the order generation module; Merge test cases to generate test scenarios: Merge the test case set of the key test module and the test case set of the associated test module to generate a test scenario representing the module merger. The execution order and data transfer of the test cases need to be considered during the merging process. In the process of generating the merged test cases, S3.3 does not delete the test cases corresponding to each test module, so that two types of test cases are retained at the same time, namely, the test cases corresponding to a single test module and the test cases corresponding to the merge of multiple test modules.
[0024] S4. Generate assertions for the test cases of each module and the merged test cases based on the language big model, and then integrate the generated assertions with the corresponding test cases into the automated test framework to execute the test; The steps of S4 are as follows: S4.1, automatically generate assertions based on the test dimensions of each test case through the language big model; S4.2. Establish an automated testing framework in the pipeline, and then input the generated assertions into the automated testing framework in combination with the corresponding test cases. The automated testing framework automatically starts the testing process after receiving the data. The steps are as follows: Determine the test dimensions: For each test case, clarify its test dimensions, such as functional correctness, performance indicators (response time, throughput, etc.), boundary conditions, exception handling, etc. Assuming that a test case is to test the user login function, its test dimensions may include the correctness verification of the user name and password, whether the login response time is within the specified range, etc.; The language big model generates assertions: The test dimension information of each test case is input into the language big model. The language big model generates corresponding assertions for each test dimension based on its learned programming knowledge, testing experience, and natural language understanding ability. Establish an automated testing framework: Design an automated testing framework that includes test case management, assertion execution, test result recording, and report generation. The test case management module is responsible for storing and managing input test cases; the assertion execution module is used to execute received assertions; the test result recording module records the execution results (pass or fail) of each test case; and the report generation module generates a test report based on the recorded results. Select programming languages and test framework tools (Python's Pytest, Java's JUnit, etc.) to build the framework. During the construction process, realize the interaction and collaboration between various functional modules to ensure the smooth operation of the framework; Execute automated testing: Input the generated assertions and corresponding test cases into the automated testing framework. After the automated testing framework receives the data, the test case management module passes the test cases and assertions to the assertion execution module. The assertion execution module executes the assertions of each test case in a certain order (such as the order of the test case numbers). Result recording and report generation: The test result recording module records the execution results of each assertion. If all assertions of a test case pass, the test case passes; otherwise, the test case fails. The report generation module generates a test report based on the recorded results. The report content includes the execution status of each test case, failed assertions and reasons, etc.
[0025] S5. Collect the test results of S4, and use the test results corresponding to the merged test cases to perform assertion analysis on the test results corresponding to the unmerged test cases. Optimize the assertions based on the analysis results, and re-automate the test.
[0026] The steps of S5 are as follows: S5.1. Monitor the test results of the automated test framework. When the test results indicate that the test execution failed, mark the corresponding assertion as a failed assertion. Then, optimize and analyze the failed assertion in combination with the assertion that the test execution succeeded. Otherwise, go to step S5.2. S5.2. Set the assertion accuracy threshold, analyze the accuracy value of the assertion of successful execution of a single module and the assertion of multiple modules, and optimize and compare the accuracy value with the assertion accuracy threshold. When the accuracy value of the assertion of successful execution of a single module and the assertion of multiple modules is less than the assertion accuracy threshold, the assertion of successful execution of the single module is optimized. Conversely, when the accuracy value of the assertion of successful execution of a single module and the assertion of multiple modules is greater than the assertion accuracy threshold, the test is completed.
[0027] Conduct in-depth analysis on failed assertions to identify the parts of the test that did not pass. At the same time, use the successfully executed assertions to find potential problem points and improvement directions. This helps to improve the overall test coverage and accuracy. The analysis content includes but is not limited to the rationality of the assertion logic, the assertion coverage, and the matching degree with the test cases. By comparing the characteristics of successful assertions and failed assertions, find out the possible problems of failed assertions, such as assertion conditions being too loose or strict, missing key judgment conditions, etc., to provide a basis for optimizing failed assertions.
[0028] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for generating automated test assertions based on a large model, characterized in that: The following steps are involved: S1. Collect historical assertion test data and network text data from different users, and then use the language big model to learn and train the historical assertion test data and network text data; S2. Collect the user's demand test files, perform test module planning analysis on the demand test files, generate the demand test files into multiple test modules, and perform key value and associated value analysis on the planning modules; S3. Analyze the test cases for each test module, then adjust the test scenario planning for all test cases in combination with key values and associated values, and merge the adjusted test cases according to the associated values; S4. Generate assertions for the test cases of each module and the merged test cases based on the language big model, and then integrate the generated assertions with the corresponding test cases into the automated test framework to execute the test; S5. Collect the test results of S4, and use the test results corresponding to the merged test cases to perform assertion analysis on the test results corresponding to the unmerged test cases. Optimize the assertions based on the analysis results, and re-automate the test.
2. The method for generating assertions for automated testing based on a large model according to claim 1, characterized in that: The S1 accesses the test management terminal, extracts historical assertion test data at the test management terminal, extracts historical users, and identifies the historical users separately, and then matches the historical assertion test data according to the user identification, thereby obtaining the historical assertion test data corresponding to each user.
3. The method for generating assertions for automated testing based on a large model according to claim 1, characterized in that: The S1 builds a large language model and then collects network text data related to assertion testing on the Internet. The collected network text data is then combined with the historical assertion test data of all users for learning and training, providing a basis for subsequent assertion generation steps.
4. The method for generating assertions for automated testing based on a large model according to claim 1, characterized in that: The steps of S2 are as follows: S2.
1. Set up a file submission channel on the test management end. Users send files to the file submission channel. After the file provision channel receives the files, the collected files are used as the required test files. S2.
2. Perform test module planning and analysis on the demand test file. First, perform static analysis and dynamic analysis on the demand test file, and plan the entire demand test file into multiple test modules according to the analysis results. S2.
3. Perform key value analysis on each test module in combination with the requirement test file to obtain the key value of each test module during the test. At the same time, perform correlation value analysis between the test modules to obtain the correlation value of each test module compared with other test modules.
5. The method for generating assertions for automated testing based on a large model according to claim 4, characterized in that: The S2.3 also includes the following steps: S2.3.
1. Analyze the number of key modules based on the total number of test modules and the complexity of the required test files. Then determine the key test modules based on the number of key modules determined by the analysis results and the key values of each test module. Select the test module with the highest key value ranking as the key test module. S2.3.
2. When performing correlation numerical analysis between test modules, obtain the file distance between each test module, and set the weights of file distance and module parameters according to the complexity of the required test file. Then, calculate the correlation numerical values between the test modules based on the set weights combined with the file distance and module parameters.
6. The method for generating assertions for automated testing based on a large model according to claim 1, characterized in that: The steps of S3 are as follows: S3.
1. Perform a new user test on the user. If the user is a new user, collect demand information from the user. Otherwise, if the user is not a new user, extract historical demand information from the historical assertion test data, and then combine the historical demand information with the current demand test file to generate demand information. S3.2, analyze the test cases by combining the test modules with the demand information, generate the test cases corresponding to each test module according to the analysis results, and then combine and analyze the key test modules with other test modules to obtain the key test modules corresponding to each test module; S3.
3. According to the corresponding key test modules, the test scenario planning and adjustment are performed on the associated test modules, and at the same time, the test cases of the key test modules are combined with the test cases of the associated test modules to merge the scenarios, thereby generating a test scenario representing the module merger.
7. The method for generating assertions for automated testing based on a large model according to claim 6, characterized in that: In the process of generating the merged test cases, S3.3 does not delete the test cases corresponding to each test module, so that two types of test cases are retained at the same time, namely, the test cases corresponding to a single test module and the test cases corresponding to the merge of multiple test modules.
8. The method for generating assertions for automated testing based on a large model according to claim 1, characterized in that: The steps of S4 are as follows: S4.1, automatically generate assertions based on the test dimensions of each test case through the language big model; S4.
2. Establish an automated testing framework in the pipeline, and then input the generated assertions into the automated testing framework in combination with the corresponding test cases. The automated testing framework automatically starts the testing process after receiving the data.
9. The method for generating assertions for automated testing based on a large model according to claim 1, characterized in that: The steps of S5 are as follows: S5.
1. Monitor the test results of the automated test framework. When the test results indicate that the test execution failed, mark the corresponding assertion as a failed assertion. Then, optimize and analyze the failed assertion in combination with the assertion that the test execution succeeded. Otherwise, go to step S5.
2. S5.
2. Set the assertion accuracy threshold, analyze the accuracy value of the assertion of successful execution of a single module and the assertion of multiple modules, and optimize and compare the accuracy value with the assertion accuracy threshold. When the accuracy value of the assertion of successful execution of a single module and the assertion of multiple modules is less than the assertion accuracy threshold, the assertion of successful execution of the single module is optimized. Conversely, when the accuracy value of the assertion of successful execution of a single module and the assertion of multiple modules is greater than the assertion accuracy threshold, the test is completed.
Citation Information
Patent Citations
Data-driven test method, device and equipment and computer readable storage medium
CN112667512A
Unit test case assertion generation method based on large language model and retrieval enhancement
CN117951011A
Data processing method, testing method, device and system, medium and program product
CN118733448A
Method and device for generating test case based on large model and electronic equipment
CN119396735A
High-reliability unit test automatic generation method and apparatus based on conversational large language model
WO2025025616A1