A comprehensive inspection method and system for test case integrity

By performing automated inspection of the fields and quantity of test cases by machine-controlled automation, the high cost and subjectivity problems caused by manual review in the prior art are solved, objective and automated inspection of the integrity of test cases is achieved, and the test quality is improved.

CN114218081BActive Publication Date: 2025-04-18CHINA CITIC BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111483266.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2025-04-18
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

The prior art test of test case integrity in project testing work mainly relies on manual review, resulting in high labor costs and subjectiveness.

Method used

A comprehensive inspection method is adopted to conduct automated inspection of the fields and quantity of test cases by mechanically controlling. The specific steps include: checking the rationality of the test case field (non-empty check of the necessary fields) and the rationality of the quantity (by comparing the number of predicted cases with the actual number of cases), and generating corresponding prompts and evaluations.

Benefits of technology

The objective and automated inspection of the integrity of the test case is achieved, which reduces labor costs, reduces subjectivity, and improves the quality of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114218081B_ABST
    Figure CN114218081B_ABST
Patent Text Reader

Abstract

The present invention relates to a comprehensive test case integrity inspection method and system, including inspection of the rationality of test case fields and inspection of the rationality of the number of test cases, comprehensive inspection of the integrity of target test cases from two dimensions of case fields and case numbers, verification of case fields through mandatory field verification of test case fields, display of test cases with missing fields to customers, prediction of the number of project test cases through deep learning, comparison of the prediction result with the number of actually written cases, and verification of the number of cases, thereby verifying the integrity of test cases by two different methods through machine control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software testing, and in particular to a comprehensive testing method and system for testing case integrity. Background Art

[0002] A test case is a description of a test task for a specific software product, reflecting the test plan, method, technology and strategy. Its content includes test objectives, test environment, input data, test steps, expected results, test scripts, etc., and finally forms a document. Simply put, a test case is a set of test inputs, execution conditions and expected results written for a specific goal, used to verify whether a specific software requirement is met.

[0003] In the software testing industry, the design and compilation of test cases are the most important in software testing activities. Test cases are the guidance of testing work, the criteria that must be followed in software testing, and the fundamental guarantee for the stability of software testing quality. If the test cases are detailed and complete enough, no matter who performs the test, by referring to the test cases, the test quality can be better guaranteed, thereby reducing the impact of human factors in the software testing process.

[0004] Currently, in project testing work, the verification of test case integrity is usually carried out through case review, which consumes a lot of project manpower costs and has a certain degree of subjectivity. Therefore, there is an urgent need for an automated method based on machine control to verify the integrity of test cases. Summary of the invention

[0005] In order to address the shortcomings of the prior art, the present invention proposes a comprehensive verification method and system for test case integrity, which comprehensively verifies the integrity of the target test case through two dimensions: case field and case quantity, verifies the case field through the required field check of the test case field, and displays the test case with missing fields to the customer. Deep learning is used to predict the number of project test cases, and the prediction result is compared with the actual number of written cases to verify the number of cases, thereby realizing the verification of the integrity of the test case by two different methods through machine control.

[0006] To achieve the above objectives, the technical solutions adopted by the present invention include:

[0007] A comprehensive test case integrity verification method, characterized by comprising:

[0008] S1. Check the rationality of the test case fields;

[0009] S2. Check the rationality of the number of test cases;

[0010] S3. Evaluate the completeness of the test case based on the field rationality and quantity rationality of the test case;

[0011] Steps S1 and S2 have the same priority and can be executed in parallel and simultaneously;

[0012] The step S1 further comprises the following sub-steps:

[0013] S11. Import the test case to be tested;

[0014] S12. According to the preset necessary fields, perform non-empty verification on the necessary fields of the test case one by one;

[0015] S13. When there are necessary fields that are checked to be empty in the test case, a field rationality prompt is generated;

[0016] The step S2 further comprises the following sub-steps:

[0017] S21, importing the test item indicators corresponding to the test cases to be tested;

[0018] S22, inputting the test item index into the pre-trained neural network model, and calculating the number of predicted cases for the test case to be tested;

[0019] S23. Compare the predicted number of cases with the actual number of test cases to be tested, and generate a quantity rationality prompt when the actual number of cases exceeds a preset threshold compared with the predicted number of cases.

[0020] Furthermore, the preset necessary fields include a case name field, a case description field, a test tool field, a case type field and an operation step field.

[0021] Furthermore, the generating field rationality prompt includes:

[0022] Classify the test cases that have necessary fields to be checked as empty according to the types of necessary fields to be checked as empty;

[0023] Generate field rationality hints for different categories.

[0024] Furthermore, the test item indicators include:

[0025] Project testing cycle, in days;

[0026] Project testing workload, in units of person / day;

[0027] The number of new functional modules added to the project shall be calculated based on the actual number of new functional modules involved;

[0028] The number of functional modules changed in the project is calculated based on the number of functional modules actually involved in the change;

[0029] The importance of the project-related functional modules is expressed as an integer from 1 to 5, where 5 is the most important and 1 is the least important;

[0030] Whether the project case-related function module involves account movement, represented by 0 or 1, where 0 means not involved and 1 means involved;

[0031] The frequency of use of the project case-related functional modules is expressed as an integer from 1 to 5, where 5 is the most frequent and 1 is the least frequent;

[0032] The historical defect rate of the system, calculated as a percentage.

[0033] Furthermore, the pre-trained neural network model is obtained by collecting historical project data and iteratively calculating using an error back propagation algorithm.

[0034] Furthermore, the preset threshold is a fluctuation of 20% above and below the number of predicted cases.

[0035] Furthermore, the rationality prompt of the generated quantity includes:

[0036] When the actual number of cases is within the preset threshold range of the predicted number of cases, it is determined that the actual number of cases is within a reasonable range;

[0037] When the actual number of cases is less than the floating end value below the preset threshold of the predicted number of cases, it is determined that the actual number of cases is insufficient, and a quantity rationality prompt indicating the insufficient number is generated;

[0038] When the actual number of cases is greater than the floating end value of the preset threshold of the predicted number of cases, the actual number of cases is determined to be redundant, and a quantity rationality prompt indicating that the number is too large is generated.

[0039] The present invention also relates to a comprehensive verification system for test case integrity, characterized in that it comprises:

[0040] The field rationality check module is used to check the necessary fields of the test case one by one according to the preset necessary fields, and generate field rationality prompts;

[0041] A quantity rationality check module is used to compare the predicted case quantity with the actual case quantity of the test case to be checked and generate a quantity rationality prompt;

[0042] The test case integrity evaluation module is used to integrate field rationality prompts and quantity rationality prompts and evaluate the test case integrity.

[0043] The present invention also relates to a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and the computer program implements the above method when executed by a processor.

[0044] The present invention also relates to an electronic device, characterized in that it comprises a processor and a memory;

[0045] The memory is used to store necessary fields and test item indicators;

[0046] The processor is used to execute the above method by calling necessary fields and test item indicators.

[0047] The beneficial effects of the present invention are:

[0048] The comprehensive verification method and system for test case integrity described in the present invention can comprehensively verify whether the test case is complete in the form of machine-controlled automation, especially comprehensively verifying whether the necessary fields in the case are filled in and whether the number of cases meets the test needs, thereby achieving objective and controllable integrity verification, and solving the problems of high labor cost consumption and strong subjectivity in existing manual verification methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 The figure is a flow chart of the comprehensive inspection method for test case integrity of the present invention.

[0050] Figure 2 It is a schematic diagram of the structure of the comprehensive inspection system for test case integrity of the present invention. DETAILED DESCRIPTION

[0051] In order to more clearly understand the content of the present invention, it will be described in detail with reference to the drawings and embodiments.

[0052] like Figure 1 The figure shows a flow chart of a preferred embodiment of the comprehensive test case integrity test method of the present invention. The test case detection includes two parallel steps: S1, checking the rationality of the test case fields and S2, checking the rationality of the number of test cases. The integrity of the test case is comprehensively evaluated through the test results of the field rationality and the mathematical rationality. Specifically, checking the rationality of the test case fields includes:

[0053] S11. Import the test case to be tested;

[0054] S12. According to the preset necessary fields, the necessary fields of the test case are checked one by one to see if they are not empty; the necessary fields preferably include a case name field, a case description field, a test tool field, a case type field, and an operation step field. The necessary fields that need to be checked can also be formulated according to actual testing needs;

[0055] S13. When there are necessary fields that are empty for verification in the test cases, the test cases with the necessary fields that are empty for verification are classified according to the types of necessary fields that are empty for verification, and field rationality prompts for different classifications are generated.

[0056] The field rationality prompt can be used to show the user the problem of missing necessary field content in the current test case. The user can perform targeted processing based on the field rationality prompt, for example, the user can directly jump to the location where the information is missing indicated by the field rationality prompt and complete it.

[0057] Furthermore, in the process of checking the necessary fields of the test cases one by one, it can be set to directly notify the user and jump to supplement and revise each missing information detected, without affecting the subsequent inspection of other necessary fields, which can improve the processing efficiency of missing field information. That is, the inspection process for each necessary field is independent and does not interfere with each other, and the execution order or parallel execution can be freely selected.

[0058] The part that checks the reasonableness of the number of test cases specifically includes:

[0059] S21, importing the test item indicators corresponding to the test cases to be tested;

[0060] S22, inputting the test item index into the pre-trained neural network model, and calculating the number of predicted cases for the test case to be tested;

[0061] S23. Compare the predicted number of cases with the actual number of test cases to be tested. When the actual number of cases exceeds the preset threshold value compared with the predicted number of cases, generate a quantity rationality prompt; preferably, the preset threshold value is 20% above and below the predicted number of cases. When the actual number of cases is within the preset threshold range of the predicted number of cases, it is determined that the actual number of cases is within a reasonable range; when the actual number of cases is less than the floating end value below the preset threshold value of the predicted number of cases, it is determined that the actual number of cases is insufficient, and a quantity rationality prompt indicating that the number is insufficient is generated; when the actual number of cases is greater than the floating end value above the preset threshold value of the predicted number of cases, it is determined that the actual number of cases is redundant, and a quantity rationality prompt indicating that the number is excessive is generated.

[0062] The test project indicators are a series of parameter indicators that affect the number of test cases. By using these parameter indicators as the input layer neurons of the deep neural network model and training the model with historical data, the optimal solution of the deep neural network model can be obtained as the pre-trained neural network model. Preferably, according to the different properties of each software system to be tested, a model can be established for each software system, and relevant indicators can be collected and quantified to establish a model as the input layer neurons of the deep neural network. Specifically, the test project indicators used include:

[0063] x_1: project testing cycle (in days);

[0064] x_2: Project testing workload (in man / day);

[0065] x_3: the number of new functional modules added to the project (calculated based on the actual number of new functional modules involved);

[0066] x_4: number of functional modules changed in the project (calculated based on the actual number of functional modules involved in the change);

[0067] x_5: The importance of the project-related functional modules (1-5, 5 is the most important and 1 is the least important);

[0068] x_6: Whether the project case-related function module involves dynamic accounting (0 means not involved, 1 means involved);

[0069] x_7: Frequency of use of project case-related functional modules (1-5, 5 is the most frequent and 1 is the least frequent);

[0070] x_8: System historical defect rate (calculated as a percentage).

[0071] The above indicators x_1 to x_8 are the 8 input layer neurons of the neural network model, and the model output y can be set to be the number of predicted cases predicted by the model.

[0072] The specific algorithm model includes: the input neurons of the neural network model, called the input layer, corresponding to the index x_1-x_8; the hidden layer, which contains several hidden layers and several nodes in each hidden layer; the output of the neural network, called the output layer, corresponding to y. The connection between nodes constitutes a neural network.

[0073] Collect historical project data of the system corresponding to the model as a training set, determine the number of hidden layers, hidden layer activation function and output layer activation function, and use the error back propagation algorithm (BP algorithm) to iteratively train the neural network model. After the training converges, the weight of the neural network model can be obtained, that is, the coefficient corresponding to the connection between nodes. After the model training is completed, collect the various input indicators corresponding to the project to be tested as input, and get the output y, so as to make recommendations on the test execution method.

[0074] After obtaining the predicted number of cases y, compare it with the number of cases actually written by the tester. If the actual number is within 20% of the predicted number, it is considered that the number of cases actually written by the tester is within a reasonable range; if the actual number is 20% or more lower than the predicted number, it indicates that the tester has written too few cases, and there may be test design omissions, causing project quality risks; if the actual number is 20% or more higher than the predicted number, it indicates that the tester has written too many cases, and there may be case design redundancy.

[0075] The present invention also relates to a comprehensive testing system for test case integrity, the structure of which is as follows: Figure 2 As shown, including:

[0076] The field rationality check module is used to check the necessary fields of the test case one by one according to the preset necessary fields, and generate field rationality prompts;

[0077] A quantity rationality check module is used to compare the predicted case quantity with the actual case quantity of the test case to be checked and generate a quantity rationality prompt;

[0078] The test case integrity evaluation module is used to integrate field rationality prompts and quantity rationality prompts and evaluate the test case integrity.

[0079] By using the system, the above method can be executed, thereby realizing comprehensive and automated integrity verification of test cases.

[0080] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A comprehensive test method for test case integrity, characterized in that: include: S1. Check the rationality of the test case fields; S2. Check the rationality of the number of test cases; S3. Evaluate the completeness of the test case based on the field rationality and quantity rationality of the test case; Steps S1 and S2 have the same priority and can be executed in parallel and simultaneously; The step S1 further comprises the following sub-steps: S11. Import the test case to be tested; S12. According to the preset necessary fields, perform non-empty verification on the necessary fields of the test case one by one; S13. When there are necessary fields that are checked to be empty in the test case, a field rationality prompt is generated; The step S2 further comprises the following sub-steps: S21, importing the test item indicators corresponding to the test cases to be tested; S22, inputting the test item index into the pre-trained neural network model, and calculating the number of predicted cases for the test case to be tested; S23. Compare the predicted number of cases with the actual number of test cases to be tested, and generate a quantity rationality prompt when the actual number of cases exceeds a preset threshold compared with the predicted number of cases.

2. The method according to claim 1, characterized in that The preset necessary fields include a case name field, a case description field, a test tool field, a case type field, and an operation step field.

3. The method according to claim 1, characterized in that The generated field rationality prompt includes: Classify the test cases that have necessary fields to be checked as empty according to the types of necessary fields to be checked as empty; Generate field rationality hints for different categories.

4. The method according to claim 1, characterized in that The test item indicators include: Project testing cycle, in days; Project testing workload, in units of person / day; The number of new functional modules added to the project shall be calculated based on the actual number of new functional modules involved; The number of functional modules changed in the project is calculated based on the number of functional modules actually involved in the change; The importance of the project-related functional modules is expressed as an integer from 1 to 5, where 5 is the most important and 1 is the least important; Whether the project case-related function module involves account movement, represented by 0 or 1, where 0 means not involved and 1 means involved; The frequency of use of the project case-related functional modules is expressed as an integer from 1 to 5, where 5 is the most frequent and 1 is the least frequent; The historical defect rate of the system, calculated as a percentage.

5. The method according to claim 1, characterized in that The pre-trained neural network model is obtained by collecting historical project data and iteratively calculating using an error back propagation algorithm.

6. The method according to claim 1, characterized in that The preset threshold is 20% above and below the predicted number of cases.

7. The method according to claim 6, characterized in that The prompts for rationality of the generated quantity include: When the actual number of cases is within the preset threshold range of the predicted number of cases, it is determined that the actual number of cases is within a reasonable range; When the actual number of cases is less than the floating end value below the preset threshold of the predicted number of cases, it is determined that the actual number of cases is insufficient, and a quantity rationality prompt indicating the insufficient number is generated; When the actual number of cases is greater than the floating end value of the preset threshold of the predicted number of cases, the actual number of cases is determined to be redundant, and a quantity rationality prompt indicating that the number is too large is generated.

8. A comprehensive verification system for test case integrity, characterized in that: include: The field rationality check module is used to check the necessary fields of the test case one by one according to the preset necessary fields, and generate field rationality prompts; A quantity rationality check module is used to compare the predicted case quantity with the actual case quantity of the test case to be checked and generate a quantity rationality prompt; The test case integrity evaluation module is used to integrate field rationality prompts and quantity rationality prompts and evaluate the test case integrity.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and 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, characterized in that: including a processor and a memory; The memory is used to store necessary fields and test item indicators; The processor is used to execute the method according to any one of claims 1 to 7 by calling necessary fields and test item indicators.

Citation Information

Patent Citations

  • A method for automatically detecting embedded software interface test data

    CN109002391A

  • A software testing process quality measurement method and system

    CN109408359A