Performance test case automatic generation method and device, equipment and storage medium
By performing three-dimensional decomposition of technical factors and dynamic combination of risk factors in distributed systems, a risk map is constructed, generating performance test cases that can comprehensively cover key risk points and causal relationships. This solves the problem of imperfect test case design in existing technologies and achieves efficient and accurate performance testing.
Patent Information
- Application Number
- CN202511004864.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-10-28
AI Technical Summary
In complex distributed systems, existing technologies find it difficult to fully identify and cover the dependencies and potential risk points between technical components, resulting in imperfect test case design and difficulty in real-time tracking and adapting to risk changes in the production environment, causing test cases to be out of touch with actual system risks.
By obtaining technical factors and performing three-dimensional decomposition based on functional dimensions, resource dimensions, and dependency dimensions, a risk map is constructed, target performance test cases are generated, and test cases that comprehensively cover key risk points and causal relationships are generated using risk factors and causal relationships.
It achieves efficient and accurate performance test case generation for distributed systems, can comprehensively cover multi-risk combination scenarios, effectively identify system bottlenecks and potential failures, and significantly improves the generation efficiency and coverage of test cases.
Smart Images

Figure CN120849288A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of performance testing technology, and in particular to methods, apparatus, equipment and storage media for the automated generation of performance test cases. Background Technology
[0002] In complex distributed systems, traditional solutions struggle to fully identify and cover dependencies and potential risks between technical components, resulting in inadequate test case design. Furthermore, traditional solutions heavily rely on the experience of testers to identify risks and design test cases; inexperienced developers and testers often fail to fully grasp the potential risks of technical components, leading to incomplete test case design. In addition, traditional solutions struggle to track and adapt to changes in risks in the production environment in real time, resulting in a disconnect between test cases and actual system risks.
[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this application is to provide a method, apparatus, device, and storage medium for automatically generating performance test cases, aiming to solve the technical problem that performance test cases in the prior art cannot fully cover risk points.
[0005] To achieve the above objectives, this application provides a method for automatically generating performance test cases, the method comprising:
[0006] The technology factors are obtained, and the technology factors are decomposed based on preset dimensions to obtain decomposition information. The preset dimensions are functional dimension, resource dimension and dependency dimension.
[0007] Based on the decomposition information and accident data, the risk factors corresponding to the technical factors are determined;
[0008] Based on the risk factors and the causal relationships between them, a risk map is constructed;
[0009] Based on the risk map, target performance test cases are generated.
[0010] In one embodiment, the step of constructing a risk map based on the risk factors and the causal relationships between the risk factors includes:
[0011] The risk factor is used as a risk factor node, and the attributes of the risk factor node are defined. The attributes of the risk factor node include at least the node name, node type, node weight, and node description.
[0012] Based on the causal relationship between the risk factors, determine the cause node and the corresponding result node in the risk factor node;
[0013] Based on the cause node and the result node corresponding to the cause node, determine the causal relationship edge between the risk factor nodes;
[0014] The weight of the causal relationship edge is determined based on the strength of the causal relationship corresponding to the causal relationship edge.
[0015] A risk graph is constructed based on the risk factor nodes, the causal relationship edges between the risk factor nodes, and the weights of the causal relationship edges.
[0016] In one embodiment, the step of generating target performance test cases based on the risk map includes:
[0017] Obtain the cause nodes and result nodes from the risk graph;
[0018] Based on the cause node, determine the corresponding test type and test steps, and based on the result node, determine the corresponding checkpoint and monitoring point.
[0019] Based on the test type, test steps, checkpoints, and monitoring points, target performance test cases are generated, and the execution order of the target performance test cases is determined based on the risk level of the risk factor nodes in the risk graph.
[0020] In one embodiment, the step of determining the risk factor corresponding to the technical factor based on the decomposition information and accident data includes:
[0021] Based on the decomposition information and accident data, the initial risk factors corresponding to the technical factors are determined;
[0022] Select a central factor from the initial risk factors;
[0023] Based on the distance between the initial risk factor and the central factor, the nearest central factor of the initial risk factor is determined, and the initial risk factor is assigned to the data cluster corresponding to the nearest central factor;
[0024] Based on the average value of the initial risk factors within the data cluster, a new central factor for the data cluster is determined;
[0025] When the convergence condition is met, the new centrality factor of the data cluster is used as the risk factor.
[0026] In one embodiment, the step of constructing a risk map based on the risk factors and the causal relationships between the risk factors further includes:
[0027] A Bayesian causal model is obtained by training a Bayesian network based on the accident data.
[0028] The risk factors are input into the Bayesian causal model to obtain the causal chain of the risk factor nodes;
[0029] Based on the causal chain, the causal relationships between the risk factor nodes are determined.
[0030] In one embodiment, the step of obtaining technical factors by decomposing the technical factors based on preset dimensions to obtain decomposition information includes:
[0031] Acquire technology factors;
[0032] The technical factors are decomposed based on functional dimensions to obtain the decomposition information of the technical factors under the functional dimensions. The functional dimensions include at least transaction processing, concurrency control, data storage, and communication processing.
[0033] The technology factors are decomposed based on the resource dimension to obtain the decomposition information of the technology factors under the resource dimension. The resource dimension includes at least computing resources, storage resources, network resources and external resources.
[0034] The technology factors are decomposed based on the dependency dimension to obtain the decomposition information of the technology factors under the dependency dimension. The dependency dimension includes at least strong dependency, weak dependency and no dependency.
[0035] In one embodiment, the step of generating target performance test cases based on the risk map further includes:
[0036] The target performance test cases are evaluated to determine their coverage.
[0037] When the coverage is less than the range of risk factors or the range of causal relationships, optimize the scope of data collection and data processing strategies;
[0038] Based on the optimized data collection scope and data processing strategy, the technical factors and accident data are updated, and the process returns to the step of decomposing the technical factors based on preset dimensions to obtain decomposition information. The preset dimensions are functional dimension, resource dimension, and dependency dimension.
[0039] Furthermore, to achieve the above objectives, this application also proposes an automated performance test case generation device, which includes:
[0040] The three-dimensional decomposition module is used to acquire technical factors and decompose the technical factors based on preset dimensions to obtain decomposition information. The preset dimensions are functional dimension, resource dimension, and dependency dimension.
[0041] The graph construction module is used to determine the risk factors corresponding to the technical factors based on the decomposition information and accident data.
[0042] The graph construction module is also used to construct a risk graph based on the risk factors and the causal relationships between the risk factors;
[0043] The case generation module is used to generate target performance test cases based on the risk map.
[0044] In addition, to achieve the above objectives, this application also proposes an automated performance test case generation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the automated performance test case generation method described above.
[0045] In addition, to achieve the above objectives, the present invention 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 performance test case automated generation method described above.
[0046] 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 performance test case automated generation method described above.
[0047] This application provides an automated method for generating performance test cases. It involves acquiring technical factors, decomposing these factors based on preset dimensions (functional, resource, and dependency dimensions) to obtain decomposition information. Based on this decomposition information and incident data, it identifies the corresponding risk factors for each technical factor. A risk graph is constructed based on these risk factors and the causal relationships between them. Finally, target performance test cases are generated based on this risk graph. This application comprehensively identifies potential risk points through the three-dimensional decomposition of technical factors, ensuring that test cases cover scenarios with multiple risk combinations. By employing the three-dimensional decomposition of technical factors and the dynamic combination of risk factors, a complete and detailed risk graph is constructed. Test cases generated based on this risk graph comprehensively cover key risk points and causal relationships, effectively identifying system bottlenecks and potential faults. It efficiently and accurately generates comprehensive and focused test cases, significantly improving the generation efficiency and coverage of performance test cases. This provides a scientific basis for performance testing of distributed systems and solves the technical problem of performance test cases failing to comprehensively cover risk points. Attached Figure Description
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0050] Figure 1 This is a flowchart illustrating an embodiment of the method for automatically generating performance test cases in this application.
[0051] Figure 2 This is a schematic diagram of the technical factor decomposition of the performance test case automated generation method provided in Embodiment 1 of this application;
[0052] Figure 3 This is a schematic diagram of the arbitration process of the automated generation method for performance test cases provided in Embodiment 1 of this application;
[0053] Figure 4 This is a flowchart illustrating Embodiment 2 of the method for automatically generating performance test cases in this application;
[0054] Figure 5 This is a schematic diagram of the risk map of the performance test case automated generation method provided in Embodiment 1 of this application;
[0055] Figure 6 A simplified flowchart illustrating the method for automatically generating performance test cases as provided in Embodiment 2 of this application;
[0056] Figure 7 This is a schematic diagram of the module structure of the performance test case automated generation device according to an embodiment of this application;
[0057] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the automated generation method of performance test cases in the embodiments of this application.
[0058] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0059] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0060] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0061] The main solution of this application embodiment is: to obtain technical factors, decompose the technical factors based on preset dimensions to obtain decomposition information, the preset dimensions being functional dimension, resource dimension, and dependency dimension; to determine the risk factors corresponding to the technical factors based on the decomposition information and accident data; to construct a risk graph based on the risk factors and the causal relationship between the risk factors; and to generate target performance test cases based on the risk graph.
[0062] This application provides a solution that comprehensively identifies potential risk points through the three-dimensional decomposition of technical factors, ensuring that test cases can cover scenarios with multiple risk combinations. By employing the three-dimensional decomposition of technical factors and the dynamic combination of risk factors, a complete and detailed risk map is constructed. Test cases generated based on this risk map can comprehensively cover key risk points and causal relationships, effectively identify system bottlenecks and potential failures, and efficiently and accurately generate comprehensive and focused test cases. This significantly improves the generation efficiency and coverage of performance test cases, provides a scientific basis for the performance testing of distributed systems, and solves the technical problem that performance test cases are difficult to fully cover risk points.
[0063] 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 or a performance test case automated generation device capable of the above functions. This embodiment does not specifically limit it in this regard. The following uses a performance test case automated generation device as an example to describe this embodiment and the following embodiments.
[0064] This application provides a method for automatically generating performance test cases, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the method for automatically generating performance test cases according to this application.
[0065] In this embodiment, the method for automatically generating performance test cases includes steps S10 to S40:
[0066] Step S10: Obtain technical factors and decompose the technical factors based on preset dimensions to obtain decomposition information. The preset dimensions are functional dimension, resource dimension, and dependency dimension.
[0067] It should be noted that before step S10, key data needs to be collected, including business factors, system architecture diagrams, technical factors, and incident data. By collecting functional requirements and operational processes related to the business (e.g., payment order creation, fund deduction), performance indicators (e.g., average response time, processing capacity, resource consumption, etc.) are extracted to quantify the business performance indicators and constitute business factors. System architecture information is extracted, including at least the connection relationships and topology of each component in the system, such as chain architecture, aggregation architecture, hybrid architecture, etc., to obtain a system architecture diagram. Technical components in the system are identified, such as databases, thread pools, external microservices, etc. These technical components are the core carriers of technical factors, thus extracting technical factors. Incident records that have occurred are extracted from the production incident data as incident data, including at least the incident type, occurrence time, scope of impact, and handling process, providing a reference for subsequent risk factor extraction. The collected data also needs to be processed before application. For example, the collected data is formatted to ensure consistency and analyzability, and missing value and outlier cleansing is performed to ensure data integrity and accuracy.
[0068] Additionally, it's important to note that in distributed systems, business functions need to be implemented through technical components. Technical components under different architectural topologies may exhibit different risk points. For example, a chained architecture sequentially performs payment order creation, database write operations, network transmission, and payment gateway; an aggregated architecture completes payment order creation and fund deduction within a single monolithic application; and a hybrid architecture combines chained and aggregated architectures, retaining the flexibility of microservices while reducing communication overhead between services. By analyzing business factors and architectural topologies, corresponding technical factors and potential risk factors can be extracted. For example, technical factors include database connection pools, thread pools, and external microservices; potential risk factors include connection pool exhaustion, thread pool fullness, and risks associated with external service calls.
[0069] In this embodiment, the purpose of data collection and preparation is to extract technical factors from technical components, analyze and mine corresponding risk factors, construct a risk map, and ultimately associate it with performance test cases. This provides comprehensive and accurate data support for subsequent technical factor decomposition, risk map construction, and test case generation, ensuring the consistency of the entire process.
[0070] It's understandable that information flows in a distributed system much like vehicles travel on a highway, with all the technical components (such as databases, applications, and middleware) serving as the core carriers of this information flow. The core functions implemented by these components (such as transaction processing, concurrency control, data storage, and communication processing) are the extracted "technical factors," representing the direction and destination of these "cars." However, this "highway" is not entirely unobstructed. Technical components rely on various resources (such as CPU, memory, and network bandwidth) during operation; these resources can be likened to the "highway" itself, forming the foundation for the smooth flow of information. Furthermore, technical components need to interact with and depend on external systems (such as third-party microservices and middleware caches); these external systems can be likened to "tollbooths," representing crucial nodes in the information flow within the system.
[0071] In one feasible implementation, step S10 may include: obtaining technical factors; decomposing the technical factors based on functional dimensions to obtain decomposition information of the technical factors under the functional dimensions, wherein the functional dimensions include at least transaction processing, concurrency control, data storage, and communication processing; decomposing the technical factors based on resource dimensions to obtain decomposition information of the technical factors under the resource dimensions, wherein the resource dimensions include at least computing resources, storage resources, network resources, and external resources; and decomposing the technical factors based on dependency dimensions to obtain decomposition information of the technical factors under the dependency dimensions, wherein the dependency dimensions include at least strong dependencies, weak dependencies, and no dependencies.
[0072] It should be noted that the preset dimensions are functional, resource, and dependency dimensions. This embodiment decomposes technical factors into three dimensions (three-dimensional classification) according to these dimensions, thereby comprehensively identifying the role and potential risks of technical factors in the system and providing a clear technical basis for the construction of the risk map. The final decomposed content is the decomposed information, with different decomposed information corresponding to different preset dimensions. (Reference) Figure 2 The functional dimension includes at least transaction processing, concurrency control, data storage, and communication processing; the resource dimension includes at least computing resources, storage resources, network resources, and external resources; and the dependency dimension includes at least strong dependencies, weak dependencies, and no dependencies.
[0073] The core functions of the technical factors analyzed from a functional dimension mainly include the following aspects: transaction processing, concurrency control, data storage, and communication processing. These cover the key functional modules in the system design, ensuring that the technical implementation meets business needs and supports the stable operation of the system. Specifically, transaction processing typically refers to identifying functional modules in the system that involve transaction operations, such as payment order creation and fund deduction; concurrency control typically refers to identifying functional modules in the system that involve concurrent operations, such as thread pool management and distributed locks; data storage typically refers to identifying functional modules in the system that involve data storage, such as database write operations and cache updates; and communication processing typically refers to identifying functional modules in the system that involve data transmission and interaction, such as HTTP (Hypertext Transfer Protocol) communication, HTTPS (HTTP Secure Transmission) communication, and distributed task scheduling.
[0074] The core resource dependencies required for analyzing technology factors from a resource perspective mainly include the following aspects: computing resources, storage resources, network resources, and external resources. These resources are the foundation for the operation of technology components. Computing resources typically refer to the computing resources used in the identification system, such as CPU (Central Processing Unit) and GPU (Graphics Processing Unit). Storage resources typically refer to the storage resources used in the identification system, such as memory and disk. Network resources typically refer to the network resources used in the identification system, such as bandwidth and the number of connections. External resources typically refer to the external resources that the identification system depends on, such as the number of database connections, TCP (Transmission Control Protocol) connections, and file handles.
[0075] Dependency dimensions define the degree to which a technical implementation depends on external components, mainly including the following aspects: strong dependency (relationship), weak dependency (relationship), and no dependency (relationship), covering the dependency relationships of external components in system design. Strong dependency typically refers to identifying external components that the system must rely on, such as payment depending on a bank gateway. Weak dependency typically refers to identifying external components that can be degraded in the system, such as returning to the origin database after cache invalidation. No dependency typically refers to identifying completely self-contained functional modules in the system, such as local log writing.
[0076] Understandably, the three-dimensional decomposition of technical factors is completed and stored in a database to ensure the comprehensiveness and accuracy of the data for subsequent analysis.
[0077] Step S20: Based on the decomposition information and accident data, determine the risk factors corresponding to the technical factors;
[0078] It should be noted that corresponding risk factors are extracted based on the decomposed information and incident data. For example, under the functional dimension of technical factors, risks such as data inconsistency, thread safety, data unavailability, and timeout or error can be extracted. Under the resource dimension of technical factors, risks such as CPU overload, I / O (input / output) failure, network fluctuation / bandwidth exhaustion, insufficient database connection count, thread blocking, and exhaustion of file handles / TCP connections can be extracted. Under the dependency dimension of technical factors, risks such as unavailability of external components and no risk can be extracted.
[0079] In one feasible implementation, step S20 may include: determining an initial risk factor corresponding to the technical factor based on the decomposition information and accident data; selecting a central factor from the initial risk factors; determining the nearest central factor of the initial risk factor based on the distance between the initial risk factor and the central factor, and assigning the initial risk factor to the data cluster corresponding to the nearest central factor; determining a new central factor of the data cluster based on the average value of the initial risk factors within the data cluster; and using the new central factor of the data cluster as a risk factor when the convergence condition is met.
[0080] It should be noted that, firstly, based on the decomposed information and accident data, risk factors, i.e., initial risk factors, are preliminarily determined. Then, these initial risk factors are clustered to identify accident types with similar characteristics. This embodiment uses the K-Means algorithm for cluster analysis, and the objective function J is shown below:
[0081]
[0082] In the formula, C i Let μ represent the i-th data cluster. i Let x represent the center point of the i-th data cluster and x represent a data point.
[0083] Understandably, K data points are randomly selected from the initial risk factors as initial centroids, i.e., initial central factors. The distance between each initial risk factor and each centroid is calculated, and the nearest centroid is the nearest centroid of that initial risk factor. Each initial risk factor is assigned to the data cluster containing the nearest centroid. At this point, the centroid of each data cluster needs to be recalculated, usually by using the average value of all data points within the cluster as the new centroid. Initial risk factors are then assigned according to the new centroid. When the allocation of data clusters no longer changes, or the change in centroids is less than a preset threshold, the convergence condition is met, and the new centroid is the most critical factor among the initial risk factors, which is then used as the final risk factor. For example, if the centroid of a data cluster represents "high database connection pool utilization" and "full thread pool," then "high database connection pool utilization" and "full thread pool" are risk factors needed to construct the risk graph.
[0084] Step S30: Construct a risk map based on the risk factors and the causal relationships between them;
[0085] It should be noted that causation refers to one or more risk factors leading to the occurrence of another risk factor. For example, network fluctuations may cause the database connection pool to run out of resources, subsequently resulting in a full thread pool. Competition can be considered a special case of causation, involving multiple causes leading to a single result, such as multiple asynchronous thread pools contending for database resources, causing the database connection pool to become full. In a risk graph, the combined use of both can provide a more comprehensive risk management perspective, helping to identify and address potential system risks. The risk graph in this embodiment includes causal chain combinations and resource competition relationships.
[0086] It is understandable that a risk graph can be constructed using graph databases (such as Neo4j) and graph analysis tools (such as NetworkX). This embodiment uses Neo4j for defining nodes and edges and NetworkX for graph analysis. In specific implementation, risk factors are treated as risk factor nodes, and the attributes of all risk factor nodes are defined. The defined risk factor nodes are imported into the graph analysis tool, and causal relationship edges are defined from cause nodes to result nodes, with weights representing the strength of the causal relationship. The correlation between risk factors is displayed using a graph database and visualization tools (such as Gephi). For example, the "network volatility" node and the "database connection pool exhausted" node are connected by causal relationship edges.
[0087] Furthermore, to ensure that the risk map is consistent with the actual system risk, this embodiment adopts a dynamic update mechanism: periodically collect or update accident data in the production environment; periodically use the K-Means algorithm to cluster the new data, identify new risk factors or update the classification of existing risk factors; and update the node and edge information in the risk map based on the new clustering results.
[0088] Step S40: Based on the risk map, generate target performance test cases.
[0089] Understandably, based on the risk map, dynamic combination testing strategies are generated, including causal chain combination strategies, resource competition combination strategies, and risk level weighted strategies. Test types and steps are designed from the starting point (cause node) of the causal chain, and checkpoints and monitoring points are designed from the ending point (result node).
[0090] In one feasible implementation, step S40 may include: obtaining the cause nodes and result nodes in the risk graph; determining the corresponding test type and test steps based on the cause nodes, and determining the corresponding checkpoints and monitoring points based on the result nodes; generating target performance test cases based on the test type, the test steps, the checkpoints and the monitoring points, and determining the execution order of the target performance test cases based on the risk level of the risk factor nodes in the risk graph.
[0091] It's important to note that by combining causal chains in the risk graph, risk factor nodes in causal relationships are identified and connected, triggering risks are merged, and comprehensive performance test cases, i.e., target performance test cases, are generated. The main idea is to combine risk factor nodes in the causal chain with the elements of the test case to obtain the purpose, preconditions, test steps, expected metrics, and checkpoints or monitoring points. Here, the purpose refers to clarifying the test objective and scope; preconditions refer to setting the test environment and initial state; test steps refer to simulating the starting point of the causal chain and progressively verifying risk propagation; expected metrics refer to setting key performance indicators (such as response time and resource consumption); and checkpoints or monitoring points refer to setting checkpoints at key nodes in the causal chain to monitor risk triggering and system performance. This allows for the systematic generation of performance test cases covering multi-dimensional risks, ensuring the comprehensiveness and accuracy of the tests.
[0092] Understandingly, performance test cases are designed from the cause perspective, meaning test types and steps are designed for the starting point (cause node) in the causal chain. For example, test type: network fluctuation test; precondition: thread pool size set to production consistency; test steps: simulate network fluctuations and monitor database connection pool usage; checkpoint: database connection pool usage exceeds 80%. Performance test cases are designed from the effect perspective, meaning checkpoints and monitoring points are designed for the ending point (effect node) in the causal chain. For example, checkpoint: when database connection pool usage exceeds 80%, trigger a rate limiting alarm; monitoring point: monitor thread pool task backlog.
[0093] Further reference Figure 3 Driven by risk levels, high-risk factors are prioritized based on risk level (P0 / P1 / P2) to ensure test coverage of key risks; automated assistance is adopted to automatically identify duplication, risk mismatch, contradiction, and omissions in test scenarios, and optimize the execution order through deduplication algorithms and topology sorting; threshold conflict resolution is implemented, and the most stringent threshold is used to ensure the comprehensiveness and accuracy of test scenarios; consistency maintenance is achieved by periodically synchronizing risk maps and test case templates based on production incidents.
[0094] It should be understood that during the test case generation phase, performance test case templates are assembled by mapping business factors (quantitative indicators such as processing capacity, response time, error rate, and resource consumption) to a risk graph. During case assembly, a conflict arbitration mechanism is used to coordinate and resolve conflicts, optimizing the execution order and coverage of test scenarios. Ultimately, users can refine and adjust the generated cases to ensure a high degree of match between the test scenarios and actual needs, thereby achieving efficient and accurate performance test case generation and significantly improving system stability and performance.
[0095] Furthermore, after step S40, the method further includes: evaluating the target performance test case to determine its coverage; optimizing the data collection scope and data processing strategy when the coverage is less than the risk factor range or causal relationship range; updating the technical factor and the accident data based on the optimized data collection scope and data processing strategy; and returning to execute the step of decomposing the technical factor based on preset dimensions to obtain decomposition information, wherein the preset dimensions are functional dimension, resource dimension, and dependency dimension.
[0096] It should be noted that the generated target performance test cases are evaluated to verify whether they cover key risk points and causal relationships. The risk factor range refers to the scope of all risk factors, and the causal relationship range refers to the scope of all causal relationships. For example, the evaluation assesses whether the test cases cover the causal chain of "network fluctuation - database connection pool exhaustion - thread pool full".
[0097] Understandably, if the coverage is less than the range of risk factors or causal relationships, it indicates that the target performance test case failed to cover all risk factors and causal relationships. In this case, the evaluation results are fed back to the data collection and processing stage to optimize the data collection scope and data processing strategy, re-collect information such as technical factors and accident data, and restart step S10. For example, if some risk points are found to be uncovered, relevant data is supplemented and the risk map is regenerated.
[0098] This embodiment provides an automated method for generating performance test cases. It acquires technical factors, decomposes these factors based on preset dimensions (functional, resource, and dependency dimensions) to obtain decomposition information. Based on the decomposition information and incident data, it identifies the corresponding risk factors. Based on the risk factors and the causal relationships between them, it constructs a risk graph. Based on the risk graph, it generates target performance test cases. This embodiment comprehensively identifies potential risk points through the three-dimensional decomposition of technical factors, ensuring that test cases cover scenarios with multiple risk combinations. By employing the three-dimensional decomposition of technical factors and the dynamic combination of risk factors, it constructs a complete and detailed risk graph. Test cases generated based on this risk graph comprehensively cover key risk points and causal relationships, effectively identifying system bottlenecks and potential faults. It efficiently and accurately generates comprehensive and focused test cases, significantly improving the generation efficiency and coverage of performance test cases.
[0099] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 Step S30 may include steps S301 to S305:
[0100] Step S301: The risk factor is used as a risk factor node, and the attributes of the risk factor node are defined. The attributes of the risk factor node include at least the node name, node type, node weight, and node description.
[0101] It should be noted that, based on the cluster analysis results, key risk factors are extracted as risk factor nodes, and each risk factor node is defined and classified. The attributes of each risk factor node include at least the node name, node type, node weight, and node description.
[0102] Understandably, node names can be "Database connection pool exhausted" or "Thread pool full," and node types can be "Resource exhaustion," "Content contention," or "Fault propagation." Node weights are typically calculated based on the frequency, scope, and severity of the incident. Node descriptions can be "Database connection pool usage exceeds threshold." Node types are determined based on the characteristics of the risk factors: Resource exhaustion (e.g., "Database connection pool exhausted," "Insufficient memory"), Contention (e.g., "Thread pool contention," "Network bandwidth contention"), and Fault propagation (e.g., "Network fluctuations cause database connection pool exhaustion").
[0103] For example, risk factor node 1: named Database connection pool exhausted, type resource exhausted, weight 0.8; risk factor node 2: named Thread pool full, type resource exhausted, weight 0.7.
[0104] Step S302: Based on the causal relationship between the risk factors, determine the cause node and the result node corresponding to the cause node in the risk factor node;
[0105] In one feasible implementation, the step of determining the causal relationship between risk factors may include: training a Bayesian network based on the accident data to obtain a Bayesian causal model; inputting the risk factors into the Bayesian causal model to obtain the causal chain of the risk factor nodes; and determining the causal relationship between the risk factor nodes based on the causal chain.
[0106] It should be noted that this embodiment uses a Bayesian Network to identify causal relationships between risk factors. A Bayesian Network is a probabilistic graphical model used to represent dependencies between multiple variables. It consists of nodes and edges; nodes represent random variables, and edges represent causal relationships or correlations between variables. Based on Bayes' theorem and the principle of conditional independence, Bayesian Networks describe probabilistic relationships under known conditions.
[0107]
[0108] In the formula, P(A|B) represents the probability of A given B, P(B|A) represents the probability of B given A, P(A) represents the prior probability of A, and P(B) represents the prior probability of B. Bayesian networks simplify computation by decomposing the joint probability distribution and utilizing conditional independence. For example, for three variables A, B, and C, if A and C are independent given B, the joint probability distribution can be expressed as:
[0109] P(A,B,C)=P(A)·P(B|A)·P(C|B)
[0110] In the formula, P(A,B,C) represents the joint probability, P(B|A) represents the probability of B given A, P(A) represents the prior probability of A, and P(C|B) represents the probability of C given B. Bayesian networks are suitable for handling uncertainty and can analyze the causal relationships between multiple risk factors. By constructing Bayesian networks, the correlations between risk factors can be clarified, supporting probabilistic reasoning under known conditions, thus providing a scientific basis for the construction of risk maps.
[0111] Understandably, a Bayesian network is constructed to define the dependencies between risk factors. Bayesian networks represent causal relationships by defining directed edges between nodes, supporting reasoning under uncertainty. For example, analyzing whether "network fluctuations" lead to an increase in "database connection pool utilization," which in turn causes "thread pool fullness," allows us to construct a causal chain: "network fluctuations - database connection pool exhaustion - thread pool fullness." By training the Bayesian network with incident data, identifying root causes, and obtaining a Bayesian causal model, we can analyze risk factors and determine the root causes of incidents, such as whether "database connection pool exhaustion" is caused by "network fluctuations" or "thread pool fullness," thus outputting the corresponding causal chain (e.g., "network fluctuations - database connection pool exhaustion - thread pool fullness").
[0112] It should be understood that the cause node in the risk factor node is the starting point of the causal chain, and the result node in the risk factor node is the ending point of the causal chain.
[0113] Step S303: Based on the cause node and the result node corresponding to the cause node, determine the causal relationship edge between the risk factor nodes;
[0114] It is understandable that there is a causal relationship between the cause node and its corresponding result node, and corresponding edges can be set, namely causal relationship edges. The direction of the causal relationship edge is usually from the cause node to the corresponding result node. Depending on the nature of the causal relationship, one-way or two-way edges are used to represent it.
[0115] Step S304: Determine the weight of the causal relationship edge based on the strength of the causal relationship corresponding to the causal relationship edge;
[0116] It is understandable that the weight of a causal edge is calculated based on the strength of the causal relationship; for example, 0.8 indicates a strong causal relationship.
[0117] Step S305: Construct a risk graph based on the risk factor nodes, the causal relationship edges between the risk factor nodes, and the weights of the causal relationship edges.
[0118] Understandably, based on risk factor nodes, causal edges between risk factor nodes, and the weights of causal edges, a corresponding risk graph can be constructed using graph databases, graph analysis tools, and visualization tools. For example, for the functional dimension, if the risk factor node corresponding to transaction processing is data inconsistency risk, the risk factor node corresponding to concurrency control is thread safety risk, the risk factor node corresponding to data storage is data unavailability risk, and the risk factor node corresponding to communication processing is timeout or error risk; for the resource dimension, the risk factor node corresponding to computing resources is CPU overload risk, the risk factor node corresponding to storage resources is I / O failure / overload risk, the risk factor node corresponding to network resources is network fluctuation / bandwidth exhaustion risk, and the risk factor nodes corresponding to external resources are insufficient database connection count risk, thread blocking / full risk, and system file handle / TCP connection count exhaustion risk; for the dependency dimension, the risk factor node corresponding to strong dependency is external component unavailability risk, the risk factor node corresponding to weak dependency is external component unavailability risk, and the risk factor node corresponding to no dependency is no risk, then a risk graph can be constructed as follows: Figure 5 The risk map shown.
[0119] This embodiment provides an automated method for generating performance test cases. It uses risk factors as risk factor nodes and defines their attributes. Based on the causal relationships between risk factors, it identifies cause nodes and their corresponding result nodes within each risk factor node. Based on the cause nodes and their corresponding result nodes, it determines the causal relationship edges between risk factor nodes. Based on the strength of the causal relationship between these edges, it determines the weights of the causal relationship edges. Finally, it constructs a risk graph based on the risk factor nodes, the causal relationship edges between them, and their weights. This embodiment comprehensively identifies potential risk points through the three-dimensional decomposition of technical factors, ensuring that test cases cover scenarios with multiple risk combinations. By employing the three-dimensional decomposition of technical factors and the dynamic combination of risk factors, it constructs a complete and detailed risk graph. Test cases generated based on this risk graph comprehensively cover key risk points and causal relationships, effectively identifying system bottlenecks and potential faults. It efficiently and accurately generates comprehensive and focused test cases, significantly improving the generation efficiency and coverage of performance test cases.
[0120] For example, to help understand the implementation process of the performance test case automated generation method obtained by combining this embodiment with the above embodiment two, please refer to... Figure 6 , Figure 6 A simplified flowchart illustrating a method for automating the generation of performance test cases is provided, specifically:
[0121] Data Collection and Preparation: Collect technical factors and incident data, including CPU utilization, memory usage, network latency, and database connection pool utilization. Clean and format the data to ensure its integrity and accuracy.
[0122] Technology factor decomposition: Technology factors are classified according to functional dimensions (transaction processing, concurrency control, data storage, communication processing), resource dimensions (CPU, memory, network, disk, connection pool, etc.), and dependency dimensions (strong dependency, weak dependency, no dependency).
[0123] Risk Graph Construction: The K-Means algorithm is used to cluster risk factors and identify accident types with similar characteristics. A Bayesian network is then used to identify causal relationships between risk factors, constructing a risk graph. Nodes represent risk factors, edges represent causal relationships or resource competition relationships, and edge weights reflect the strength of the relationship.
[0124] Test case generation: Based on the risk map, dynamic combination test strategies are generated, including causal chain combinations, resource competition combinations, and risk level weighted combinations. Test types and steps are designed from the starting point (cause node) of the causal chain, and checkpoints and monitoring points are designed from the ending point (result node).
[0125] Arbitration processing: High-risk factors are prioritized based on risk level. Automated identification of duplicate, risk mismatch, contradictions, and omissions in test scenarios is provided. Threshold conflicts are resolved to ensure the comprehensiveness and accuracy of test scenarios. Risk maps and test case templates are regularly updated to maintain consistency.
[0126] Effectiveness assessment and feedback: Evaluate whether the generated test cases cover key risk points and causal relationships. Feedback the assessment results to the data collection and processing phases to optimize the scope of data collection and processing strategies.
[0127] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the method for automatically generating performance test cases in this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0128] This application also provides an automated performance test case generation device; please refer to... Figure 7 The performance test case automated generation device includes:
[0129] The three-dimensional decomposition module 10 is used to acquire technical factors and decompose the technical factors based on preset dimensions to obtain decomposition information. The preset dimensions are functional dimension, resource dimension and dependency dimension.
[0130] The map construction module 20 is used to determine the risk factors corresponding to the technology factors based on the decomposition information and accident data.
[0131] The graph construction module 20 is also used to construct a risk graph based on the risk factors and the causal relationships between the risk factors;
[0132] The case generation module 30 is used to generate target performance test cases based on the risk map.
[0133] In one feasible implementation, the graph construction module 20 is further configured to use the risk factor as a risk factor node and define the attributes of the risk factor node, wherein the attributes of the risk factor node include at least node name, node type, node weight and node description.
[0134] Based on the causal relationship between the risk factors, determine the cause node and the corresponding result node in the risk factor node;
[0135] Based on the cause node and the result node corresponding to the cause node, determine the causal relationship edge between the risk factor nodes;
[0136] The weight of the causal relationship edge is determined based on the strength of the causal relationship corresponding to the causal relationship edge.
[0137] A risk graph is constructed based on the risk factor nodes, the causal relationship edges between the risk factor nodes, and the weights of the causal relationship edges.
[0138] In one feasible implementation, the case generation module 30 is further configured to obtain the cause nodes and result nodes in the risk graph;
[0139] Based on the cause node, determine the corresponding test type and test steps, and based on the result node, determine the corresponding checkpoint and monitoring point.
[0140] Based on the test type, test steps, checkpoints, and monitoring points, target performance test cases are generated, and the execution order of the target performance test cases is determined based on the risk level of the risk factor nodes in the risk graph.
[0141] In one feasible implementation, the map construction module 20 is further configured to determine the initial risk factor corresponding to the technology factor based on the decomposition information and accident data;
[0142] Select a central factor from the initial risk factors;
[0143] Based on the distance between the initial risk factor and the central factor, the nearest central factor of the initial risk factor is determined, and the initial risk factor is assigned to the data cluster corresponding to the nearest central factor;
[0144] Based on the average value of the initial risk factors within the data cluster, a new central factor for the data cluster is determined;
[0145] When the convergence condition is met, the new centrality factor of the data cluster is used as the risk factor.
[0146] In one feasible implementation, the graph construction module 20 is further used to train a Bayesian network based on the accident data to obtain a Bayesian causal model.
[0147] The risk factors are input into the Bayesian causal model to obtain the causal chain of the risk factor nodes;
[0148] Based on the causal chain, the causal relationships between the risk factor nodes are determined.
[0149] In one feasible implementation, the three-dimensional decomposition module 10 is also used to obtain technical factors;
[0150] The technical factors are decomposed based on functional dimensions to obtain the decomposition information of the technical factors under the functional dimensions. The functional dimensions include at least transaction processing, concurrency control, data storage, and communication processing.
[0151] The technology factors are decomposed based on the resource dimension to obtain the decomposition information of the technology factors under the resource dimension. The resource dimension includes at least computing resources, storage resources, network resources and external resources.
[0152] The technology factors are decomposed based on the dependency dimension to obtain the decomposition information of the technology factors under the dependency dimension. The dependency dimension includes at least strong dependency, weak dependency and no dependency.
[0153] In one feasible implementation, the test case generation module 30 is further configured to evaluate the target performance test cases and determine the coverage of the target performance test cases;
[0154] When the coverage is smaller than the range of risk factors or the range of causal relationships, optimize the data collection scope and the data processing strategy;
[0155] Based on the optimized data collection scope and data processing strategy, the technical factors and the accident data are updated, and the process returns to the step of decomposing the technical factors based on preset dimensions to obtain decomposition information. The preset dimensions are functional dimension, resource dimension, and dependency dimension.
[0156] The performance test case automated generation device provided in this application, employing the performance test case automated generation method described in the above embodiments, can solve the technical problem that performance test cases are difficult to fully cover risk points. Compared with the prior art, the beneficial effects of the performance test case automated generation device provided in this application are the same as those of the performance test case automated generation method described in the above embodiments, and other technical features in the performance test case automated generation device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0157] This application provides an automated performance test case generation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the automated performance test case generation method in Embodiment 1 above.
[0158] The following is for reference. Figure 8 The diagram illustrates a structural schematic suitable for implementing an automated performance test case generation device according to embodiments of this application. The automated performance test case generation device in 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 8 The performance test case automated generation 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.
[0159] like Figure 8As shown, the performance test case automated generation 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 ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the performance test case automated generation device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the performance test case automation generation device to communicate wirelessly or wiredly with other devices to exchange data. Although a performance test case automation generation device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented alternatively.
[0160] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0161] The performance test case automated generation device provided in this application, employing the performance test case automated generation method described in the above embodiments, can solve the technical problem that performance test cases are difficult to fully cover risk points. Compared with the prior art, the beneficial effects of the performance test case automated generation device provided in this application are the same as those of the performance test case automated generation method described in the above embodiments, and other technical features in this performance test case automated generation device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0162] 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 one or more embodiments or examples in a suitable manner.
[0163] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0164] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the performance test case automated generation method described in the above embodiments.
[0165] 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, 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, 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.
[0166] The aforementioned computer-readable storage medium may be included in the performance test case automated generation device; or it may exist independently and not assembled into the performance test case automated generation device.
[0167] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the performance test case automated generation device, the performance test case automated generation device: acquires technical factors; decomposes the technical factors based on preset dimensions to obtain decomposition information, where the preset dimensions are functional dimension, resource dimension, and dependency dimension; determines the risk factors corresponding to the technical factors based on the decomposition information and incident data; constructs a risk graph based on the risk factors and the causal relationships between them; and generates target performance test cases based on the risk graph.
[0168] 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).
[0169] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0170] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0171] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described automated performance test case generation method, thereby solving the technical problem that performance test cases are difficult to fully cover risk points. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the automated performance test case generation method provided in the above embodiments, and will not be repeated here.
[0172] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the performance test case automated generation method described above.
[0173] The computer program product provided in this application can solve the technical problem that performance test cases are difficult to fully cover risk points. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the automated performance test case generation method provided in the above embodiments, and will not be repeated here.
[0174] The above are only some embodiments of this application and do 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 automatically generating performance test cases, characterized in that, The method includes: The technology factors are obtained, and the technology factors are decomposed based on preset dimensions to obtain decomposition information. The preset dimensions are functional dimension, resource dimension and dependency dimension. Based on the decomposition information and accident data, the risk factors corresponding to the technical factors are determined; Based on the risk factors and the causal relationships between them, a risk map is constructed; Based on the risk map, target performance test cases are generated.
2. The method as described in claim 1, characterized in that, The step of constructing a risk map based on the risk factors and the causal relationships between the risk factors includes: The risk factor is used as a risk factor node, and the attributes of the risk factor node are defined. The attributes of the risk factor node include at least the node name, node type, node weight, and node description. Based on the causal relationship between the risk factors, determine the cause node and the corresponding result node in the risk factor node; Based on the cause node and the result node corresponding to the cause node, determine the causal relationship edge between the risk factor nodes; The weight of the causal relationship edge is determined based on the strength of the causal relationship corresponding to the causal relationship edge. A risk graph is constructed based on the risk factor nodes, the causal relationship edges between the risk factor nodes, and the weights of the causal relationship edges.
3. The method as described in claim 2, characterized in that, The steps for generating target performance test cases based on the risk map include: Obtain the cause nodes and result nodes from the risk graph; Based on the cause node, determine the corresponding test type and test steps, and based on the result node, determine the corresponding checkpoint and monitoring point. Based on the test type, test steps, checkpoints, and monitoring points, target performance test cases are generated, and the execution order of the target performance test cases is determined based on the risk level of the risk factor nodes in the risk graph.
4. The method as described in claim 1, characterized in that, The step of determining the risk factor corresponding to the technical factor based on the decomposition information and accident data includes: Based on the decomposition information and accident data, the initial risk factors corresponding to the technical factors are determined; Select a central factor from the initial risk factors; Based on the distance between the initial risk factor and the central factor, the nearest central factor of the initial risk factor is determined, and the initial risk factor is assigned to the data cluster corresponding to the nearest central factor; Based on the average value of the initial risk factors within the data cluster, a new central factor for the data cluster is determined; When the convergence condition is met, the new centrality factor of the data cluster is used as the risk factor.
5. The method as described in claim 1, characterized in that, The step of constructing a risk map based on the risk factors and the causal relationships between the risk factors also includes the following before: A Bayesian causal model is obtained by training a Bayesian network based on the accident data. The risk factors are input into the Bayesian causal model to obtain the causal chain of the risk factor nodes; Based on the causal chain, the causal relationships between the risk factor nodes are determined.
6. The method as described in claim 1, characterized in that, The step of obtaining technical factors by decomposing the technical factors based on preset dimensions to obtain decomposition information includes: Acquire technology factors; The technical factors are decomposed based on functional dimensions to obtain the decomposition information of the technical factors under the functional dimensions. The functional dimensions include at least transaction processing, concurrency control, data storage, and communication processing. The technology factors are decomposed based on the resource dimension to obtain the decomposition information of the technology factors under the resource dimension. The resource dimension includes at least computing resources, storage resources, network resources and external resources. The technology factors are decomposed based on the dependency dimension to obtain the decomposition information of the technology factors under the dependency dimension. The dependency dimension includes at least strong dependency, weak dependency and no dependency.
7. The method according to any one of claims 1 to 6, characterized in that, The step of generating target performance test cases based on the risk map further includes: The target performance test cases are evaluated to determine their coverage. When the coverage is less than the range of risk factors or the range of causal relationships, optimize the scope of data collection and data processing strategies; Based on the optimized data collection scope and data processing strategy, the technical factors and accident data are updated, and the process returns to the step of decomposing the technical factors based on preset dimensions to obtain decomposition information. The preset dimensions are functional dimension, resource dimension, and dependency dimension.
8. An automated performance test case generation device, characterized in that, The device includes: The three-dimensional decomposition module is used to acquire technical factors and decompose the technical factors based on preset dimensions to obtain decomposition information. The preset dimensions are functional dimension, resource dimension, and dependency dimension. The graph construction module is used to determine the risk factors corresponding to the technical factors based on the decomposition information and accident data. The graph construction module is also used to construct a risk graph based on the risk factors and the causal relationships between the risk factors; The case generation module is used to generate target performance test cases based on the risk map.
9. An automated performance test case generation 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 method for automatically generating performance test cases as claimed in any one of claims 1 to 7.
10. 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 performance test case automated generation method as described in any one of claims 1 to 7.