Test case management method and device, terminal and storage medium

The preset factor library generates test case configuration information and matches the use cases in the test case library, solves the problem of low efficiency in test case management, improves the efficiency and accuracy of software testing, and achieves comprehensive coverage of product functions.

CN119127658APending Publication Date: 2024-12-13SUOTUO (SHANDONG) BIG DATA SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310692847.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-12
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the prior art, the testing case management efficiency is low, resulting in low software testing efficiency and the inability to effectively control and manage test cases.

Method used

Determine the test category, test factor and observation factor through the preset factor library, combine the test case configuration information, match the use cases in the test case library, realize the testing of product functions, and generate reports based on the test results to manage failure cases and remediate failure case Test.

Benefits of technology

It improves the uniformity and standardization of test cases, improves testing efficiency and accuracy, enhances the management of test factors and observation factors, and ensures comprehensive coverage of product functions and efficient testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127658A_ABST
    Figure CN119127658A_ABST
Patent Text Reader

Abstract

The invention provides a test case management method and device, a terminal and a storage medium, and the method comprises the steps: determining a test type according to a product function needing to be tested in a project, and determining at least one test factor, at least one observation factor and at least one sub-item of each test factor in a preset factor library; determining configuration information of the required test case according to the test category, the test factor, the at least one sub-item of each test factor and the observation factor; matching the configuration information of the required test case with configuration information of test cases in a preset test case library, and screening successfully matched test cases from the test case library to obtain a test case set required by the test; and testing the product functions by using the test cases in the test case set. According to the invention, the product function test precision and test efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of test case management, and in particular to a test case management method, device, terminal and storage medium. Background Art

[0002] A test case is a specific set of input data, operations or various environment settings, and expected results provided to the system under test for the purpose of implementing the test. Test cases come from requirements. They are refinements of test requirements, can control the execution process of software testing, and are the process of further instantiating each test item.

[0003] The purpose of scientific organization and induction of test cases is to transform the behavior of software testing into a manageable mode; at the same time, test cases are also one of the methods to quantify the test. Different types of software have different test cases. Effective management of test cases can improve the work efficiency of testers and the utilization efficiency of test resources. How to effectively manage test cases to improve the test efficiency of the project to be tested is a technical problem that the existing technology needs to solve. Summary of the invention

[0004] In view of this, the present invention provides a test case management method, device, terminal and storage medium, which can solve the problem of low test efficiency.

[0005] In a first aspect, an embodiment of the present invention provides a test case management method, comprising:

[0006] Determine the test category according to the product functions that need to be tested in the project, and determine at least one test factor, at least one observation factor, and at least one sub-item of each test factor in the preset factor library;

[0007] Determine configuration information of required test cases according to the test category, the test factor and at least one sub-item of each test factor, and the observation factor;

[0008] Match the configuration information of the required test cases with the configuration information of the test cases in the preset test case library, filter the successfully matched test cases from the test case library, and obtain the test case set required for this test;

[0009] The product function is tested using the test cases in the test case set.

[0010] In a possible implementation, determining the configuration information test category of the required test case according to the test category, the test factor, at least one sub-item of each test factor, and the observation factor includes:

[0011] Take out each sub-item of each test factor, combine the test factor and its associated sub-items, and obtain a test item group;

[0012] Combine the test item groups of different test factors to obtain the test factor group;

[0013] Add test categories and observation factors to each test factor group to obtain a test case group, and use the obtained test case group as the configuration information of the required test case.

[0014] In a possible implementation, for any test case, the test case includes input data, operation steps and expected results, and the testing of the product function using the test case in the test case set includes:

[0015] Obtaining test results according to the input data and the operation steps;

[0016] Determine the test result of the test case according to the test result and the expected result, wherein the test result includes a test success or a test failure;

[0017] A test report is generated according to the execution result of this test, and the test report includes configuration information and test results for each test case in the test case set.

[0018] In a possible implementation, after testing the product function using the test cases in the test case set, the method further includes:

[0019] For any test case in the test case set, if the test succeeds, the test of the test case is ended; if the test fails, the test case is put into the failed case library;

[0020] For any test case in the failed case library, determine whether to retest the test case;

[0021] If the test case is retested and the retest result is that the test is successful, the test case is restored to the test case library.

[0022] In a possible implementation, for any test factor, each sub-item of the test factor corresponds to a preset weight, and the testing of the product function by using the test case in the test case set includes:

[0023] For any test case in the test case set, determining a weight of the test case according to a preset weight of a sub-item in each test factor in the configuration information of the test case;

[0024] Sorting the test cases in the test case set in descending order of weight to obtain a sorting result;

[0025] According to the sorting result, the test cases in the test case set are tested in sequence.

[0026] In a possible implementation, testing the test cases in the test case set in sequence according to the sorting result includes:

[0027] A first preset proportion of test cases in the sorting results are tested.

[0028] In a possible implementation, for any test case in the test case library, the test case further includes identification information, where the identification information is used to identify the test case as a core test case or to identify the test case as a non-core test case, and the testing of the product function using the test case in the test case set includes:

[0029] According to the identification information of each test case in the test case combination, the test case set is divided into a subset of core test cases and a subset of non-core test cases;

[0030] The test order of the test cases in the test case set is determined according to a second preset ratio, the subset of core test cases and the subset of non-core test cases, wherein the second preset ratio is used to indicate that a second preset ratio of test cases in the test case set is tested.

[0031] In a second aspect, an embodiment of the present invention provides a test case management device, including: a determination module, an acquisition module, a generation module and a test module;

[0032] The determination module is used to determine the test category according to the product functions that need to be tested in the project, and determine at least one test factor, at least one observation factor, and at least one sub-item of each test factor in a preset factor library;

[0033] The acquisition module is used to determine the configuration information of the required test case according to the test category, the test factor and at least one sub-item of each test factor, and the observation factor;

[0034] The generation module is used to match the configuration information of the required test cases with the configuration information of the test cases in the preset test case library, filter the successfully matched test cases from the test case library, and obtain the test case set required for this test;

[0035] The testing module is used to test the product function using the test cases in the test case set.

[0036] In a third aspect, an embodiment of the present invention provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the first aspect or any possible implementation manner of the first aspect are implemented.

[0037] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect or any possible implementation method of the first aspect are implemented.

[0038] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0039] The method provided by the embodiment of the present invention improves the uniformity and standardization of test cases by pre-defining multiple test categories for the project, and sets and manages the test factors and observation factors required for the project through a preset factor library. When a product function of the project needs to be tested, the configuration information of the test cases required for testing the product function can be obtained by determining the test category, determining at least one test factor and at least one sub-item of each test factor in the preset factor library, and determining at least one observation factor. Based on the configuration information, all test cases required for testing the product function can be obtained by matching in the preset test case library, and the product function can be tested. The method provided by the embodiment of the present invention can realize the effective management of test factors and observation factors, improve test efficiency, improve the matching degree between test cases and product functions, and thus improve test accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0041] Figure 1 is a flow chart of an implementation of a test case management method provided by an embodiment of the present invention;

[0042] Figure 2 is a schematic diagram of the structure of a test case management device provided by an embodiment of the present invention;

[0043] Figure 3 is a schematic diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0045] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0046] See also Figure 1 , which shows an implementation flow chart of the test case management method provided by an embodiment of the present invention, and is described in detail as follows:

[0047] In step 101, a test category is determined according to a product function that needs to be tested in a project, and at least one test factor, at least one observation factor, and at least one sub-item of each test factor are determined in a preset factor library.

[0048] In the embodiment of the present invention, a project is used to represent software that needs to be tested.

[0049] Optionally, a project management module is created in advance to create and manage projects that need to be tested, including creation, modification, deletion, and viewing of projects.

[0050] In the embodiment of the present invention, since the standardization, uniformity and practicality of test case management are taken into consideration, multiple test categories are preset by analyzing the project, and the test categories respectively summarize the test method, test content, and judgment criteria.

[0051] Each test method has corresponding test content and judgment results. Operate the program under the specified conditions to generate standardized test cases, which are convenient for users to use and operate the system with the least manpower, material resources and time, while also ensuring the stability and efficiency of the system. When testing a product function, determine the test category corresponding to the product function through the product function, and use the test category as a necessary parameter of the test case configuration information, which not only ensures the integrity of the test case, but also improves the matching degree between the test scenario and the product function, while reducing the workload of the test and improving the test efficiency.

[0052] Test factors are used to describe different test dimensions, such as vehicle load status, clutch status, or road status. The sub-items of a test factor are used to describe different states under a test dimension. For example, when the test factor is vehicle load status, its sub-items can be half-loaded, empty, or fully loaded.

[0053] In the embodiment of the present invention, the preset factor library may uniquely correspond to one project, or multiple projects may share one preset factor library. For example, when multiple projects are different versions of the same software, they may share the preset factor library.

[0054] In the process of software testing, the product function of the project is generally tested through test cases. Different test cases are required for different test scenarios. In the embodiment of the present invention, each scenario parameter is represented by a test factor.

[0055] For example, the project is a vehicle intelligent driving system, and the product function to be tested is ABS (antilock brake system), and the test factors can be vehicle load status, clutch status, road surface status, etc.

[0056] In the embodiment of the present invention, a factor library is pre-set, that is, the preset factor library in this step. The factor library includes all test factors pre-set according to the items to be tested.

[0057] In an embodiment of the present invention, a test case configuration module and a test case management module are optionally pre-set. The test case management module is used to manage the test case library, including the creation, modification, deletion and viewing of test cases. Each test case corresponds to a configuration information, and the configuration information includes a test factor, an observation factor and a test category. The test case configuration information is used to generate a test case, that is, according to a test case configuration information, a test case can be uniquely generated / obtained from the test case library. The test case configuration module is used to manage the test case configuration information, including the creation, modification, deletion and viewing of the test case configuration information.

[0058] In the embodiment of the present invention, multiple test categories are predefined according to the project to be tested. When a product function in the project needs to be tested, the corresponding test category, observation factor and test factor are determined according to the product function, wherein the test factor refers to the factor selected from the preset factor library, and the other unselected factors in the preset factor library are the observation factors.

[0059] For each test factor, at least one sub-item is selected for the test factor. For example, a test factor is used to represent a scenario parameter, and multiple different types of situations are distinguished under the scenario parameter. Then the test factor includes a sub-item corresponding to each situation. For example, the test factor includes 10 sub-items. In this step, after a test factor is determined according to the product function, at least one sub-item corresponding to the test factor is determined according to the product function. For example, a test factor includes 10 sub-items. In this step, after the test factor is determined, 3 sub-items are selected according to the product function. Then, in this step, the test factor corresponds to 3 sub-items.

[0060] In the embodiment of the present invention, the test factor in the configuration information is specifically a sub-item of the test factor.

[0061] In step 102, configuration information of the required test case is determined according to the test category, the test factor, at least one sub-item of each test factor, and the observation factor.

[0062] Optionally, take out each sub-item of each test factor, combine the test factor and its associated sub-items to obtain a test item group; combine the test item groups of different test factors to obtain a test factor group; add the test category and observation factor to each test factor group to obtain a test case group, and use the obtained test case group as the configuration information of the required test case. Each test item group represents a different state of the same test dimension.

[0063] In the embodiment of the present invention, for example, the product function requires various tests, so it is necessary to generate test cases containing different conditions. The preset factor table includes n factors, each factor includes at least one sub-item. Through step 101, according to the product function that needs to be tested in the project, it is necessary to select w factors from the n factors as test factors, and the other factors as observation factors. Among the w test factors, each test factor selects at least one sub-item. For example, the first test factor is selected with a sub-items, the second test factor is selected with b sub-items... The wth test factor is selected with t sub-items, then through the combination algorithm, the number of test cases generated is count = a × b ... × t.

[0064] In a specific example, the product function to be tested in the project is ABS (antilock brake system). According to the product function, the test category is determined to be uniform low attachment. In the preset factor library, the selected factors, namely the test factors, include 3 items, namely vehicle load state, clutch state and road state. The first test factor, vehicle load state, has 3 sub-items selected, namely half load, no load and full load; the second test factor, clutch state, has 2 sub-items selected, namely neutral brake and gear brake; the third test factor has 4 sub-items selected, namely cement road, asphalt road, gravel road and long downhill.

[0065] Then the number of test cases generated is count=3×2×4=24.

[0066] The unselected factors in the preset factor library are collectively referred to as observation factors, and the configuration information of the 24 test cases are:

[0067] 1. Uniform low attachment, observation factor, vehicle load state (half load), clutch state (neutral brake), road surface state (cement road);

[0068] 2. Uniform low attachment, observation factor, vehicle load state (half load), clutch state (neutral brake), road surface state (asphalt road);

[0069] 3. Uniform low attachment, observation factor, vehicle load state (half load), clutch state (neutral brake), road surface state (gravel road);

[0070] 4. Uniform low attachment, observation factor, vehicle load status (half load), clutch status (neutral brake), road surface status (long downhill slope);

[0071] 5. Uniform low attachment, observation factor, vehicle load status (half load), clutch status (brake with gear), road surface status (cement road);

[0072] 6. Uniform low attachment, observation factor, vehicle load status (half load), clutch status (brake with gear), road surface status (asphalt road);

[0073] 7. Uniform low attachment, observation factor, vehicle load status (half load), clutch status (brake with gear), road surface status (gravel road);

[0074] 8. Uniform low attachment, observation factor, vehicle load status (half load), clutch status (brake with gear), road surface status (long downhill slope);

[0075] 9. Uniform low adhesion, observation factor, vehicle load status (no load), clutch status (neutral brake), road surface status (cement road);

[0076] 10. Uniform low attachment, observation factor, vehicle load status (no load), clutch status (neutral brake), road surface status (asphalt road);

[0077] 11. Uniform low adhesion, observation factor, vehicle load status (no load), clutch status (neutral brake), road surface status (gravel road);

[0078] 12. Uniform low attachment, observation factor, vehicle load status (no load), clutch status (neutral brake), road surface status (long downhill slope);

[0079] 13. Uniform low attachment, observation factor, vehicle load status (no load), clutch status (with gear and brake), road surface status (cement road);

[0080] 14. Uniform low adhesion, observation factor, vehicle load status (no load), clutch status (brake with gear), road surface status (asphalt road);

[0081] 15. Uniform low attachment, observation factor, vehicle load status (no load), clutch status (brake with gear), road surface status (gravel road);

[0082] 16. Uniform low attachment, observation factor, vehicle load status (no load), clutch status (brake with gear), road surface status (long downhill slope);

[0083] 17. Uniform low adhesion, observation factor, vehicle load status (full load), clutch status (neutral brake), road surface status (cement road);

[0084] 18. Uniform low adhesion, observation factor, vehicle load status (full load), clutch status (neutral brake), road surface status (asphalt road);

[0085] 19. Uniform low adhesion, observation factor, vehicle load status (full load), clutch status (neutral brake), road surface status (gravel road);

[0086] 20. Uniform low attachment, observation factor, vehicle load status (full load), clutch status (neutral brake), road surface status (long downhill slope);

[0087] 21. Uniform low adhesion, observation factor, vehicle load status (full load), clutch status (brake with gear), road surface status (cement road);

[0088] 22. Uniform low adhesion, observation factor, vehicle load status (full load), clutch status (brake with gear), road surface status (asphalt road);

[0089] 23. Uniform low adhesion, observation factor, vehicle load status (full load), clutch status (brake with gear), road surface status (gravel road);

[0090] 24. Uniform low adhesion, observation factor, vehicle load status (fully loaded), clutch status (brake with gear), road surface status (long downhill slope).

[0091] Thus, 24 test scenarios are obtained, and each test scenario corresponds to a test case.

[0092] In step 103, the configuration information of the required test case is matched with the configuration information of the test case in the preset test case library, and the successfully matched test cases are screened from the test case library to obtain the test case set required for this test.

[0093] In the embodiment of the present invention, optionally, the test case library is managed by a test case management module to implement functions such as viewing and editing of each test case in the test case library.

[0094] After the configuration information of the test case is obtained in step 102, a set of test cases required for testing the function of the product to be tested can be obtained through a preset test case library.

[0095] The test case set obtained through steps 101 to 103 is obtained through a combination algorithm based on each selected sub-item in the test factor, thereby achieving full scenario coverage and ensuring the coverage rate of the functional test of the product.

[0096] In step 104, the product functions are tested using the test cases in the test case set.

[0097] By testing the product function with each test case in the test case set, a higher coverage rate of the product function test can be achieved.

[0098] Optionally, a test execution management module may be pre-set, and test execution may be created, modified, deleted, and viewed through the test execution management module. The process of testing a product function through steps 101 to 104 may be regarded as one test execution.

[0099] Optionally, for any test case, the test case includes input data, operation steps and expected results, and testing each test case in the test case set includes: obtaining test results based on the input data and operation steps; judging the test results of the test case based on the test results and expected results, and the test results include test success or test failure; generating a test report based on the execution results of this test, and the test report includes configuration information and test results for each test case in the test case set.

[0100] In an optional implementation, for any test case in the test case set, if the test is successful, the test of the test case is completed; if the test fails, the test case is placed in a failed case library; for any test case in the failed case library, determine whether to retest the test case; if the test case is retested and the retest result is a successful test, restore the test case to the test case library.

[0101] Optionally, a failure case management module is pre-set to manage the failure case information found during the test, including review and retesting of the failure cases.

[0102] Optionally, a statistics management module can be pre-set to manage project test progress and statistically analyze test data, including test report generation, export and viewing, etc. This enables stable and efficient work planning for testers, information-based connection and efficient execution of processes between department members, management and tracking of test cases, and comprehensive quality tracking and tracing of project product functions.

[0103] Optionally, a user management module can be pre-set to manage user information in the system, including adding, editing, and changing passwords of users, and to implement user authority control functions. It can perform refined authority control on system functions and data according to the roles and responsibilities of different users to ensure the security and stability of the system. For example, the two roles of administrator and user are distinguished, and the administrator can set the authority of the user. For example, a user can only edit and use the test cases of the project corresponding to the user, and only have the authority to view the test cases of other projects.

[0104] Furthermore, due to the combinatorial algorithm provided by the embodiment of the present invention, when there are many test factors or many sub-items of the test factors are selected, the number of test cases in the test case set for testing a product function is too large. When the number of test cases expands to a certain number, the test progress will be out of control.

[0105] To solve this problem and improve testing efficiency, based on the invention concept of giving priority to testing important test scenarios and then testing secondary test scenarios, the fault leakage rate can be reduced within a fixed test period. In an optional implementation, for any test factor, each sub-item of the test factor corresponds to a preset weight, and testing each test case in a test case set includes: for any test case in the test case set, determining the weight of the test case according to the preset weight of a sub-item in each test factor in the configuration information of the test case; sorting the test cases in the test case set in order of weight from large to small to obtain a sorting result; and testing the test cases in the test case set in sequence according to the sorting result.

[0106] According to the product function to be tested, the selected sub-item of each test factor corresponds to a preset weight. The preset weight is set based on that, according to the product function, the important scenario corresponds to a larger weight, and the secondary scenario corresponds to a smaller weight.

[0107] Combining the above examples, 24 test scenarios are obtained, each of which corresponds to a weight.

[0108] Sorting is done in descending order of weight, that is, in descending order of importance of the test scenarios. According to the sorting results, the test cases in the test case set are tested in sequence, so that the test cases of the important test scenarios are tested before the test cases of the less important test scenarios.

[0109] In another optional implementation, when the test cycle is limited, the first preset proportion of test cases in the sorting results are tested. For example, 80% of the test cases in the sorting results are tested so that the test cases of important test scenarios are tested, and the fault leakage rate is reduced when the test time is fixed.

[0110] In another optional implementation, for any test case in the test case library, the test case also includes identification information, and the identification information is used to identify the test case as a core test case, or to identify the test case as a non-core test case, and testing each test case in the test case set includes: dividing the test case set into a subset of core test cases and a subset of non-core test cases according to the identification information of each test case in the test case combination; determining the test order of the test cases in the test case set according to a second preset ratio, a subset of core test cases, and a subset of non-core test cases, and the second preset ratio is used to indicate testing a second preset ratio of test cases in the test case set.

[0111] For example, the second preset ratio is 70%. If the ratio of the number of test cases in the core test case set to the number of test cases in the test case set is lower than 70%, after all the test cases in the core test case set are tested, some test cases are selected from the non-core test case set for testing, so that the total ratio of tested test cases is higher than 70% and all core test cases are tested.

[0112] If the ratio of the number of test cases in the core test case set to the number of test cases in the test case set is higher than 70%, some test cases are selected from the core test cases for testing so that the total ratio of tested test cases is higher than 70% and all the tested test cases are core test cases.

[0113] The method provided by the embodiment of the present invention predefines a variety of test categories for the project to improve the uniformity and standardization of the test cases, and sets and manages the test factors and observation factors required for the project through the preset factor library. When a product function of the project needs to be tested, the configuration information of the test case required for testing the product function can be obtained by determining the test category, determining at least one test factor and at least one sub-item of each test factor in the preset factor library, and determining at least one observation factor. Based on the configuration information, all the test cases required for testing the product function can be obtained by matching in the preset test case library, and the product function is tested. Through the method provided by the embodiment of the present invention, effective management of test factors and observation factors can be achieved, test efficiency can be improved, the matching degree between test cases and product functions can be improved, and test accuracy can be improved. It should be understood that the size of the sequence number of each step in the above embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0114] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.

[0115] Figure 2 The structure diagram of the test case management device provided by the embodiment of the present invention is shown. For the convenience of description, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:

[0116] like Figure 2 As shown, the test case management device 2 includes: a determination module 21, an acquisition module 22, a generation module 23 and a test module 24;

[0117] A determination module 21, used to determine the test category according to the product functions to be tested in the project, and to determine at least one test factor, at least one observation factor, and at least one sub-item of each test factor in a preset factor library;

[0118] An acquisition module 22, used to determine the configuration information of the required test case according to the test category, the test factor and at least one sub-item of each test factor and the observation factor;

[0119] A generating module 23 is used to match the configuration information of the required test case with the configuration information of the test case in the preset test case library, and filter the successfully matched test cases from the test case library to obtain the test case set required for this test;

[0120] The testing module 24 is used to test the product functions using the test cases in the test case set.

[0121] The method provided by the embodiment of the present invention improves the uniformity and standardization of test cases by pre-defining multiple test categories for the project, and sets and manages the test factors and observation factors required for the project through a preset factor library. When a product function of the project needs to be tested, the configuration information of the test cases required for testing the product function can be obtained by determining the test category, determining at least one test factor and at least one sub-item of each test factor in the preset factor library, and determining at least one observation factor. Based on the configuration information, all test cases required for testing the product function can be obtained by matching in the preset test case library, and the product function can be tested. The method provided by the embodiment of the present invention can realize the effective management of test factors and observation factors, improve test efficiency, improve the matching degree between test cases and product functions, and thus improve test accuracy. In a possible implementation, the acquisition module 22 is also used to:

[0122] Take out each sub-item of each test factor, combine the test factor and its associated sub-items, and obtain a test item group;

[0123] Combine the test item groups of different test factors to obtain the test factor group;

[0124] Add test categories and observation factors to each test factor group to obtain a test case group, and use the obtained test case group as the configuration information of the required test case.

[0125] In a possible implementation, for any test case, the test case includes input data, operation steps and expected results, and the test module 24 is used to:

[0126] Obtaining test results according to the input data and the operation steps;

[0127] Determine the test result of the test case according to the test result and the expected result, wherein the test result includes a test success or a test failure;

[0128] A test report is generated according to the execution result of this test, and the test report includes configuration information and test results for each test case in the test case set.

[0129] In a possible implementation, the testing module 24 is further configured to:

[0130] For any test case in the test case set, if the test succeeds, the test of the test case is ended; if the test fails, the test case is put into the failed case library;

[0131] For any test case in the failed case library, determine whether to retest the test case;

[0132] If the test case is retested and the retest result is that the test is successful, the test case is restored to the test case library.

[0133] In a possible implementation, for any test factor, each sub-item of the test factor corresponds to a preset weight, and the test module 24 is further configured to:

[0134] For any test case in the test case set, determining a weight of the test case according to a preset weight of a sub-item in each test factor in the configuration information of the test case;

[0135] Sorting the test cases in the test case set in descending order of weight to obtain a sorting result;

[0136] According to the sorting result, the test cases in the test case set are tested in sequence.

[0137] In a possible implementation, the testing module 24 is further configured to:

[0138] A first preset proportion of test cases in the sorting results are tested.

[0139] In a possible implementation, for any test case in the test case library, the test case further includes identification information, where the identification information is used to identify the test case as a core test case or to identify the test case as a non-core test case, and the test module 24 is further used to:

[0140] According to the identification information of each test case in the test case combination, the test case set is divided into a subset of core test cases and a subset of non-core test cases;

[0141] The test order of the test cases in the test case set is determined according to a second preset ratio, the subset of core test cases and the subset of non-core test cases, wherein the second preset ratio is used to indicate that a second preset ratio of test cases in the test case set is tested.

[0142] The test case management device provided in this embodiment can be used to execute the above-mentioned test case management method embodiment. Its implementation principle and technical effects are similar, and this embodiment will not be repeated here.

[0143] Figure 3 FIG. 1 is a schematic diagram of a terminal provided by an embodiment of the present invention. Figure 3 As shown, the terminal 3 of this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30. When the processor 30 executes the computer program 32, the steps in the above-mentioned test case management method embodiments are implemented, for example Figure 1 Alternatively, when the processor 30 executes the computer program 32, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 2 The functions of modules 21 to 24 are shown.

[0144] Exemplarily, the computer program 32 may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 30 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 32 in the terminal 3.

[0145] The terminal 3 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal 3 may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of terminal 3 and does not constitute a limitation on terminal 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.

[0146] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0147] The memory 31 may be an internal storage unit of the terminal 3, such as a hard disk or memory of the terminal 3. The memory 31 may also be an external storage device of the terminal 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal 3. Further, the memory 31 may also include both an internal storage unit of the terminal 3 and an external storage device. The memory 31 is used to store the computer program and other programs and data required by the terminal. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0148] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0149] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0150] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0151] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0153] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0154] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned test case management method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0155] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A test case management method, characterized in that: include: Determine the test category according to the product functions that need to be tested in the project, and determine at least one test factor, at least one observation factor, and at least one sub-item of each test factor in the preset factor library; Determine configuration information of required test cases according to the test category, the test factor and at least one sub-item of each test factor, and the observation factor; Match the configuration information of the required test cases with the configuration information of the test cases in the preset test case library, filter the successfully matched test cases from the test case library, and obtain the test case set required for this test; The product function is tested using the test cases in the test case set.

2. The method according to claim 1, characterized in that The step of determining the configuration information test category of the required test case according to the test category, the test factor, at least one sub-item of each test factor, and the observation factor comprises: Take out each sub-item of each test factor, combine the test factor and its associated sub-items, and obtain a test item group; Combine the test item groups of different test factors to obtain the test factor group; Add test categories and observation factors to each test factor group to obtain a test case group, and use the obtained test case group as the configuration information of the required test case.

3. The method according to claim 1, characterized in that For any test case, the test case includes input data, operation steps and expected results, and the testing of the product function using the test case in the test case set includes: Obtaining test results according to the input data and the operation steps; Determine the test result of the test case according to the test result and the expected result, wherein the test result includes a test success or a test failure; A test report is generated according to the execution result of this test, and the test report includes configuration information and test results for each test case in the test case set.

4. The method according to claim 1, characterized in that: After testing the product function using the test cases in the test case set, the method further includes: For any test case in the test case set, if the test succeeds, the test of the test case is ended; if the test fails, the test case is put into the failed case library; For any test case in the failed case library, determine whether to retest the test case; If the test case is retested and the retest result is that the test is successful, the test case is restored to the test case library.

5. The method according to any one of claims 1 to 4, characterized in that: For any test factor, each sub-item of the test factor corresponds to a preset weight, and the testing of the product function using the test cases in the test case set includes: For any test case in the test case set, determining a weight of the test case according to a preset weight of a sub-item in each test factor in the configuration information of the test case; Sorting the test cases in the test case set in descending order of weight to obtain a sorting result; According to the sorting result, the test cases in the test case set are tested in sequence.

6. The method according to claim 5, characterized in that The testing of the test cases in the test case set in sequence according to the sorting result comprises: A first preset proportion of test cases in the sorting results are tested.

7. The method according to any one of claims 1 to 4, characterized in that: For any test case in the test case library, the test case further includes identification information, where the identification information is used to identify the test case as a core test case, or to identify the test case as a non-core test case, and the testing of the product function using the test case in the test case set includes: According to the identification information of each test case in the test case combination, the test case set is divided into a subset of core test cases and a subset of non-core test cases; The test order of the test cases in the test case set is determined according to a second preset ratio, the subset of core test cases and the subset of non-core test cases, wherein the second preset ratio is used to indicate that a second preset ratio of test cases in the test case set is tested.

8. A test case management device, characterized in that: include: Determine modules, obtain modules, generate modules and test modules; The determination module is used to determine the test category according to the product functions that need to be tested in the project, and determine at least one test factor, at least one observation factor, and at least one sub-item of each test factor in a preset factor library; The acquisition module is used to determine the configuration information of the required test case according to the test category, the test factor and at least one sub-item of each test factor, and the observation factor; The generation module is used to match the configuration information of the required test cases with the configuration information of the test cases in the preset test case library, filter the successfully matched test cases from the test case library, and obtain the test case set required for this test; The testing module is used to test the product function using the test cases in the test case set.

9. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method as claimed in any one of claims 1 to 7 are implemented.