Intelligent use case recommendation method and system based on link consanguinity

By adopting a link-based intelligent use case recommendation method in the microservice architecture, dynamically recommending and updating test cases, the problem of old test cases being abandoned after system upgrade is solved, and efficient and accurate test case management is achieved.

CN119396741AActive Publication Date: 2025-02-07HANGYIN CONSUMER FINANCE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411989934.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-02-07
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

Under the microservice architecture, after the system is upgraded and refactored, the old test cases have link differences, parameter differences, etc., and the test cases under the new architecture need to be re-recorded, resulting in huge workload.

Method used

Using the intelligent use case recommendation method based on link blood relationship, we analyze the call link of the software code, determine the key code segment of the code segment, and combine the call data of the link blood relationship data and the call data of the code segment to dynamically recommend and update the test cases.

Benefits of technology

It realizes the adaptation of test cases from the code changes of key code segments, avoids the problem of insufficient stability caused by frequent modification of test cases, and improves the accuracy and efficiency of test cases through intelligent recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396741A_ABST
    Figure CN119396741A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent case recommendation method and system based on link consanguinity, and belongs to the technical field of data management.The method specifically comprises the steps that the types of different key code segments are determined according to the functions of the key code segments, and when it is determined that test cases need to be changed according to code change data of the different types of key code segments, the types of the key code segments are different; the method comprises the following steps: taking a code segment with a changed code as a change code segment, determining matched test cases in test cases according to call data of the change code segment and key code segments in the change code segment in different test cases, and determining link blood relationship data between different matched test cases on the basis of the call data of the test cases, according to the method, the link consanguinity data and the calling data of the code segment are utilized to determine the recommendation processing result of the test case of the software code, and the recommendation processing of the test case of the software code is performed after the recommendation processing result is modified, so that the reliability of test analysis processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data management, and in particular, relates to an intelligent use case recommendation method and system based on link lineage. Background Art

[0002] While the microservice architecture has the advantages of greater flexibility and scalability, it also increases the complexity between systems. This makes the difficulty of designing corresponding test cases and the number of test cases required to cover the scenarios exponentially increase, which is time-consuming and laborious. At the same time, after the system is upgraded and reconstructed, the old test cases have differences in links and parameters and are discarded. At the same time, the test cases under the new architecture need to be re-recorded. When the amount of data reaches a certain level, the workload cannot be ignored.

[0003] In response to the above technical problems, and for the system upgrade and transformation scenarios under the microservice architecture, the present application provides a new link intelligent use case recommendation system that does not require manual recording and can dynamically recommend and update use cases. Specifically, the present invention provides an intelligent use case recommendation method and system based on link lineage. Summary of the invention

[0004] To achieve the purpose of the present invention, the present invention adopts the following technical solutions: According to one aspect of the present invention, a link lineage-based intelligent use case recommendation method is provided.

[0005] An intelligent use case recommendation method based on link lineage, specifically comprising: S1 determines the historical call data of different code segments in different business processes based on the analysis results of the call link of the software code, and determines the key code segment in the code segment in combination with the link association relationship between the code segment and other code segments; S2 determines the types of different key code segments according to their functions, and when it is determined that the test case needs to be changed based on the code change data of different types of key code segments, proceeds to the next step; S3 takes the code segment in which the code is changed as the changed code segment, and determines the matching test case in the test case by using the call data of the changed code segment and the key code segment in the changed code segment in different test cases; S4 determines the link lineage data between different matching test cases based on the calling data of the test case, and uses the link lineage data and the calling data of the code segment to determine the recommended processing results of the test case of the software code, and then modifies the recommended processing results to perform recommended processing of the test case of the software code.

[0006] The beneficial effects of the present invention are: The code change data of different types of key code segments is used to determine whether test case changes are needed, thereby achieving accurate assessment of the adaptability of test cases based on the code changes in key code segments. This not only avoids the technical problem of insufficient test case stability caused by frequent test case modifications, but also ensures accurate testing and analysis when software code changes are made by further combining the code changes in key code segments.

[0007] The recommended processing results of the test cases for the software code are determined by utilizing the link lineage data and the calling data of the code segments. This not only takes into account the differences in the degree of repetition between test cases due to the differences in the link lineage relationships, but also takes into account the differences in the test matching of test cases due to the differences in the calling data of the code segments. This enables the determination of the recommended processing results of the test cases for the software code from multiple angles, which not only ensures the efficiency but also the reliability of the test processing.

[0008] A further technical solution is that the analysis result of the call link is determined according to the call link of the software code in the calling process of the business process.

[0009] A further technical solution is that the historical call data of the code segment in different business processes includes the number of historical calls in different business processes.

[0010] A further technical solution is that the method for determining the key code segment in the code segment is: Based on the historical call data of the code segment in different business processes, determine the business process in which the code segment is called, and use it as the matching business process; According to the historical call data in different matching business processes, other code segments associated with links in different matching business processes are determined, and used as associated code segments; Whether the code segment is a key code segment is determined based on the sum of the numbers of associated code segments matching the business process.

[0011] A further technical solution is that when the total number of associated code segments of the matching business process is greater than a preset code segment number threshold, the code segment is determined to be a key code segment.

[0012] A further technical solution is that the method for determining the key code segment in the code segment is: Based on the historical call data of the code segment in different business processes, determine the business process in which the code segment is called, and use it as the matching business process; According to the historical call data in different matching business processes, other code segments with link associations in different matching business processes are determined, and the other code segments are used as associated code segments, and the screening business process in the matching business process is determined according to the number of associated code segments; Determine whether the code segment is a key code segment based on the number of the screened business processes.

[0013] A further technical solution is that the business process to be screened is a business process whose number of associated code segments is within a preset code segment number range. A further technical solution is that the recommended processing result is modified to perform the recommended processing of the test case of the software code, specifically including: Automatically modifying the recommended processing result according to the changed data of the code segment to obtain a modified result; The modification results are used for recommendation processing of test cases of the software code.

[0014] In a second aspect, the present invention provides a computer system comprising: a memory and a processor that are communicatively connected, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the above-mentioned link lineage-based intelligent use case recommendation method when running the computer program.

[0015] Other features and advantages will be described in the following description. The objects and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and drawings.

[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and other features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.

[0018] Figure 1 It is a flow chart of an intelligent use case recommendation method based on link lineage; Figure 2 It is a flowchart of a method for determining a key code segment in a code segment; Figure 3 It is a flowchart to determine whether the test case needs to be changed; Figure 4 is a flow chart of a method for determining a matching test case in a test case; Figure 5 It is a framework diagram of a computer system. DETAILED DESCRIPTION

[0019] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0020] While the microservice architecture provides the system with greater flexibility and scalability, it also increases the complexity between systems. As a result, the difficulty of designing corresponding test cases and the number of test cases required to cover the scenarios increase exponentially, which is time-consuming and labor-intensive.

[0021] After the system is upgraded and reconstructed, the old test cases are discarded due to differences in links and parameters, and the test cases under the new architecture need to be re-recorded. When the amount of data is large enough, the workload cannot be ignored. Therefore, for the system upgrade and transformation scenarios under the microservice architecture, a new link intelligent use case recommendation system is required, which does not require manual recording and dynamically recommends and updates use cases.

[0022] The present invention dynamically generates and recommends test cases based on link lineage, code coloring and intelligent recommendation. Its core principles and functions are as follows: Code link execution path analysis: By capturing software runtime information, deeply analyzing and recording the code call link structure, building function call graphs, module dependency graphs, etc., the position and role of each function, module, and custom transaction code in the business process can be clarified.

[0023] Code coloring technology application: The code can be colored and marked according to business logic or specific requirements. For example, code segments involving key paths such as important transaction processing, risk control, and exception handling can be highlighted to facilitate intuitive identification of test focus.

[0024] Dynamic blood relationship analysis: Combined with the code link information, the blood relationship between use cases at different levels (such as function level, module level, and custom transaction code level) is dynamically analyzed to form a complete test case impact range map.

[0025] Data cleaning and noise reduction: Use machine learning algorithms to preprocess the large amount of collected runtime data, eliminate irrelevant noise data, extract useful features, and optimize the blood relationship network to ensure the accuracy of subsequent recommendations.

[0026] Smart use case recommendations: Based on the above analysis results and optimized blood relationship data, the intelligent algorithm model is used to recommend test cases. When the code changes or new transaction codes are added, the system can quickly locate the affected links and generate corresponding test case suggestions.

[0027] Visual display and interaction: The intelligently recommended test cases and their lineage characteristics are visualized in the form of charts, making it easier for testers to understand and evaluate the effectiveness and coverage of the recommended cases. A friendly user interface is also provided to support interactive adjustment and optimization of test strategies.

[0028] Key code segments in code segments: The business processes that have been called by the code segments are regarded as calling business processes. The key coefficients of the code segments are determined according to the proportion of the number of calling business processes. The code segments with key coefficients greater than 0.6 are regarded as key code segments.

[0029] Determine whether test case changes need to be made: Use the ratio of key code segments with code changes in the key code segments to determine whether test case changes need to be made. Specifically, if the ratio is greater than 0.4, it is determined that test case changes need to be made.

[0030] Matching test cases in test cases: Determine the matching coefficient of the test cases using the percentage of calls to the changed code segments in the test cases, and consider the test cases with a matching coefficient greater than 0.6 as matching test cases.

[0031] Determination of recommended processing results of test cases for software codes: Matching test cases that have no link blood relationship with other test cases and have a larger matching coefficient are used as recommended processing results of test cases for software codes.

[0032] Embodiment 1 To solve the above problem, according to one aspect of the present invention, Figure 1 As shown, a method for intelligent use case recommendation based on link lineage is provided, which specifically includes: S1 determines the historical call data of different code segments in different business processes based on the analysis results of the call link of the software code, and determines the key code segment in the code segment in combination with the link association relationship between the code segment and other code segments; S2 determines the types of different key code segments according to their functions, and when it is determined that the test case needs to be changed based on the code change data of different types of key code segments, proceeds to the next step; S3 takes the code segment in which the code is changed as the changed code segment, and determines the matching test case in the test case by using the call data of the changed code segment and the key code segment in the changed code segment in different test cases; S4 determines the link lineage data between different matching test cases based on the calling data of the test case, and uses the link lineage data and the calling data of the code segment to determine the recommended processing results of the test case of the software code, and then modifies the recommended processing results to perform recommended processing of the test case of the software code.

[0033] Furthermore, the analysis result of the call link is determined according to the call link of the software code in the calling process of the business process.

[0034] Specifically, the historical call data of the code segment in different business processes includes the number of historical calls in different business processes.

[0035] It should be noted that if Figure 2 As shown, the method for determining the key code segment in the code segment is: Based on the historical call data of the code segment in different business processes, determine the business process in which the code segment is called, and use it as the matching business process; According to the historical call data in different matching business processes, other code segments associated with links in different matching business processes are determined, and used as associated code segments; Whether the code segment is a key code segment is determined based on the sum of the numbers of associated code segments matching the business process.

[0036] It is understandable that when the total number of associated code segments of the matching business process is greater than a preset code segment number threshold, the code segment is determined to be a key code segment. It should also be noted that the method for determining the key code segment in the code segment is: Based on the historical call data of the code segment in different business processes, determine the business process in which the code segment is called, and use it as the matching business process; According to the historical call data in different matching business processes, other code segments with link associations in different matching business processes are determined, and the other code segments are used as associated code segments, and the screening business process in the matching business process is determined according to the number of associated code segments; Determine whether the code segment is a key code segment based on the number of the screened business processes.

[0037] Furthermore, the screened business processes are business processes whose number of associated code segments is within a preset code segment number range.

[0038] It can be understood that when the number of screening business processes corresponding to the code segment is greater than the preset number of processes, the code segment is determined to be a key code segment.

[0039] Optionally, the method for determining the key code segment in the code segment is: S11 determines the business process in which the code segment is called based on the historical call data of the code segment in different business processes, and uses it as a matching business process; and determines other code segments with link associations in different matching business processes based on the different historical call data, and uses them as associated code segments; S12: obtaining the number of associated code segments and the link association relationship between different associated code segments and the code segment in the matching business process, and determining the association coefficients of different matching business processes in combination with the proportion of the number of calls of the code segment in the execution process of the matching business process; S13 determines weight coefficients of different matching business processes based on execution data of different matching business processes, determines an impact correlation coefficient of the code segment in combination with correlation coefficients of different matching business processes, and determines whether the code segment is a key code segment based on the impact correlation coefficient.

[0040] Optionally, the above step S11 includes the following contents: S111 determines the business process in which the code segment is called based on the historical call data of the code segment in different business processes, and uses it as a matching business process. When the number of matching business processes is greater than the preset number of business processes, the process proceeds to step S112. When the number of matching business processes is not greater than the preset number of business processes, the process proceeds to step S113. S112 determines other code segments associated with links in different matching business processes based on different historical call data, and uses them as associated code segments. Based on the number of associated code segments in different matching business processes, determines the total number of associated code segments. When the total number of associated code segments is greater than a preset associated number threshold, determines that the code segment is a key code segment. When the total number of associated code segments is not greater than the preset associated number threshold, proceeds to step S113. S113 determines that the code segment is a key code segment based on the number of associated code segments in different matching business processes. When the number of matching business processes whose number of associated code segments is greater than the preset code segment number threshold does not meet the requirement, the code segment is determined to be a key code segment. When the number of matching business processes whose number of associated code segments is greater than the preset code segment number threshold meets the requirement, the process proceeds to step S12.

[0041] Optionally, the above step S12 includes the following contents: S121 obtains the number of associated code segments and the link association relationship between different associated code segments and the code segment in the matching business process, and determines the association coefficients of different matching business processes in combination with the proportion of the number of calls of the code segment in the execution process of the matching business process. When the association coefficients of different matching business processes are all less than a preset association coefficient threshold, proceeds to step S122. When there is a matching business process with an association coefficient not less than the preset association coefficient threshold, proceeds to step S123. S122: when the number of the matching business processes and the number of the associated code segments are both within the preset number range, it is determined that the code segment does not belong to the key code segment; when either the number of the matching business processes or the number of the associated code segments is not within the preset number range, the process proceeds to step S123; S123 When the number of matching business processes whose correlation coefficient is not less than the preset correlation coefficient threshold is greater than the preset matching process number threshold, it is determined that the code segment does not belong to the key code segment; when the number of matching business processes whose correlation coefficient is not less than the preset correlation coefficient threshold is not greater than the preset matching process number threshold, proceed to step S13.

[0042] Furthermore, the types of key code segments include transaction processing, risk control, and exception handling.

[0043] Specifically, Figure 3 As shown, determine whether the test case needs to be changed, including: Using the code change data of different types of key code segments, determine the percentage of key code segments that have changed in different types; Determine the coefficient of variation of key code segments in different types based on the quantity proportions; The change types in the key code segments of different types are determined based on the change coefficients, and whether the test case needs to be changed is determined using the number of the change types.

[0044] Furthermore, the change type in the key code segment is a type in which the change coefficient is greater than a preset change coefficient.

[0045] It should also be noted that when the number of the change types is greater than a preset change type number threshold, it is determined that a change process of the test case needs to be performed.

[0046] Optionally, determine whether the test case needs to be changed, including: Determine the code change status of the key code segments in different types based on the code change data of the key code segments in different types; determine the changed key code segments in the key code segments in different types based on the code change status; The number of changed key code segments is used to determine whether a test case change process is required.

[0047] It should be noted that the changed key code segment is a key code segment whose code change ratio is greater than a preset change ratio.

[0048] Optionally, determine whether the test case needs to be changed, including: S21 determines the key code segments with code changes in different types based on the code change data of the key code segments of different types, and determines the code change coefficients of the key code segments based on the code change amounts and code change proportions of the key code segments; S22 obtains the percentage of code changes in different types of key code segments, and determines the code segment change coefficients of different types of key code segments in combination with the code change coefficients of different types of key code segments; S23 determines the change weight coefficients of different types of key code segments, and determines the comprehensive change coefficient by combining the change coefficients of different types of code segments, and uses the comprehensive change coefficient to determine whether the test case needs to be changed.

[0049] It should be noted that the variable weight coefficients of the different types of key code segments are determined according to the functions of the different types of key code segments in the software code.

[0050] Furthermore, when the comprehensive coefficient of variation does not meet the requirement, it is determined that the test case needs to be changed.

[0051] Optionally, the above step S21 includes the following contents: S211 determines the key code segments with code changes in different types based on the code change data of the key code segments of different types. When the number of the key code segments with code changes does not meet the requirement, it is determined that the test case needs to be changed. When the number of the key code segments with code changes meets the requirement, the process proceeds to step S212. S212 determines the code change coefficients of different key code segments by using the code change amounts and code change proportions of different key code segments. When there is a key code segment whose code change coefficient is greater than a preset change coefficient threshold, the process proceeds to step S213. When there is no key code segment whose code change coefficient is greater than the preset change coefficient threshold, the process proceeds to step S22. S213 takes the key code segments whose code change coefficient is greater than the preset change coefficient threshold as the screened change code segments. When the number of the screened change code segments does not meet the requirement, it is determined that the test case needs to be changed. When the number of the screened change code segments meets the requirement, the process proceeds to step S214. S214 determines the screening change coefficient with the code change coefficients of different screening change code segments. When the screening change coefficient does not meet the requirements, it is determined that the test case needs to be changed. When the screening change coefficient meets the requirements, the process proceeds to step S22. Optionally, the above step S22 includes the following contents: S221 obtains the percentage of code changes in different types of key code segments. When there is a type in which the percentage of code changes is greater than a preset percentage, the process proceeds to step S223. When there is no type in which the percentage of code changes is less than the preset percentage, the process proceeds to step S222. S222: The type of code changes whose number is greater than the preset number is regarded as the change type. When the number of the change types does not meet the requirement, it is determined that the test case needs to be changed. When the number of the change types meets the requirement, the process proceeds to step S223. S223 determines the code segment change coefficients of different types according to the percentage of code changes in different types of key code segments and the code change coefficients of key code segments. If there is a type whose code segment change coefficient does not meet the requirements, it is determined that the test case needs to be changed. If there is no type whose code segment change coefficient does not meet the requirements, it proceeds to step S224. S224 determines the types of code segment variation coefficients within the preset variation coefficient range according to the variation coefficients of different types of code segments. When the number of types of code segment variation coefficients within the preset variation coefficient range is within the preset type quantity range, it is determined that the test case needs to be changed. When the number of types of code segment variation coefficients within the preset variation coefficient range is not within the preset type quantity range, proceed to step S23.

[0052] Specifically, Figure 4 As shown, the method for determining the matching test case in the test case is: Using the calling data of the variable code segment in the test case, determining that there is a called variable code segment in the test case, and using it as the called variable code segment; Obtaining the key code segments in the calling change code segment, and determining the key code quantity ratio according to the quantity ratio of the key code segments in the calling change code segment to the key code segments; The proportion of the changed code quantity is determined by the proportion of the called changed code segment in the changed code segment, the use case matching coefficient is determined based on the proportion of the changed code quantity and the proportion of the key code quantity, and whether the test case is a matching test case is determined according to the use case matching coefficient.

[0053] Furthermore, the use case matching coefficient is determined based on an average value of the proportion of the number of changed codes and the proportion of the number of key codes.

[0054] It should also be noted that determining whether the test case is a matching test case according to the case matching coefficient specifically includes: When the test case matching coefficient is greater than a preset matching coefficient threshold, the test case is determined to be a matching test case. Further, the link lineage data between the matching test cases includes the code segments associated with the call links between the matching test cases and the similarity of the call relationships of the code segments.

[0055] Specifically, the method for determining the recommended processing result of the test case of the software code is: Based on the key code segments in the calling change code segments, combined with the calling data of the code segments of the test cases, and based on the fact that all the key code segments are tested, the test cases are divided into available case groups; Based on the analysis result of the link lineage data, determine the code segments associated with the call links between the matching test case and other matching test cases in the available test case group, and use the code segments associated with the call links to determine the correlation coefficient between the matching test case and other matching test cases in the available test case group; Determine the called changed code segment in the test case through the calling data of the changed code segment in the test case, and use it as the called changed code segment to obtain the key code segment in the called changed code segment, determine the key code quantity ratio by the quantity ratio of the key code segments in the called changed code segment in the key code segment, determine the changed code quantity ratio by the quantity ratio of the called changed code segment in the changed code segment, and determine the case matching coefficient of the matching test case based on the changed code quantity ratio and the key code quantity ratio; Based on the correlation coefficient between the matching test case and other matching test cases in the available use case group and the use case matching coefficient of the matching test case, a recommended matching coefficient of the available use case group is determined, and the recommended processing result of the test case of the software code is determined using the recommended matching coefficient.

[0056] Furthermore, the recommended processing result of the test case of the software code is to recommend a group of available test cases with the largest matching coefficient.

[0057] It should also be noted that the recommended processing of the test case of the software code is performed after the recommended processing result is modified, specifically including: Automatically modifying the recommended processing result according to the changed data of the code segment to obtain a modified result; The modification results are used for recommendation processing of test cases of the software code.

[0058] Embodiment 2 In the second aspect, as Figure 5 As shown, the present invention provides a computer system, comprising: a memory and a processor that are communicatively connected, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the above-mentioned intelligent use case recommendation method based on link bloodline when running the computer program.

[0059] Optionally, a method for determining a matching test case in the test case is: Determine the calling data of the variable code segment in the test case, and use the called variable code segment as the calling variable code segment; when the number of the called variable code segments in the test case does not meet the requirement, determine that the test case does not belong to the matching test case; When the number of call change code segments in the test case meets the requirement: Obtaining a key code segment in the calling change code segment, and when the key code segment does not exist in the calling change code segment, determining that the test case does not belong to a matching test case; When there is a critical code segment in the calling change code segment: Obtaining the number of call change code segments in the test case, and when the number of call change code segments in the test case is greater than a preset call number threshold, determining that the test case belongs to a matching test case; When the number of call change code segments in the test case is not greater than the preset call number threshold: Determine a change matching coefficient based on the number of call change code segments in the test case and the proportion of the number in the change code segments, and determine that the test case belongs to a matching test case when the change matching coefficient is greater than a preset matching coefficient threshold; When the change matching coefficient is not greater than the preset matching coefficient threshold: Obtaining the key code segments in the calling change code segment, determining the key code matching coefficient according to the number of the key code segments in the calling change code segment and the proportion of the number in the key code segment, and determining that the test case belongs to a matching test case when the key code matching coefficient is greater than a preset coefficient threshold; When the key code matching coefficient is not greater than the preset coefficient threshold: The use case matching coefficient is determined by using the key code matching coefficient and the change matching coefficient, and whether the test case is a matching test case is determined according to the use case matching coefficient.

[0060] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0061] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0062] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.

Claims

1. An intelligent use case recommendation method based on link lineage, characterized in that: Specifically include: Based on the analysis results of the call link of the software code, determine the historical call data of different code segments in different business processes, and determine the key code segments in the code segments in combination with the link association relationship between the code segments and other code segments; Determine different types of key code segments according to their functions, and proceed to the next step when it is determined that test case changes need to be made based on code change data of different types of key code segments; The code segment in which the code is changed is taken as the changed code segment, and the calling data of the changed code segment and the key code segment in the changed code segment in different test cases are used to determine the matching test case in the test case; Based on the calling data of the test case, the link lineage data between different matching test cases is determined, and the recommended processing results of the test case of the software code are determined using the link lineage data and the calling data of the code segment, and the recommended processing of the test case of the software code is performed after modifying the recommended processing results.

2. The intelligent use case recommendation method based on link lineage as claimed in claim 1, characterized in that: The analysis result of the call link is determined according to the call link of the software code in the calling process of the business process.

3. The intelligent use case recommendation method based on link lineage as claimed in claim 1, characterized in that: The historical call data of the code segment in different business processes includes the historical call times in different business processes.

4. The intelligent use case recommendation method based on link lineage as claimed in claim 1, characterized in that: The method for determining the key code segment in the code segment is: Based on the historical call data of the code segment in different business processes, determine the business process in which the code segment is called, and use it as the matching business process; According to the historical call data in different matching business processes, other code segments associated with links in different matching business processes are determined, and used as associated code segments; Whether the code segment is a key code segment is determined based on the sum of the numbers of associated code segments matching the business process.

5. The intelligent use case recommendation method based on link lineage as claimed in claim 4, characterized in that: When the total number of the associated code segments of the matching business process is greater than a preset code segment number threshold, the code segment is determined to be a key code segment.

6. The intelligent use case recommendation method based on link lineage as claimed in claim 1, characterized in that: Determine whether the test case needs to be changed, including: Using the code change data of different types of key code segments, determine the percentage of key code segments that have changed in different types; Determine the coefficient of variation of key code segments in different types based on the quantity proportions; The change types in the key code segments of different types are determined based on the change coefficients, and whether the test case needs to be changed is determined using the number of the change types.

7. The intelligent use case recommendation method based on link lineage as claimed in claim 6, characterized in that: The change type in the key code segment is a type in which the change coefficient is greater than a preset change coefficient.

8. The intelligent use case recommendation method based on link lineage as claimed in claim 6, characterized in that: When the number of the change types is greater than a preset change type number threshold, it is determined that a change process of the test case needs to be performed.

9. The intelligent use case recommendation method based on link lineage as claimed in claim 1, characterized in that: The recommended processing result is modified and then the recommended processing of the test case of the software code is performed, specifically including: Automatically modifying the recommended processing result according to the changed data of the code segment to obtain a modified result; The modification results are used for recommendation processing of test cases of the software code.

10. A computer system comprising: A memory and a processor in communication connection, and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes a link lineage-based intelligent use case recommendation method as described in any one of claims 1 to 9 when running the computer program.

Citation Information

Patent Citations

  • Test case precise recommendation method, device and system, equipment and storage medium

    CN107515826A

  • Data processing method and system

    CN113704112A

  • City-wide bill network test case recommendation system

    CN115878452A

  • Test case processing method and equipment

    CN115981987A

  • Test method and electronic equipment

    CN116701164A