Regression case recommendation method and device, electronic equipment and storage medium

By automatically comparing and analyzing the code comparison information and code penetration information of regression use cases, identifying similar use cases and recommending target use cases, the problem that test engineers cannot identify the similarity of use cases in full regression verification is solved, and the testing efficiency is improved.

CN120029911APending Publication Date: 2025-05-23SHANGHAI FAIRYLAND INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510051146.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

When testing engineers perform full regression verification after application changes, they cannot identify the similarity or repetition of regression use cases, resulting in repeated verification work and reducing testing efficiency.

Method used

By responding to the user's operation of determining the use case type, we automatically determine the use case similar results based on the code comparison information and code penetration information between the regressive use cases of each business function, and determine the target recommended use case based on this, displaying the recommended information to guide the tester.

Benefits of technology

It effectively avoids repeated verification of similar regression use cases, reduces repeated labor among testers, and improves the regression testing efficiency of application development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029911A_ABST
    Figure CN120029911A_ABST
Patent Text Reader

Abstract

The invention provides a regression use case recommendation method and device, electronic equipment and a storage medium, and belongs to the technical field of computers, and the method comprises the following steps: in response to a first operation of determining a use case type by a user, determining a regression use case of each service function; based on the code comparison information and the code penetration information between the regression cases of each service function, determining a case similarity result of each service function; based on the case similarity result of each service function, determining a target recommendation case of each service function; and displaying the recommendation information of the target recommendation use case of each service function. According to the method and the device, a tester can be helped to intuitively, quickly and accurately judge whether the target recommended case recommended by the test system belongs to repeated verification or not, and effective regression test guidance is provided for the tester, so that the situation that similar regression cases are repeatedly verified in a full-quantity regression test can be avoided; repeated labor of testers is reduced, and regression testing efficiency of application program development is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for recommending regression use cases. Background Art

[0002] A regression test case is a test case used to test whether the existing business functions of an application are affected after changes such as fixing defects, adding new functions, or modifying code occur. Its purpose is to ensure that no new defects are introduced after the application code is changed, and to ensure that the existing functions in the application still work as expected, so as to achieve the ultimate goal of ensuring that application development meets expectations.

[0003] Currently, test engineers often use full regression verification to perform software development testing, that is, after the application is changed, regression use cases for all business functions are generated and executed to perform thorough regression testing on the entire application system.

[0004] However, the changes that occur in the application include partial changes, and the regression cases of all business functions generated contain the same situations as the previous test cases, that is, there are redundant cases, and the test engineers cannot obtain information such as the similarity or duplication of the regression cases. As a result, the test engineers use similar cases to repeat the verification work, resulting in low regression testing efficiency. Summary of the invention

[0005] The present invention provides a regression test case recommendation method, device, electronic device and storage medium, which are used to solve the defect in the prior art that test engineers use similar test cases to perform repeated verification work, and provide effective regression testing guidance for testers to avoid repeated verification of similar regression test cases.

[0006] The present invention provides a method for recommending a regression use case, comprising:

[0007] In response to a first operation of the user determining a use case type, determining a regression use case for each business function;

[0008] Determine a similarity result of the use case of each business function based on the code comparison information and code penetration information between the regression use cases of each business function;

[0009] Determine a target recommended use case for each business function based on the use case similarity results for each business function;

[0010] The recommendation information of the target recommended use case of each business function is displayed.

[0011] According to a regression use case recommendation method provided by the present invention, based on the use case similarity results of each business function, a target recommended use case of each business function is determined, including:

[0012] Determine a first recommended use case based on similar use cases with similar results of the use cases;

[0013] The regression case whose similarity result of the case is not similar is used as the second recommended case;

[0014] The target recommended use case is determined based on the first recommended use case and / or the second recommended use case.

[0015] According to a regression use case recommendation method provided by the present invention, the recommendation information includes a use case status; before displaying the recommendation information of the target recommended use case of each business function, for any target recommended use case, determining the use case status of any target recommended use case includes:

[0016] If the status of all regression use cases in the regression use case set corresponding to any target recommended use case is to be regressed, determining that the use case status of any target recommended use case is to be regressed;

[0017] If the status of all regression use cases in the regression use case set is passed, determining the use case status of any target recommended use case is passed;

[0018] If there is at least one regression use case in the regression use case set whose status is failed, determining that the use case status of any target recommended use case is failed;

[0019] If there is at least one regression case in the regression case set whose status is passed and at least one regression case whose status is pending regression, determining that the case status of any target recommended case is similarly passed;

[0020] The regression use case set is determined based on the first recommended use case and its similar use cases, or the regression use case set is determined based on the second recommended use case.

[0021] According to a method for recommending regression use cases provided by the present invention, determining a first recommended use case based on similar use cases having similar use case similarity results includes:

[0022] Determine a number of similar use case sets based on similar use cases with similar results of the use cases;

[0023] For any similar use case set, a first recommended use case is determined according to the similar use cases in the similar use case set whose status is passed.

[0024] According to a regression use case recommendation method provided by the present invention, determining a first recommended use case according to the similar use case whose status is passed in any similar use case set includes:

[0025] When the number of the similar use cases in the set of any similar use cases with a status of passed is one, taking the similar use cases in the set of any similar use cases with a status of passed as the first recommended use case;

[0026] When the number of the similar use cases in the set of any similar use cases that is in a passed state is two or more, the first recommended use case is determined according to the use case numbers of the similar use cases in the set of any similar use cases that is in a passed state.

[0027] According to a regression use case recommendation method provided by the present invention, when the target recommended use case includes any of the first recommended use cases, the recommendation information includes a similar folding mark, a use case name, and the number of similar use cases; the recommendation information of the target recommended use case displaying each business function includes:

[0028] In the first display area of ​​the target recommended use case, the similar folding mark is displayed; the similar folding mark is used to instruct the user to enter a second operation in the first display area; the second operation is used to trigger the display of similar use cases of the target recommended use case;

[0029] In the second display area of ​​the target recommended use case, the similar folding mark, the use case name and the number of similar use cases are displayed in a specified manner; the specified manner is the same as the hyperlink display manner.

[0030] According to a regression use case recommendation method provided by the present invention, when the regression use case has a conditional branch, the code comparison information and code penetration information between the regression use cases of each business function are based on to determine the use case similarity result of each business function, including:

[0031] Determine a first sub-similarity result based on the code comparison information between the regression use cases;

[0032] Determine a second sub-similar result based on the code penetration information of all conditional branches between the regression use cases;

[0033] When the first sub-similarity result and the second sub-similarity result are completely consistent, it is determined that the use case similarity results between the regression use cases are similar.

[0034] The present invention also provides a device for recommending regression use cases, comprising:

[0035] An operation response module, configured to determine a regression use case for each business function in response to a first operation of a user determining a use case type;

[0036] A similar result acquisition module, used to determine the similar result of the use case of each business function based on the code comparison information and code penetration information between the regression use cases of each business function;

[0037] A recommended use case determination module, configured to determine a target recommended use case for each business function based on the use case similarity results for each business function;

[0038] The information display module is used to display the recommendation information of the target recommended use cases of each business function.

[0039] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, a method for recommending regression use cases as described in any one of the above is implemented.

[0040] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for recommending regression use cases as described in any one of the above is implemented.

[0041] The regression case recommendation method, device, electronic device and storage medium provided by the present invention can automatically determine the case similarity result of each business function according to the code comparison information and code penetration information between the regression case of each business function by responding to the operation of determining the case type, and then automatically determine the target recommended case of each business function, and display the recommendation information of the target recommended case, so as to help testers intuitively, quickly and accurately judge whether the target recommended case recommended by the execution test system belongs to repeated verification, provide effective regression testing guidance for testers, and thus avoid the situation of repeated verification of similar regression case in full regression testing, reduce the duplication of testers' work, and improve the regression testing efficiency of application development. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 any creative work.

[0043] Figure 1 It is a flowchart of a recommended method for a regression use case provided by the present invention.

[0044] Figure 2is an example diagram of the user interface provided by the present invention.

[0045] Figure 3 This is a partial example diagram of the user interface provided by the present invention.

[0046] Figure 4 It is a schematic diagram of the structure of a recommendation device for a regression use case provided by the present invention.

[0047] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] It should be noted that, in the description of the present invention, the term "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0050] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" means at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0051] Combine the following Figure 1-Figure 5 The invention describes a recommended method, device, electronic device and storage medium for a regression use case.

[0052] Figure 1 is a flowchart of a recommended method for a regression use case provided by the present invention, such as Figure 1 As shown, the recommended method for the regression use case includes but is not limited to steps 101 to 104.

[0053] It should be noted that the execution subject of the recommendation method for regression use cases provided by the present invention can be a server, a computer device, such as a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc.

[0054] Step 101: In response to a first operation of a user determining a use case type, a regression use case for each business function is determined.

[0055] The use case type is a type of regression use case classified from the perspectives of test content, test purpose, and test execution method, including but not limited to functional use cases, automated use cases, etc.

[0056] Among them, the functional test case is a regression test case mainly used to verify whether the various business functions of the application can be executed correctly and meet the requirements in the requirement specification or design document; the automated test case is a regression test case that is mainly executed through automated tools or frameworks rather than manually.

[0057] Business functions are the specific functions of the business implemented by the application under development. Taking an application for retail management as an example, business functions include but are not limited to retail delivery, retail return, etc., which can be divided into retail delivery-deletion, retail delivery-batch deletion, retail delivery-document number query (retail delivery-order query), retail delivery-addition, retail return-query, etc.

[0058] Generally speaking, different regression use cases under the same business function can belong to different use case types, and different regression use cases under the same use case type can belong to different business functions.

[0059] It should be noted that the various business functions of the application are determined according to the specific purpose and functional requirements of the application, and the present invention does not impose any limitation on this.

[0060] The first operation is a confirmation operation of the user on the interface elements representing different use case types on the user interface. For example, the first operation is an operation of the user clicking on a tab representing different use case types on the user interface.

[0061] Specifically, Figure 2 is an example diagram of the user interface provided by the present invention, such as Figure 2As described, the user interface of the application for retail management testing displays interface elements representing different use case types, including but not limited to a "Function Use Case Recommendation" tab, an "Automation Use Case Recommendation" tab, and an "API Recommendation" tab. When a user clicks the "Function Use Case Recommendation" tab, the user performs a first operation of determining the use case type. In response to the click operation, the backend determines the regression use cases corresponding to each business function of the type of function use case stored in the test system database after the test case is generated. There can be one or more regression use cases corresponding to each business function.

[0062] Step 102: Based on the code comparison information and code penetration information between the regression use cases of each business function, determine the use case similarity result of each business function.

[0063] Code comparison information is comparison information determined based on the differences between different versions of code; code penetration information is information that is determined by analyzing the execution paths or logic flows of different versions of code to determine whether the code paths are fully tested, verified, and covered.

[0064] Specifically, after determining the regression use cases corresponding to each business function, for each business function, when there are more than two regression use cases corresponding to the business function, the use case similarity results between the regression use cases corresponding to the business function are determined based on the code comparison information and code penetration information between the regression use cases.

[0065] Among them, when the code comparison information and code penetration information between the regression use cases are consistent, the use case similarity results between the regression use cases are determined to be similar, and the regression use cases corresponding to the business function are similar use cases; when the code comparison information or code penetration information between the regression use cases are inconsistent, the use case similarity results between the regression use cases are determined to be dissimilar, and the regression use cases corresponding to the business function are not similar use cases.

[0066] Step 103: Determine a target recommended use case for each business function based on the use case similarity results for each business function.

[0067] Specifically, for each business function, after obtaining the similarity results of the use cases of the business function, according to certain recommendation rules, a target recommended use case to be recommended to the user is determined from the regression use cases corresponding to the business function.

[0068] Step 104: Display recommendation information of the target recommended use case of each business function.

[0069] Specifically, the steps of determining the use case similarity result of the business function based on the code comparison information and code penetration information between the regression use cases of the business function, and determining the target recommended use case of the business function according to the use case similarity result of the business function are repeatedly performed to determine the target recommended use cases of all business functions. After determining the target recommended use cases of all business functions, the recommendation information of the target recommended use cases of all business functions is displayed on the user interface of the test application system.

[0070] The recommendation information includes but is not limited to the use case number, use case name, application, number of impact methods, recommendation level, version, recommendation time, impact code, use case status and other information of the target recommended use case.

[0071] For example, combined with Figure 2 As shown, the user interface displays the recommended information for target recommended utilization of the four business functions of "Retail Outbound - Delete", "Retail Outbound - Check Order", "Retail Outbound - Add", and "Retail Return - Query", including the use case number, use case name, number of affected methods, recommendation level, version, and use case status.

[0072] Optionally, the displaying the recommendation information of the target recommended use cases of each business function includes: sorting the target recommended use cases according to their use case numbers, recommendation levels or versions.

[0073] Optionally, the display of recommendation information of the target recommended use cases for each business function includes: displaying the recommendation information of the target recommended use cases on a user interface that receives a first operation in which a user determines a use case type; or, displaying the recommendation information of the target recommended use cases in a pop-up window that pops up in the user interface; or, displaying the recommendation information of the target recommended use cases in a newly opened page outside the user interface.

[0074] The regression case recommendation method provided by the present invention can automatically determine the case similarity result of each business function according to the code comparison information and code penetration information between the regression case studies of each business function by responding to the operation of determining the case type, and then automatically determine the target recommended case study for each business function, and display the recommendation information of the target recommended case study, so as to help testers intuitively, quickly and accurately judge whether the target recommended case study recommended by the execution test system belongs to repeated verification, provide effective regression testing guidance for testers, and thus avoid the situation of repeated verification of similar regression case studies in the full regression test, reduce the duplication of work of testers, and improve the regression testing efficiency of application development.

[0075] Based on the above embodiment, as an optional embodiment, determining a target recommended use case for each business function based on the use case similarity result of each business function includes:

[0076] Determine a first recommended use case based on similar use cases with similar results of the use cases;

[0077] The regression case whose similarity result of the case is not similar is used as the second recommended case;

[0078] The target recommended use case is determined based on the first recommended use case and / or the second recommended use case.

[0079] Specifically, for any business function, based on the code comparison information and code penetration information between all regression use cases under the business function, the use case similarity results between different regression use cases can be obtained. For similar use cases with similar use case similarity results, one use case is determined from these similar use cases as the first recommended use case; for regression use cases with dissimilar use case similarity results, that is, among all regression use cases under the same business function,

[0080] It should be noted that, for any business function, the first recommended use case determined based on the use case similarity results can be one or more than two; the second recommended use case determined based on the use case similarity results can be one or more than two, and the present invention does not impose any restrictions on this.

[0081] For example, combined with Figure 2 As shown in the figure, taking the business function "retail outbound" as an example, there are 7 regression use cases under the business function "retail outbound". According to the code comparison information and code penetration information between the 7 regression use cases, it is determined that the use case similarity results between 5 regression use cases are similar. These 5 regression use cases are similar use cases, and the similar use case with the use case number "101" and the use case name "retail outbound-deletion" is determined as the first recommended use case; in addition, the regression use cases with the use case numbers "102" and "103" are not similar to other regression use cases, so the regression use cases with the use case number "102" and the use case name "retail outbound-check order" and the use case number "103" and the use case name "retail outbound-addition" are all used as the second recommended use cases. Finally, for the business function "retail outbound", the target recommended use cases with the use case numbers "101", "102" and "103" are determined to display the recommended information.

[0082] It can be understood that if no similar similar use cases can be obtained based on the use case similarity results, the target recommended use case is determined only based on the second recommended use case; if it is determined based on the use case similarity results that all regression use cases have similar similar use cases, the target recommended use case is determined only based on the first recommended use case.

[0083] The regression case recommendation method provided by the present invention performs similarity analysis on regression case under business functions, and for similar case, only one recommended case is determined from the similar case, and for dissimilar regression case, it is directly determined as a recommended case, so that there is no duplicate case in the recommended case whose case information is recommended to the tester, thereby providing effective regression test guidance for the tester.

[0084] Based on the above embodiment, as an optional embodiment, the recommendation information includes a use case status; before displaying the recommendation information of the target recommended use case of each business function, for any target recommended use case, determining the use case status of any target recommended use case includes:

[0085] If the status of all regression use cases in the regression use case set corresponding to any target recommended use case is to be regressed, determining that the use case status of any target recommended use case is to be regressed;

[0086] If the status of all regression use cases in the regression use case set is passed, determining the use case status of any target recommended use case is passed;

[0087] If there is at least one regression use case in the regression use case set whose status is failed, determining that the use case status of any target recommended use case is failed;

[0088] If there is at least one regression case in the regression case set whose status is passed and at least one regression case whose status is pending regression, determining that the case status of any target recommended case is similarly passed;

[0089] The regression use case set is determined based on the first recommended use case and its similar use cases, or the regression use case set is determined based on the second recommended use case.

[0090] Among them, Pending regression, Passed, and Failed are all use case states of regression use cases. Pending regression means that the regression use case has not been executed after the application is updated. Passed means that the regression use case has been executed after the application is updated and the expected result is consistent with the actual result. Failed means that the regression use case has been executed after the application is updated and the expected result is inconsistent with the actual result.

[0091] Specifically, after determining the target recommended use case, before displaying the recommendation information of the target recommended use case, the use case status of the target recommended use case is first determined. For any target recommended use case, a regression use case set is first constructed. If the target recommended use case belongs to the first recommended use case, a regression use case set is constructed based on the target recommended use case and similar use cases; if the target recommended use case belongs to the second recommended use case, a regression use case set is constructed only based on the target recommended use case.

[0092] Furthermore, if the status of all regression use cases in the regression use case set is to be regressed, the use case status of the target recommended use case is determined to be to be regressed; if the status of all regression use cases in the regression use case set is passed, the use case status of the target recommended use case is determined to be passed; if there is at least one regression use case in the regression use case set with a failed status, even if there are other regression use cases in the regression use case set with a pending regression status, the use case status of the target recommended use case is directly determined to be failed; if there is at least one regression use case in the regression use case set with a passed status or at least one regression use case with a pending regression status, and there is no regression use case in the regression use case set with a failed status, the use case status of the target recommended use case is determined to be similarly passed.

[0093] That is, similar pass means that although there are newly generated regression use cases that have not been executed after the application is updated, similar use cases generated before the application is updated have been executed and passed, so the newly generated regression use cases that have not been executed at this time may not be executed again.

[0094] The regression case recommendation method provided by the present invention determines the case status of each target recommended case by analyzing the status of the target recommended case and its similar case, and displays the case status as recommendation information, thereby providing effective regression testing guidance for testers. In particular, when there are similar case studies, the testers can be clearly guided not to verify similar case studies that have not been executed but have similar passed case status, thereby reducing duplication of work for testers and improving testing efficiency.

[0095] Based on the above embodiment, as an optional embodiment, determining the first recommended use case based on similar use cases having similar use case similarity results includes:

[0096] Determine a number of similar use case sets based on similar use cases with similar results of the use cases;

[0097] For any similar use case set, a first recommended use case is determined according to the similar use cases in the similar use case set whose status is passed.

[0098] Specifically, when determining the first recommended use case, more than two first recommended use cases may be determined. When more than two first recommended use cases are determined, it means that there are similar use case sets with the same number as the first recommended use cases, that is, a first recommended use case is determined from each similar use case set. The use case similarity results between similar use cases in the same similar use case set are similar, and the use case similarity results between any two similar use cases in different similar use case sets are dissimilar.

[0099] For any similar use case set, when determining the first recommended use case of the similar use case set, the similar use case with the status of passed is preferentially selected as the first recommended use case. When there are more than two similar use cases with the status of passed in the similar use case set, a similar use case is determined as the first recommended use case according to the use case number, version or random selection.

[0100] Based on the above embodiment, as an optional embodiment, determining a first recommended use case according to the similar use case whose status in any similar use case set is passed includes:

[0101] When the number of the similar use cases in the set of any similar use cases with a status of passed is one, taking the similar use cases in the set of any similar use cases with a status of passed as the first recommended use case;

[0102] When the number of the similar use cases in the set of any similar use cases that is in a passed state is two or more, the first recommended use case is determined according to the use case numbers of the similar use cases in the set of any similar use cases that is in a passed state.

[0103] For example, the regression use cases corresponding to a business function include use case A with a status of pending regression, use case B with a status of passed, use case C with a status of passed, and use case D with a status of passed. Based on the code comparison information and code penetration information between these regression use cases, it is determined that use case A and use case B are similar use cases, and use case C and use case D are similar use cases. Then, it is determined that use case A and use case B constitute similar use case set a, and use case C and use case D constitute similar use case set b. Then, when determining the two first recommended use cases of the business function, for similar use case set a, use case B is directly used as the first recommended use case; for similar use case set b, use case C or use case D is selected as the first recommended use case.

[0104] The regression case recommendation method provided by the present invention performs similarity comparison on similar regression case studies under business functions, and determines the first recommended case study recommended to the tester when similar case studies exist in combination with the case study similarity results and the case study status of the regression case study, thereby determining a better recommended case study. No matter how many similar case studies there are, only one of them is displayed to the tester, thereby providing the tester with effective regression testing guidance.

[0105] Based on the above embodiment, as an optional embodiment, when the target recommended use case includes any of the first recommended use cases, the recommendation information includes a similar folding mark, a use case name, and the number of similar use cases; the recommendation information of the target recommended use case displaying each business function includes:

[0106] In the first display area of ​​the target recommended use case, the similar folding mark is displayed; the similar folding mark is used to instruct the user to enter a second operation in the first display area; the second operation is used to trigger the display of similar use cases of the target recommended use case;

[0107] In the second display area of ​​the target recommended use case, the similar folding mark, the use case name and the number of similar use cases are displayed in a specified manner; the specified manner is the same as the hyperlink display manner.

[0108] The first display area is an area on the user interface used to display similar folding marks, and the area of ​​the first display area is greater than or equal to the area occupied by the similar folding marks.

[0109] The second display area is an area on the user interface used to display similar folding marks, use case names and the number of similar use cases. The second display area is greater than or equal to the area occupied by the similar folding marks, use case names and the number of similar use cases.

[0110] Specifically, when the target recommended use case includes any first recommended use case, that is, when there are similar use cases to the target recommended use case, the recommendation information displayed for the target recommended use case includes but is not limited to a similar folding mark, a use case name, and the number of similar use cases.

[0111] Combination Figure 2 As shown, taking the target recommended use case with the use case number "101" as an example, "5" is the number of similar use cases of the target recommended use case, and "Retail Outbound-Delete" is the name of the use case.

[0112] Figure 3 is a partial example diagram of the user interface provided by the present invention, such as Figure 3 As shown, the dashed box is the first display area 301, and the dotted box is the second display area 302. The tester uses the folding mark, use case name and number of similar use cases displayed in the second display area 302 in the same designated manner as the hyperlink display method to highlight to the tester that there are similar use cases to the target recommended use case. The tester further inputs a second operation such as single-click or double-click in the first display area 301 displaying a similar folding mark, which can trigger the user interface to expand and display similar use cases of the target recommended use case in the current page, pop-up window or newly opened window, so that the tester can understand the details of the similar use cases. Among them, the details of similar use cases include but are not limited to use case name, number of similar use cases, use case number, use case name, application, number of affected methods, recommendation level, version, recommendation time, affected code, use case status and other information.

[0113] Optionally, when displaying similar use cases of the target recommended use case, if the status of the similar use case is passed, it will be displayed first; when the status of similar use cases is passed, failed, pending regression, or similarly passed, the similar use cases are sorted in ascending order according to the use case number.

[0114] The regression case recommendation method provided by the present invention provides effective regression testing guidance for testers from the perspective of similar case duplication by highlighting the similar folding marks, case name, and recommended information of the number of similar case for target recommended cases where similar case exists, thereby avoiding repeated verification.

[0115] Based on the above embodiment, as an optional embodiment, when the regression use case has a conditional branch, the code comparison information and code penetration information between the regression use cases of each business function are based on to determine the use case similarity result of each business function, including:

[0116] Determine a first sub-similarity result based on the code comparison information between the regression use cases;

[0117] Determine a second sub-similar result based on the code penetration information of all conditional branches between the regression use cases;

[0118] When the first sub-similarity result and the second sub-similarity result are completely consistent, it is determined that the use case similarity results between the regression use cases are similar.

[0119] Specifically, when the regression use case has conditional branches, when determining the use case similarity results of each business function, on the one hand, the first sub-similarity result is determined based on the code comparison information between the regression use cases. If the code comparison information is completely consistent, such as the methods called in the code, line numbers, and change methods, the first sub-similarity result is determined to be completely consistent; on the other hand, the second sub-similarity result is determined based on the code penetration information of all conditional branches between the regression use cases, that is, the execution path or logic flow information. If the code penetration information is completely consistent, such as the historical penetration and the molecular conditions of the changes are completely consistent, the second sub-similarity result is determined to be completely consistent. Only when the first sub-similarity result and the second sub-similarity result are completely consistent, the use case similarity results between the regression use cases are determined to be similar. If either of the first sub-similarity result and the second sub-similarity result is not completely consistent, the use case similarity results between the regression use cases are determined to be dissimilar.

[0120] For example, before the application was updated, regression case A included a conditional branch 0 The code includes "if(a>1||b<10)". After the application is updated, the newly generated regression case A 1The corresponding code includes "if(a>10||b<100)". Since the conditional branches of "a>1" and "b<10" have been changed to "a>10" and "b<100", the penetration point influence point has changed, and the code penetration information is not completely consistent. Therefore, we regress to use case A. 0 and regression case A 1 The results of similar use cases are not similar.

[0121] The regression case recommendation method provided by the present invention determines that the case similarity results between two regression case studies are similar only when the code change information and the code penetration information are completely consistent, thereby ensuring the accuracy of similar case judgment to the greatest extent, providing effective regression testing guidance for testers, and thus avoiding the situation where similar regression case studies are repeatedly verified in full regression testing, reducing the duplication of work for testers, and improving the regression testing efficiency of application development.

[0122] Figure 4 is a schematic diagram of the structure of the recommended device for the regression use case provided by the present invention, such as Figure 4 As shown, the regression use case recommendation device includes but is not limited to an operation response module 401 , a similar result acquisition module 402 , a recommended use case determination module 403 and an information display module 404 .

[0123] The operation response module 401 is used to determine the regression use case of each business function in response to the first operation of the user to determine the use case type.

[0124] The similarity result acquisition module 402 is used to determine the similarity result of the use cases of each business function based on the code comparison information and code penetration information between the regression use cases of each business function.

[0125] The recommended use case determination module 403 is used to determine a target recommended use case for each business function based on the use case similarity results of each business function.

[0126] The information display module 404 is used to display the recommendation information of the target recommended use case of each business function.

[0127] It should be noted that the device for recommending regression use cases provided by the present invention can execute the method for recommending regression use cases described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.

[0128] The regression case recommendation device provided by the present invention can automatically determine the case similarity result of each business function according to the code comparison information and code penetration information between the regression case studies of each business function by responding to the operation of determining the case type, and then automatically determine the target recommended case study for each business function, and display the recommendation information of the target recommended case study, so as to help testers intuitively, quickly and accurately judge whether the target recommended case study recommended by the execution test system belongs to repeated verification, provide effective regression testing guidance for testers, and thus avoid the situation of repeated verification of similar regression case studies in the full regression test, reduce the duplication of work of testers, and improve the regression testing efficiency of application development.

[0129] Figure 5 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 5 As shown, the electronic device may include: a processor (Processor) 510, a communication interface (Communications Interface) 520, a memory (Memory) 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the regression use case recommendation method provided by any of the above embodiments, and the regression use case recommendation method includes but is not limited to the following steps: in response to the user's first operation of determining the use case type, determining the regression use case of each business function; based on the code comparison information and code penetration information between the regression use cases of each business function, determining the use case similarity result of each business function; based on the use case similarity result of each business function, determining the target recommended use case of each business function; and displaying the recommendation information of the target recommended use case of each business function.

[0130] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0131] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the regression use case recommendation method provided in any of the above embodiments. The regression use case recommendation method includes but is not limited to the following steps: in response to a first operation of a user to determine a use case type, determining the regression use case of each business function; based on the code comparison information and code penetration information between the regression use cases of each business function, determining the use case similarity result of each business function; based on the use case similarity result of each business function, determining the target recommended use case of each business function; and displaying recommendation information of the target recommended use case of each business function.

[0132] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the regression use case recommendation method provided in any of the above-mentioned embodiments, wherein the regression use case recommendation method includes but is not limited to the following steps: in response to a first operation of a user to determine a use case type, determining a regression use case for each business function; based on code comparison information and code penetration information between the regression use cases for each business function, determining a use case similarity result for each business function; based on the use case similarity result for each business function, determining a target recommended use case for each business function; and displaying recommendation information for the target recommended use case for each business function.

[0133] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0134] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for recommending regression use cases, characterized in that: include: In response to a first operation of the user determining a use case type, determining a regression use case for each business function; Determine a similarity result of the use case of each business function based on the code comparison information and code penetration information between the regression use cases of each business function; Determine a target recommended use case for each business function based on the use case similarity results for each business function; The recommendation information of the target recommended use case of each business function is displayed.

2. The method for recommending regression use cases according to claim 1, characterized in that: Determining a target recommended use case for each business function based on the use case similarity results of each business function includes: Determine a first recommended use case based on similar use cases with similar results of the use cases; The regression case whose similarity result of the case is not similar is used as the second recommended case; The target recommended use case is determined based on the first recommended use case and / or the second recommended use case.

3. The method for recommending regression use cases according to claim 2, characterized in that: The recommendation information includes a use case status; before displaying the recommendation information of the target recommended use case of each business function, determining the use case status of any target recommended use case for any target recommended use case, including: If the status of all regression use cases in the regression use case set corresponding to any target recommended use case is to be regressed, determining that the use case status of any target recommended use case is to be regressed; If the status of all regression use cases in the regression use case set is passed, determining the use case status of any target recommended use case is passed; If there is at least one regression use case in the regression use case set whose status is failed, determining that the use case status of any target recommended use case is failed; If there is at least one regression case in the regression case set whose status is passed and at least one regression case whose status is pending regression, determining that the case status of any target recommended case is similarly passed; The regression use case set is determined based on the first recommended use case and its similar use cases, or the regression use case set is determined based on the second recommended use case.

4. The method for recommending regression use cases according to claim 2, characterized in that: The determining a first recommended use case based on similar use cases having similar use case similarity results includes: Determine a number of similar use case sets based on similar use cases with similar results of the use cases; For any similar use case set, a first recommended use case is determined according to the similar use cases in the similar use case set whose status is passed.

5. The method for recommending regression use cases according to claim 4, characterized in that: The determining a first recommended use case according to the similar use case whose status is passed in any one of the similar use cases includes: When the number of the similar use cases in the set of any similar use cases with a status of passed is one, taking the similar use cases in the set of any similar use cases with a status of passed as the first recommended use case; When the number of the similar use cases in the set of any similar use cases that is in a passed state is two or more, the first recommended use case is determined according to the use case numbers of the similar use cases in the set of any similar use cases that is in a passed state.

6. The method for recommending regression use cases according to claim 2, characterized in that: In the case where the target recommended use case includes any of the first recommended use cases, the recommendation information includes a similar folding mark, a use case name, and a number of similar use cases; The display of recommendation information of the target recommended use case of each business function includes: In the first display area of ​​the target recommended use case, the similar folding mark is displayed; the similar folding mark is used to instruct the user to enter a second operation in the first display area; the second operation is used to trigger the display of similar use cases of the target recommended use case; In the second display area of ​​the target recommended use case, the similar folding mark, the use case name and the number of similar use cases are displayed in a specified manner; the specified manner is the same as the hyperlink display manner.

7. The method for recommending regression use cases according to claim 1, characterized in that: In the case where the regression use case has a conditional branch, the code comparison information and code penetration information between the regression use cases of each business function are based on to determine the use case similarity result of each business function, including: Determine a first sub-similarity result based on the code comparison information between the regression use cases; Determine a second sub-similar result based on the code penetration information of all conditional branches between the regression use cases; When the first sub-similarity result and the second sub-similarity result are completely consistent, it is determined that the use case similarity results between the regression use cases are similar.

8. A recommendation device for regression use cases, characterized in that: include: An operation response module, configured to determine a regression use case for each business function in response to a first operation of a user determining a use case type; A similar result acquisition module, used to determine the similar result of the use case of each business function based on the code comparison information and code penetration information between the regression use cases of each business function; A recommended use case determination module, configured to determine a target recommended use case for each business function based on the use case similarity results for each business function; The information display module is used to display the recommendation information of the target recommended use cases of each business function.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the recommendation method for the regression use case according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for recommending a regression use case as claimed in any one of claims 1 to 7 is implemented.