Test case correction method and system based on test case quality evaluation
Through the preset model, multi-index evaluation and code coverage analysis are carried out on test cases, and correction suggestions are put forward automatically and the test cases are improved, which solves the problems of high manual review costs and strong subjectivity, and improves the quality and efficiency of test cases.
Patent Information
- Application Number
- CN202510550473.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-05-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The evaluation of test cases in the prior art relies on manual review, which leads to high labor costs, strong subjectivity, and difficulty in ensuring the accuracy and timeliness of the review results. Key information may be missed during the correction process, reducing the accuracy and effectiveness of the correction.
Through the preset model combined with the requirements document, multi-index evaluation of test cases, including functional point coverage evaluation, format evaluation, quantity evaluation and security evaluation, generate the first correction recommendation, and supplementary modifications to the test cases based on this recommendation to obtain updated test cases. Then, use the code coverage tool to analyze and update the code coverage level of the test cases, generate a second correction suggestion, further adjust the test cases, and obtain the target test cases.
It realizes automated adjustment and optimization of test cases based on the correction suggestions obtained from the evaluation, effectively reducing labor costs, improving the accuracy and objectivity of the evaluation results, improving the quality and efficiency of test cases, and ensuring the comprehensiveness and security of software development.
Smart Images

Figure CN120066977A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and in particular, to a test case correction method, system, storage medium, and electronic device based on test case quality assessment. Background Art
[0002] In the current software development cycle, the assessment of test cases is a key link to ensure software quality. Test cases are designed to verify whether the functions, performance, security, and other key features of the software meet the expectations. This step is crucial for discovering and fixing potential defects, and helps to improve the stability and user experience of the final product.
[0003] Currently, for the improvement of test cases, the widely adopted method in related technologies is the method of manual review, that is, relying on the professional knowledge and experience of test engineers or experts in related fields to comprehensively evaluate the integrity, accuracy, effectiveness, and operability of test cases, and making manual adjustments accordingly.
[0004] However, this method largely depends on the professional experience of professionals. With the increase in the number of test cases, the review and modification time and human resources required also increase sharply, resulting in a significant burden on human costs. And the manual review process has certain subjectivity, which may affect the accuracy and timeliness of the review results, making it difficult to provide accurate adjustment suggestions in a timely manner to optimize the test plan. There may also be a risk of missing key information in the manual correction process, further reducing the accuracy and effectiveness of the correction. Summary of the Invention
[0005] The present disclosure provides a test case correction method, system, storage medium, and electronic device based on test case quality assessment.
[0006] According to a first aspect of the present disclosure, there is provided a test case correction method based on test case quality assessment, the method including: performing multi-index assessment on test cases in combination with requirement documents through a preset model to obtain a first correction suggestion corresponding to each index assessment in the multi-index assessment, and supplementing and modifying the test cases based on the first correction suggestion to obtain updated test cases, where the multi-index assessment includes at least one of function point coverage assessment, format assessment, quantity assessment, and security assessment; executing the updated test cases, using a code coverage tool to determine the code coverage degree during the execution of the updated test cases to obtain a second correction suggestion corresponding to the code coverage degree, and supplementing and modifying the updated test cases based on the second correction suggestion to obtain target test cases.
[0007] In some embodiments of the present disclosure, the multi - metric evaluation includes function point coverage evaluation, the function point coverage evaluation includes function point coverage rate evaluation, the first correction suggestion includes function point correction suggestions. By using a preset model and combining with the requirement document, multi - metric evaluation is performed on the test cases to obtain the first correction suggestion corresponding to each metric evaluation in the multi - metric evaluation, and the test cases are supplemented and modified based on the first correction suggestion to obtain updated test cases, which includes: analyzing the requirement document and test cases by using the preset model to determine the requirement function points in each function module of the requirement document and each test title in the test cases; respectively performing vector transformation on the requirement function points and test titles to obtain requirement function point vectors and test title vectors; performing semantic matching on the test title vectors and requirement function point vectors to obtain matching function point vectors; determining the function coverage rate based on the matching function point vectors, test title vectors and requirement function point vectors; if the function coverage rate is less than or equal to the preset function coverage rate threshold, generating function point correction suggestions; and supplementing and modifying the test function points in the test cases with the requirement function points based on the function point correction suggestions to obtain updated test cases.
[0008] In some embodiments of the present disclosure, the multi - metric evaluation includes function point coverage evaluation, the function point coverage evaluation includes boundary point coverage rate evaluation, the first correction suggestion includes dataset correction suggestions. By using a preset model and combining with the requirement document, multi - metric evaluation is performed on the test cases to obtain the first correction suggestion corresponding to each metric evaluation in the multi - metric evaluation, and the test cases are supplemented and modified based on the first correction suggestion to obtain updated test cases, which includes: based on the preset boundary points, determining whether there are requirement boundary points in the requirement function points, where the requirement boundary points refer to the function points in the requirement function points that involve preset special numerical values or preset special formats; if there are requirement boundary points in the requirement function points, determining the test boundary points in the test cases and the data type of each test boundary point, where the test boundary points refer to the function points in the test function points that involve preset special numerical values or preset special formats; if the test boundary points and the requirement boundary points are the same, determining the test dataset corresponding to the data type of the test boundary points; if the preset valid dataset and / or preset invalid dataset do not exist in the test dataset, determining the dataset supplement suggestion for the test cases, and supplementing the test cases with the dataset based on the dataset supplement suggestion to obtain updated test cases.
[0009] In some embodiments of the present disclosure, the multi - metric evaluation includes format evaluation, and the first correction suggestion includes format correction suggestions. By using a preset model and combining with the requirement document, the test cases are evaluated with multiple metrics to obtain the first correction suggestion corresponding to each metric evaluation in the multi - metric evaluation, and the test cases are supplemented and modified based on the first correction suggestion to obtain updated test cases, which includes: If the test case includes a test title, test steps, and test expectations, the format requirements in the preset template are used to perform format analysis on the test title, test steps, and test expectations to obtain an analysis result; If the analysis result of at least one of the test title, test steps, and test expectations in the analysis result is an abnormal result, the format correction suggestion for the test case corresponding to the abnormal result is determined, and the format of the test case number is modified based on the format correction suggestion to obtain updated test cases.
[0010] In some embodiments of the present disclosure, the multi - metric evaluation includes quantity evaluation, and the first correction suggestion includes splitting correction suggestions. By using a preset model and combining with the requirement document, the test cases are evaluated with multiple metrics to obtain the first correction suggestion corresponding to each metric evaluation in the multi - metric evaluation, and the test cases are supplemented and modified based on the first correction suggestion to obtain updated test cases, which includes: Determining the test function points of the test case; If the number of test function points exceeds the preset number, the splitting correction suggestion for the test case is determined based on the number of test function points, and the test case is split based on the splitting correction suggestion to obtain updated test cases.
[0011] In some embodiments of the present disclosure, the multi - metric evaluation includes security evaluation, and the first correction suggestion includes security supplement correction suggestions. By using a preset model and combining with the requirement document, the test cases are evaluated with multiple metrics to obtain the first correction suggestion corresponding to each metric evaluation in the multi - metric evaluation, and the test cases are supplemented and modified based on the first correction suggestion to obtain updated test cases, which includes: Determining the test function points of the test case; If the preset security function points are not included in the test function points, the security abnormality of the test case is determined; Based on the preset security function points not included in the test function points, the security supplement suggestion for the test case is determined, and the security function points of the test case are supplemented based on the security supplement suggestion to obtain updated test cases.
[0012] In some embodiments of the present disclosure, the updated test cases are supplemented and modified based on the second correction suggestion to obtain target test cases. After that, the method includes: Summarizing the first correction suggestion, the updated test cases, the second correction suggestion, and the target test cases to obtain a test case evaluation report.
[0013] According to the second aspect of the present disclosure, a test case correction system based on test case quality evaluation is provided. The system includes: A test case pre - execution evaluation unit is used to perform multi - index evaluation on test cases through a preset model in combination with a requirements document, obtain a first correction suggestion corresponding to each index evaluation in the multi - index evaluation, and supplement and modify the test cases based on the first correction suggestion to obtain updated test cases. The multi - index evaluation includes at least one of function point coverage evaluation, format evaluation, quantity evaluation, and security evaluation; A test case in - execution evaluation unit is used to execute the updated test cases, use a code coverage tool to determine the code coverage degree of the updated test cases during execution, obtain a second correction suggestion corresponding to the code coverage degree, and supplement and modify the updated test cases based on the second correction suggestion to obtain target test cases.
[0014] According to the third aspect of the present disclosure, there is provided a computer - readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method of the first aspect described above is implemented.
[0015] According to the fourth aspect of the present disclosure, there is provided an electronic device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor. When the processor executes the computer program, the method of the first aspect described above is implemented.
[0016] The test case correction method based on test case quality evaluation provided by the present disclosure performs multi - index evaluation on test cases through a preset model in combination with a requirements document, obtains a first correction suggestion corresponding to each index evaluation in the multi - index evaluation, and supplements and modifies the test cases based on the first correction suggestion to obtain updated test cases. The multi - index evaluation includes at least one of function point coverage evaluation, format evaluation, quantity evaluation, and security evaluation; execute the updated test cases, use a code coverage tool to determine the code coverage degree of the updated test cases during execution, obtain a second correction suggestion corresponding to the code coverage degree, and supplement and modify the updated test cases based on the second correction suggestion to obtain target test cases. It realizes multi - index evaluation and code coverage analysis of test cases using a preset model, automatically proposes correction suggestions and improves test cases accordingly, effectively reducing labor costs, improving the accuracy and objectivity of evaluation results, significantly improving the quality and efficiency of test cases, and ensuring the comprehensiveness and security of software development.
[0017] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them: Figure 1A flowchart diagram of a test case correction method based on test case quality assessment provided by an embodiment of the present disclosure; Figure 2 A flowchart diagram of a second test case correction method based on test case quality assessment provided by an embodiment of the present disclosure; Figure 3 A flowchart diagram of a third test case correction method based on test case quality assessment provided by an embodiment of the present disclosure; Figure 4 A flowchart diagram of a fourth test case correction method based on test case quality assessment provided by an embodiment of the present disclosure; Figure 5 A flowchart diagram of a fifth test case correction method based on test case quality assessment provided by an embodiment of the present disclosure; Figure 6 A flowchart diagram of a sixth test case correction method based on test case quality assessment provided by an embodiment of the present disclosure; Figure 7 A schematic diagram of a specific test case correction system based on test case quality assessment provided by an embodiment of the present disclosure; Figure 8 A structural schematic diagram of a test case correction system based on test case quality assessment provided by an embodiment of the present disclosure; Figure 9 A hardware structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. Detailed implementation manners
[0019] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted below.
[0020] In the current software development cycle, the evaluation of test cases is a key link to ensure software quality. Test cases are designed to verify whether the functions, performance, security, and other key features of the software meet expectations. This step is crucial for discovering and fixing potential defects, and helps improve the stability and user experience of the final product. With the continuous expansion of software scale and the increase in complexity, the number of test cases has also increased rapidly, making the effective evaluation of test cases a challenge.
[0021] Currently, for the evaluation of test cases, the widely adopted method is manual review. This method relies on the professional knowledge and experience of test engineers or experts in related fields to evaluate the integrity, accuracy, effectiveness, and executability of test cases. Manual review usually involves a detailed examination of the test case documents and communication and discussion with testers when necessary. In this way, potential defects or deficiencies in the test cases can be identified, and corresponding improvement suggestions can be put forward to further manually adjust the test cases according to the improvement suggestions.
[0022] However, as the main solution for related technologies, manual review has various defects. First, the labor cost is high. As the number of test cases increases, the time and human resources required for the review work also increase accordingly, bringing a heavy burden to the project team. Second, it is highly subjective. Different reviewers may evaluate the test cases differently based on personal experience, understanding perspectives, and preferences, making it difficult to ensure the consistency and objectivity of the evaluation results. Finally, the feedback and adjustment are not timely. Manual review often takes a relatively long period to complete, and the presentation of the review results and suggestions may also be delayed, which is not conducive to the timely adjustment and optimization of the test plan. Moreover, there may be a risk of missing key information during the manual correction process, further reducing the accuracy and effectiveness of the correction. Therefore, related technologies urgently need to be improved and innovated in the evaluation of test cases.
[0023] To solve the problems in related technologies, the test case correction method based on test case quality assessment proposed in this disclosure divides the entire test case correction based on test case quality assessment into the pre-execution stage and the in-execution stage of test cases, which runs through the entire software R & D cycle until the version goes online. And in the pre-execution stage of test cases, a preset model is used to comprehensively evaluate the test cases in multiple metrics, and the test cases are automatically adjusted according to the evaluation results to obtain updated test cases. In the in-execution stage of test cases, a code coverage tool is used to evaluate the code coverage of the updated test cases, and the updated test cases are automatically adjusted again according to the evaluation results to obtain target test cases. It can quickly and automatically adjust and optimize the test cases according to the correction suggestions obtained from the evaluation, effectively reducing the labor cost, improving the accuracy and objectivity of the evaluation results, and enhancing the test quality and efficiency.
[0024] Next, the test case correction method, system, electronic device, storage medium, and computer program product based on test case quality assessment according to the embodiments of this disclosure will be described with reference to the accompanying drawings.
[0025] Figure 1 It is a flowchart showing the test case correction method based on test case quality assessment provided for the embodiments of this disclosure. As Figure 1 shown, the method includes: Step 101: Through a preset model, combined with the requirements document, conduct multi - metric evaluation on test cases to obtain the first correction suggestions corresponding to each metric evaluation in the multi - metric evaluation, and based on the first correction suggestions, supplement and modify the test cases to obtain updated test cases. The multi - metric evaluation includes at least one of function point coverage evaluation, format evaluation, quantity evaluation, and security evaluation.
[0026] In some embodiments, the preset model can be a large model, which refers to a large - scale neural network model with a large number of parameters and a complex structure pre - trained in a specific task or application to utilize its powerful representation ability and learning ability, so as to more effectively meet the requirements of various aspects of the task or application. In the present disclosure, the preset model is a tool for evaluating test cases, which can include multiple evaluation metrics used to measure the quality of test cases. The requirements document details the requirements of the software in terms of functions, performance, security, etc., and is an important basis for test case design and evaluation. By combining the preset model with the requirements document, the present disclosure ensures that the test cases not only meet the functional requirements of the software but also reach certain standards in terms of format, quantity, security, etc.
[0027] Among them, the multi - metric evaluation of the present disclosure includes at least one of function point coverage evaluation, format evaluation, quantity evaluation, and security evaluation.
[0028] Based on the results of the multi - metric evaluation, the present disclosure can propose corresponding first correction suggestions for each evaluation metric. The first correction suggestions can guide testers to supplement and modify the test cases. The present disclosure can also directly supplement and modify the test cases based on the first correction suggestions to obtain updated test cases. These updated test cases will more conform to the requirements of the requirements document and also reach higher standards in terms of format, quantity, security, etc., ensuring that the software undergoes sufficient testing before release and reducing potential risks and problems.
[0029] Step 102: Execute the updated test cases, use a code coverage tool to determine the code coverage degree of the updated test cases during execution, obtain the second correction suggestions corresponding to the code coverage degree, and based on the second correction suggestions, supplement and modify the updated test cases to obtain target test cases.
[0030] In some embodiments, the present disclosure may execute the updated test cases in a test environment. Specifically, it may execute the updated test cases in response to an execution signal, or directly and automatically execute the updated test cases. The code coverage tool (such as JaCoCo, Cobertura, etc.) is used to analyze the code scope covered by the test cases during the execution process and calculate the code coverage level. Based on the code coverage level, a second correction suggestion is proposed. And based on the second correction suggestion, the updated test cases are further supplemented and modified to obtain the target test cases.
[0031] Specifically, the degree to which the test cases cover the code can be measured by a code coverage tool.
[0032] Code coverage includes statement coverage, branch coverage, condition coverage, and path coverage. Statement coverage: The test cases execute each statement in the code; Branch coverage: The test cases execute each branch in the code; Condition coverage: The test cases evaluate each condition in the code; Path coverage: The test cases execute each path in the code.
[0033] The present disclosure uses the JaCoCo open-source code coverage tool to dynamically monitor the coverage rate of test cases during the test execution process. For modules with a small coverage rate, it is considered that the test cases are not fully covered, and a second correction suggestion can be generated in a timely manner, the test plan can be adjusted in a timely manner, the test cases can be supplemented, and testing can be carried out. That is, start running the JaCoCo Agent. Before running the program code, start the JaCoCo agent; execute the test cases. After running the application, execute the test cases; collect the coverage data. The execution of the test cases can be divided into the first round of testing, the second round of testing, and the third round of testing. After each round of testing is completed, the JaCoCo agent will save the coverage data to the specified.exec file; generate a coverage report. Use the JaCoCo command-line tool to generate a coverage report, and it can be seen the execution situation of the current test cases covering the current version, so as to determine the code coverage rate of the current test cases and determine the code coverage level.
[0034] Among them, based on the second correction suggestion, the updated test cases are supplemented and modified to obtain the target test cases. After that, the present disclosure further includes: summarizing the first correction suggestion, the updated test cases, the second correction suggestion, and the target test cases to obtain a test case evaluation report.
[0035] In summary, the technical solution provided by the present disclosure performs multi - index evaluation on test cases through a preset model in combination with a requirements document, obtains a first correction suggestion corresponding to each index evaluation in the multi - index evaluation, and supplements and modifies the test cases based on the first correction suggestion to obtain updated test cases. The multi - index evaluation includes at least one of function point coverage evaluation, format evaluation, quantity evaluation, and security evaluation; execute the updated test cases, use a code coverage tool to determine the code coverage degree during the execution of the updated test cases, obtain a second correction suggestion corresponding to the code coverage degree, and supplement and modify the updated test cases based on the second correction suggestion to obtain target test cases. It realizes the multi - index comprehensive evaluation and code coverage analysis of test cases using a preset model, automatically proposes correction suggestions and improves test cases accordingly, effectively reducing labor costs, improving the accuracy and objectivity of evaluation results, and enhancing test quality and efficiency.
[0036] As a possible implementation, as Figure 2 shown in the flowchart of the second test case correction method based on test case quality evaluation, on the basis of the above - mentioned embodiments, the specific process of performing multi - index evaluation on test cases through a preset model in combination with a requirements document, obtaining a first correction suggestion corresponding to each index evaluation in the multi - index evaluation, and supplementing and modifying the test cases based on the first correction suggestion to obtain updated test cases includes the following steps: Step 201: Analyze the requirements document and test cases using a preset model to determine the required function points in each function module of the requirements document and each test title in the test cases.
[0037] In some embodiments, the multi - index evaluation includes function point coverage evaluation. The function point coverage evaluation includes function point coverage rate evaluation, and the first correction suggestion includes function point correction suggestions. The function point coverage rate indicates whether the test cases cover all functional requirements. The present disclosure can compare the requirements of the requirements document with the function points of the test cases to view the function point coverage rate.
[0038] That is, the present disclosure can read the requirements document, identify and divide each function module, perform a detailed analysis on each function module to understand its functions and requirements. At the same time, collect all test cases, ensure that each test case has a clear title, and classify the test cases so as to correspond to the function modules in the requirements document.
[0039] Step 202: Perform vector transformation on the required function points and test titles respectively to obtain required function point vectors and test title vectors.
[0040] In some embodiments, the present disclosure can implement the transformation of required function point vectors and the transformation of test title vectors.
[0041] For the conversion of requirement function point vectors, the present disclosure can use a requirement function point extraction and understanding module to input each function module in the requirement document into a preset model. Extract p function points and output them in text format, totaling n*p function points. Then request the preset model interface to convert the text description of each function point into a d-dimensional semantic vector, totaling n*p vectors.
[0042] For the conversion of test title vectors, the present disclosure can use a test case set understanding module to convert the title of each test case into a d-dimensional semantic vector through a preset model, totaling m vectors.
[0043] Step 203: Perform semantic matching on the test title vector and the requirement function point vector to obtain a matching function point vector.
[0044] In some embodiments, the present disclosure can use a semantic matching module to input the semantic vectors of requirement function points (n*p) into a vector retrieval engine (such as faiss) to build an index. Then input the semantic vectors of test cases into the retrieval engine and set the minimum similarity threshold to t. For the title vector of each test case, set the minimum similarity threshold to t and return k function points with a similarity greater than or equal to t, that is, the matching function point vector. Among them, if the maximum similarity is less than t, no function points will be returned.
[0045] Step 204: Determine the function coverage rate based on the matching function point vector, the test title vector, and the requirement function point vector.
[0046] In some embodiments, calculate the function coverage rate of each function module based on the matching function point vector, the test title vector, and the requirement function point vector.
[0047] The coverage rate coverage of each function module can be calculated by the following formula:
[0048] Among them, k is the number of function points of the matching function point vector, and p is the total number of function points of the current function module.
[0049] After obtaining the function module coverage rate of each function module, the present disclosure can further calculate the total coverage rate coverage_z, that is, the function coverage rate, through the following formula.
[0050]
[0051] Among them, union_set represents removing duplicates from all function points, (m*k) is the total number of function points after removing duplicates of all matching function point vectors, and (n*p) is the total number of function points in the requirement document.
[0052] Step 205: If the function coverage rate is less than or equal to a preset function coverage rate threshold, generate function point correction suggestions.
[0053] In some embodiments, for modules with a low function coverage rate, the present disclosure considers that the quality of test cases is low, that is, if the function coverage rate of a certain function module is less than or equal to the preset function coverage rate threshold, it is considered that the quality of the test cases is low. Generating function point correction suggestions includes the function module name and the corresponding uncovered function points.
[0054] Step 206: Based on the function point correction suggestions, use the required function points to supplement and modify the test function points to obtain updated test cases.
[0055] In some embodiments, based on the function point correction suggestions, the present disclosure can directly supplement and modify the test function points in the test cases, or can prompt the tester to supplement and modify the test cases through the function point correction suggestions, ensuring that all function points of each function module are covered by the test cases, and obtaining an updated test case set for subsequent test work.
[0056] In summary, the present disclosure analyzes the requirement document and test cases by using a preset model to determine the correspondence between the required function points in each function module of the requirement document and each test title in the test cases. At the same time, by calculating the function point coverage rate and generating function point correction suggestions, the quality of the test cases is effectively improved.
[0057] As a possible implementation manner, as Figure 3 shown in the flowchart of the third test case correction method based on test case quality assessment, on the basis of the above embodiments, through a preset model, the test cases are evaluated with multiple indicators in combination with the requirement document, and the first correction suggestions corresponding to each indicator evaluation in the multiple indicator evaluations are obtained, and the specific process of supplementing and modifying the test cases based on the first correction suggestions to obtain updated test cases includes the following steps: Step 301: Based on the preset boundary points, determine whether there are requirement boundary points in the required function points. The requirement boundary points refer to the function points in the required function points that involve preset special values or preset special formats.
[0058] In some embodiments, the multiple indicator evaluation includes function point coverage evaluation, the function point coverage evaluation includes boundary point coverage rate evaluation, and the first correction suggestions include data set correction suggestions.
[0059] The present disclosure can understand whether there are preset boundary points (such as special numerical values or formats) in the requirement function points of the requirement function based on a preset model. That is, the present disclosure can combine each function point into a prompt according to the function module and input it into the preset model for analysis and understanding, and determine whether the function points in the function model contain boundary points of special numerical values or special formats such as user input amounts, dates, strings, etc.
[0060] Step 302: If there are requirement boundary points in the requirement function points, determine the test boundary points in the test case and the data type of each test boundary point. The test boundary point refers to the function point in the test function point that involves preset special numerical values or preset special formats.
[0061] In some embodiments, if there are requirement boundary points in the requirement function points, identify the corresponding test boundary points in the test case, output the extracted test boundary points, and determine their data types.
[0062] Step 303: If the test boundary points are the same as the requirement boundary points, determine the test data set corresponding to the data type of the test boundary points.
[0063] In some embodiments, if the test boundary points are consistent with the requirement boundary points, further determine the test data sets required for these boundary points. If they are inconsistent, output the missing boundary points or data types, and the test case can be supplemented based on the missing boundary points or data types.
[0064] Step 304: If there is no preset valid data set and / or preset invalid data set in the test data set, determine the data set supplement suggestion for the test case, and supplement the data set of the test case based on the data set supplement suggestion to obtain an updated test case.
[0065] In some embodiments, if the preset valid data set or invalid data set is missing in the test data set, propose a data set supplement suggestion and update the test case accordingly.
[0066] That is, the present disclosure can input the current test case and the preset valid data set and preset invalid data set corresponding to the data type of the current test case into the preset model to determine whether the current test case hits both the valid and invalid data sets at the same time. If it hits both at the same time, it is considered that the boundary coverage of the test case is complete; if there is a part that does not hit, output the part of the valid or invalid data set that does not hit.
[0067] Furthermore, the present disclosure can also train the preset model according to the preset valid data set and invalid data set through the preset model to obtain a trained preset model, so as to directly identify the valid data set and invalid data set in the test data set by using the trained preset model.
[0068] When the present disclosure determines the boundaries of test cases, various data sets need to be considered, including valid data sets and invalid data sets. Specific examples of the preset valid data set and the preset invalid data set are shown in Table 1.
[0069]
[0070] Table 1 In summary, by using the preset model to identify and process boundary test cases, the present disclosure can more effectively identify and process boundary conditions, thereby improving the quality of test cases.
[0071] As a possible implementation, as Figure 4 shown in the schematic flowchart of the fourth test case correction method based on test case quality assessment, on the basis of the above embodiments, through the preset model, combined with the requirements document, multi-index evaluation of the test case is carried out to obtain the first correction suggestion corresponding to each index evaluation in the multi-index evaluation, and based on the first correction suggestion, the test case is supplemented and modified to obtain the specific process of the updated test case, including the following steps: Step 401: If the test case includes a test title, test steps, and test expectations, use the format requirements in the preset template to analyze the format of the test title, test steps, and test expectations to obtain an analysis result.
[0072] In some embodiments, the multi-index evaluation includes format evaluation. For each test case, the test case needs to include a use case title, test steps, and test expectations (expectations). The present disclosure can analyze the format of the test title, test steps, and test expectations in the test case. This analysis is based on the format requirements in the preset template to ensure that the test case meets certain writing standards.
[0073] For the test title, the function point being tested should be clearly indicated so that testers can quickly understand the purpose of the test; for the test steps, they need to be concise and avoid complex sentence structures to ensure that the test steps are easy to understand and execute; for the test expectations, it should be a clear result indicating the criteria for test success or failure. The analysis result can be used to indicate the understandability of the test case, that is, whether the test case is clear and easy to understand. If the test case does not meet the format requirements, it will need to be corrected.
[0074] In addition, the present disclosure can also analyze the format of the preconditions in the test case. Although the preconditions are not required, if they exist, they should also be included in the test case to ensure the integrity and accuracy of the test.
[0075] Step 402: If the analysis result of at least one of the test title, test steps, and test expectations in the analysis result is an abnormal result, determine the format correction suggestion for the test case corresponding to the abnormal result, and modify the format of the test case number based on the format correction suggestion to obtain an updated test case.
[0076] In some embodiments, if any one of the format analysis results of the test case is an abnormal result (i.e., does not meet the format requirements in the preset template), the system will generate a format correction suggestion.
[0077] The present disclosure can input test cases into a preset model according to functional modules for preliminary judgment. The preset model can automatically analyze the integrity of test cases, the clarity of titles, the clarity of steps, etc. If the test case does not meet the requirements, the preset model will output the test case number and the corresponding format correction suggestion. The preset model or the tester can supplement and modify the test case according to the format correction suggestion to meet the format requirements. The modified test case will be stored and used as an updated test case.
[0078] In addition, in order to improve the judgment ability of the preset model, the present disclosure can also input some test cases with better understandability as examples during the model training process. These examples will help the model learn how to identify high-quality test cases and generate more accurate format correction suggestions.
[0079] In summary, the present disclosure ensures the understandability of test cases and improves the quality of test cases by evaluating the format of test cases and correcting and supplementing test cases based on the format correction suggestions obtained from the format evaluation.
[0080] As a possible implementation, as Figure 5 shown in the flowchart of the fifth test case correction method based on test case quality evaluation, on the basis of the above embodiments, through a preset model, combined with the requirements document, multi-index evaluation of test cases is carried out to obtain the first correction suggestion corresponding to each index evaluation in the multi-index evaluation, and the specific process of supplementing and modifying the test case based on the first correction suggestion to obtain an updated test case includes the following steps: Step 501: Determine the test function point of the test case.
[0081] In some embodiments, the multi-index evaluation includes quantity evaluation, and the first correction suggestion includes a splitting correction suggestion. In order to ensure the singularity of each test case, that is, each test case only tests a specific function point, to ensure the clarity and maintainability of the test case, so that each test case can focus on verifying a specific function or behavior.
[0082] The present disclosure uses a pre-trained preset model (such as a natural language processing model) to analyze each test case and extract its test function points. The preset model needs to be able to accurately understand the description of the test case and identify the function points involved. For each test case, check the number of function points extracted by the large preset model. If a test case contains multiple function points, then this test case does not meet the requirement of singularity and needs to be split. That is, each test case is input into the preset model, which is responsible for extracting function points and performing singularity checks. If the model detects multiple function points, it will output corresponding warnings or suggestions.
[0083] Step 502: If the number of test function points exceeds the preset number, determine the splitting and correction suggestions for the test case based on the number of test function points, and split the test case based on the splitting and correction suggestions to obtain updated test cases.
[0084] In some embodiments, if a test case contains more function points than the preset number (for example, more than 1), then it is necessary to determine the splitting and correction suggestions based on the number of function points and split the test case.
[0085] For example, when the preset model detects that a test case contains multiple function points, it will output the test case number and list all the extracted function points (such as function point 1_1, function point 1_2,..., function point 1_p). At the same time, the model will give splitting suggestions, indicating how many independent test cases the test case should be split into, and each test case is used to test one function point. Then the preset model can split the original test case according to the splitting and correction suggestions. Each of the split test cases should only contain one function point and be clearly and accurately described. The split test cases will be regarded as updated test cases and used for subsequent testing work.
[0086] In summary, the present disclosure uses a preset model to automatically extract and check the function points in test cases, ensuring the singularity of test cases. When multiple function points are detected, the system can give splitting and correction suggestions and automatically or assist testers to complete the splitting work of test cases. This improves the quality and maintainability of test cases and reduces the complexity and cost of testing work.
[0087] As a possible implementation, as Figure 6 shown in the flowchart of the sixth test case correction method based on test case quality assessment, on the basis of the above embodiments, through a preset model, combined with the requirement document, multi-index evaluation of the test case is carried out to obtain the first correction suggestion corresponding to each index evaluation in the multi-index evaluation, and the specific process of supplementing and modifying the test case based on the first correction suggestion to obtain updated test cases includes the following steps: Step 601: Determine the test function points of the test case.
[0088] In some embodiments, the multi - index evaluation includes security evaluation, and the first correction suggestion includes security supplementary correction suggestions. For each test case, a preset model (such as a large model) is used for function point extraction. That is, the preset model can identify and extract the test function points involved in the test case.
[0089] Step 602: If the test function points do not include the preset security function points, determine that the test case has a security exception.
[0090] In some embodiments, check whether the test function points extracted by the preset model include preset security function points such as permission management and content filtering. If the test function points include preset security function points such as permission management and content filtering, it is considered that the test case meets the requirements in terms of security functions. If the test function points do not include any of the preset security function points, give a corresponding prompt indicating that the test case has a security exception.
[0091] Step 603: Based on the preset security function points not included in the test function points, determine the security supplementary suggestions for the test case, and based on the security supplementary suggestions, supplement the security function points of the test case to obtain an updated test case.
[0092] In some embodiments, based on the preset security function points missing in the test function points (such as permission management or content filtering), determine specific security supplementary suggestions. According to the security supplementary suggestions, make necessary modifications and supplements to the test case to include the missing security function points. Ensure that the test case can cover key security aspects such as permission management and content filtering after modification. After completing the supplement of the security function points, an updated test case is obtained. The updated test case will include all necessary security function points and meet the requirements of the security evaluation.
[0093] In addition, some educational software is provided for children and adolescents to use. For such software, the present disclosure can also add an evaluation of whether the test case includes aspects related to children and adolescents to comprehensively check whether the software fully considers the special needs of this user group. This evaluation will carefully examine whether the test case covers various scenarios that children and adolescents may encounter when using the software, including but not limited to the suitability of the content, the friendliness of the interface and interaction, and the effectiveness of privacy protection measures. Through this evaluation, it can be ensured that the software is not only fully functional but also can serve its target user group safely and healthily.
[0094] In summary, the present disclosure can ensure that the test case is fully evaluated and supplemented in terms of security functions, thereby improving the overall security of the software.
[0095] Based on the aboveFigures 1 to 6 The illustrated embodiment, such as Figure 7 shown, the present disclosure provides a specific test case correction system based on test case quality assessment.
[0096] In the embodiments of the present disclosure, with reference to Figure 7 , the present disclosure can divide the test case evaluation into pre-execution evaluation of test cases and in-execution evaluation of test cases.
[0097] For the pre-execution evaluation of test cases, the present disclosure can input the requirement document and the current test case into the coverage processing module, the understandability module, and the independence processing module. Among them, the coverage processing module is used for the function point coverage evaluation in the present disclosure, the understandability module is used for the format evaluation in the present disclosure, and the independence processing module is used for the quantity evaluation in the present disclosure. In addition, the present disclosure also includes security evaluation, which can be specifically implemented by using the security processing module. Among them, the test case correction system based on test case quality assessment of the present disclosure can obtain the function coverage result of the test case set, the understandability evaluation result of the test case set, and the independence evaluation result of the test case set through the coverage processing module, the understandability module, and the independence processing module, so as to determine the first correction suggestion corresponding to each evaluation result according to these evaluation results, supplement and modify the test case, and obtain the updated test case.
[0098] For the in-execution evaluation of test cases, the present disclosure can input the obtained test execution use case (updated test case) and the code project into the code coverage processing module. Among them, the code coverage processing module can specifically be the code coverage tool in the present disclosure. The test case correction system based on test case quality assessment of the present disclosure can obtain the code coverage evaluation result (i.e., the code coverage degree) of the test case set through the code coverage processing module, so as to determine the second correction suggestion according to the code coverage degree, supplement and modify the updated test case again, and obtain the target test case.
[0099] Corresponding to the above-mentioned test case correction method based on test case quality assessment, the present invention also proposes a test case correction system based on test case quality assessment. Since the system embodiment of the present invention corresponds to the above-mentioned method embodiment, for the details not disclosed in the system embodiment, reference can be made to the above-mentioned method embodiment, and the present invention will not be elaborated herein.
[0100] Figure 8 It is a schematic structural diagram of a test case correction system based on test case quality assessment provided by the embodiments of the present disclosure, such as Figure 8 shown, the system includes: A pre-execution evaluation unit 810 for test cases is configured to perform multi-index evaluation on test cases by combining a requirements document with a preset model, obtain a first correction suggestion corresponding to each index evaluation in the multi-index evaluation, and supplement and modify the test cases based on the first correction suggestion to obtain updated test cases. The multi-index evaluation includes at least one of function point coverage evaluation, format evaluation, quantity evaluation, and security evaluation; A mid-execution evaluation unit 820 for test cases is configured to execute the updated test cases, use a code coverage tool to determine the code coverage degree of the updated test cases during execution, obtain a second correction suggestion corresponding to the code coverage degree, and supplement and modify the updated test cases based on the second correction suggestion to obtain target test cases.
[0101] In some embodiments of the present disclosure, the multi-index evaluation includes function point coverage evaluation. The function point coverage evaluation includes function point coverage rate evaluation. The first correction suggestion includes function point correction suggestions. The pre-execution evaluation unit 810 for test cases is configured to: analyze the requirements document and test cases using a preset model to determine the required function points in each function module of the requirements document and each test title in the test cases; perform vector transformation on the required function points and test titles respectively to obtain required function point vectors and test title vectors; perform semantic matching on the test title vectors and required function point vectors to obtain matching function point vectors; determine the function coverage rate based on the matching function point vectors, test title vectors, and required function point vectors; if the function coverage rate is less than or equal to a preset function coverage rate threshold, generate function point correction suggestions; and supplement and modify the test function points in the test cases with the required function points based on the function point correction suggestions to obtain updated test cases.
[0102] In some embodiments of the present disclosure, the multi-index evaluation includes function point coverage evaluation. The function point coverage evaluation includes boundary point coverage rate evaluation. The first correction suggestion includes dataset correction suggestions. The pre-execution evaluation unit 810 for test cases is configured to: based on a preset boundary point, determine whether there is a required boundary point in the required function points, where the required boundary point refers to a function point in the required function points that involves a preset special value or a preset special format; if there is a required boundary point in the required function points, determine the test boundary points in the test cases and the data type of each test boundary point, where the test boundary point refers to a function point in the test function points that involves a preset special value or a preset special format; if the test boundary points and the required boundary points are the same, determine the test dataset corresponding to the data type of the test boundary points; if the preset valid dataset and / or the preset invalid dataset do not exist in the test dataset, determine the dataset supplement suggestion for the test cases, and supplement the dataset of the test cases based on the dataset supplement suggestion to obtain updated test cases.
[0103] In some embodiments of the present disclosure, the multi - indicator evaluation includes format evaluation, and the first correction suggestion includes a format correction suggestion. The pre - execution evaluation unit 810 of the test case is configured to: if the test case includes a test title, test steps, and test expectations, use the format requirements in the preset template to perform format analysis on the test title, test steps, and test expectations to obtain an analysis result; if the analysis result of at least one of the test title, test steps, and test expectations is an abnormal result, determine the format correction suggestion for the test case corresponding to the abnormal result, and modify the format of the test case number based on the format correction suggestion to obtain an updated test case.
[0104] In some embodiments of the present disclosure, the multi - indicator evaluation includes quantity evaluation, and the first correction suggestion includes a splitting correction suggestion. The pre - execution evaluation unit 810 of the test case is configured to: determine the test function points of the test case; if the number of test function points exceeds the preset number, determine the splitting correction suggestion for the test case based on the number of test function points, and split the test case based on the splitting correction suggestion to obtain an updated test case.
[0105] In some embodiments of the present disclosure, the multi - indicator evaluation includes security evaluation, and the first correction suggestion includes a security supplement correction suggestion. The pre - execution evaluation unit 810 of the test case is configured to: determine the test function points of the test case; if the preset security function points are not included in the test function points, determine that the test case has a security anomaly; based on the preset security function points not included in the test function points, determine the security supplement suggestion for the test case, and supplement the security function points of the test case based on the security supplement suggestion to obtain an updated test case.
[0106] In some embodiments of the present disclosure, the apparatus further includes: a report generation unit, configured to, after supplementing and modifying the updated test case based on the second correction suggestion to obtain a target test case, summarize the first correction suggestion, the updated test case, the second correction suggestion, and the target test case to obtain a test case evaluation report.
[0107] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of this embodiment, with the same principle, and will not be limited in this embodiment.
[0108] Based on the above - mentioned method as Figures 1 to 6 shown, correspondingly, this embodiment also provides a computer program product, including a computer program, which when executed by a processor implements the above - mentioned method as Figures 1 to 6 shown.
[0109] Based on the above - mentioned as Figures 1 to 6For the method described above, correspondingly, this embodiment also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned method as Figures 1 to 6 shown is implemented.
[0110] Based on such an understanding, the technical solution of this application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods in various implementation scenarios of this application.
[0111] As Figure 9 shown is a schematic diagram of the hardware structure of an electronic device according to the present invention, including: At least one processor 901; and, A memory 902 communicatively connected to at least one of the processors 901; wherein, The memory 902 stores instructions executable by at least one of the processors. The instructions are executed by at least one of the processors so that at least one of the processors can execute the test case correction method based on test case quality assessment as described above.
[0112] Figure 9 Taking one processor 901 as an example.
[0113] The electronic device may further include: an input device 903 and a display device 904.
[0114] The processor 901, the memory 902, the input device 903, and the display device 904 may be connected through a bus or other means. In the figure, the connection through a bus is taken as an example.
[0115] The memory 902, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the review content generation method in the embodiments of this application. For example, Figures 1 to 6 the method flow shown. The processor 901 executes various functional applications and data processing by running the non-volatile software programs, instructions, and modules stored in the memory 902, that is, implements the test case correction method based on test case quality assessment in the above embodiments.
[0116] The memory 902 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created according to the use of the review content generation method, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 902 may optionally include a memory remotely disposed relative to the processor 901, and these remote memories may be connected to the device for executing the test case correction method based on test case quality assessment through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0117] The input device 903 may receive input user clicks and generate signal inputs related to user settings and function controls of the test case correction method based on test case quality assessment. The display device 904 may include a display device such as a display screen.
[0118] When the one or more modules are stored in the memory 902 and run by the one or more processors 901, they execute the test case correction method based on test case quality assessment in any of the above method embodiments.
[0119] Optionally, the above-mentioned physical device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, sensors, an audio circuit, a WI-FI module, etc. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc. Optionally, the user interface may further include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0120] Those skilled in the art can understand that the above-mentioned physical device structure provided in this embodiment does not limit the physical device, and it may include more or fewer components, or combine certain components, or have different component arrangements.
[0121] The storage medium may further include an operating system and a network communication module. The operating system is a program for managing the hardware and software resources of the above-mentioned physical device, and supports the operation of information processing programs and other software and / or programs. The network communication module is used to implement communication between components inside the storage medium, and communication with other hardware and software in the information processing physical device.
[0122] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or can also be implemented by hardware. By applying the solution of this embodiment, compared with the current existing technologies, in this embodiment, through a preset model, combined with the requirement document, multi-index evaluation is performed on the test cases, and the first correction suggestions corresponding to each index evaluation in the multi-index evaluation are obtained, and the test cases are supplemented and modified based on the first correction suggestions to obtain updated test cases. The multi-index evaluation includes at least one of function point coverage evaluation, format evaluation, quantity evaluation, and security evaluation; the updated test cases are executed, and a code coverage tool is used to determine the code coverage degree during the execution of the updated test cases, and the second correction suggestions corresponding to the code coverage degree are obtained, and the updated test cases are supplemented and modified based on the second correction suggestions to obtain target test cases. It realizes multi-index comprehensive evaluation and code coverage analysis of test cases by using a preset model, automatically proposes correction suggestions and improves test cases accordingly, effectively reducing the labor cost, improving the accuracy and objectivity of the evaluation results, and enhancing the test quality and efficiency.
[0123] It should be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0124] The above are only specific embodiments of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments described herein, but will conform to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A test case correction method based on test case quality assessment, characterized in that: The method comprises: Performing a multi-index evaluation on the test case in combination with the requirement document through a preset model, obtaining a first correction suggestion corresponding to each indicator evaluation in the multi-index evaluation, and supplementing and modifying the test case based on the first correction suggestion to obtain an updated test case, wherein the multi-index evaluation includes at least one of a function point coverage evaluation, a format evaluation, a quantity evaluation, and a security evaluation; Execute the update test case, use a code coverage tool to determine the code coverage level of the update test case during the execution process, obtain a second correction suggestion corresponding to the code coverage level, and supplement and modify the update test case based on the second correction suggestion to obtain a target test case.
2. The method according to claim 1, characterized in that The function point coverage evaluation includes a function point coverage rate evaluation, the first correction suggestion includes a function point correction suggestion, the multi-index evaluation of the test case is performed by a preset model in combination with a requirement document to obtain a first correction suggestion corresponding to each index evaluation in the multi-index evaluation, and the test case is supplemented and modified based on the first correction suggestion to obtain an updated test case, including: Analyze the requirement document and the test case using the preset model to determine the requirement function points in each functional module in the requirement document and each test title in the test case; Performing vector conversion on the required function point and the test title respectively to obtain a required function point vector and a test title vector; Performing semantic matching on the test title vector and the required function point vector to obtain a matching function point vector; Determining function coverage based on the matching function point vector, the test title vector and the requirement function point vector; If the function coverage is less than or equal to a preset function coverage threshold, generating a function point correction suggestion; Based on the function point correction suggestion, the test function points in the test case are supplemented and modified using the required function points to obtain an updated test case.
3. The method according to claim 1, characterized in that The multi-index evaluation includes a function point coverage evaluation, the function point coverage evaluation includes a boundary point coverage evaluation, the first correction suggestion includes a data set correction suggestion, the multi-index evaluation of the test case is performed by a preset model in combination with a requirement document, a first correction suggestion corresponding to each indicator evaluation in the multi-index evaluation is obtained, and the test case is supplemented and modified based on the first correction suggestion to obtain an updated test case, including: Based on the preset boundary points, determining whether there are demand boundary points in the demand function points, wherein the demand boundary points refer to function points in the demand function points involving preset special values or preset special formats; If there are requirement boundary points in the requirement function points, determine the test boundary points in the test case and the data type of each test boundary point, wherein the test boundary points refer to the function points in the test function points involving preset special values or preset special formats; If the test boundary point is the same as the requirement boundary point, determining a test data set corresponding to the data type of the test boundary point; If the preset valid data set and / or the preset invalid data set does not exist in the test data set, a data set supplement suggestion for the test case is determined, and the data set of the test case is supplemented based on the data set supplement suggestion to obtain an updated test case.
4. The method according to claim 1, characterized in that: The multi-index evaluation includes a format evaluation, the first correction suggestion includes a format correction suggestion, the multi-index evaluation is performed on the test case by using a preset model in combination with a requirement document, a first correction suggestion corresponding to each index evaluation in the multi-index evaluation is obtained, and the test case is supplemented and modified based on the first correction suggestion to obtain an updated test case, including: If the test case includes a test title, test steps, and test expectations, format analysis is performed on the test title, the test steps, and the test expectations using the format requirements in the preset template to obtain analysis results; If the analysis result of at least one of the test title, test steps and test expectations in the analysis result is an abnormal result, a format correction suggestion for the test case corresponding to the abnormal result is determined, and the test case number is formatted based on the format correction suggestion to obtain an updated test case.
5. The method according to claim 1, characterized in that The multi-index evaluation includes a quantity evaluation, the first correction suggestion includes a split correction suggestion, the multi-index evaluation is performed on the test case by using a preset model in combination with a requirement document to obtain a first correction suggestion corresponding to each indicator evaluation in the multi-index evaluation, and the test case is supplemented and modified based on the first correction suggestion to obtain an updated test case, including: Determine the test function points of the test case; If the number of the test function points exceeds a preset number, a splitting and correction suggestion for the test case is determined based on the number of the test function points, and the test case is split based on the splitting and correction suggestion to obtain an updated test case.
6. The method according to claim 5, characterized in that The multi-index evaluation includes a security evaluation, the first correction suggestion includes a security supplement correction suggestion, the multi-index evaluation is performed on the test case by using a preset model in combination with a requirement document, a first correction suggestion corresponding to each indicator evaluation in the multi-index evaluation is obtained, and the test case is supplemented and modified based on the first correction suggestion to obtain an updated test case, including: Determine the test function points of the test case; If the test function points do not include the preset security function points, determining that the test case has a security anomaly; Based on preset security function points not included in the test function points, security supplement suggestions for the test case are determined, and security function points of the test case are supplemented based on the security supplement suggestions to obtain an updated test case.
7. The method according to claim 1, characterized in that The updated test case is supplemented and modified based on the second correction suggestion to obtain a target test case, and then the method includes: The first correction suggestion, the updated test case, the second correction suggestion and the target test case are summarized to obtain a test case evaluation report.
8. A test case correction system based on test case quality assessment, characterized in that: The system comprises: A test case pre-execution evaluation unit, used to perform a multi-index evaluation on the test case in combination with a requirement document through a preset model, obtain a first correction suggestion corresponding to each indicator evaluation in the multi-index evaluation, and supplement and modify the test case based on the first correction suggestion to obtain an updated test case, wherein the multi-index evaluation includes at least one of a function point coverage evaluation, a format evaluation, a quantity evaluation, and a security evaluation; The evaluation unit during test case execution is used to execute the updated test case, use a code coverage tool to determine the code coverage level of the updated test case during execution, obtain a second correction suggestion corresponding to the code coverage level, and supplement and modify the updated test case based on the second correction suggestion to obtain a target test case.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Evaluation method and device of test case generation model and electronic equipment
CN118012777A
Test case completeness evaluation method and device, electronic equipment and storage medium
CN119166525A