A method and system for adaptive generation of test cases for multi-module linkage of an HRP system

By constructing a multi-module business directed graph and an anomaly propagation model for the HRP system, test cases covering both normal and abnormal scenarios are automatically generated. This solves the problems of low efficiency and incomplete coverage in the design of multi-module linkage test cases for the HRP system, thereby improving testing efficiency and coverage.

CN122111874APending Publication Date: 2026-05-29SHANGHAI XIRUAN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI XIRUAN TECH CO LTD
Filing Date
2026-04-30
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

The design of multi-module linkage test cases in HRP systems is inefficient and lacks comprehensive coverage. Existing automated testing tools lack analysis of inter-module business rule linkage, making it difficult to simulate the propagation of anomalies in real business scenarios, and test case generation lacks specificity and effectiveness.

Method used

Based on historical business data from the HRP system, a multi-module directed graph is constructed to identify key business paths, generate anomaly propagation models, and automatically generate test cases covering both normal and abnormal scenarios. The strength of rules between modules is quantified through directed graph modeling technology, and combined with anomaly propagation path optimization algorithms, testing efficiency and coverage are improved.

Benefits of technology

It enables efficient and systematic multi-module collaborative test case generation, improves test coverage and defect detection rate of abnormal tests, and ensures that the generated test cases comply with business rules and historical data distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122111874A_ABST
    Figure CN122111874A_ABST
Patent Text Reader

Abstract

The application relates to an HRP system multi-module linkage test case adaptive generation method and system, belonging to the technical field of testing. The method comprises the following steps: extracting a business rule set based on historical business data of an HRP system; obtaining a multi-module business directed graph through directed graph modeling based on the business rule set; identifying a key business path based on the multi-module business directed graph and outputting a path priority ranking list; constructing an abnormal propagation model and generating a test scene based on the path priority ranking list; and generating corresponding test cases based on the test scene. The application realizes the mining of business rules through historical business data, the construction of a multi-module business directed graph, the identification of a key business path, the construction of an abnormal propagation model, and the final automatic generation of test cases covering normal and abnormal scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of testing technology, specifically relating to an adaptive generation method and system for multi-module linkage test cases in an HRP system. Background Technology

[0002] With the deepening development of enterprise human resource management informatization, the HRP (Human Resources and Payroll) system has become one of the core business systems of enterprises. Its modules include accounts receivable, accounts payable, general ledger, human resources, payroll, and attendance, among others. Complex business flows and data dependencies exist between these modules. Currently, the main challenge facing HRP system testing is the difficulty in designing multi-module linkage test cases. Traditional testing methods mainly rely on manual design, which is inefficient and lacks comprehensive coverage. Existing automated testing tools are mostly limited to single-module testing, lacking systematic analysis of the linkage of business rules between modules, making it difficult to simulate anomaly propagation in real business scenarios. Rule-based test case generation methods often ignore the value of historical business data and cannot adaptively generate test cases that conform to actual business scenarios, resulting in test cases being disconnected from actual business scenarios and insufficient test coverage. Especially for anomaly scenario testing, existing technologies often use random anomaly injection, lacking systematic analysis of anomaly propagation paths, leading to a lack of targeted and effective test case generation. Therefore, how to automatically and systematically generate multi-module linkage test cases covering both normal and anomaly scenarios to improve testing efficiency and coverage is a pressing technical problem to be solved in the current HRP system testing field. Summary of the Invention

[0003] To address the aforementioned problems in the existing technology, this invention provides an adaptive generation method and system for multi-module linkage test cases in HRP systems.

[0004] The objective of this invention can be achieved through the following technical solutions: An adaptive generation method for multi-module linkage test cases in an HRP system, the implementation of which includes the following steps: Step S1: Extract a set of business rules based on historical business data from the HRP system; Step S2: Based on the set of business rules, obtain a multi-module business directed graph through directed graph modeling; Step S3: Identify key business paths based on the multi-module business directed graph and output a path priority ranking list; Step S4: Construct an anomaly propagation model and generate test scenarios based on the path priority sorting list; Step S5: Generate corresponding test cases based on the test scenario.

[0005] Preferably, step S1 specifically includes: Collect the historical business data of each module of the HRP system within a preset time period and perform cleaning and structuring processing. The historical business data includes data flow records between modules, business operation logs, data consistency verification results, and exception handling records. Based on the historical business data, frequently occurring data conversion patterns are identified to obtain the preconditions and result constraints. Based on the historical business data, the preconditions, and the result constraints, business rules are extracted, mathematically described as follows: ,in, For the kth business rule, F is the data transformation function for the transformation from source module x to target module y. To verify the function, This represents the n prerequisites that source module x must satisfy. Let m represent the m result constraints that the target module y must satisfy. For logical implication symbols, For the equivalent of, For existence; The business rule set is generated based on the business rules, and each business rule includes the preconditions, the result constraints, the confidence level, and the support level.

[0006] Preferably, the directed graph modeling in step S2 specifically involves: The core module of the HRP system is defined as a graph node. When a business rule exists from graph node a to graph node b, a directed edge is added between the two graph nodes, and the edge weight of each directed edge is obtained. Mathematically, this is described as follows: ,in, Let be the edge weight of the directed edge between graph node a and graph node b. To adjust the parameters, The frequency of data transformation from graph node a to graph node b. The average frequency of data transformations between all graph nodes. Let be the directed edge between graph node a and graph node b. For business rules Confidence level, The maximum confidence level for all business rules in the system; The business rules are attached as constraints to the corresponding directed edges; Output the multi-module service directed graph G=(V,E,W,C), where V is the set of graph nodes, E is the set of directed edges, W is the set of edge weights, and C is the set of constraints.

[0007] Preferably, step S3 specifically includes: The initial graph node access probability is preset, and the graph node access probability of each graph node is obtained based on the historical business data. Graph nodes whose access probability is higher than a threshold are retained as key graph nodes. A connected path from the starting point to the ending point is found in the set of key graph nodes as a key test path. Each key test path contains a key graph node sequence and a cumulative access probability. The key test paths are prioritized based on the weighted average of the access probabilities of the graph nodes on a single path, resulting in a path priority ranking list.

[0008] Preferably, the acquisition of the graph node access probability specifically involves: Get the set of neighboring graph nodes for each graph node; Construct indicator function The indicator function exists if and only if there exists a path that satisfies constraint R. The value is 1 if it is true, and 0 otherwise. The probability of visiting a graph node is obtained based on the set of neighboring graph nodes and the indicator function, mathematically described as follows: ,in, Let v be the graph node visit probability of graph node v at step t+1. The balance parameter between random walk and attention mechanism. Let v be the set of neighboring graph nodes. Let x be the weight of the directed edge between neighboring graph node u and graph node v. Let be the graph node visit probability of neighboring graph node u at step t. Let v be the anomaly attention coefficient of the graph node. This is the sum of the anomaly attention coefficients for all graph nodes.

[0009] Preferably, the construction of the anomaly propagation model in step S4 specifically involves: Inject a preset exception into the starting critical graph node of the critical test path; Obtain the propagation probability of the preset anomaly from the current key graph node to the next key graph node; The conditional entropy, derived from the transition probability, is mathematically described as follows: ,in, Let J be the conditional entropy, and J be the number of critical test paths containing critical graph node i. The test scenarios, covering both normal and abnormal scenarios, are generated based on the conditional entropy.

[0010] Preferably, obtaining the transition probability specifically includes: Obtain the constraint change amount during the propagation of the preset anomaly, which is used to represent the degree of violation of the business rules; The transition probability is obtained based on the constraint change and edge weights, and is mathematically described as follows: ,in, To predetermine the transition probability of an anomaly propagating from critical graph node i to the next critical graph node j, Let be the edge weight of the directed edge between key graph node i and key graph node j. Let represent the constraint variation between key graph node i and key graph node j. Let i be the set of neighboring graph nodes of the key graph node i. For the Sigmoid function, Let be the edge weight of the directed edge between key graph node i and its neighboring key graph node k. Let i be the constraint change between key graph node i and its neighboring key graph node k.

[0011] Preferably, step S5 specifically includes: Construct equality constraint functions to represent the business rules that must be satisfied; Construct inequality constraint functions to represent the business restrictions that need to be satisfied; An optimization objective function is constructed based on the equality constraint function and the inequality constraint function. Solving this function yields the test cases, which are mathematically described as follows: Where X represents the test cases to be generated, and K represents the number of equality constraint functions. Let i be the constraint function for the i-th equality. Let be the weight of the i-th equality constraint function. Let i be the objective value of the i-th equality constraint function. For distribution similarity weights, The KL divergence between the test cases and the historical data distribution. Let be the constraint function for the j-th inequality.

[0012] An adaptive test case generation system for multi-module linkage test cases of HRP system is used to execute the adaptive test case generation method for multi-module linkage test cases of HRP system described above, including a business rule extraction module, a directed graph construction module, a path identification module, a test scenario generation module, and a test case generation module; The business rule extraction module is used to extract a set of business rules based on historical business data from the HRP system. The directed graph construction module is used to obtain a multi-module business directed graph through directed graph modeling based on the business rule set; The path identification module is used to identify key business paths based on the multi-module business directed graph and output a path priority ranking list; The test scenario generation module is used to construct an anomaly propagation model and generate test scenarios based on the path priority sorting list; The test case generation module is used to generate corresponding test cases based on the test scenario.

[0013] The beneficial effects of this invention are as follows: (1) By mining high-frequency business rules in historical business data, a multi-module business directed graph is constructed. Combined with the identification of key business paths, test cases covering core business processes are automatically generated to solve the problems of low efficiency and incomplete coverage in the design of multi-module linkage test cases.

[0014] (2) By using directed graph modeling technology, a dynamic association network of business rules between modules is established. The edge weight formula is used to quantify the rule strength between modules, realize intelligent identification of cross-module business paths and generation of test cases, and fill the technical gap of existing tools in the field of module linkage analysis.

[0015] (3) By introducing KL divergence to measure the similarity between the generated data and the distribution of historical business data, and by adding constraint terms to the optimization objective function, we can ensure that the generated test cases not only meet the constraints of business rules, but also remain consistent with the distribution of historical business data.

[0016] (4) By constructing an anomaly propagation model, high-risk anomaly scenarios are generated first. At the same time, by pre-setting anomaly types and anomaly propagation path optimization algorithms, the defect detection rate of anomaly test cases is improved. Attached Figure Description

[0017] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings.

[0018] Figure 1 This is a flowchart illustrating the steps of an adaptive generation method for multi-module linkage test cases in an HRP system according to the present invention. Detailed Implementation

[0019] To better understand the invention, various aspects of the invention will be described in more detail with reference to the accompanying drawings. It should be understood that these detailed descriptions are merely illustrative of exemplary embodiments of the invention and are not intended to limit the scope of the invention in any way. Throughout the specification, the expression "and / or" includes any and all combinations of one or more of the associated listed items. As used herein, the terms "approximately," "about," and similar terms are used as expressions of approximation, not as expressions of degree, and are intended to describe inherent deviations in measured or calculated values ​​that will be recognized by those skilled in the art. Furthermore, the order in which the steps are described in this invention does not necessarily indicate the order in which these steps occur in actual operation, unless otherwise expressly defined or deduced from the context.

[0020] It should also be understood that expressions such as "comprising," "including," "having," "containing," and / or "comprising" are open-ended rather than closed-ended expressions in this specification, indicating the presence of the stated features, elements, and / or components, but not excluding the presence of one or more other features, elements, components, and / or combinations thereof. Furthermore, when expressions such as "at least one of..." appear after a list of listed features, they modify the entire list of features, not just individual elements in the list. Additionally, when describing embodiments of the invention, the word "may" is used to mean "one or more embodiments of the invention." And the term "exemplary" is intended to refer to examples or illustrations.

[0021] Unless otherwise specified, all terms used herein (including engineering and technical terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that, unless expressly stated herein, terms defined in common dictionaries shall be interpreted as having the meaning consistent with their meaning in the context of the relevant art, and not in an idealized or overly formalized sense.

[0022] It should be noted that, unless otherwise specified, the embodiments and features described in this invention can be combined with each other. The invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0023] Example 1: Please see Figure 1 An adaptive generation method for multi-module linkage test cases in an HRP system, comprising: Step S1: Extract a set of business rules based on historical business data from the HRP system; Step S2: Based on the set of business rules, obtain a multi-module business directed graph through directed graph modeling; Step S3: Identify key business paths based on the multi-module business directed graph and output a path priority ranking list; Step S4: Construct an anomaly propagation model and generate test scenarios based on the path priority sorting list; Step S5: Generate corresponding test cases based on the test scenario.

[0024] In this embodiment, step S1 can be implemented through the following steps: S101: The HRP system includes core modules such as accounts receivable, accounts payable, general ledger, human resources, payroll, and attendance. It collects historical business data from each module within a preset time period and performs cleaning and structuring processing to eliminate noisy data. The historical business data includes, but is not limited to, data flow records between modules (such as records of generating payment orders from accounts payable), business operation logs (such as document review, data modification, etc.), data consistency verification results (such as reconciliation results between general ledger and subsidiary ledger), and exception handling records (such as the handling process when data is inconsistent). S102: Based on the historical business data, apply the association rule mining algorithm to identify frequently occurring data conversion patterns (for example, when the payable order status is "approved" and the amount is greater than 0, the system allows the generation of a payment order), and obtain the preconditions (such as "payable order status = approved", "payable order amount > 0") and result constraints ("payment order amount ≤ unpaid amount of payable order", "payment order generation time ≥ payable order approval time"). S103: Extract business rules based on the historical business data, the preconditions, and the result constraints, mathematically described as follows: ,in, For the kth business rule, For data transformation from source module x to target module y, F is a data transformation function that describes how the data in x is transformed into the data in y through specific business logic. To verify the function and determine whether the data transformation between x and y conforms to business constraints, This represents the n prerequisites that source module x must satisfy. Let m represent the m result constraints that the target module y must satisfy. This is a logical implication symbol, representing "if the premises are true, then the result constraint must be satisfied". For the equivalent of, For existence; S104: Generate the set of business rules based on the business rules. Each business rule includes the preconditions, the result constraints, confidence (the proportion of historical records that satisfy the business rule) and support (the frequency of the business rule in all historical records).

[0025] In this embodiment, the directed graph modeling specifically involves: S201: Define the core modules of the HRP system as graph nodes (e.g., graph node a corresponds to the "Accounts Payable" module and graph node b corresponds to the "Payment" module). When a business rule exists from graph node a to graph node b, add a directed edge between the two graph nodes and obtain the edge weight of each directed edge to characterize the degree of dependency between the graph nodes. Mathematically, this is described as follows: ,in, Let be the edge weight of the directed edge between graph node a and graph node b. To adjust the parameters and control the steepness of the Sigmoid function, This refers to the frequency of data transformation from graph node a to graph node b, which is statistically obtained from historical business data (such as the frequency of document generation from the accounts payable module to the payment module). The average frequency of data transformations between all graph nodes. Let be the directed edge between graph node a and graph node b. For business rules Confidence level, The maximum confidence level for all business rules in the system; S202: Attach the business rules as constraints to the corresponding directed edges; S203: Output the multi-module service directed graph G=(V,E,W,C), where V is the set of graph nodes, E is the set of directed edges, W is the set of edge weights, and C is the set of constraints.

[0026] In this embodiment, step S3 can be implemented through the following steps: S301: Preset the access probability of the starting graph node. The starting graph node is usually the starting module of the business process (such as the contract module). Obtain the access probability of each graph node according to the historical business data, and perform a random walk in the multi-module business directed graph according to the access probability of the graph node to simulate the flow of business data. S302: Retain the graph nodes whose access probability is higher than the threshold as key graph nodes, and find the connecting path from the start point to the end point in the set of key graph nodes as key test paths (i.e., ensure that the access probability of each graph node in the key test path is higher than the threshold). Each key test path contains a key graph node sequence and a cumulative access probability. S303: Prioritize the key test paths according to the weighted average of the access probabilities of the graph nodes on a single path to obtain the path priority ranking list.

[0027] In this embodiment, the acquisition of the graph node access probability is specifically as follows: S301-1: Obtain the set of neighboring graph nodes for each graph node, that is, the set of graph nodes that can be directly reached by directed edges. S301-2: Constructing Indicator Functions The indicator function exists if and only if there exists a path that satisfies constraint R. The value is 1 if it is true, and 0 otherwise. S301-3: The access probability of the graph node is obtained based on the set of neighboring graph nodes and the indicator function, mathematically described as follows: ,in, Let v be the graph node visit probability of graph node v at step t+1. The balance parameter between random walk and attention mechanism. Let v be the set of neighboring graph nodes. Let x be the weight of the directed edge between neighboring graph node u and graph node v. Let be the graph node visit probability of neighboring graph node u at step t. The anomaly attention coefficient for graph node v is calculated from the statistical indicators of anomaly events related to the module corresponding to graph node v, obtained from the HRP system anomaly log. The calculation method is to statistically analyze the occurrence frequency and / or severity level of anomaly events related to the module corresponding to graph node v within a preset time period and then normalize them. This is the sum of the anomaly attention coefficients for all graph nodes.

[0028] In this embodiment, the construction of the anomaly propagation model is specifically as follows: S401: Inject a preset exception (such as business inconsistency, business rule violation, etc.) into the starting critical graph node of the critical test path. S402: Obtain the transition probability of the preset anomaly propagating from the current key graph node to the next key graph node; S403: Based on the aforementioned transition probability, obtain the conditional entropy, and assess the uncertainty of the abnormal propagation path. Mathematically, this is described as follows: ,in, Let J be the conditional entropy, and J be the number of critical test paths where critical graph node i is located. That is, a critical graph node may be associated with multiple critical test paths. When evaluating uncertainty, all associated critical test paths need to be considered. S404: Based on the conditional entropy, generate the test scenarios covering normal and abnormal scenarios. That is, for high-entropy graph nodes, generate all possible abnormal propagation paths starting from the graph node. For example, if the high conditional entropy of the accounts payable module indicates that the abnormality may propagate to multiple modules, then generate scenarios such as "Accounts payable data error leading to general ledger imbalance" and "Accounts payable data error leading to payment overpayment". For graph nodes with high access frequency and conditional entropy not exceeding the threshold, generate normal business paths, such as the standard scenario of "Contract to Accounts Payable to Payment...".

[0029] In this embodiment, step S402 can be implemented through the following steps: S402-1: Obtain the constraint change amount during the propagation of the preset exception, which is used to represent the degree of violation of the business rule (for example, there is a rule from "Accounts Payable Module" to "Payment Module": 'Payment Amount ≤ Accounts Payable Amount'. When an exception data is generated in "Accounts Payable Module" with a payment amount exceeding the accounts payable amount by 100 yuan, the rule is violated, and the constraint change amount during the propagation of the exception from "Accounts Payable Module" to "Payment Module" is 100). S402-2: The transition probability is obtained based on the constraint change and the edge weight, mathematically described as follows: ,in, To predetermine the transition probability of an anomaly propagating from critical graph node i to the next critical graph node j, Let be the edge weight of the directed edge between key graph node i and key graph node j. Let represent the constraint variation between key graph node i and key graph node j. Let i be the set of neighboring graph nodes of the key graph node i. For the Sigmoid function, Let be the edge weight of the directed edge between key graph node i and its neighboring key graph node k. Let i be the constraint change between key graph node i and its neighboring key graph node k.

[0030] In this embodiment, step S5 can be implemented through the following steps: S501: Construct an equality constraint function to represent the business rules that must be met. For example, if the difference between the beginning balance of accounts payable and the balance of general ledger accounts payable must be a certain value, then the equality constraint function g(X) = beginning balance of accounts payable - balance of general ledger accounts payable. S502: Construct inequality constraint functions to represent the business restrictions that need to be met. For example, if the payment amount cannot exceed the amount due, then the inequality constraint function h(X) = payment amount - amount due. (Under normal circumstances); or h(X) = payment amount - payable amount (Under abnormal circumstances); S503: Construct an optimization objective function based on the equality constraint function and the inequality constraint function, and solve for the test cases. The mathematical description is as follows: Where X is the test cases to be generated (i.e., the test dataset), and K is the number of equality constraint functions. Let i be the constraint function for the i-th equality. Let be the weight of the i-th equality constraint function. This is the objective value of the i-th equality constraint function, which is usually 0 in normal scenarios, but is set according to the exception type in abnormal scenarios. To distribute similarity weights, the degree of deviation between test cases and historical data is controlled. The KL divergence between test cases and historical data distribution measures the similarity between generated data and real business data distribution. Let be the constraint function for the j-th inequality.

[0031] Example 2: An adaptive test case generation system for multi-module linkage in HRP system includes a business rule extraction module, a directed graph construction module, a path recognition module, a test scenario generation module, and a test case generation module. The business rule extraction module is used to extract a set of business rules based on historical business data from the HRP system. The directed graph construction module is used to obtain a multi-module business directed graph through directed graph modeling based on the business rule set; The path identification module is used to identify key business paths based on the multi-module business directed graph and output a path priority ranking list; The test scenario generation module is used to construct an anomaly propagation model and generate test scenarios based on the path priority sorting list; The test case generation module is used to generate corresponding test cases based on the test scenario.

[0032] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. An adaptive generation method for multi-module linkage test cases in an HRP system, characterized in that, Includes the following steps: Step S1: Extract a set of business rules based on historical business data from the HRP system; Step S2: Based on the set of business rules, obtain a multi-module business directed graph through directed graph modeling; Step S3: Identify key business paths based on the multi-module business directed graph and output a path priority ranking list; Step S4: Construct an anomaly propagation model and generate test scenarios based on the path priority sorting list; Step S5: Generate corresponding test cases based on the test scenario.

2. The adaptive generation method for multi-module linkage test cases in HRP system according to claim 1, characterized in that, Step S1 specifically includes: Collect the historical business data of each module of the HRP system within a preset time period and perform cleaning and structuring processing. The historical business data includes data flow records between modules, business operation logs, data consistency verification results, and exception handling records. Based on the historical business data, frequently occurring data conversion patterns are identified to obtain the preconditions and result constraints. Based on the historical business data, the preconditions, and the result constraints, business rules are extracted, mathematically described as follows: ,in, For the kth business rule, F is the data transformation function for the transformation from source module x to target module y. To verify the function, This represents the n prerequisites that source module x must satisfy. Let m represent the m result constraints that the target module y must satisfy. For logical implication symbols, For the equivalent of, For existence; The business rule set is generated based on the business rules, and each business rule includes the preconditions, the result constraints, the confidence level, and the support level.

3. The adaptive generation method for multi-module linkage test cases in HRP systems according to claim 1, characterized in that, The directed graph modeling in step S2 specifically involves: The core module of the HRP system is defined as a graph node. When a business rule exists from graph node a to graph node b, a directed edge is added between the two graph nodes, and the edge weight of each directed edge is obtained. Mathematically, this is described as follows: ,in, Let be the edge weight of the directed edge between graph node a and graph node b. To adjust the parameters, The frequency of data transformation from graph node a to graph node b. The average frequency of data transformations between all graph nodes. Let be the directed edge between graph node a and graph node b. For business rules Confidence level, The maximum confidence level for all business rules in the system; The business rules are attached as constraints to the corresponding directed edges; Output the multi-module service directed graph G=(V,E,W,C), where V is the set of graph nodes, E is the set of directed edges, W is the set of edge weights, and C is the set of constraints.

4. The adaptive generation method for multi-module linkage test cases in HRP systems according to claim 1, characterized in that, Step S3 specifically includes: The initial graph node access probability is preset, and the graph node access probability of each graph node is obtained based on the historical business data. Graph nodes whose access probability is higher than a threshold are retained as key graph nodes. A connected path from the starting point to the ending point is found in the set of key graph nodes as a key test path. Each key test path contains a key graph node sequence and a cumulative access probability. The key test paths are prioritized based on the weighted average of the access probabilities of the graph nodes on a single path, resulting in a path priority ranking list.

5. The adaptive generation method for multi-module linkage test cases in an HRP system according to claim 4, characterized in that, The specific method for obtaining the access probability of the graph node is as follows: Get the set of neighboring graph nodes for each graph node; Construct indicator function The indicator function exists if and only if there exists a path that satisfies constraint R. The value is 1 if it is true, and 0 otherwise. The probability of visiting a graph node is obtained based on the set of neighboring graph nodes and the indicator function, mathematically described as follows: ,in, Let v be the graph node visit probability of graph node v at step t+1. The balance parameter between random walk and attention mechanism. Let v be the set of neighboring graph nodes. Let x be the weight of the directed edge between neighboring graph node u and graph node v. Let be the graph node visit probability of neighboring graph node u at step t. Let v be the anomaly attention coefficient of the graph node. This is the sum of the anomaly attention coefficients for all graph nodes.

6. The adaptive generation method for multi-module linkage test cases in an HRP system according to claim 4, characterized in that, The construction of the anomaly propagation model in step S4 is specifically as follows: Inject a preset exception into the starting critical graph node of the critical test path; Obtain the propagation probability of the preset anomaly from the current key graph node to the next key graph node; The conditional entropy, derived from the transition probability, is mathematically described as follows: ,in, Let J be the conditional entropy, and J be the number of critical test paths containing critical graph node i. The transition probability of an anomaly propagating from critical graph node i to the next critical graph node j is preset; The test scenarios, covering both normal and abnormal scenarios, are generated based on the conditional entropy.

7. The adaptive generation method for multi-module linkage test cases in an HRP system according to claim 6, characterized in that, The acquisition of the transition probability specifically includes: Obtain the constraint change amount during the propagation of the preset anomaly, which is used to represent the degree of violation of the business rules; The transition probability is obtained based on the constraint change and edge weights, and is mathematically described as follows: ,in, To predetermine the transition probability of an anomaly propagating from critical graph node i to the next critical graph node j, Let be the edge weight of the directed edge between key graph node i and key graph node j. Let represent the constraint variation between key graph node i and key graph node j. Let i be the set of neighboring graph nodes of the key graph node i. For the Sigmoid function, Let be the edge weight of the directed edge between key graph node i and its neighboring key graph node k. Let i be the constraint change between key graph node i and its neighboring key graph node k.

8. The adaptive generation method for multi-module linkage test cases in HRP system according to claim 1, characterized in that, Step S5 specifically includes: Construct equality constraint functions to represent the business rules that must be satisfied; Construct inequality constraint functions to represent the business restrictions that need to be satisfied; An optimization objective function is constructed based on the equality constraint function and the inequality constraint function. Solving this function yields the test cases, which are mathematically described as follows: Where X represents the test cases to be generated, and K represents the number of equality constraint functions. Let i be the constraint function for the i-th equality. Let be the weight of the i-th equality constraint function. Let i be the objective value of the i-th equality constraint function. For distribution similarity weights, The KL divergence between the test cases and the historical data distribution. Let be the constraint function for the j-th inequality.

9. An adaptive test case generation system for multi-module linkage in an HRP system, characterized in that, The system is applied to the HRP system multi-module linkage test case adaptive generation method as described in any one of claims 1-8, including a business rule extraction module, a directed graph construction module, a path identification module, a test scenario generation module, and a test case generation module; The business rule extraction module is used to extract a set of business rules based on historical business data from the HRP system. The directed graph construction module is used to obtain a multi-module business directed graph through directed graph modeling based on the business rule set; The path identification module is used to identify key business paths based on the multi-module business directed graph and output a path priority ranking list; The test scenario generation module is used to construct an anomaly propagation model and generate test scenarios based on the path priority sorting list; The test case generation module is used to generate corresponding test cases based on the test scenario.