Test case management method and device, computer equipment and storage medium
Through AI algorithms, the testing cases are managed and filtered, and the redundant use cases are identified and deleted, ensuring the functional characteristics of the software project products are covered, and the redundancy and insufficient coverage problems in test case management is solved, testing efficiency and accuracy are improved, and project Quality and product stability.
Patent Information
- Application Number
- CN202411310534.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-11-08
AI Technical Summary
In the prior art, there are redundancy in the management of test cases, resulting in waste of resources and inaccuracy of testing work, and it cannot effectively cover the overall functional characteristics of software project products, affecting the stability and reliability of the products.
Use AI algorithm to generate and filter test cases, identify redundant use cases and delete them by comparing product information and functional characteristics, and design test cases with scenario use case method and equivalent categories to ensure that new functional characteristics are covered, and dependencies are considered during the testing process. and priority, use AI algorithms to filter and execute test cases.
It realizes efficient management of test cases, improves testing efficiency and accuracy, ensures project quality, avoids resource waste and test inaccuracy, and ensures full coverage and stability of product functions.
Smart Images

Figure CN118916294A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a test case management method, device, computer equipment and storage medium. Background Art
[0002] In the field of software development, the number of software project product developments has risen sharply, and the ever-changing customer needs require continuous iterative updates of the software. In the process of updating the software, the number of test cases used in testing work has increased significantly, requiring efficient and accurate management of the huge set of product-level software test cases.
[0003] Currently, the management of test cases is mainly based on the historical version requirements of software project products, and new requirements are constantly added and superimposed. The newly added test cases may be redundant with the existing test cases, which will lead to a waste of resources and may also affect the accuracy of the testing work.
[0004] Therefore, the related technology has the problem that test cases are redundant, resulting in waste of resources and affecting the accuracy of the testing work. Summary of the invention
[0005] In view of this, the present invention provides a test case management method, apparatus, computer equipment and storage medium to solve the problem that test cases are redundant, resulting in waste of resources and affecting the accuracy of testing work.
[0006] In a first aspect, the present invention provides a test case management method, comprising:
[0007] Obtain the first functional characteristics of the new functions of the software project product;
[0008] Generate and save the current test case according to the first functional feature and the preset test case generation algorithm;
[0009] Determine the first product information and the first product functional characteristics of the software project product corresponding to the current test case, and determine the second product information and the second product functional characteristics of the software project product corresponding to the historical test case;
[0010] The first product information and the second product information are compared, and the functional characteristics of the first product and the functional characteristics of the second product are compared. According to the comparison result, the test cases to be deleted are determined in the historical test cases, and the test cases to be deleted are deleted.
[0011] The test case management method provided in this embodiment generates test cases according to the first functional feature and the preset test case generation algorithm. By comparing the test cases with the historical test cases, the test cases to be deleted are determined and deleted, and the product-level test cases are comprehensively and deeply constructed. The test cases are efficiently managed, which can not only improve the efficiency of the test, but also improve the effect of the test and ensure the quality of the project. The problem of redundant test cases, waste of resources, and affecting the accuracy of the test work is solved.
[0012] In some optional implementations, after deleting the test case to be deleted, the method further includes:
[0013] Obtain the second functional characteristics of the function to be tested of the software project product;
[0014] Filter the test cases in the test case set according to the second functional feature to obtain a test case filtering result, wherein the test case set includes historical test cases and current test cases, and the test case filtering result includes a first preset number of test cases in the test case set;
[0015] The priority of each test case in the test case screening result is obtained, and the test case with the highest priority is used as the target test case, wherein the target test case is used to test the function to be tested.
[0016] In this embodiment, the dimension of test case priority is added to the test case screening to achieve a more refined and comprehensive screening of test cases, which can not only improve the efficiency of the test, but also improve the accuracy and comprehensiveness of the test.
[0017] In some optional implementations, after taking the test case with the highest priority as the target test case, the method further includes:
[0018] Determine an execution strategy for a target test case, and execute the target test case according to the execution strategy, test the function to be tested, and obtain a first execution result of the target test case;
[0019] If it is determined according to the first execution result that there is a fault in the process of executing the target test case, an association relationship between the fault and the target test case is generated;
[0020] If it is determined according to the first execution result that a test case is blocked during the execution of the target test case, obtaining relevant information about the test case blocking;
[0021] The first execution result and the execution exception information are stored in a database, wherein the execution exception information includes the association relationship and / or related information.
[0022] In some optional embodiments, the method further comprises:
[0023] Obtain the abandoned functions of the software project product;
[0024] Determine the test cases corresponding to the functions to be discarded in the test case set, and delete the test cases corresponding to the functions to be discarded.
[0025] In this embodiment, the functions to be abandoned and the test cases corresponding to the functions to be abandoned are deleted to ensure the purity and effectiveness of the baseline library and to prevent the test cases corresponding to the functions to be abandoned from affecting the accuracy and efficiency of the test.
[0026] In some optional implementations, the test cases in the test case set are screened according to the second functional feature to obtain a test case screening result, including:
[0027] Acquire first information of product functional characteristics of the software project product corresponding to the test case in the test case set, second information of the product scenario, third information of the product equipment, and fourth information of the expected result of the product from the second functional characteristics;
[0028] Using the first information, the second information, the third information, and the fourth information as benchmark keywords, and screening the test cases in the test case set according to the benchmark keywords to obtain an intermediate screening result, wherein the intermediate screening result includes a second preset number of test cases in the test case set;
[0029] Obtaining a second execution result of the test case in the intermediate screening result, and determining the defect hit rate of the test case in the intermediate screening result according to the second execution result, wherein the second execution result is obtained after executing the test case in the intermediate screening result to test the software project product when the software project product is launched;
[0030] Delete the test cases whose defect hit rate is less than the preset threshold in the intermediate screening results to obtain the test case screening results.
[0031] In this embodiment, the first information, the second information, the third information and the fourth information are used as benchmark keywords to screen the test cases in the test case set, so that the test cases related to the product characteristics can be screened out more comprehensively and accurately, and can go beyond a single requirement to achieve comprehensive coverage of the product characteristics. The test cases whose defect hit rate is less than the preset threshold in the intermediate screening results are deleted to obtain the test case screening results. The efficiency of the test can be improved, and the comprehensiveness and accuracy of the test can also be ensured.
[0032] In some optional embodiments, the method further comprises:
[0033] Obtain historical functional characteristics of software project products;
[0034] Determine whether the first functional feature can cover the historical functional feature;
[0035] If yes, generate a new test case according to the first functional feature;
[0036] If not possible, determine the test case to be modified associated with the first functional feature, and modify the test case to be modified according to the first functional feature.
[0037] In some optional implementations, after deleting the test case to be deleted, the method further includes:
[0038] Determine the dependency relationship between other historical test cases except the test case to be deleted and the newly added function, wherein the dependency relationship is used to determine the impact of the newly added function on the historical functions corresponding to other historical test cases;
[0039] Acquire newly added test requirement points of the software project product, where the newly added test requirement points are used to adjust the test cases in the test case set.
[0040] In this implementation, the dependency between historical test cases and new functions is determined to ensure that such dependency can be fully considered during the test process to avoid affecting the stability of existing functions due to changes in the characteristics of new functions. New test requirements of historical test cases and test cases are obtained, and test cases will be clearly designed for these requirements to ensure that each requirement can be fully verified and tested to ensure the quality and performance of new functions.
[0041] In a second aspect, the present invention provides a test case management device, comprising:
[0042] An acquisition module, used to acquire a first functional feature of a new function of a software project product;
[0043] A generating module, used to generate an algorithm according to the first functional feature and a preset test case, and to generate and save the current test case;
[0044] A determination module, used to determine the first product information and the first product functional characteristics of the software project product corresponding to the current test case, and determine the second product information and the second product functional characteristics of the software project product corresponding to the historical test case;
[0045] The comparison module is used to compare the first product information with the second product information, compare the first product function characteristics with the second product function characteristics, determine the test cases to be deleted in the historical test cases according to the comparison results, and delete the test cases to be deleted.
[0046] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the test case management method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0047] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the test case management method of the first aspect or any corresponding embodiment thereof.
[0048] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the test case management method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 is a flow chart of a test case management method according to an embodiment of the present invention;
[0051] Figure 2 is a flowchart of a method for managing a product test case set based on AI according to an embodiment of the present invention;
[0052] Figure 3 is a schematic diagram of the main process of product test case set management according to an embodiment of the present invention;
[0053] Figure 4 is a structural block diagram of a test case management device according to an embodiment of the present invention;
[0054] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0056] At present, the management of requirements and test cases for software project products is mainly based on the historical version requirements, and new requirements are constantly added and superimposed. However, the newly added test cases may overlap with the existing test cases, resulting in redundancy, leading to resource waste, and may interfere with the screening of test cases, resulting in the selection of wrong test cases and affecting the accuracy of the test. In addition, there may be too many new functional features associated with the test cases, but since the relationship between the test cases and other functional features cannot be directly obtained, the scalability of the test cases is poor, and the functional features of the overall requirements of the software project products cannot be fully covered, which will affect the stability and reliability of the software project products. In addition, the test case management method currently adopted is relatively simple, and the maintenance of the test cases is heavy, resulting in the execution of the test cases also consuming a lot of manpower and time. At the same time, the task of automated design is also very large, all of which seriously consumes resources and manpower. Therefore, it is necessary to find a more scientific and reasonable method for requirements management and test case management.
[0057] Based on the above content, an embodiment of the present invention provides a test case management method. When there are new product functional features, the functional test points required are advanced through the AI (Artificial Intelligence) algorithm. Test cases are designed through common testing methods such as scenario use case method and equivalence class. The functional features and test cases of the existing requirements are screened out through the AI algorithm, and the redundant use case parts are removed to design test cases covering the new functional features. The functional features and test cases of the existing requirements are screened out through the AI algorithm. Through the test case screening, the use cases of the changed parts are modified. When the project is launched, the functional feature points that need to be tested in the project are sorted out, the corresponding product-level use cases are screened for test execution, and the test results are recorded. After the functional features are refined, the test cases are screened through the AI algorithm. Through the above steps, the management of the complete product-level test case set and the management method of project test case screening and execution are completed. In order to achieve a comprehensive and in-depth construction of product-level test cases and efficient management of test cases, not only the efficiency of testing can be improved, but also the effect of testing can be improved, and the quality of the project can be ensured.
[0058] According to an embodiment of the present invention, a test case management embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer device with data processing capabilities, such as a computer, a server, etc., and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0059] In this embodiment, a test case management method is provided, which can be used for the above-mentioned computer device. Figure 1 is a flow chart of a test case management method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0060] Step S101, obtaining a first functional feature of a new function of a software project product.
[0061] Specifically, when new requirements for software project products are introduced, new functions of the software project products will be set according to the requirements. Requirements include: how to add new users, what are the input and output parameters, what verifications are included, security requirements, etc. When a software project product has new product features, that is, new functions, it is necessary to extract the first functional characteristics of the new functions. The key points of these new functional characteristics can be quickly identified and refined through AI algorithms to obtain the first functional characteristics. The key points are, for example: the business that currently needs to create a development environment, the key points are: in training, reasoning, etc. The new functions can be functions that are incrementally developed based on the original functions. The new functions can also be functions that complement the original functions and are different from the original functions.
[0062] like Figure 2 As shown in the figure, AI algorithms can perform test case management, automated case management, test case execution, defect management system, and data storage. When requirements are introduced, AI algorithms will generate test cases. Figure 3 As shown in the figure, after the demand is introduced, the AI algorithm is used to obtain the key points of the demand characteristics, that is, the above-mentioned new functional characteristics.
[0063] Step S102, generating and saving the current test case according to the first functional feature and a preset test case generation algorithm.
[0064] Specifically, the preset test case generation algorithm includes AI algorithm and common test methods such as scenario use case method and equivalence class. The first functional feature is input into the AI algorithm to automatically generate an initial test case. Then, the initial test case is supplemented and screened by common test methods such as scenario use case method and equivalence class division to obtain the test case. After a detailed review, the generated test case can enter the baseline library.
[0065] It should be noted that when designing test cases, it is necessary to ensure that the test cases can accurately cover the product's feature keywords, which is the key to ensuring the comprehensiveness of the test. At the same time, the test cases also need to be clearly described and the steps are clear, so as to ensure the accuracy of the test. In order to further improve the test efficiency, the big model can be used to automatically convert these test cases into automated test codes and scripts.
[0066] The above process is as follows Figure 2 As shown in the figure, the test cases are analyzed by AI algorithms to identify the use cases that can be automated, and then the AI algorithms are used to convert the use cases into automated use cases. These use cases will enter the automated use case management. Figure 3 As shown, the AI algorithm generates and designs test cases and manages test cases. In addition, the test cases are converted into automated cases, automated cases are generated, and automated case management is performed.
[0067] Step S103, determining the first product information and the first product functional characteristics of the software project product corresponding to the current test case, and determining the second product information and the second product functional characteristics of the software project product corresponding to the historical test case.
[0068] Specifically, combined Figure 2 To illustrate this embodiment, the AI algorithm can filter test cases, filter out redundant test cases in the test cases and delete them. Adding new features based on the existing requirements of the historical version requires refining the new features. The AI algorithm is used to filter out the features and test cases of the existing requirements. Through test case screening, the redundant test cases are removed, and test cases covering the new features are designed.
[0069] The AI algorithm is used to determine the first product information and first product functional characteristics of the software project product corresponding to the test case. The first product information includes, for example, product scenario information, product equipment information, product expected results, etc. of the software project product. The first product functional characteristics include, for example, product functional characteristics of the software project product. The second product information and second product functional characteristics of the software project product corresponding to the historical test case are determined. The second product information contains the same content type as the first product information, and the second product functional characteristics contain the same content type as the first product functional characteristics.
[0070] Step S104, comparing the first product information and the second product information, comparing the first product functional characteristics and the second product functional characteristics, determining the test cases to be deleted in the historical test cases according to the comparison results, and deleting the test cases to be deleted.
[0071] Specifically, the first product information and the second product information are compared through the AI algorithm, and the first product functional characteristics and the second product functional characteristics are compared. Test cases with consistent product information and product functional characteristics and historical test cases in historical test cases are taken as test cases to be deleted, and the test cases to be deleted are deleted.
[0072] The test case management method provided in this embodiment generates test cases according to the first functional feature and the preset test case generation algorithm. By comparing the test cases with the historical test cases, the test cases to be deleted are determined and deleted, and the product-level test cases are comprehensively and deeply constructed. The test cases are efficiently managed, which can not only improve the efficiency of the test, but also improve the effect of the test and ensure the quality of the project. The problem of redundant test cases, waste of resources, and affecting the accuracy of the test work is solved.
[0073] In some optional implementations, after deleting the test case to be deleted, the method further includes:
[0074] Obtain the second functional characteristics of the function to be tested of the software project product;
[0075] Filter the test cases in the test case set according to the second functional feature to obtain a test case filtering result, wherein the test case set includes historical test cases and current test cases, and the test case filtering result includes a first preset number of test cases in the test case set;
[0076] The priority of each test case in the test case screening result is obtained, and the test case with the highest priority is used as the target test case, wherein the target test case is used to test the function to be tested.
[0077] Specifically, the software project product adds new functional features based on the existing requirements, and the new functional features need to be tested, that is, the new functional features are used as the functions to be tested.
[0078] These new functional features must be accurately extracted first. After the new functional features are extracted, AI algorithms will be used to screen these features to find existing requirements and test cases that are closely related to the new features. The second functional features of the functions to be tested of the software project product are obtained through AI algorithms. The second functional features are, for example, the characteristic keywords of the functions to be tested.
[0079] It is necessary to use the new functional features as the benchmark keywords and the complete test case set as the overall data set for screening through the algorithm. The test cases in the test case set are screened according to the second functional features through the AI algorithm to obtain the test case screening results, wherein the test case set includes historical test cases and test cases, and the test case screening results include the test cases in the first preset number of test case sets.
[0080] When screening test cases, you can also consider the priority of the test cases. According to the priority of the test cases, they can be divided into three levels: high, medium, and low. High-priority test cases are mainly used to accurately cover the functional characteristics of the product, medium-priority test cases are used to test the performance of functional characteristics in different scenarios, and low-priority test cases are used to cover some less common test scenarios. Get the priority of each test case in the test case screening results, and use the test case with the highest priority as the target test case, where the target test case is used to test the function to be tested.
[0081] In this embodiment, the dimension of test case priority is added to the test case screening to achieve a more refined and comprehensive screening of test cases, which can not only improve the efficiency of the test, but also improve the accuracy and comprehensiveness of the test.
[0082] In some optional implementations, after taking the test case with the highest priority as the target test case, the method further includes:
[0083] Determine an execution strategy for a target test case, and execute the target test case according to the execution strategy, test the function to be tested, and obtain a first execution result of the target test case;
[0084] If it is determined according to the first execution result that there is a fault in the process of executing the target test case, an association relationship between the fault and the target test case is generated;
[0085] If it is determined according to the first execution result that a test case is blocked during the execution of the target test case, obtaining relevant information about the test case blocking;
[0086] The first execution result and the execution exception information are stored in a database, wherein the execution exception information includes the association relationship and / or related information.
[0087] Specifically, the AI algorithm will formulate an execution strategy, determine the execution strategy of the target test case, and execute the target test case according to the execution strategy to test the function to be tested, obtain the execution result of the target test case, and backfill the execution result. The test result is directly backfilled into the test case execution. During the backfilling process, if there is a bug (fault), it will be recorded in the defect management, and the corresponding bug and the test case will be associated.
[0088] After executing the newly added test cases, it is necessary to record the results of the execution of the cases in detail. If the cases fail, it is necessary to record the bug data of the cases. That is, if it is determined that there is a fault in the execution of the target test cases based on the execution results, the association relationship between the fault and the target test cases is generated. The test case management system needs to be connected with the defect management system and can be directly associated through jumps. For example: if the target test case is PASS (skipped) for multiple consecutive versions in different execution plans, it proves that the functional characteristics corresponding to the target test case are stable; there are many bug data associated with the target test case, and the bug information can be summarized and compared and analyzed through AI algorithms to deduce the functional characteristics where the bugs are concentrated, which can be used as an important basis for screening cases.
[0089] If, based on the execution results, it is determined that there is a test case blockage during the execution of the target test case, relevant information about the test case blockage is obtained; these execution results need to be accurately recorded and saved in the database. This is to enable effective statistics and analysis of the test results, as a statistical basis for screening the statistics of hit defect cases, which is crucial for understanding product quality and improving product functions. The reasons for the case blockage can be summarized and analyzed, and compared and calculated through AI algorithms. The reasons for the blockage can be analyzed to avoid introduction in the early stage of test strategy analysis.
[0090] The execution results, associations, and related information are saved in the database. Figure 2 As shown, AI algorithm screens use cases, updates use cases, executes use cases, and stores data. Figure 3 As shown, the AI algorithm issues execution instructions, test cases are executed, the defect management system records the execution results, stores the results, and stores the execution results and defect records in data.
[0091] In some optional embodiments, the method further comprises:
[0092] Obtain the abandoned functions of the software project product;
[0093] Determine the test cases corresponding to the functions to be discarded in the test case set, and delete the test cases corresponding to the functions to be discarded.
[0094] Specifically, this embodiment discloses a process for discarding functional characteristics based on existing requirements.
[0095] AI algorithms are used to screen and identify the functional features of software project products, and related test cases are also searched to determine the functions of software project products to be abandoned. This process requires accurate positioning of the functional features and test cases that need to be removed due to abandoned requirements.
[0096] After screening and identifying the functions to be abandoned, the AI algorithm is used to determine the test cases corresponding to the functions to be abandoned in the test case set. The functions to be abandoned and the test cases corresponding to the functions to be abandoned are deleted from the baseline library to ensure the purity and effectiveness of the baseline library. Therefore, with the assistance of the AI algorithm, this work can be completed efficiently and accurately to ensure the quality and integrity of the test baseline library.
[0097] In this embodiment, the functions to be abandoned and the test cases corresponding to the functions to be abandoned are deleted to ensure the purity and effectiveness of the baseline library and to prevent the test cases corresponding to the functions to be abandoned from affecting the accuracy and efficiency of the test.
[0098] In some optional implementations, the test cases in the test case set are screened according to the second functional feature to obtain a test case screening result, including:
[0099] Acquire first information of product functional characteristics of the software project product corresponding to the test case in the test case set, second information of the product scenario, third information of the product equipment, and fourth information of the expected result of the product from the second functional characteristics;
[0100] Using the first information, the second information, the third information, and the fourth information as benchmark keywords, and screening the test cases in the test case set according to the benchmark keywords to obtain an intermediate screening result, wherein the intermediate screening result includes a second preset number of test cases in the test case set;
[0101] Obtaining a second execution result of the test case in the intermediate screening result, and determining the defect hit rate of the test case in the intermediate screening result according to the second execution result, wherein the second execution result is obtained after executing the test case in the intermediate screening result to test the software project product when the software project product is launched;
[0102] Delete the test cases whose defect hit rate is less than the preset threshold in the intermediate screening results to obtain the test case screening results.
[0103] Specifically, the first information of the product functional characteristics of the software project product corresponding to the test case in the test case set, the second information of the product scenario, the third information of the product equipment, and the fourth information of the expected results of the product are obtained from the second functional characteristics. The first information, such as the keywords of the product functional characteristics, is the basis for identifying and screening test cases; the second information, such as the key information of the product scenario, helps to understand the performance of the product in a specific situation; the third information, such as the key information of the product equipment, is crucial to the accuracy and comprehensiveness of the test case; the fourth information, such as the key information of the expected results of the product, is the basis for evaluating the effectiveness of the test case.
[0104] When using the AI algorithm to match test cases, you can filter the keywords of product features and match them with the test point keywords of the test cases. Use the first information, second information, third information, and fourth information as benchmark keywords to filter the test cases in the test case set and obtain intermediate screening results.
[0105] The baseline library should contain all the test cases that the product should have, so that when the project goes online, the corresponding product-level test cases can be selected from the baseline library for execution according to the functional features that actually need to be tested. During this process, the execution results of each test case will be recorded for subsequent analysis and improvement. In this way, it can be ensured that the product is fully tested before going online, thereby improving the quality and stability of the product and reducing potential problems and risks. At the same time, this also provides strong support for product iteration and upgrading, making product maintenance and optimization more efficient and convenient.
[0106] In addition, by analyzing the results of existing test cases, we can find out those test cases with a higher hit defect rate and then screen them to improve the efficiency and effectiveness of the test. Specifically, it includes:
[0107] Use AI algorithm to obtain the execution results of the test cases in the intermediate screening results, determine the defect hit rate of the test cases in the intermediate screening results according to the execution results; delete the test cases in the intermediate screening results whose defect hit rate is less than the preset threshold, and obtain the test case screening results. The preset threshold is, for example, 90%, 80% or other values.
[0108] In this embodiment, the first information, the second information, the third information and the fourth information are used as benchmark keywords to screen the test cases in the test case set, so that the test cases related to the product characteristics can be screened out more comprehensively and accurately, and can go beyond a single requirement to achieve comprehensive coverage of the product characteristics. The test cases whose defect hit rate is less than the preset threshold in the intermediate screening results are deleted to obtain the test case screening results. The efficiency of the test can be improved, and the comprehensiveness and accuracy of the test can also be ensured.
[0109] In some optional embodiments, the method further comprises:
[0110] Obtain historical functional characteristics of software project products;
[0111] Determine whether the first functional feature can cover the historical functional feature;
[0112] If yes, generate a new test case according to the first functional feature;
[0113] If not possible, determine the test case to be modified associated with the first functional feature, and modify the test case to be modified according to the first functional feature.
[0114] Specifically, necessary modifications are made to the functional features while maintaining the existing requirements. In order to ensure the accuracy and efficiency of the modification process, AI algorithms are used to screen out the functional features and corresponding test cases related to the modification. This step is crucial because it helps to accurately identify those parts that need to be adjusted for subsequent updates. Once the updates to the relevant use cases are completed, the next step is to submit these changes to the review team. The review team will conduct a detailed review of the updated use cases to ensure that the modified use cases can meet the new functional requirements. Once the review is passed, these updates can be written into the baseline library as a reference for subsequent development and testing.
[0115] Obtain the historical and new functional features of the software project product. When it is necessary to modify the functional features based on the original requirements, it must first be clear whether the new functional features can fully cover the original functional features. Therefore, AI algorithms are used to determine whether the new functional features can cover the historical functional features.
[0116] If the new functional features can completely cover the original functional features, then a complete set of functional feature test cases needs to be added. New test cases should be generated based on the new functional features to ensure that the new functional features can work properly.
[0117] However, if the new features cannot completely cover the original features, then it is necessary to use artificial intelligence algorithms at the product level to screen out those test cases that may be affected. Determine the test cases to be modified associated with the new features, and then make necessary modifications to these new features and modify the test cases to be modified according to the new features to ensure that the product's functions can meet the new requirements. This process requires careful analysis and precise execution to ensure that the modified product can meet the expected functional requirements.
[0118] In some optional implementations, after deleting the test case to be deleted, the method further includes:
[0119] Determine the dependency relationship between other historical test cases except the test case to be deleted and the newly added function, wherein the dependency relationship is used to determine the impact of the newly added function on the historical functions corresponding to other historical test cases;
[0120] Acquire newly added test requirement points of the software project product, where the newly added test requirement points are used to adjust the test cases in the test case set.
[0121] Specifically, when software project products add new features based on existing requirements, these new features must first be accurately extracted, i.e., new functions. After the new functions are extracted, the AI algorithm will be used to screen historical test cases to find historical test cases that are closely related to the new functions. The new functions need to be used as benchmark keywords, and the complete set of use cases needs to be used as the overall data set for screening through the AI algorithm. These historical test cases have a direct dependency relationship with the new functions, so it is necessary to clarify this dependency relationship and ensure that this dependency relationship can be fully considered during the testing process to avoid affecting the stability of existing functions due to changes in the new functions.
[0122] It should be noted that when refining new functional features, it is necessary to sort out a clear logical relationship with the existing requirements. This relationship is usually an inheritance relationship, which means that on the basis of the original requirements, by extending and adding new functional features, a richer and more powerful product function is built. In this process, it is necessary to ensure that the logical relationship of the new functional features is clear and seamlessly connected with the logical relationship of the original requirements to ensure the integrity and consistency of the product.
[0123] The AI algorithm is used to infer the new test requirements of historical test cases and test cases. These requirements are designed for new features and functions, and they will help discover and fix possible problems and ensure the quality and performance of new features and functions. Test cases will be clearly designed for these requirements to ensure that each requirement can be fully verified and tested.
[0124] In this implementation, the dependency between historical test cases and new functions is determined to ensure that such dependency can be fully considered during the test process to avoid affecting the stability of existing functions due to changes in the characteristics of new functions. New test requirements of historical test cases and test cases are obtained, and test cases will be clearly designed for these requirements to ensure that each requirement can be fully verified and tested to ensure the quality and performance of new functions.
[0125] In some optional implementations, the method for generating a test case may also include steps A1 to A3.
[0126] Step A1, obtaining a product requirement document (PRD); the PRD document is a test document written by a tester according to a first preset standard.
[0127] Specifically, this embodiment provides a preset PRD document template for testers. When a user needs to write a test case, the system controls the preset terminal to display the preset PRD document template according to the tester's data acquisition operation. The tester enters the corresponding content in the preset PRD document template according to the content of the preset PRD document template. The system generates data corresponding to the data input operation in the preset PRD document template according to the tester's data input operation to obtain a PRD document.
[0128] Step A2: setting test rules according to the tester's setting operation.
[0129] Specifically, this embodiment supports testers to customize the output rules of test cases. Testers can adjust the granularity of test cases and test case generation rules as needed, so that test cases fit the tested products and the test content is more comprehensive.
[0130] Step A3: Generate test cases based on the PRD document and test rules.
[0131] Specifically, first, the content of the PRD document is obtained. The content of the PRD document can be functional logic data, field description data or business scenario data written by the user. Then, based on the test rules, when the content of the PRD document is functional logic data, a functional use case is generated according to the functional logic data; when the content of the PRD document is field description data, a field verification use case is generated according to the field description data; when the content of the PRD document is business scenario data, a scenario use case is generated according to the business scenario data.
[0132] In this embodiment, the test case is automatically generated by obtaining the PRD document written by the user and the test rules set by the user. Compared with the prior art, the speed of generating test cases in this embodiment is fast and efficient, so that the writing time of the test case is shortened, which is conducive to shortening the software testing cycle.
[0133] In this embodiment, a test case management device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0134] This embodiment provides a test case management device, such as Figure 4 As shown, including:
[0135] An acquisition module 401 is used to acquire a first functional feature of a new function of a software project product;
[0136] A generating module 402, configured to generate and save a current test case according to the first functional feature and a preset test case generating algorithm;
[0137] Determination module 403, used to determine the first product information and the first product functional characteristics of the software project product corresponding to the current test case, and determine the second product information and the second product functional characteristics of the software project product corresponding to the historical test case;
[0138] The comparison module 404 is used to compare the first product information with the second product information, compare the first product function characteristics with the second product function characteristics, determine the test cases to be deleted in the historical test cases according to the comparison results, and delete the test cases to be deleted.
[0139] In some optional implementations, after deleting the test case to be deleted, the device is used to:
[0140] Obtain the second functional characteristics of the function to be tested of the software project product;
[0141] Filter the test cases in the test case set according to the second functional feature to obtain a test case filtering result, wherein the test case set includes historical test cases and current test cases, and the test case filtering result includes a first preset number of test cases in the test case set;
[0142] The priority of each test case in the test case screening result is obtained, and the test case with the highest priority is used as the target test case, wherein the target test case is used to test the function to be tested.
[0143] In some optional implementations, after taking the test case with the highest priority as the target test case, the apparatus is further configured to:
[0144] Determine an execution strategy for a target test case, and execute the target test case according to the execution strategy, test the function to be tested, and obtain a first execution result of the target test case;
[0145] If it is determined according to the first execution result that there is a fault in the process of executing the target test case, an association relationship between the fault and the target test case is generated;
[0146] If it is determined according to the first execution result that a test case is blocked during the execution of the target test case, obtaining relevant information about the test case blocking;
[0147] The first execution result and the execution exception information are stored in a database, wherein the execution exception information includes the association relationship and / or related information.
[0148] In some optional embodiments, the device is also used for:
[0149] Obtain the abandoned functions of the software project product;
[0150] Determine the test cases corresponding to the functions to be discarded in the test case set, and delete the test cases corresponding to the functions to be discarded.
[0151] In some optional implementations, the device screens the test cases in the test case set according to the second functional feature to obtain a test case screening result, including:
[0152] Acquire first information of product functional characteristics of the software project product corresponding to the test case in the test case set, second information of the product scenario, third information of the product equipment, and fourth information of the expected result of the product from the second functional characteristics;
[0153] Using the first information, the second information, the third information, and the fourth information as benchmark keywords, and screening the test cases in the test case set according to the benchmark keywords to obtain an intermediate screening result, wherein the intermediate screening result includes a second preset number of test cases in the test case set;
[0154] Obtaining a second execution result of the test case in the intermediate screening result, and determining the defect hit rate of the test case in the intermediate screening result according to the second execution result, wherein the second execution result is obtained after executing the test case in the intermediate screening result to test the software project product when the software project product is launched;
[0155] Delete the test cases whose defect hit rate is less than the preset threshold in the intermediate screening results to obtain the test case screening results.
[0156] In some optional embodiments, the device is also used for:
[0157] Obtain historical functional characteristics of software project products;
[0158] Determine whether the first functional feature can cover the historical functional feature;
[0159] If yes, generate a new test case according to the first functional feature;
[0160] If not possible, determine the test case to be modified associated with the first functional feature, and modify the test case to be modified according to the first functional feature.
[0161] In some optional implementations, after deleting the test case to be deleted, the device is further used to:
[0162] Determine the dependency relationship between other historical test cases except the test case to be deleted and the newly added function, wherein the dependency relationship is used to determine the impact of the newly added function on the historical functions corresponding to other historical test cases;
[0163] Acquire newly added test requirement points of the software project product, where the newly added test requirement points are used to adjust the test cases in the test case set.
[0164] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0165] The test case management device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0166] The embodiment of the present invention also provides a computer device having the above Figure 4 The test case management device shown.
[0167] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.
[0168] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0169] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0170] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0171] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0172] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0173] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0174] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0175] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined in this application.
Claims
1. A test case management method, It is characterized in that The method comprises: Obtain the first functional characteristics of the new functions of the software project product; Generate and save the current test case according to the first functional feature and the preset test case generation algorithm; Determine that the current test case corresponds to first product information and first product functional characteristics of the software project product, and determine that the historical test case corresponds to second product information and second product functional characteristics of the software project product; Compare the first product information with the second product information, compare the first product function characteristics with the second product function characteristics, determine the test cases to be deleted in the historical test cases according to the comparison results, and delete the test cases to be deleted.
2. The method according to claim 1, It is characterized in that After deleting the test case to be deleted, the method further includes: Acquire a second functional characteristic of the function to be tested of the software project product; Filter the test cases in the test case set according to the second functional feature to obtain a test case screening result, wherein the test case set includes the historical test cases and the current test cases, and the test case screening result includes a first preset number of test cases in the test case set; The priority of each test case in the test case screening result is obtained, and the test case with the highest priority is used as the target test case, wherein the target test case is used to test the function to be tested.
3. The method according to claim 2, It is characterized in that After taking the test case with the highest priority as the target test case, the method further includes: Determining an execution strategy for the target test case, and executing the target test case according to the execution strategy, testing the function to be tested, and obtaining a first execution result of the target test case; If it is determined according to the first execution result that a fault exists during the execution of the target test case, an association relationship between the fault and the target test case is generated; If it is determined according to the first execution result that a test case is blocked during the execution of the target test case, obtaining relevant information of the test case blocking; The first execution result and execution exception information are stored in a database, wherein the execution exception information includes the association relationship and / or the related information.
4. The method according to claim 2, It is characterized in that The method further comprises: Obtain the functions to be abandoned of the software project product; The test case corresponding to the to-be-discarded function is determined in the test case set, and the test case corresponding to the to-be-discarded function is deleted.
5. The method according to claim 2, It is characterized in that The step of screening the test cases in the test case set according to the second functional feature to obtain the test case screening result includes: Acquire, from the second functional feature, first information of product functional characteristics of the software project product corresponding to the test case in the test case set, second information of product scenario, third information of product equipment, and fourth information of expected product results; Using the first information, the second information, the third information, and the fourth information as benchmark keywords, screening the test cases in the test case set according to the benchmark keywords to obtain an intermediate screening result, wherein the intermediate screening result includes a second preset number of test cases in the test case set; Obtaining a second execution result of the test case in the intermediate screening result, and determining the defect hit rate of the test case in the intermediate screening result according to the second execution result, wherein the second execution result is obtained after executing the test case in the intermediate screening result to test the software project product when the software project product is launched; The test cases whose defect hit rate is less than a preset threshold in the intermediate screening results are deleted to obtain the test case screening results.
6. The method according to claim 1, It is characterized in that The method further comprises: Obtaining historical functional characteristics of the software project product; Determining whether the first functional feature can cover the historical functional feature; If yes, generating a new test case according to the first functional feature; If not possible, determine the test case to be modified associated with the first functional feature, and modify the test case to be modified according to the first functional feature.
7. The method according to claim 2, It is characterized in that After deleting the test case to be deleted, the method further includes: Determine the dependency relationship between other historical test cases except the test case to be deleted and the newly added function, wherein the dependency relationship is used to determine the impact of the newly added function on the historical functions corresponding to the other historical test cases; Acquire newly added test requirement points of the software project product, wherein the newly added test requirement points are used to adjust the test cases in the test case set.
8. A test case management device, It is characterized in that The device comprises: An acquisition module, used to acquire a first functional feature of a new function of a software project product; A generating module, used to generate and save a current test case according to the first functional feature and a preset test case generating algorithm; A determination module, used to determine that the current test case corresponds to the first product information and the first product functional characteristics of the software project product, and to determine that the historical test case corresponds to the second product information and the second product functional characteristics of the software project product; A comparison module is used to compare the first product information with the second product information, compare the first product function characteristics with the second product function characteristics, determine the test cases to be deleted in the historical test cases according to the comparison results, and delete the test cases to be deleted.
9. A computer device, It is characterized in that include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the test case management method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the test case management method according to any one of claims 1 to 7.
