Test case management method and device, electronic equipment and storage medium
By adopting a test case management method based on the business map in software testing, the duplicate and failure test cases caused by version iteration are solved, the accuracy and effectiveness of test cases are achieved, and the R&D testing efficiency is improved.
Patent Information
- Application Number
- CN202510301826.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-06-13
AI Technical Summary
During the software testing process, version iteration leads to a large number of repeated test cases, no one maintains the failed test cases, and it is impossible to quickly and accurately select effective test cases during regression testing.
Using a test case management method based on the business map, by receiving test requirements, determining the location of the system under test functions in the business map, obtaining associated existing test cases, confirming whether or not it needs to be updated or added, and creating a task plan to ensure the effectiveness of the test cases.
It reduces the generation of repeated test cases, improves the testers' global system perspective, ensures the accuracy and effectiveness of test cases, avoids the problem of missing tests for extended functions, and improves the R&D testing efficiency.
Smart Images

Figure CN120144463A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application systems, and more particularly, to a method, device, electronic device, and storage medium for test case management. Background Art
[0002] A test case is a set of detailed steps or instructions used to verify the behavior, performance, security, and correctness of a software application, system, or product. It is a basic element in the testing process and aims to improve software quality and reliability. In the agile development mode, for the function to be tested, testers first write test cases, then create a test plan, and execute the test plan. When the same function iterates multiple versions, especially when the testers change, it is easier and more time-saving to create new test cases than to select the test cases required for this iterative version from a large number of unordered test cases.
[0003] The inventors found that this led to the following problems in the test case management system: 1. A large number of duplicate test cases; 2. Some test cases have become invalid with version iteration and are not maintained; 3. There is no way to archive test cases from a global business perspective, and there is no solution to the problem of missed testing of extended functions during functional regression testing. For example, in a certain iterative version, a second function is added on the basis of the existing first function. During the testing of this version, since there is no impact on the existing first function, only the test cases corresponding to the second function are added. In subsequent iterative versions, when the first function is changed, the test cases related to the second function are forgotten to be regressed.
[0004] In the test case management system, when using related technologies to remove duplicate test cases, word segmentation technology is basically used to screen out test cases with duplicate content copywriting; however, whether they can be deleted still requires manual confirmation, which is a means of sacrificing human resources to save storage resources. The association between test cases and the function points of the system under test is basically achieved by means such as tags and remarks, and there is no systematic and global perspective function and test case association topology diagram. There is no effective solution to problems such as unmaintained invalid cases and unregressed extended functions.
[0005] Therefore, there is an urgent need for a method or device that can manage test cases in combination with the actual business functions to avoid problems such as a large number of duplicate test cases generated with version iteration, unmaintained invalid test cases, and missed testing of extended functions during regression testing. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to avoid problems such as a large number of duplicate test cases generated during version iteration, unmaintained invalid test cases, and inability to quickly and accurately select effective test cases during the regression testing of existing functions.
[0007] To solve the above technical problems, according to one aspect of the present invention, a method for test case management is provided. Among them, the test case management method is implemented based on a business big picture. The business big picture contains multiple functions to be tested, and each function contains multiple test cases. The test case management method includes the following steps: Step 1, receive a test requirement, determine whether the function of the system under test corresponding to the test requirement exists in the functions to be tested in the business big picture, locate the function node ID. If it exists, this function of the system under test belongs to the existing function, and enter step S3; Step 3, obtain the function node ID of the existing function corresponding to this function of the system under test, and through the business test case relationship business_testcase_relationship used to represent the association relationship between the function node and the test case, obtain the existing test case ID associated with the function node ID, and then find the corresponding test case record in the test case table through the test case ID, that is, find the existing test cases associated with this function of the system under test, confirm whether the test cases need to be updated. If the test cases need to be updated, update the test cases; if the test cases do not need to be updated, determine whether new test cases need to be added. If new test cases need to be added, enter step 4. If new test cases do not need to be added, enter step 5; Step 4, create a test case. After finding the function node ID corresponding to the function under test in the business big picture, add a new test case record in the test case table, and add a record of the association relationship between this function node and the test case in the business test case relationship business_testcase_relationship table; after the new use case is completed, if a task plan needs to be created, enter step 5; Step 5, create a task plan. Select the test cases corresponding to this function and its associated functions from the business big picture according to the function under test, fill in the start time of the task plan, and add a new task plan record. Among them, the new task plan includes: storing the function node in the business big picture business_map corresponding to the function under test, the selected test cases, and the planned start time of the task plan.
[0008] According to an embodiment of the present invention, the test case management method may further include: Step 2, in Step 1, if the function of the system under test does not belong to the existing function and is a new function, then execute Step 2. Step 2, find the superior function to which this function belongs in the business big picture, and determine whether this function is added to the business big picture as a leaf node; if it is a leaf node, directly add this function to the business big picture as a leaf node, and add a record corresponding to this leaf node in the business big picture business_map table; after the function is added, enter step 4.
[0009] According to an embodiment of the present invention, step 1 may include the following steps: S11. Determine whether the upper and lower functions of the function node need to be adjusted. If the upper and lower functions need to be adjusted, proceed to the next step; S12. Update the ids of each node in the complete path from the root node of the function node to its upper-level node, including parent_id, level, parents_trace, and the node names parents_trace_info of each node in the complete path from the root node to its upper-level node; and sequentially update the information of all descendant nodes of the function node, including level, parents_trace, and parents_trace_info; S13. If a certain function node in the business big picture needs to be discarded in this iterative version, update the value of the is_valid field indicating whether it is valid for the corresponding records of the function node and its child nodes in the business big picture business_map table to invalid. Update the business test case relationship business_testcase_relationship table, and sequentially set the value of the is_valid field indicating whether the association relationship record between the function node and its child nodes and their associated test cases to invalid. At the same time, find the test case ids associated with the function node and its child nodes through the business test case relationship business_testcase_relationship table. If these test cases are not associated with other function nodes, search for the records in the test case table through the test case ids, and set the value of the is_valid field of these records to invalid; S14. After finding the location of the function of the system under test in the business big picture, proceed to step 3.
[0010] According to an embodiment of the present invention, in step 2, if the function of the system under test is not a leaf node, the upper and lower nodes of the function can be found, and a corresponding record of the node is added in the business big picture business_map, including: setting the parent_id field of the node to the id of the upper-level node, and sequentially setting the fields including parents_trace and parents_trace_info; then, update the parent node of the lower-level node to this function node. The business big picture management module will automatically update the level of the lower-level node = the level of this function node + 1, the parents_trace field to the ids of each node in the complete path from the root node to this function node, and the parents_trace_info field to the names of each node in the complete path from the root node to this function node. And recursively update the fields including leve1, parents_trace, and parents_trace_info of the descendant nodes.
[0011] According to an embodiment of the present invention, in step 3, when it is confirmed that a test case needs to be updated, the following steps may be included: S31. When it is necessary to update the test case description information, update the test case details corresponding to the test case ID in the test case table; S32. When it is necessary to update the binding relationship between the test case and the function node, search for the corresponding record in the business_testcase_relationship table through the test case ID and the function node ID, and update the value of the is_valid field to invalid; at the same time, search for the record corresponding to the test case in the business test case relationship business_testcase_relationship table through the test case ID. If no other function references this test case, update the value of the is_valid field indicating whether the test case is valid in the test case table to invalid, that is, logically delete the invalid test case.
[0012] According to an embodiment of the present invention, step 5 may further include: task execution, periodically scanning the execution plan, and executing the test case according to the planned start time.
[0013] According to a second aspect of the present invention, there is provided an apparatus for test case management, which includes:
[0014] Determine the functional modules of the system under test, which is used to receive test requirements, determine whether the functions of the system under test corresponding to the test requirements exist in the functions to be tested in the business big picture, locate the function node ID. If it exists, the function of the system under test belongs to the stock function and enters the stock function processing module; the stock function processing module is used to obtain the function node ID of the stock function corresponding to the function of the system under test, and through the business test case relationship business_testcase_relationship representing the association relationship between the function node and the test case, obtain the existing test case IDs associated with the function node ID, and then find the corresponding test case records in the test case table through the test case IDs, that is, find the existing test cases associated with the function of the system under test, confirm whether the test cases need to be updated. If the test cases need to be updated, update the test cases; if the test cases do not need to be updated, determine whether new test cases need to be added. If new test cases need to be added, enter the new test case module. If new test cases do not need to be added, enter the create task plan module; the new test case module is used to create test cases. After finding the function node ID corresponding to the function under test in the business big picture, add a new test case record in the test case table and add a record of the association relationship between the function node and the test case in the business test case relationship business_testcase_relationship table; after the new test case is completed, if a task plan needs to be created, enter the create task plan module; the create task plan module is used to create a task plan, select the test cases corresponding to the function and its associated functions from the business big picture according to the function under test, fill in the start time of the task plan, and add a new task plan record. Among them, the new task plan includes: storing the function nodes in the business big picture business_map corresponding to the function under test, the selected test cases, and the planned start time of the task plan.
[0015] According to an embodiment of the present invention, the test case management device may further include: a new function processing module, which is used to find the superior function to which the function belongs in the business big picture and determine whether the function is added to the business big picture as a leaf node; if it is a leaf node, directly add the function to the business big picture as a leaf node and add a record corresponding to the leaf node in the business big picture business_map table; after the function addition is completed, enter the new test case module.
[0016] According to a third aspect of the present invention, there is provided an electronic device, including: a memory, a processor, and a test case management program stored on the memory and executable on the processor. When the test case management program is executed by the processor, the steps of the above test case management method are implemented.
[0017] According to a fourth aspect of the present invention, there is provided a computer storage medium, on which a test case management program is stored. When the test case management program is executed by a processor, the steps of the above-mentioned test case management method are implemented.
[0018] Compared with the prior art, the technical solutions provided by the embodiments of the present invention can at least achieve the following beneficial effects:
[0019] The method or device for test case management of the present invention, by adding a business big picture function module, enables testers to maintain associated test cases according to the function under test, reduces the generation of duplicate test cases, enhances the system global perspective of testers, ensures the accuracy and effectiveness of test cases, and at the same time avoids the problem of missed testing of extended functions, improving the R & D test efficiency.
[0020] The method for test case management of the present invention, by designing a new process, for new functions, creating business big picture function nodes precedes creating test cases, and for changed existing functions, updating test cases precedes adding new test cases.
[0021] The method and device for test case management of the present invention can effectively solve the problem of waste of storage resources caused by a large number of duplicate test cases, and effectively improve the reuse rate of test cases; thus ensuring the accuracy and effectiveness of stored test cases.
[0022] The method and device for test case management of the present invention effectively associate functions with test cases through the business big picture, ensuring the effectiveness and comprehensiveness of test cases corresponding to each function in the test case management system; providing a solution for accurately finding function-associated test cases. And it can save the time for testers to find test cases corresponding to a certain function and its extended functions.
[0023] By adopting the method and device for test case management of the present invention, the problems of missing function test points and test cases during regression testing can be avoided; various production incidents caused thereby are avoided, greatly improving the R & D test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description only relate to some embodiments of the present invention and do not limit the present invention.
[0025] Figure 1 is a flowchart showing the method for test case management according to an embodiment of the present invention; Figure 2a is a topological structure diagram of a previous embodiment before adopting the test case management method of the present invention; Figure 2b is Figure 2aData structure design diagram; Figure 2c It is the topology diagram of this embodiment after adopting the test case management method of the present invention; Figure 2d is Figure 2c Data structure design diagram; Figure 3 It is a schematic diagram showing the correspondence between the business big picture and test cases according to an embodiment of the present invention. Detailed implementation manners
[0026] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the described embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.
[0027] Unless otherwise defined, the technical terms or scientific terms used herein shall have the ordinary meanings understood by those of ordinary skill in the art to which the present invention belongs. The "first", "second" and similar terms used in the specification and claims of this patent application of the present invention do not denote any order, quantity or importance, but are only used to distinguish different components. Similarly, the terms such as "a" or "one" do not denote a quantity limitation, but mean that there is at least one.
[0028] Figure 1 It is a flowchart showing the method for test case management according to an embodiment of the present invention; Figure 3 It is a schematic diagram showing the correspondence between the business big picture and test cases according to an embodiment of the present invention.
[0029] As Figure 1 and Figure 3 shown, the method for test case management is implemented based on the business big picture. Among them, the business big picture includes multiple functions to be tested, and each function includes multiple test cases. The method for test case management includes the following steps:
[0030] Step 1: Receive a test requirement, determine whether the function of the system under test corresponding to the test requirement exists in the functions to be tested in the business big picture, locate the function node ID. If it exists, this function of the system under test belongs to the existing function, and enter step S3;
[0031] Step 3: Obtain the function node ID of the existing function corresponding to the function of the system under test. Through the business test case relationship business_testcase_relationship used to represent the association relationship between function nodes and test cases, obtain the existing test case IDs associated with the function node ID. Then, find the corresponding test case records in the test case table through the test case IDs, that is, find the existing test cases associated with the function of the system under test, and confirm whether the test cases need to be updated. If the test cases need to be updated, update the test cases; if the test cases do not need to be updated, determine whether new test cases need to be added. If new test cases need to be added, go to Step 4; if new test cases do not need to be added, go to Step 5;
[0032] Step 4: Create test cases. After finding the function node ID corresponding to the function under test in the business big picture, add a new test case record in the test case table, and add a record of the association relationship between the function node and the test case in the business test case relationship business_testcase_relationship table; after the new use case is completed, if a task plan needs to be created, go to Step 5;
[0033] Step 5: Create a task plan. Select the test cases corresponding to the function and its associated functions from the business big picture according to the function under test, fill in the start time of the task plan, and add a new task plan record. Among them, the new task plan includes: storing the function nodes in the business big picture business_map corresponding to the function under test, the selected test cases, and the planned start time of the task plan.
[0034] The method or device for test case management of the present invention, by adding a business big picture function module, enables testers to maintain associated test cases according to the function under test, reduces the generation of duplicate use cases, enhances the system-wide perspective of testers, ensures the accuracy and effectiveness of test cases, and at the same time avoids the problem of missed testing of extended functions, improving the R & D test efficiency.
[0035] According to one or some embodiments of the present invention, the method for test case management further includes: Step 2. In Step 1, if the function of the system under test does not belong to the existing functions and is a new function, then execute Step 2.
[0036] Step 2: Find the superior function to which the function belongs in the business big picture, and determine whether the function is added to the business big picture as a leaf node; if it is a leaf node, directly add the function to the business big picture as a leaf node, and add a record corresponding to the leaf node in the business big picture business_map table; after the function is added, go to Step 4.
[0037] The test case management method of the present invention, through designing a new process, for newly added functions, creates business big picture function nodes prior to creating test cases, and for modified existing functions, updates test cases earlier than adding new test cases.
[0038] According to one or some embodiments of the present invention, step 1 includes the following steps:
[0039] S11. Determine whether the upper and lower level functions of the function node need to be adjusted. When the upper and lower level functions need to be adjusted, proceed to the next step;
[0040] S12. Update the ids of each node in the complete path from the root node of the function node to its upper level node, including parent_id, level, parents_trace, and the names of each node parents_trace_info in the complete path from the root node to its upper level node; and sequentially update the information of all descendant nodes of this function node, including level, parents_trace, and parents_trace_info;
[0041] S13. If a certain function node in the business big picture needs to be discarded in this iterative version, update the value of the is_valid field indicating whether it is valid for the corresponding records of this function node and its child nodes in the business big picture business_map table to invalid. Update the business test case relationship business_testcase_relationship table, and sequentially set the value of the is_valid field indicating whether the association relationship records between this function node and its child nodes and their associated test cases to invalid. At the same time, find the test case ids associated with this function node and its child nodes through the business test case relationship business_testcase_relationship table. If these test cases are not associated with other function nodes, search for the records in the test case table through the test case ids, and set the value of the is_valid field of these records to invalid;
[0042] S14. After finding the position of the function of the system under test in the business big picture, proceed to step 3.
[0043] Figure 2a is the topological structure diagram of the previous embodiment of the test case management method of the present invention; Figure 2b is Figure 2a the data structure design diagram; Figure 2c is the topological structure diagram of this embodiment after adopting the test case management method of the present invention; Figure 2d is Figure 2c the data structure design diagram.
[0044] Such as Figures 2a to 2dAs shown, taking the test case function4 as an example, before the adjustment, parent_id = 3, level = 3, parents_trace = "1, 3", parents_trace_info = "root, feature". Due to the change in the function level, function4 is moved under function15, and its parent_id needs to be adjusted to 22, level = 4, parents_trace = "1, 6, 22", parents_trace_info = "root, featureE, function15". Subsequently, the level of its child nodes is updated to 5, parents_trace = "1, 6, 22, 11", parents_trace_info = "root, feature, function15, function4", and so on to update all descendant nodes.
[0045] The method and device for test case management of the present invention effectively associate functions with test cases through a business big picture, ensuring the effectiveness and comprehensiveness of test cases corresponding to each function in the test case management system; providing a solution for accurately searching for test cases associated with functions. And it can save the time for testers to search for test cases corresponding to a certain function and its extended functions.
[0046] According to one or some embodiments of the present invention, in step 2, if the function of the system under test is not a leaf node, find the upper and lower level nodes of this function, and add a record corresponding to this node in the business big picture business_map, including: setting the parent_id field of this node to the upper level node id, and sequentially setting fields including parents_trace and parents_trace_info; then, update the parent node of the lower level node to this function node, and the business big picture management module will automatically update the level of the lower level node to this function node level + 1, the parents_trace field to the ids of each node in the complete path from the root node to this function node, and the parents_trace_info field to the names of each node in the complete path from the root node to this function node. And recursively update the fields including leve1, parents_trace, and parents_trace_info of the descendant nodes.
[0047] According to one or some embodiments of the present invention, in step 3, when it is confirmed that the test case needs to be updated, the steps include:
[0048] S31. When it is necessary to update the test case description information, update the test case details corresponding to the test case ID in the test case table;
[0049] S32. When it is necessary to update the binding relationship between test cases and function nodes, search for the corresponding record in the business_testcase_relationship table through the test case ID and function node ID, and update the value of the is_valid field to invalid; at the same time, search for the record corresponding to this test case in the business test case relationship business_testcase_relationship table through the test case id. If there are no other functions referencing this use case, update the value of the is_valid field indicating whether the test case is valid in the test case table to invalid, that is, logically delete the invalid test case.
[0050] The method and device for test case management of the present invention can effectively solve the problem of waste of storage resources caused by a large number of duplicate test cases, and effectively improve the reuse rate of test cases; thus ensuring the accuracy and effectiveness of storing test cases.
[0051] According to one or some embodiments of the present invention, step 5 further includes: task execution, regularly scanning the execution plan and executing the test cases according to the planned start time.
[0052] By adopting the method and device for test case management of the present invention, it is possible to avoid the problems of missing function test points and test cases during regression testing; avoid various production events caused thereby, and greatly improve the R & D test efficiency.
[0053] According to a second aspect of the present invention, there is provided a device for test case management, which includes:
[0054] Determine the function module of the system under test, which is used to receive test requirements, determine whether the function of the system under test corresponding to the test requirements exists in the functions to be tested in the business big picture, locate the function node ID, and if it exists, this function of the system under test belongs to the stock function and enters the stock function processing module;
[0055] The stock function processing module is used to obtain the function node ID of the stock function corresponding to this function of the system under test, obtain the existing test case ID associated with the function node ID through the business test case relationship business_testcase_relationship representing the association relationship between function nodes and test cases, and then search for the corresponding test case record in the test case table through the test case ID, that is, find the existing test cases associated with this function of the system under test, confirm whether the test cases need to be updated, and if the test cases need to be updated, perform test case update; if the test cases do not need to be updated, determine whether new test cases need to be added. If new test cases need to be added, enter the new test case module. If new test cases do not need to be added, enter the create task plan module;
[0056] A new test case module is used to create test cases. After finding the function node ID corresponding to the function under test in the business big picture, a test case record is added to the test case table, and a relationship record between the function node and the test case is added to the business test case relationship table (business_testcase_relationship). After the new test case is created, if a task plan needs to be created, it enters the task plan creation module;
[0057] The task plan creation module is used to create a task plan. According to the function under test, test cases corresponding to the function and its associated functions are selected from the business big picture, the start time of the task plan is filled in, and a task plan record is added. Among them, the new task plan includes: storing the function node in the business big picture (business_map) corresponding to the function under test, the selected test cases, and the planned start time of the task plan.
[0058] According to one or some embodiments of the present invention, the device for test case management further includes:
[0059] The new function processing module is used to find the superior function to which the function belongs in the business big picture and determine whether the function is added to the business big picture as a leaf node; if it is a leaf node, the function is directly added to the business big picture as a leaf node, and a record corresponding to the leaf node is added to the business big picture table (business_map); after the function addition is completed, it enters the new test case module.
[0060] According to another aspect of the present invention, there is provided a device for test case management, including: a memory, a processor, and a test case management program stored on the memory and executable on the processor. When the test case management program is executed by the processor, the steps of the above-mentioned test case management method are implemented.
[0061] According to the present invention, there is also provided a computer storage medium.
[0062] The computer storage medium stores a test case management program. When the test case management program is executed by the processor, the steps of the above-mentioned test case management method are implemented.
[0063] Among them, the method implemented when the test case management program running on the processor is executed can refer to the various embodiments of the test case management method of the present invention, which will not be elaborated here.
[0064] The present invention also provides a computer program product.
[0065] The computer program product of the present invention includes a test case management program. When the test case management program is executed by the processor, the steps of the test case management method as described above are implemented.
[0066] Among them, when the test case management program running on the processor is executed, the implemented method can refer to each embodiment of the test case management method of the present invention, which will not be elaborated here.
[0067] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0068] The above is only an exemplary embodiment of the present invention and is not used to limit the protection scope of the present invention. The protection scope of the present invention is determined by the appended claims.
Claims
1. A method for test case management, wherein: The method for test case management is implemented based on a business big picture, wherein the business big picture includes multiple functions to be tested, each function includes multiple test cases, and the method for test case management includes the following steps: Step 1: Receive a test requirement, determine whether the system function under test corresponding to the test requirement exists in the functions to be tested in the business graph, locate the function node ID, if it exists, the system function under test belongs to the stock function, and proceed to step S3; Step 3, obtain the function node ID of the stock function corresponding to the function of the system under test, obtain the existing test case ID associated with the function node ID through the business test case relationship business_testcase_relationship used to represent the relationship between the function node and the test case, and then find the corresponding test case record in the test case table through the test case ID, that is, find the existing test case associated with the function of the system under test, confirm whether the test case needs to be updated, if so, update the test case; if not, determine whether a new test case needs to be added, if a new test case needs to be added, proceed to step 4, if not, proceed to step 5; Step 4: Create a test case. After finding the function node ID corresponding to the function under test in the business diagram, add a test case record to the test case table, and add a record of the association relationship between the function node and the test case in the business_testcase_relationship table. After adding the test case, if you need to create a task plan, go to step 5. Step 5. Create a task plan. Select the test cases corresponding to the function and its related functions from the business map according to the function under test. Fill in the task plan start time and add a task plan record. The newly added task plan includes: storing the function node in the business map corresponding to the function under test, the selected test cases, and the planned start time of the task plan.
2. The test case management method according to claim 1, wherein: The method further includes: step 2, in step 1, if the function of the system under test does not belong to the existing function but is a new function, then executing step 2, Step 2. Find the parent function to which the function belongs in the business graph, and determine whether the function is added to the business graph as a leaf node; if it is a leaf node, directly add the function to the business graph as a leaf node, and add a record corresponding to the leaf node in the business_map table of the business graph; after the function is added, go to step 4.
3. The test case management method according to claim 1, wherein: Step 1 includes the following steps: S11, determining whether the upper and lower level functions of the functional node need to be adjusted, and if so, proceeding to the next step; S12, update the id of each node in the complete path from the root node of the function node to the parent node of the function node, including parent_id, level, parents_trace, and parents_trace_info of each node name in the complete path from the root node to the parent node of the node; and update the information of all descendant nodes of the function node including level, parents_trace, and parents_trace_info in sequence; S13. If a certain function node in the business map needs to be discarded in this iteration version, the is_valid field value of the corresponding record of the function node and its subnodes in the business map business_map table is updated to invalid, and the business test case relationship business_testcase_relationship table is updated. The is_valid field value of the relationship record of the function node and its subnodes and their associated test cases is set to invalid in turn. At the same time, the test case id associated with the function node and its subnodes is found through the business test case relationship business_testcase_relationship table. If these test cases are not associated with other function nodes, it is necessary to find the records in the test case table through the test case id, and set the is_valid field value of these records to invalid; S14. After finding the position of the function of the system under test in the business graph, go to step 3.
4. The test case management method according to claim 2, wherein: In step 2, if the function of the system under test is not a leaf node, find the upper and lower nodes of the function, and add a record corresponding to the node in the business map business_map, including: setting the parent_id field of the node to the upper node id, and setting the fields including parents_trace and parents_trace_info in sequence; then, update the parent node of the lower node to the function node, and the business map management module will automatically update the level of the lower node = this function node level + 1, the parents_trace field is the id of each node in the complete path from the root node to the function node, and the parents_trace_info field is the name of each node in the complete path from the root node to the function node. And recursively update the fields including level1, parents_trace, and parents_trace_info of the descendant nodes.
5. The test case management method according to claim 1, wherein: In step 3, when confirming that the test case needs to be updated, the following steps are included: S31. When the test case description information needs to be updated, the test case details corresponding to the test case ID in the test case table are updated; S32. When the binding relationship between the test case and the function node needs to be updated, the corresponding record in the business_testcase_relationship table is searched by the test case ID and the function node ID, and the is_valid field value is updated to invalid; at the same time, the record corresponding to the test case in the business_testcase_relationship table is searched by the test case ID. If no other function references this test case, the is_valid field value of the test case in the test case table is updated to invalid, that is, the invalid test case is logically deleted.
6. The test case management method according to claim 1, wherein: Step 5 also includes: task execution, scheduled scanning execution plan, and execution of test cases according to the planned start time.
7. A device for test case management, comprising: Determine the function module of the system under test, which is used to receive the test requirements, determine whether the system under test function corresponding to the test requirements exists in the functions to be tested in the business graph, locate the function node ID, and if it exists, the system under test function belongs to the stock function, and enter the stock function processing module; The stock function processing module is used to obtain the function node ID of the stock function corresponding to the function of the system under test, obtain the existing test case ID associated with the function node ID through the business test case relationship business_testcase_relationship used to represent the association between the function node and the test case, and then find the corresponding test case record in the test case table through the test case ID, that is, find the existing test case associated with the function of the system under test, confirm whether the test case needs to be updated, and if so, update the test case; if not, determine whether a new test case needs to be added, and if so, enter the new test case module, and if not, enter the task plan creation module; Add a test case module to create test cases. After finding the function node ID corresponding to the function under test in the business diagram, add a test case record to the test case table, and add a record of the association relationship between the function node and the test case in the business_testcase_relationship table. After adding a new test case, if you need to create a task plan, enter the Create Task Plan module. Create a task plan module, which is used to create a task plan. According to the function under test, select the test case corresponding to the function and its related functions from the business map, fill in the task plan start time, and add a task plan record. The newly added task plan includes: storing the function node in the business map business_map corresponding to the function under test, the selected test case, and the planned start time of the task plan.
8. The test case management device according to claim 7, wherein: Also includes: A new function processing module is added to find the parent function of the function in the business graph and determine whether the function is added to the business graph as a leaf node; If it is a leaf node, directly add the function as a leaf node to the business graph, and add a record corresponding to the leaf node in the business_map table of the business graph; after the function is added, enter the new test case module.
9. An electronic device, comprising: A memory, a processor, and a test case management program stored in the memory and executable on the processor, wherein the test case management program implements the steps of the test case management method according to any one of claims 1 to 6 when executed by the processor.
10. A computer storage medium, wherein: The computer storage medium stores a test case management program, and when the test case management program is executed by the processor, the steps of the test case management method according to any one of claims 1 to 6 are implemented.