Intelligent dynamic test strategy recommendation method, device, equipment, storage medium and product
By collecting multi-dimensional data to construct an interface dependency graph and combining it with a multi-dimensional evaluation model, a dynamic testing strategy is generated, which solves the problems of rigid testing strategies and resource waste in existing technologies, and achieves efficient and high-quality testing results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MERCHANTS BANK
- Filing Date
- 2026-05-12
- Publication Date
- 2026-08-04
AI Technical Summary
Current software testing technologies rely on rigid testing strategies that depend on manual judgment, making it difficult to identify potential risks in high-value, high-impact interfaces. Furthermore, historical test data is not systematically accumulated, making it impossible to meet the needs of efficient testing in complex business scenarios.
By collecting multi-dimensional test data, an interface dependency graph is constructed, and a multi-dimensional evaluation model is used to comprehensively score the interfaces, generate dynamic test strategies, and receive feedback data in real time for optimization.
It has optimized test resources and focused the test scope, improved test efficiency and quality, adapted to the high-efficiency testing needs in complex business scenarios, and reduced manpower and time costs.
Smart Images

Figure CN122507633A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software testing technology, and in particular to an intelligent dynamic testing strategy recommendation method, apparatus, device, storage medium, and product. Background Technology
[0002] As software systems become increasingly microservice-oriented and business-complex, software iteration speeds accelerate, and testing cycles are continuously compressed. The number of internal interfaces is vast, and the call chains are complex; even a small code change often affects multiple related interfaces. Currently, the software testing field commonly adopts code-change-driven testing solutions. The testing scope is mainly determined by the testers' experience, and test execution often employs full regression testing or fixed test case execution methods, with the testing process conducted according to manually defined rules.
[0003] The existing technology has the following obvious drawbacks: First, the testing strategy is rigid and relies too much on manual judgment, which can easily lead to a waste of testing resources or the omission of key risks; second, it only focuses on code-level analysis and is difficult to identify potential risks of high-value and high-impact interfaces; third, historical test data is not systematically accumulated and reused, the testing strategy does not have the ability to self-optimize and iterate, and it is difficult to adapt to the efficient testing needs of complex business scenarios.
[0004] Therefore, it is necessary to propose an intelligent dynamic testing strategy recommendation method to improve testing efficiency and quality and meet the high-efficiency testing needs in complex business scenarios. Summary of the Invention
[0005] The main purpose of this application is to provide an intelligent dynamic test strategy recommendation method, device, equipment, storage medium and product, which aims to improve test efficiency and quality and meet the high-efficiency test needs in complex business scenarios.
[0006] To achieve the above objectives, this application proposes an intelligent dynamic testing strategy recommendation method, the method comprising: Collect multi-dimensional test data; Construct an interface dependency graph based on the multi-dimensional test data; Based on the interface dependency graph and combined with a pre-built multi-dimensional evaluation model, the interfaces are comprehensively scored to obtain the interface priority; Test strategies are generated and recommended based on the interface priorities.
[0007] In one embodiment, the multi-dimensional testing data includes code modification data and interface performance metrics data; the step of constructing an interface dependency graph based on the multi-dimensional testing data includes: The scope of the code changes' impact is determined based on the aforementioned code modification data; Based on the interface operation metrics data, the interface dependencies are obtained by calling the chain tracing tool. Combined with the impact range analysis of the code changes, the node-edge structure is stored in a graph database to output an interface dependency graph. The interface dependency graph is used to construct the risk transmission path between interfaces and quantify the indirect impact of code changes on related interfaces.
[0008] In one embodiment, the multi-dimensional testing data further includes business attribute data and user experience impact data. The step of comprehensively scoring the interfaces based on the interface dependency graph and combining it with a pre-built multi-dimensional evaluation model to obtain the interface priority includes: Based on the interface dependency graph, the risk transmission result is calculated using the risk transmission model. The risk transmission results, code modification data, business attribute data, and user experience impact data are used as input parameters and fed into a multi-dimensional evaluation model. The model is then comprehensively weighted and calculated based on interface dependency risk, interface business value, user experience impact, and code modification risk to obtain a comprehensive interface score. The interface priority is calculated based on the comprehensive score and historical data of the interface.
[0009] In one embodiment, the evaluation dimensions of the comprehensive interface score include at least one of the following: whether the interface is a core business function, high-frequency calls, key link nodes, code complexity, impact on user experience, and business growth potential. The evaluation metrics for the value of the interface services include core links and / or user call volume; The evaluation metrics for the impact on user experience include user churn rate and / or complaint relevance.
[0010] In one embodiment, the step of generating a test strategy based on the interface priority includes: Based on the interface priority and the pre-set strategy rules, an optimal test strategy is dynamically generated. The optimal test strategy includes an optimal test task type, which includes at least one of full testing, regression testing, and key testing.
[0011] In one embodiment, the method further includes: Receive test feedback data in real time; The testing strategy is dynamically optimized based on the test feedback data.
[0012] In one embodiment, the method further includes: The execution results and optimization suggestions of the structured storage testing strategy are used to build a dedicated testing knowledge base; Based on historical test data and knowledge base feedback, the evaluation model parameters and recommendation algorithm are optimized.
[0013] In one embodiment, the code modification data is obtained through Git API and static code analysis; the interface operation metric data is collected through APM tools; and the business attribute data and user experience impact data are obtained through business systems and user behavior data.
[0014] Furthermore, to achieve the above objectives, this application also proposes an intelligent dynamic testing strategy recommendation device, the device comprising: The data acquisition module is used to collect multi-dimensional test data; The graph building module is used to construct an interface dependency graph based on the multi-dimensional test data. The evaluation module is used to comprehensively score the interfaces based on the interface dependency graph and in combination with a pre-built multi-dimensional evaluation model to obtain the interface priority; The strategy recommendation module is used to generate and recommend test strategies based on the interface priority.
[0015] Furthermore, to achieve the above objectives, this application also proposes an intelligent dynamic test strategy recommendation device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the intelligent dynamic test strategy recommendation method as described above.
[0016] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the intelligent dynamic test strategy recommendation method as described above.
[0017] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the intelligent dynamic test strategy recommendation method described above.
[0018] One or more technical solutions proposed in this application have at least the following technical effects: This application's technical solution involves collecting multi-dimensional test data; constructing an interface dependency graph based on the multi-dimensional test data; comprehensively scoring interfaces based on the interface dependency graph and a pre-built multi-dimensional evaluation model to obtain interface priorities; and generating and recommending test strategies based on these interface priorities. By integrating multi-dimensional data, using an interface dependency graph and a multi-dimensional evaluation model to comprehensively score interfaces, dynamically calculate interface priorities, and recommend test strategies, this solution optimizes test resources, focuses test scope, dynamically adjusts strategies, and continuously iterates the model. This helps testers optimize resource allocation, reduce unnecessary testing work, improve testing efficiency, and maximize coverage of key changes, ensuring test coverage and quality, and meeting the high-efficiency testing needs of complex business scenarios. Furthermore, the tool's intelligence and dynamic adjustment capabilities allow it to flexibly adapt to different testing scenarios, saving manpower and time costs. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of the system architecture involved in the embodiment of the intelligent dynamic testing strategy recommendation method of this application; Figure 2 A flowchart illustrating the first embodiment of the intelligent dynamic testing strategy recommendation method of this application; Figure 3 This is a schematic diagram of the module structure of the intelligent dynamic test strategy recommendation device according to an embodiment of this application; Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the intelligent dynamic test strategy recommendation method in the embodiments of this application.
[0022] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0023] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0024] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0025] The main solution of this application is as follows: Collect multi-dimensional test data; construct an interface dependency graph based on the multi-dimensional test data; comprehensively score interfaces based on the interface dependency graph and a pre-built multi-dimensional evaluation model to obtain interface priorities; generate and recommend test strategies based on the interface priorities; further, it can also realize test feedback reception, dynamic strategy optimization, knowledge base construction, and model iterative updates. This technical solution, by integrating multi-dimensional data, using an interface dependency graph and a multi-dimensional evaluation model to comprehensively score interfaces, dynamically calculate interface priorities, and recommend test strategies, achieves test resource optimization, test scope focus, dynamic strategy adjustment, and continuous model iteration. This helps testers optimize resource allocation, reduce unnecessary testing work, improve testing efficiency, and maximize coverage of key changes, ensuring test coverage and quality, and meeting the high-efficiency testing needs of complex business scenarios. Furthermore, the tool's intelligence and dynamic adjustment capabilities can flexibly adapt to different testing scenarios, saving manpower and time costs.
[0026] This application embodiment takes into account the following shortcomings of existing testing technologies: (1) Rigid strategy relies on manual intervention: test priority depends on the experience of testers and cannot be dynamically optimized by combining multi-dimensional data such as the impact of code changes and the business value of interfaces, which can easily lead to waste of resources or omission of key issues.
[0027] (2) Ignoring the connection between business and user experience: Focusing only on code-level changes without integrating the business attributes of the interface (such as core link nodes and user activity) and user experience data (such as error messages) can easily lead to overlooking the potential risks of high-value interfaces.
[0028] (3) Insufficient knowledge reuse capability: Historical test data (such as defect distribution and strategy effectiveness) has not been systematically accumulated, which cannot support the self-optimization and iteration of test strategies.
[0029] Therefore, this application provides a solution that integrates code impact, business value, and user experience to achieve dynamic recommendation and closed-loop optimization testing strategies, thereby improving testing efficiency and quality and meeting the high-efficiency testing needs in complex business scenarios.
[0030] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device, intelligent dynamic test strategy recommendation device, or system capable of implementing the above functions. The following description uses an intelligent dynamic test strategy recommendation system as an example to illustrate the various embodiments.
[0031] ReferenceFigure 1 , Figure 1 This is a schematic diagram of the system architecture involved in the implementation of the intelligent dynamic testing strategy recommendation method of this application.
[0032] like Figure 1 As shown, the intelligent dynamic testing strategy recommendation system of this application includes: a data acquisition layer, an analysis and evaluation layer, a strategy recommendation layer, and a knowledge feedback layer.
[0033] The data acquisition layer is responsible for collecting multi-dimensional data such as code changes, interface operation, business attributes and user experience impact, and environmental data, providing a data source for subsequent analysis.
[0034] The analysis and evaluation layer is used to construct an interface dependency graph and risk transmission model based on the data collected by the data acquisition layer, and to calculate the interface priority through a multi-dimensional evaluation model. The strategy recommendation layer is used to match and dynamically generate test strategies based on interface priority, and adjust the test scope and test depth in real time based on test feedback. The knowledge feedback layer is used to store test strategies and execution results to form a test knowledge base, and continuously optimizes the evaluation model and recommendation algorithm based on historical data.
[0035] Specifically, as one implementation method, the data acquisition layer may include a code modification analysis module and an interface monitoring module, wherein: The code change analysis module is used to track the commit history of the code repository in real time, analyze the scope and complexity of code changes, and identify the list of affected interfaces.
[0036] Specifically, the code change analysis module can capture code commit records in real time based on the Git API interface, and combine them with static code analysis tools to calculate indicators such as cyclomatic complexity and coupling, and output a list of high-risk code modules and related interfaces.
[0037] The interface monitoring module is used to collect the operating status of the interface and assess its stability and risk level.
[0038] Specifically, the interface monitoring module can use APM tools to collect data points to obtain metrics such as interface call volume, error rate, and response time. It can then combine historical data to establish a dynamic baseline and generate real-time risk scores and error distribution heatmaps for the interfaces.
[0039] Specifically, as one implementation, the analysis and evaluation layer may include an interface dependency graph construction module and a multi-dimensional evaluation model module, wherein: The Interface Dependency Graph Construction Module is used to build an interface dependency graph based on code changes and interface call chain data, and to quantify the risk transmission path.
[0040] Specifically, the interface dependency graph construction module can obtain interface dependencies by calling chain tracing tools, combine code change impact analysis, use graph database to store node-edge structure, output interface call link graph (i.e. interface dependency graph) and risk transmission model, and further calculate the risk transmission result based on the interface dependency graph and the risk transmission model.
[0041] The multi-dimensional evaluation model module is used to build a multi-dimensional evaluation model to comprehensively score interfaces. Based on the comprehensive score and historical data, the priority of the interface is dynamically calculated, and an initial recommendation of testing strategy is generated.
[0042] Specifically, the multi-dimensional evaluation model module can employ machine learning models to perform weighted calculations on multi-source data, outputting an interface priority score of 0-1 to drive test strategy generation. Evaluation dimensions include whether the interface is a core business function, frequently called, a key link node, as well as code complexity (e.g., lines of code, function complexity, coupling), user experience impact (e.g., whether it affects core operations, the degree of impact of errors on users), and business growth potential (e.g., whether it is a key point for future expansion).
[0043] Specifically, as one implementation, the strategy recommendation layer may include a test strategy recommendation engine and a dynamic adjustment module, wherein: The test strategy recommendation engine is used to score interfaces based on their priority and recommend the optimal test task type (full test / regression test / key test).
[0044] Specifically, the test strategy recommendation engine can set strategy rules based on scoring thresholds (such as triggering full testing if priority > 0.8), dynamically generate the optimal test strategy, and continuously optimize the strategy through feedback data.
[0045] The dynamic adjustment module is used to receive test feedback data in real time, dynamically optimize test strategies, and improve the efficiency of problem discovery.
[0046] Specifically, the dynamic adjustment module can identify strategy deviations through feedback data such as test coverage and defect rate, trigger strategy adjustment instructions, and form a closed-loop optimization.
[0047] Specifically, as one implementation method, the knowledge feedback layer may include: a knowledge base update module and a model optimization module, wherein: The knowledge base update module is used to structure and store the results of test strategy execution and optimization suggestions, and to build a dedicated test knowledge base.
[0048] Specifically, the knowledge base update module can write data such as test strategy ID, defect type, and coverage into the knowledge base to establish a "strategy-defect-scenario" relationship, supporting subsequent model optimization and strategy reuse.
[0049] The model optimization module is used to continuously optimize and evaluate model parameters and recommendation algorithms based on historical test data and knowledge base feedback.
[0050] Specifically, the model optimization module can periodically backtrack test results and actual fault data, and update model weights through reinforcement learning or incremental training to improve the accuracy of priority scoring and strategy recommendation.
[0051] Based on the above system architecture, this application provides an intelligent dynamic testing strategy recommendation method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the intelligent dynamic testing strategy recommendation method of this application.
[0052] In this embodiment, the intelligent dynamic testing strategy recommendation method includes steps S10 to S40. The following provides a detailed explanation of each step.
[0053] like Figure 2 As shown, the first embodiment of this application proposes an intelligent dynamic testing strategy recommendation method, the method comprising: Step S10: Collect multi-dimensional test data; Among them, multi-dimensional test data can be collected through the data acquisition layer.
[0054] In one embodiment, the multi-dimensional test data includes code modification data, interface operation indicator data, business attribute data, and user experience impact data.
[0055] The code change data can be collected by the code change analysis module, which can be obtained by the code change analysis module through Git API and static code analysis.
[0056] The Git API is used to retrieve raw information such as code commit history, changed files, and modified lines in real time.
[0057] The Git API is a programmable interface provided by code hosting platforms (such as GitLab / GitHub). It encapsulates the Git command-line tool into a programmable interface, primarily used for automated development, continuous integration, and microservice architecture. It can be applied to scenarios such as microservice development, providing Git operation interfaces for microservices and enabling modular integration of code version control.
[0058] In this embodiment, the system calls the Git API interface to automatically and in real time capture the commit records, changed files and modification scope of the code repository, providing raw data support for subsequent code change analysis, affected interface identification and interface dependency graph construction, and realizing automated collection and parsing of code changes.
[0059] Static code analysis is used to calculate cyclomatic complexity, coupling, and the scope of impact of modifications. Its purpose is to identify the direct technical risks brought about by code modifications and to locate the affected interfaces.
[0060] Among them, the interface operation index data can be obtained through the interface monitoring module.
[0061] Specifically, as one implementation method, interface performance metrics data can be collected using APM (Application Performance Management, or Application Performance Monitoring) tools.
[0062] APM tools are a type of professional IT management tool. Their core objective is to monitor, manage, and optimize application performance, availability, and user experience in real time. By collecting and analyzing various data during application runtime, they help development and operations teams quickly locate performance bottlenecks and diagnose the root causes of faults, thereby ensuring business continuity and improving operational efficiency.
[0063] In this embodiment, the APM tool is used to perform instrumentation monitoring of the interface, collecting the interface call volume, error rate, response time, throughput and other operating status, which reflects the current stability, load status and real-time risks of the interface; Among them, business attribute data can be obtained through the business system, including the business module to which the interface belongs, whether it is a core link node, user call activity, business growth potential tags, etc., which represent the business importance and business value of the interface. User experience impact data can be obtained through user behavior data, including the degree to which interface anomalies block user operations, the correlation between user churn and complaints, etc., which are used to measure the impact level of interface failures on end users.
[0064] Step S20: Construct an interface dependency graph based on the multi-dimensional test data; After data collection is complete, the system constructs an interface dependency graph based on multi-dimensional test data. This graph expresses the calling relationships, dependencies, and risk transmission relationships between interfaces, providing a structural foundation for subsequent risk quantification. In other words, the interface dependency graph is used to construct risk transmission paths between interfaces and quantify the indirect impact of code changes on related interfaces.
[0065] Specifically, as one implementation method, the system constructs an interface dependency graph based on code changes and interface call chain data to quantify risk transmission paths.
[0066] In specific implementation, the following approach can be adopted: obtain the interface dependency relationship by calling the chain tracing tool, combine it with the impact range analysis of code changes, use a graph database to store the node-edge structure, and output the interface call link graph (i.e., the interface dependency graph) and risk transmission model so that the risk transmission result can be calculated based on the interface dependency graph and risk transmission model, and provided to the multi-dimensional evaluation model to give a comprehensive score to the interface.
[0067] Step S30: Based on the interface dependency graph and combined with the pre-built multi-dimensional evaluation model, the interfaces are comprehensively scored to obtain the interface priority; Then, the system performs a comprehensive score on the interfaces based on the interface dependency graph and a pre-built multi-dimensional evaluation model to obtain the interface priority step.
[0068] One approach is to calculate the risk transmission results based on the interface dependency graph.
[0069] In one implementation method, the system takes risk transmission results, code modification data, business attribute data, and user experience impact data as input parameters and inputs them into a multi-dimensional evaluation model.
[0070] In one implementation method, the system analyzes code modification data, business attribute data, and user experience impact data to obtain corresponding code modification risks, business value, and user experience impact indicators.
[0071] A multi-dimensional evaluation model is used to integrate technical risks, business value, user experience, and dependency risks to calculate a comprehensive score for each interface, resulting in an interface priority. Interface priority is used to differentiate the importance of interface testing and the order in which test resources are allocated.
[0072] Specifically, as one implementation method, the multi-dimensional evaluation model can adopt a hierarchical fusion structure, for example, it can include a dimensional input layer, a feature quantization layer, a weighted calculation layer, and a score output layer. Its implementation principle can be as follows: The risks of code changes, the consequences of risk transmission, business value, and user experience are uniformly quantified into a score between 0 and 1. A multi-dimensional integrated evaluation is carried out through dynamic weighted calculation, and the final output is a comprehensive interface priority score, which is used to drive test strategy recommendations.
[0073] The evaluation dimensions include whether the interface is a core business function, is frequently called, is a key link node, and the code complexity (such as the number of lines of code, function complexity, and coupling), user experience impact (such as whether it affects core operations and the degree of impact of errors on users), and business growth potential (such as whether it is a key point for future expansion).
[0074] Step S40: Generate and recommend a test strategy based on the interface priority.
[0075] Finally, the system generates and recommends test strategies based on interface priority.
[0076] Among them, the testing strategy is used to guide the scope, depth and method of test execution, so as to achieve on-demand testing and precise testing.
[0077] Specifically, the system scores interfaces based on their priority and recommends the optimal test task type (such as full testing, regression testing, and key testing).
[0078] In practice, the system sets strategy rules based on the scoring threshold (such as triggering full testing if priority > 0.8), dynamically generates the optimal testing strategy, and continuously optimizes the strategy through feedback data.
[0079] Through the above steps, we have achieved the technical effects of unified collection of multi-dimensional data, structured expression of interface dependencies, intelligent scoring of interface priorities, and automatic recommendation of test strategies.
[0080] This embodiment's technical solution involves collecting multi-dimensional test data; constructing an interface dependency graph based on the multi-dimensional test data; comprehensively scoring interfaces based on the interface dependency graph and a pre-built multi-dimensional evaluation model to obtain interface priorities; and generating and recommending test strategies based on the interface priorities. By integrating multi-dimensional data, using the interface dependency graph and combining it with a multi-dimensional evaluation model to comprehensively score interfaces, dynamically calculate interface priorities, and recommend test strategies, this approach optimizes test resources, focuses test scope, dynamically adjusts strategies, and continuously iterates the model. It helps testers optimize resource allocation, reduce unnecessary testing work, improve testing efficiency, and maximize coverage of key changes, ensuring test coverage and quality, and meeting the high-efficiency testing needs of complex business scenarios. Furthermore, the tool's intelligence and dynamic adjustment capabilities allow it to flexibly adapt to different testing scenarios, saving manpower and time costs.
[0081] In one feasible implementation, step S20, constructing the interface dependency graph based on the multi-dimensional test data, includes: Step 201: Determine the scope of impact of the code changes based on the code modification data; Step 202: Based on the interface operation index data, obtain the interface dependency relationship by calling the chain tracing tool, combine the impact range analysis of the code change, use the graph database to store the node-edge structure, and output the interface dependency relationship graph. The interface dependency relationship graph is used to construct the risk transmission path between interfaces and quantify the indirect impact of code changes on related interfaces.
[0082] Specifically, in this embodiment, the steps for constructing the interface dependency graph are detailed and explained as follows: First, the scope of impact of the code changes is determined based on the code change data. The scope of impact refers to the set of functions, modules, services and external interfaces directly related to the code changes. It is calculated by the file paths, function call relationships and class coupling relationships of the code changes. Its purpose is to clarify the direct impact boundary of the code changes and provide risk starting point data for the graph.
[0083] Then, based on the interface runtime metric data, the interface dependency relationships are obtained through a call chain tracing tool. The call chain tracing tool is used to collect the call order, dependency level, and upstream / downstream relationships between interfaces in a microservice architecture. The interface runtime metric data provides real-time interface call behavior. Combining the two yields a true, dynamic interface dependency relationship, rather than a static configuration relationship. Its purpose is to reconstruct the interface topology of a real online / test environment.
[0084] Then, based on the analysis of the impact of the code changes, a graph database is used to store the node-edge structure, where nodes represent interfaces and edges represent the call / dependency relationships between interfaces. The graph database is used to efficiently store and query dependency paths and propagation depths, and its function is to transform dependency relationships into computable and queryable data structures.
[0085] Finally, an interface dependency graph is output. This graph is used to construct risk transmission paths between interfaces and quantify the indirect impact of code changes on related interfaces. The risk transmission path refers to the route by which code changes spread from directly affected interfaces to indirectly related interfaces. Quantifying the indirect impact includes the level, quantity, and intensity of the impact. Its purpose is to make implicit and diffuse risks explicit and calculable, providing an objective basis for subsequent scoring.
[0086] Through the above steps, we have achieved the technical effect of building an interface dependency graph based on actual calls and code impact, and quantifying the risk transmission path and the scope of indirect impact.
[0087] In one feasible implementation, step S30, based on the interface dependency graph and combined with a pre-built multi-dimensional evaluation model, comprehensively scores the interfaces to obtain interface priorities, including: Step S301: Based on the interface dependency graph, the risk transmission result is calculated using the risk transmission model; Step S302: The risk transmission results, code modification data, business attribute data, and user experience impact data are used as input parameters and input into the multi-dimensional evaluation model. The interface dependency risk, interface business value, user experience impact, and code modification risk are combined for comprehensive weighted calculation to obtain the comprehensive interface score. Step S303: Calculate the interface priority based on the comprehensive interface score and historical data.
[0088] In this embodiment, the comprehensive scoring and priority calculation steps are fully implemented, and the specific steps are explained as follows: First, based on the interface dependency graph, the risk transmission result is calculated using a risk transmission model. The risk transmission model is used to calculate the risk diffusion intensity, impact depth, and number of affected interfaces based on the dependency graph. The risk transmission result is a quantitative indicator, including risk level, impact range value, and transmission depth value. Its function is to transform the dependency graph into numerical parameters that can be input into the model.
[0089] Then, the risk transmission results, code modification data, business attribute data, and user experience impact data are used as input parameters and fed into the multi-dimensional evaluation model.
[0090] The input parameters fall into four categories: risk transmission results representing indirect risks, code modification data representing direct technical risks, business attribute data representing business value, and user experience impact data representing user-side impact. Their purpose is to achieve a four-dimensional fusion of technical, business, user experience, and risk transmission inputs, avoiding bias from a single dimension. In particular, the introduction of quantitative assessments of business value and user experience impact data into test strategy generation allows for the integration of multi-dimensional data, such as the scope of code modification impact, interface business value (e.g., core links, user call volume), and user experience impact (e.g., user churn rate, complaint relevance), to dynamically calculate interface priorities and recommend test strategies, thus improving the accuracy of test strategy recommendations.
[0091] Then, the multi-dimensional evaluation model combines interface dependency risk, interface business value, user experience impact, and code modification risk to perform a comprehensive weighted calculation to obtain the interface's overall score.
[0092] Among them, interface dependency risk comes from the risk transmission result, interface business value assessment indicators include core links and / or user call volume, user experience impact assessment indicators include user churn rate and / or complaint correlation, code modification risk comes from the scope of modification, complexity, and coupling, weighted calculation uses machine learning model to allocate weights and output a comprehensive score between 0 and 1, the purpose of which is to unify and quantify multi-dimensional indicators to form comparable interface scores.
[0093] The comprehensive evaluation dimensions of the interface include at least one of the following: whether the interface is a core business, high-frequency calls, key link nodes, code complexity, impact on user experience, and business growth potential. Each dimension is used to measure the importance and risk level of the interface from different perspectives to ensure the comprehensiveness of the evaluation.
[0094] Specifically, as one implementation method, the multi-dimensional evaluation model can adopt a hierarchical fusion structure, including a dimensional input layer, a feature quantization layer, a weighted calculation layer, and a scoring output layer, wherein: Dimensional Input Layer: Used to access four types of standardized input parameters, including code modification risks, risk transmission results, business value, and user experience impact.
[0095] Feature quantization layer: Unifies the mapping of non-numerical features into quantized scores in the 0–1 range, enabling comparability and calculability of indicators across different dimensions.
[0096] Weighted calculation layer: Configures dynamic weights for each dimension, performs comprehensive calculation by weighted summation, and obtains the comprehensive risk and value score of the interface.
[0097] Scoring output layer: Outputs interface priority scores in the range of 0–1, which serve as a direct basis for recommending testing strategies.
[0098] The implementation principle of the multi-dimensional evaluation model can be summarized as follows: The risks of code changes, the consequences of risk transmission, business value, and user experience are uniformly quantified into a score between 0 and 1. A multi-dimensional integrated evaluation is carried out through dynamic weighted calculation, and the final output is a comprehensive interface priority score, which is used to drive test strategy recommendations.
[0099] Specifically, firstly, the risks of code modification, the results of risk transmission, business value indicators, and user experience impact indicators are input into the model in a unified format to form a multi-dimensional feature vector.
[0100] Then, the indicators are normalized: Code modification risk: Score is calculated based on the number of lines modified, cyclomatic complexity, and coupling degree; Risk transmission results: Scores are calculated based on the number of affected interfaces, transmission depth, and transmission strength. Business value: Scores are calculated based on whether it is a core link, call volume, and growth potential; User experience impact: Scores are calculated based on error rate, churn correlation, and complaint level.
[0101] Therefore, all indicators are uniformly quantified into scores of 0–1.
[0102] Then, dynamic weighted fusion is performed, using linear weighting or machine learning-trained weights to fuse the scores of each dimension, resulting in the comprehensive score as follows: Overall score = Code change risk × W1 + Risk transmission result × W2 + Business value × W3 + User experience impact × W4.
[0103] Among them, W1~W4 are dynamically adjustable weights, satisfying W1+W2+W3+W4=1.
[0104] Finally, a comprehensive score is output, which is then mapped to an interface priority in the range of 0–1. A higher score indicates a higher testing priority and requires a stronger testing effort.
[0105] Finally, based on the comprehensive interface score and historical data, the interface priority is calculated. Historical data includes historical defect distribution, historical strategy effectiveness, and historical fault impact, used to correct scoring biases. Interface priority is used for final sorting to determine the testing order, improving scoring accuracy and alignment with actual business scenarios.
[0106] Through the above steps, we have achieved multi-dimensional data fusion calculation, comprehensive quantification of interface risks and values, and output of interface priorities, thereby enabling us to accurately recommend testing strategies based on interface priorities.
[0107] In one feasible implementation, step S40, generating a test strategy based on the interface priority, includes: Based on the interface priority and the pre-set strategy rules, an optimal test strategy is dynamically generated. The optimal test strategy includes an optimal test task type, which includes at least one of full testing, regression testing, and key testing.
[0108] Specifically, the strategy rules are scoring threshold rules; for example, priority > 0.8 corresponds to high priority, 0.5–0.8 corresponds to medium priority, and priority < 0.5 corresponds to low priority. Dynamic generation means that it is automatically matched based on real-time scores, rather than being manually configured.
[0109] Among them, the optimal testing strategy can refer to the testing plan that saves the most resources while ensuring quality, and its function is to achieve adaptive matching of strategies.
[0110] The optimal testing strategy may include the optimal testing task type, which includes at least one of full testing, regression testing, and focused testing.
[0111] Among them, full testing is applicable to high-priority interfaces, covering all test cases, all scenarios, and all entry parameters. Its purpose is to ensure that no core high-value interfaces are missed.
[0112] As one implementation method, regression testing is suitable for medium-priority interfaces, executing historical and related test cases to verify that changes do not affect existing functionality. Focused testing is suitable for low-priority interfaces, executing only core paths and critical test cases to improve execution speed while ensuring basic quality.
[0113] Through the above steps, we have achieved the technical effect of dynamically matching the corresponding test strategy according to the interface priority, rationally allocating test resources, and improving test efficiency and coverage.
[0114] In one feasible implementation, the method further includes: Receive test feedback data in real time; dynamically optimize test strategies based on the test feedback data.
[0115] In one feasible implementation, the method further includes: The execution results and optimization suggestions of the structured storage testing strategy are used to build a dedicated testing knowledge base; Based on historical test data and knowledge base feedback, the evaluation model parameters and recommendation algorithm are optimized.
[0116] Specifically, in this embodiment, a complete closed loop of test feedback, dynamic optimization, knowledge base construction, and model iteration is achieved. The specific steps are explained below: First, test feedback data is received in real time. This data includes test coverage, number of defects, defect severity, execution time, missed detection rate, and problem discovery efficiency. Its purpose is to obtain data on the actual effects of the strategy after its execution, providing a basis for adjustments.
[0117] Then, based on the test feedback data, the testing strategy is dynamically optimized. This dynamic optimization includes expanding / reducing the test scope, increasing / decreasing the test depth, adjusting the test type, etc. Alternatively, when the defect rate is too high, the test intensity is automatically increased, and when the coverage is insufficient, test cases are automatically added. The purpose is to achieve real-time correction of the strategy and improve the ability to discover problems.
[0118] Furthermore, the execution results and optimization suggestions of test strategies can be stored in a structured manner to build a dedicated test knowledge base. Specifically, structured storage refers to forming related entries based on strategy ID, interface list, test type, defect type, test scenario, coverage, and execution effect; the dedicated test knowledge base is used to accumulate historical experience, avoid repeated trial and error, and its function is to make test knowledge accumulative, searchable, and reusable.
[0119] Furthermore, the evaluation model parameters and recommendation algorithm can be optimized based on historical test data and knowledge base feedback. Optimization methods include incremental training, reinforcement learning, and weight correction, all aimed at continuously improving scoring accuracy and the rationality of strategy recommendations, making the system more accurate with repeated use.
[0120] Through the above steps, a complete closed loop of test strategy execution – feedback – adjustment – knowledge accumulation – model iteration is achieved, realizing the technical effect of test system self-optimization and long-term improvement of test efficiency.
[0121] This embodiment collects multi-dimensional test data through the above scheme; constructs an interface dependency graph based on the multi-dimensional test data; obtains interface priority by comprehensively scoring the interfaces based on the interface dependency graph and combined with a multi-dimensional evaluation model; generates and recommends test strategies based on the priority; and further enables test feedback reception, dynamic strategy optimization, knowledge base construction, and model iterative updates.
[0122] Compared with the prior art, the technical solution of this embodiment has the following advantages: 1. Multi-dimensional data collection covers code, interfaces, business, and user experience, enabling test-driven testing to shift from a single code dimension to a collaborative approach driven by business, technology, and user experience. Through multi-dimensional data fusion and evaluation, test quality is improved, meeting the needs of efficient testing in complex business scenarios. 2. Construct an interface dependency graph and risk transmission model to accurately identify the scope of impact and risk diffusion paths, thereby improving the completeness of risk identification; 3. A multi-dimensional evaluation model provides a comprehensive weighted score, enabling the scientific quantification of interface priorities, replacing manual experience-based judgment, and improving testing efficiency and quality; dynamic recommendation of testing strategies based on priorities optimizes resource allocation, further enhancing testing efficiency and quality; 4. It supports dynamic adjustment based on feedback, knowledge base accumulation, and model iteration to form a closed-loop self-optimizing system and improve long-term testing results.
[0123] Furthermore, to achieve the above objectives, this application also proposes an intelligent dynamic testing strategy recommendation device, such as... Figure 3 As shown, the device includes: Data acquisition module 10 is used to collect multi-dimensional test data; The graph building module 20 is used to construct an interface dependency graph based on the multi-dimensional test data. Evaluation module 30 is used to comprehensively score the interfaces based on the interface dependency graph and in combination with a pre-built multi-dimensional evaluation model to obtain the interface priority; The strategy recommendation module 40 is used to generate and recommend test strategies based on the interface priority.
[0124] The intelligent dynamic testing strategy recommendation device provided in this application adopts the intelligent dynamic testing strategy recommendation method in the above embodiments to improve testing efficiency and quality, and meet the high-efficiency testing needs in complex business scenarios. Compared with the prior art, the beneficial effects of the intelligent dynamic testing strategy recommendation device provided in this application are the same as those of the intelligent dynamic testing strategy recommendation method provided in the above embodiments, and other technical features in the intelligent dynamic testing strategy recommendation device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0125] Furthermore, to achieve the above objectives, this application also proposes an intelligent dynamic test strategy recommendation device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the intelligent dynamic test strategy recommendation method as described above.
[0126] The following is for reference. Figure 4 The diagram illustrates a structural schematic of an intelligent dynamic test strategy recommendation device suitable for implementing embodiments of this application. The intelligent dynamic test strategy recommendation device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The intelligent dynamic testing strategy recommended device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0127] like Figure 4 As shown, the intelligent dynamic test strategy recommendation device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the intelligent dynamic test strategy recommendation device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 allows the intelligent dynamic test strategy recommendation device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows intelligent dynamic test strategy recommendation devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0128] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0129] The intelligent dynamic test strategy recommendation device provided in this application adopts the intelligent dynamic test strategy recommendation method in the above embodiments to improve test efficiency and quality, and meet the high-efficiency test requirements in complex business scenarios. Compared with the prior art, the beneficial effects of the intelligent dynamic test strategy recommendation device provided in this application are the same as those of the intelligent dynamic test strategy recommendation method provided in the above embodiments, and other technical features in this intelligent dynamic test strategy recommendation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0130] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0131] Furthermore, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the intelligent dynamic test strategy recommendation method described above.
[0132] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0133] The aforementioned computer-readable storage medium may be included in the intelligent dynamic test strategy recommendation device; or it may exist independently and not be assembled into the intelligent dynamic test strategy recommendation device.
[0134] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the intelligent dynamic test strategy recommendation device, the intelligent dynamic test strategy recommendation device: collects multi-dimensional test data; constructs an interface dependency graph based on the multi-dimensional test data; performs a comprehensive score on the interfaces based on the interface dependency graph and a pre-built multi-dimensional evaluation model to obtain interface priorities; and generates and recommends test strategies based on the interface priorities.
[0135] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0136] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0137] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0138] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the above-described intelligent dynamic test strategy recommendation method, thereby improving testing efficiency and quality and meeting the high-efficiency testing needs in complex business scenarios. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the intelligent dynamic test strategy recommendation method provided in the above embodiments, and will not be repeated here.
[0139] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the intelligent dynamic test strategy recommendation method described above.
[0140] The computer program product provided in this application improves testing efficiency and quality, meeting the needs of efficient testing in complex business scenarios. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the intelligent dynamic testing strategy recommendation method provided in the above embodiments, and will not be repeated here.
[0141] The technical solutions proposed in this application, including one or more, have at least the following technical effects: collecting multi-dimensional test data; constructing an interface dependency graph based on the multi-dimensional test data; comprehensively scoring interfaces based on the interface dependency graph and a pre-built multi-dimensional evaluation model to obtain interface priorities; generating and recommending test strategies based on the interface priorities; and further enabling test feedback reception, dynamic strategy optimization, knowledge base construction, and model iterative updates. The technical solutions in this application, by integrating multi-dimensional data, using an interface dependency graph and a multi-dimensional evaluation model to comprehensively score interfaces, dynamically calculate interface priorities, and recommend test strategies, achieve test resource optimization, test scope focus, dynamic strategy adjustment, and continuous model iteration. This helps testers optimize resource allocation, reduce unnecessary testing work, improve testing efficiency, and maximize coverage of key changes, ensuring test coverage and quality, and meeting the high-efficiency testing needs in complex business scenarios. Furthermore, the tool's intelligence and dynamic adjustment capabilities can flexibly adapt to different testing scenarios, saving manpower and time costs.
[0142] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for recommending intelligent dynamic testing strategies, characterized in that, The method includes: Collect multi-dimensional test data; Construct an interface dependency graph based on the multi-dimensional test data; Based on the interface dependency graph and combined with a pre-built multi-dimensional evaluation model, the interfaces are comprehensively scored to obtain the interface priority; Test strategies are generated and recommended based on the interface priorities.
2. The method as described in claim 1, characterized in that, The multi-dimensional test data includes code modification data and interface operation metric data; the step of constructing an interface dependency graph based on the multi-dimensional test data includes: The scope of the code changes' impact is determined based on the aforementioned code modification data; Based on the interface operation metrics data, the interface dependencies are obtained by calling the chain tracing tool. Combined with the impact range analysis of the code changes, the node-edge structure is stored in a graph database to output an interface dependency graph. The interface dependency graph is used to construct the risk transmission path between interfaces and quantify the indirect impact of code changes on related interfaces.
3. The method as described in claim 2, characterized in that, The multi-dimensional test data also includes business attribute data and user experience impact data. The step of comprehensively scoring the interfaces based on the interface dependency graph and combining it with a pre-built multi-dimensional evaluation model to obtain the interface priority includes: Based on the interface dependency graph, the risk transmission result is calculated using the risk transmission model. The risk transmission results, code modification data, business attribute data, and user experience impact data are used as input parameters and fed into a multi-dimensional evaluation model. The model is then comprehensively weighted and calculated based on interface dependency risk, interface business value, user experience impact, and code modification risk to obtain a comprehensive interface score. The interface priority is calculated based on the comprehensive score and historical data of the interface.
4. The method as described in claim 3, characterized in that, The evaluation dimensions for the comprehensive interface score include at least one of the following: whether the interface is a core business function, high-frequency calls, key link nodes, code complexity, impact on user experience, and business growth potential. The evaluation metrics for the value of the interface services include core links and / or user call volume; The evaluation metrics for the impact on user experience include user churn rate and / or complaint relevance.
5. The method as described in claim 1, characterized in that, The step of generating a test strategy based on the interface priority includes: Based on the interface priority and the pre-set strategy rules, an optimal test strategy is dynamically generated. The optimal test strategy includes an optimal test task type, which includes at least one of full testing, regression testing, and key testing.
6. The method according to any one of claims 1-5, characterized in that, The method further includes: Receive test feedback data in real time; The testing strategy is dynamically optimized based on the test feedback data.
7. The method as described in claim 6, characterized in that, The method further includes: The execution results and optimization suggestions of the structured storage testing strategy are used to build a dedicated testing knowledge base; Based on historical test data and knowledge base feedback, the evaluation model parameters and recommendation algorithm are optimized.
8. The method as described in claim 3, characterized in that, The code modification data is obtained through Git API and static code analysis; the interface operation metric data is collected through application performance management (APM) tools; and the business attribute data and user experience impact data are obtained through business system and user behavior data.
9. An intelligent dynamic testing strategy recommendation device, characterized in that, The device includes: The data acquisition module is used to collect multi-dimensional test data; The graph building module is used to construct an interface dependency graph based on the multi-dimensional test data. The evaluation module is used to comprehensively score the interfaces based on the interface dependency graph and in combination with a pre-built multi-dimensional evaluation model to obtain the interface priority; The strategy recommendation module is used to generate and recommend test strategies based on the interface priority.
10. An intelligent dynamic testing strategy recommendation device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the intelligent dynamic test strategy recommendation method as described in any one of claims 1 to 8.
11. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the intelligent dynamic test strategy recommendation method as described in any one of claims 1 to 8.
12. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the intelligent dynamic test strategy recommendation method as described in any one of claims 1 to 8.