Target human-computer cooperation-based e2e scene test optimization method and system
By optimizing the E2E scenario testing method based on human-machine collaboration, and through the construction of resource libraries, path parsing, strategy generation, and dynamic updates, the method achieves efficient optimization of E2E scenario testing. This solves the problems of low performance in handling key scenarios and insufficient dynamic adaptability in existing technologies, ensuring test quality and software delivery efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RUIJIAN TECHNOLOGY (BEIJING) CO LTD
- Filing Date
- 2025-09-10
- Publication Date
- 2026-06-26
AI Technical Summary
Existing E2E scenario testing optimization methods have low performance in critical scenarios and lack dynamic adaptability. Relying on human experience makes it difficult to efficiently ensure test effectiveness with limited resources.
By using a goal-oriented human-machine collaboration approach, optimization objectives are determined, an initial test resource library is built, business paths are automatically parsed and test case dependency graphs are generated, and optimization strategies are automatically generated by combining manual verification and correction. Furthermore, test cases are streamlined and merged through system execution, and evaluation reports are generated by real-time data collection. A dynamic feedback mechanism is established to continuously optimize the testing process.
It achieves precise positioning and efficient optimization of core test scenarios, shortens test execution time, reduces resource consumption, and ensures complete coverage of core scenarios while dynamically adapting to system changes.
Smart Images

Figure CN121387710B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of software engineering and automated testing technology, and more specifically, to an E2E scenario testing optimization method and system based on target human-machine collaboration. Background Technology
[0002] In the fields of software engineering and automated testing, E2E scenario testing optimization is of great significance. Optimizing E2E scenario testing can be achieved in various ways, such as using test automation frameworks like Selenium and Cypress, which provide tools, libraries, and guidelines to make test writing, execution, and reporting more efficient and consistent, thereby accelerating the testing process; adopting continuous testing methodologies, integrating E2E testing into continuous integration and continuous delivery (CI / CD) pipelines, enabling tests to run automatically and frequently, quickly providing feedback on system quality and functional issues throughout the software development cycle, avoiding regression issues, discovering vulnerabilities early, and facilitating more reliable and faster software delivery; leveraging cloud-based testing environments, which allow for flexible configuration and expansion as needed, eliminating concerns about infrastructure and dependencies, and offering significant advantages in security, reliability, and compatibility; implementing test data management, systematically creating, storing, updating, and deleting data required for testing, ensuring data validity and accuracy, and preventing data issues from affecting test results; and applying best practices in test design, such as identifying critical paths and branch scenarios, to improve test coverage.
[0003] Prior to this invention, existing E2E scenario testing optimization methods mainly focused on simplifying test cases, improving execution efficiency, enhancing element location, and optimizing fault location. They also relied on human experience to prioritize core business paths in order to ensure the effectiveness of testing key scenarios with limited resources. However, the handling effect of key scenarios was low, and the dynamic adaptability was insufficient. Summary of the Invention
[0004] In view of the above problems, this invention proposes an E2E scenario testing optimization method and system based on target-oriented human-machine collaboration. By determining the target, building a resource library, parsing the path, generating strategies, optimizing test cases, performing analysis and dynamic updates, it achieves efficient optimization of E2E scenario testing of analysis software, ensuring test quality and software delivery efficiency.
[0005] According to a first aspect of the present invention, an E2E scenario testing optimization method based on target human-machine collaboration is provided.
[0006] In one or more embodiments, preferably, the E2E scenario testing optimization method based on target human-machine collaboration includes:
[0007] Determine the optimization goals for E2E scenario testing. Based on these goals, manually input the initial E2E test case set and related business process information to construct an initial test resource library.
[0008] Based on the initial test resource library, the system automatically performs business path parsing and correlation analysis on the test cases, generates a test case dependency graph and critical path identifiers, and manually verifies and corrects the graph and identifiers based on business experience to determine the core test scenarios.
[0009] Based on the optimization objectives and the core test scenarios, the system automatically generates candidate strategies for test case simplification, priority ranking, and execution scheduling. The candidates are then evaluated and screened manually in conjunction with resource constraints and business priorities to determine the target optimization strategy.
[0010] Based on the aforementioned optimization strategy, the system automatically performs test case simplification, merging, and execution order adjustment to generate an optimized test case set. The optimized test case set is then manually sampled and verified to ensure complete coverage of core business scenarios.
[0011] The system deploys the optimized test case set to the test environment and executes it automatically, collecting execution data and exception information in real time, generating a preliminary optimization effect evaluation report, and manually analyzing the evaluation report and exception information to determine whether additional test cases or adjustments to the optimization strategy are needed.
[0012] Update the initial test resource library and the strategy model formed by the target optimization strategy, establish a dynamic feedback mechanism, and automatically trigger a new round of optimization process prompts when the application system undergoes version iteration or business process changes. After manual confirmation, the aforementioned steps are executed for continuous optimization.
[0013] In one or more embodiments, preferably, determining the E2E scenario testing optimization target, and based on the optimization target, constructing an initial test resource library by manually inputting an initial E2E test case set and related business process information, specifically includes:
[0014] Extract core test metrics from business requirements documents, including historical test coverage baseline, historical test execution time average, and historical test resource consumption peak.
[0015] The optimization objectives are dynamically calculated using the first calculation formula, and the optimization objectives include an upper limit threshold for improving coverage, a lower limit threshold for shortening execution time, and a threshold for reducing resource consumption.
[0016] The initial E2E test case set is manually entered into a structured format according to the test case ID, the business scenario to which it belongs, the preconditions, the operation steps, and the expected results.
[0017] Collect the role and permission matrix, data interaction interface list, and system module dependency relationship of the business process as relevant business process information, and use the matrix lookup table mapping method to establish the role-interface-module association mapping table;
[0018] The system stores the above information in a three-level structure of scenario-use case-process element, and uses maximum-minimum value normalization to process the use case priority attribute value, mapping it to the 0-1 range to form an initial test resource library with an index mechanism, supporting fast retrieval by business scenario and use case attribute;
[0019] The first calculation formula is:
[0020]
[0021] Where T_cov is the upper limit threshold for coverage improvement, T_time is the lower limit threshold for execution time reduction, T_resource is the threshold for resource consumption reduction, P_cov is the historical test coverage baseline, P_time is the historical test average execution time, and P_resource is the historical test peak resource consumption.
[0022] In one or more embodiments, preferably, the system automatically performs business path parsing and correlation analysis on the test cases in the initial test resource library, generates a test case dependency graph and critical path identifiers, and manually verifies and corrects the graph and identifiers based on business experience to determine the core test scenarios, specifically including:
[0023] The system extracts the module call sequence from the operation steps of the test cases and uses a directed graph algorithm to construct a business path model;
[0024] By calculating the number of shared module nodes and data transmission relationships between use cases, an association matrix containing direct and indirect dependencies is generated, and a use case dependency graph is constructed based on the association matrix.
[0025] Based on the frequency of path occurrence, the scope of fault impact, and the business value weight, the importance of the path is calculated using the second calculation formula.
[0026] Manual review of the accuracy of node associations and the completeness of critical paths in the graph is conducted through a visual interface. Any missing core business paths are supplemented and annotated, and the core test scenarios are finally determined.
[0027] The second calculation formula is:
[0028]
[0029] in, Here, F represents the path importance, S represents the path occurrence frequency (a normalized value), and V represents the fault impact range (a normalized value). Finally, V represents the business value weight (a normalized value). The weighting coefficients are the frequency of occurrence of the path. The weighting coefficients represent the scope of the fault's impact. The weighting coefficient for business value. .
[0030] In one or more embodiments, preferably, the system automatically generates candidate strategies for test case simplification, priority ranking, and execution scheduling based on the optimization objective and the core test scenario. The candidate strategies are then manually evaluated and screened based on resource constraints and business priorities to determine the target optimization strategy, specifically including:
[0031] The system uses a core test scenario coverage rate of no less than 95% as a classification constraint, and uses a third calculation formula to extract the objective function to eliminate redundant test cases;
[0032] Based on the importance of the path corresponding to the use case, the historical execution time and failure risk, the fourth calculation formula is used to calculate the uncertainty weight, and the final priority ranking rule is formed by merging them.
[0033] Based on the number of test environments and test case resource requirements, the completion time is calculated using the fifth calculation formula, and tasks are allocated with the goal of minimizing the maximum completion time.
[0034] The above solutions are combined into multiple candidate strategies, and the target optimization strategy that meets the actual test resource conditions is manually selected.
[0035] The third calculation formula is:
[0036]
[0037] ARGMIN() is used for extraction. Minimum The function that takes values, Let be the value of the i-th test case, used as the objective function to eliminate redundant test cases. It is a binary decision variable. This indicates that the i-th test case is deleted. This indicates that the i-th test case is retained. For all core test scenarios j, the objective function is subject to the following constraints: ,in, It is the coverage contribution of use case i to scenario j. This represents the total coverage requirement for scenario j;
[0038] The fourth calculation formula is:
[0039]
[0040] Where E is the information entropy of a certain indicator. This represents the proportion of the value of the m-th use case on this metric to the total value of this metric for all use cases. N is the total number of test cases. This refers to the uncertainty weight of the indicator calculated based on information entropy;
[0041] The fifth calculation formula is:
[0042]
[0043] Makespan represents the latest completion time among all execution machines, i.e., the total completion time. The optimization objective is to minimize the value of Makespan by adjusting task allocation, while satisfying resource constraints, to sum the execution times of all test cases assigned to the k-th execution machine.
[0044] In one or more embodiments, preferably, based on the target optimization strategy, the system automatically performs test case simplification, merging, and execution order adjustment to generate an optimized test case set. The optimized test case set is then manually sampled and verified to ensure complete coverage of core business scenarios, specifically including:
[0045] The system deletes low-priority use cases that repeatedly cover the same core path according to the simplification rules in the target optimization strategy;
[0046] Identify test cases with the same continuous operation sequence, merge them into combined test cases containing multiple branch verification points, and use the sixth calculation formula to calculate the target value so that the target value corresponding to the fitted curve and the original data points is minimized.
[0047] Based on the use case dependencies and the division of parallel execution groups, the execution order of use cases is adjusted to reduce cross-group resource waiting time;
[0048] The optimized test case set is manually verified using a segmented sampling method. It is divided into three segments: high, medium, and low, according to the business complexity of the core scenario. The sampling ratio of the high complexity segment is no less than 30%, the medium complexity segment is no less than 20%, and the low complexity segment is no less than 10%. The complete test process is executed to verify the validity and coverage of the test cases, thus forming the optimized test case set.
[0049] The sixth calculation formula is:
[0050]
[0051] Where MBZ is the target value, Y_i is the parameter value of the i-th original data point, X_i is the sequence or index of the i-th original data point, and A and B are the fitting coefficients to be solved, where A is the slope and B is the intercept. The optimal A and B are determined by minimizing the sum of squared errors of all data points, MBZ.
[0052] In one or more embodiments, preferably, the system deploys the optimized test case set to the test environment and executes it automatically, collects execution data and anomaly information in real time, generates a preliminary optimization effect evaluation report, and manually analyzes the evaluation report and anomaly information to determine whether additional test cases or adjustments to the optimization strategy are needed, specifically including:
[0053] The system allocates the optimized test case set to the test environment according to the scheduling scheme, triggers automated execution through interface calls, and uses edge computing to perform real-time data preprocessing on the local test nodes.
[0054] Real-time collection of test case execution status, time consumption, resource consumption, and exception stack information; time consumption data is processed by normalization of maximum and minimum values and converted into relative time consumption in the range of 0 and 1; exception information is classified into environment, script, and business logic categories according to preset classification constraint rules.
[0055] Generate an optimization effect evaluation report that includes coverage achievement rate, long-term cumulative efficiency improvement value, and resource consumption reduction rate. The long-term cumulative efficiency improvement value is calculated using the seventh calculation formula.
[0056] For optimization indicators and high-frequency anomaly types that fail to meet the standards in the manual analysis report, the similarity is calculated using the eighth calculation formula to determine whether to add edge scenario use cases or adjust the use case priority ranking rules, and thus form optimization and adjustment opinions.
[0057] The seventh calculation formula is:
[0058]
[0059] in, V_t represents the cumulative efficiency improvement over a long period, V_t represents the efficiency improvement observed in the t-th time period, decay_factor is the decay factor, a constant between 0 and 1, representing the decay rate of historical data, and t is the time period. The further away from the current time, the larger the value of t, and the smaller the value of (decay_factor)t, the lower its weight.
[0060] The eighth calculation formula is:
[0061]
[0062] Where Similarity is the similarity between the current abnormal pattern A and the historical case pattern B of two vectors. The closer the value is to 1, the more similar they are. A_i and B_i are the values of vector A and vector B in the i-th feature dimension, respectively. This formula calculates the difference between the two vectors in direction, ignoring their magnitude / modulus.
[0063] In one or more embodiments, preferably, the strategy model formed by updating the initial test resource library and the target optimization strategy establishes a dynamic feedback mechanism. When the application system undergoes version iteration or business process changes, a new round of optimization process prompts is automatically triggered. After manual confirmation, the aforementioned steps of continuous optimization are executed, specifically including:
[0064] Based on the analysis results, the system adds supplementary test cases to the test resource library and uses the ninth calculation formula to iteratively correct the weight parameters in the strategy model.
[0065] Establish a dynamic feedback mechanism that includes a version change identification interface and a business process comparison algorithm. Utilize the tenth calculation formula to calculate the similarity of business processes before and after the change. When the similarity is lower than a preset threshold, an optimization prompt will be automatically triggered.
[0066] After manual confirmation, the system calls historical optimization parameters as initial values, uses a prediction function (based on trend prediction of multinomial fitting) to estimate the achievability of the optimization target, and performs full-process optimization from test resource library update to strategy evaluation, so as to realize dynamic adaptation of test strategy and system iteration.
[0067] The ninth calculation formula is:
[0068]
[0069] Where W_new is the corrected weight, and W_old is the original weight. The correction factor is derived from the deviation between the manual analysis results or effect evaluation report and the expected value. C is the confidence coefficient, which is a value between 0 and 1, representing the reliability of the analysis results. The higher the confidence level, the greater the correction magnitude.
[0070] The tenth calculation formula is:
[0071]
[0072] Where Similarity_bp represents the similarity of the business processes before and after the change. These are the values of the business process before and after the change on the i-th feature dimension, respectively.
[0073] According to a second aspect of the present invention, an E2E scenario testing optimization system based on target human-machine collaboration is provided.
[0074] In one or more embodiments, preferably, the E2E scenario testing optimization system based on target human-machine collaboration includes:
[0075] A resource library module is constructed to determine the optimization goals for E2E scenario testing. Based on the optimization goals, an initial E2E test case set and related business process information are manually input to construct the initial test resource library.
[0076] The scenario determination module is used by the system to automatically perform business path parsing and correlation analysis on the test cases in the initial test resource library, generate test case dependency graphs and critical path identifiers, and manually verify and correct the graphs and identifiers based on business experience to determine the core test scenarios.
[0077] The strategy optimization module is used by the system to automatically generate candidate strategies for test case simplification, priority ranking, and execution scheduling based on the optimization objectives and the core test scenarios. The candidate strategies are then evaluated and screened manually in combination with resource constraints and business priorities to determine the target optimization strategy.
[0078] The test case optimization module is used to automatically simplify, merge, and adjust the execution order of test cases based on the target optimization strategy, generate an optimized test case set, and manually sample and verify the optimized test case set to ensure the complete coverage of core business scenarios.
[0079] The test case analysis module is used to deploy the optimized test case set to the test environment and execute it automatically, collect execution data and exception information in real time, generate a preliminary optimization effect evaluation report, and manually analyze the evaluation report and exception information to determine whether it is necessary to add test cases or adjust the optimization strategy.
[0080] The dynamic feedback module is used to update the initial test resource library and the strategy model formed by the target optimization strategy, and to establish a dynamic feedback mechanism. When the application system undergoes version iteration or business process changes, a new round of optimization process prompts will be automatically triggered, and the aforementioned steps will be executed for continuous optimization after manual confirmation.
[0081] According to a third aspect of the present invention, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the method as described in any one of the first aspects of the present invention.
[0082] According to a fourth aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method described in any one aspect of the present invention.
[0083] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0084] In this invention, the initial test resources are manually input and the system automatically parses the business path and generates a dependency graph in coordination. Combined with manual verification and correction of critical paths, the core test scenarios are accurately located, avoiding the omission of key business logic due to automatic system analysis, and ensuring that the test focuses on the core functions.
[0085] In this invention, the system automatically generates candidate strategies according to the optimization goal, and the target strategy is screened manually in combination with resource constraints. Then, the system performs test case simplification and merging and manual sampling verification, which realizes efficient optimization of the test case set. While shortening the test execution time and reducing resource consumption, it ensures complete coverage of the core scenarios.
[0086] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0087] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0088] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0089] Figure 1 This is a flowchart of an embodiment of the present invention: an E2E scenario testing optimization method based on target human-machine collaboration.
[0090] Figure 2 This is a flowchart of a method for optimizing E2E scenario testing based on target-driven human-machine collaboration, according to an embodiment of the present invention, which involves determining the optimization target for E2E scenario testing, and constructing an initial test resource library based on the optimization target by manually inputting an initial E2E test case set and related business process information.
[0091] Figure 3The system in the E2E scenario test optimization method based on target human-machine collaboration, according to an embodiment of the present invention, automatically performs business path parsing and correlation analysis on the test cases in the initial test resource library, generates test case dependency graphs and critical path identifiers, and manually verifies and corrects the graphs and identifiers based on business experience to determine the flowchart of the core test scenario.
[0092] Figure 4 This is a flowchart of an E2E scenario test optimization method based on target human-machine collaboration in an embodiment of the present invention. The system automatically generates candidate strategies for test case simplification, priority ranking, and execution scheduling based on the optimization target and the core test scenario. The candidate strategies are evaluated and screened manually in combination with resource constraints and business priorities to determine the target optimization strategy.
[0093] Figure 5 This is a flowchart illustrating the target-based human-machine collaboration-based E2E scenario test optimization method of an embodiment of the present invention. Based on the target optimization strategy, the system automatically performs test case simplification, merging, and execution order adjustment to generate an optimized test case set. The optimized test case set is then manually sampled and verified to ensure the complete coverage of core business scenarios.
[0094] Figure 6 This is a flowchart of a target-based human-machine collaboration-based E2E scenario test optimization method according to an embodiment of the present invention. The system deploys the optimized test case set to the test environment and executes it automatically, collects execution data and abnormal information in real time, generates a preliminary optimization effect evaluation report, and manually analyzes the evaluation report and abnormal information to determine whether it is necessary to supplement test cases or adjust the optimization strategy.
[0095] Figure 7 This is a flowchart of a target-based human-machine collaboration-based E2E scenario test optimization method according to an embodiment of the present invention, which updates the initial test resource library and the strategy model formed by the target optimization strategy, establishes a dynamic feedback mechanism, and automatically triggers a new round of optimization process prompts when the application system undergoes version iteration or business process changes. After manual confirmation, the aforementioned steps are executed for continuous optimization.
[0096] Figure 8 This is a structural diagram of an E2E scenario testing optimization system based on target human-machine collaboration, according to an embodiment of the present invention.
[0097] Figure 9 This is a structural diagram of an electronic device according to one embodiment of the present invention. Detailed Implementation
[0098] In some of the processes described in the specification, claims, and accompanying drawings of this invention, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as 101, 102, etc., are merely used to distinguish different operations and do not represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0099] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0100] Prior to this invention, existing E2E scenario testing optimization methods mainly focused on test case simplification (such as eliminating redundant test cases based on coverage analysis), execution efficiency improvement (such as adopting parallel execution and pre-deploying the test environment), element location enhancement (such as introducing intelligent waiting and dynamic location strategies), and fault location optimization (such as log tracking and anomaly correlation analysis). At the same time, they relied on human experience to prioritize core business paths in order to ensure the effectiveness of testing in key scenarios with limited resources.
[0101] This invention provides a method and system for optimizing E2E scenario testing based on target-oriented human-machine collaboration. This solution achieves efficient optimization of E2E scenario testing for analytical software by identifying targets, building a resource library, parsing paths, generating strategies, optimizing test cases, performing analysis, and dynamically updating, thus ensuring test quality and software delivery efficiency.
[0102] According to a first aspect of the present invention, an E2E scenario testing optimization method based on target human-machine collaboration is provided.
[0103] Figure 1 This is a flowchart of an embodiment of the present invention: an E2E scenario testing optimization method based on target human-machine collaboration.
[0104] In one or more embodiments, preferably, the E2E scenario testing optimization method based on target human-machine collaboration includes:
[0105] S101. Determine the optimization goals for E2E scenario testing. Based on the optimization goals, manually input the initial E2E test case set and related business process information to construct the initial test resource library.
[0106] S102. Based on the initial test resource library, the system automatically performs business path parsing and correlation analysis on the test cases in it, generates a test case dependency graph and critical path identifiers, and manually verifies and corrects the graph and identifiers based on business experience to determine the core test scenarios.
[0107] S103. Based on the optimization goal and the core test scenario, the system automatically generates candidate strategies for test case simplification, priority ranking, and execution scheduling. The candidate strategies are evaluated and screened manually in combination with resource constraints and business priorities to determine the target optimization strategy.
[0108] S104. Based on the target optimization strategy, the system automatically performs test case simplification, merging and execution order adjustment to generate an optimized test case set. The optimized test case set is manually sampled and verified to ensure the complete coverage of core business scenarios.
[0109] S105. The system deploys the optimized test case set to the test environment and executes it automatically, collects execution data and abnormal information in real time, generates a preliminary optimization effect evaluation report, and manually analyzes the evaluation report and abnormal information to determine whether it is necessary to add test cases or adjust the optimization strategy.
[0110] S106. Update the initial test resource library and the strategy model formed by the target optimization strategy, and establish a dynamic feedback mechanism. When the application system undergoes version iteration or business process changes, a new round of optimization process prompts will be automatically triggered. After manual confirmation, the aforementioned steps will be executed for continuous optimization.
[0111] This embodiment applies to the optimization of E2E scenario testing for talent analysis software (with core functions such as resume parsing, talent profile matching, interview assessment, and salary prediction). E2E scenario testing refers to testing the entire business process of the software, from user input (e.g., uploading a resume) to output (e.g., generating a talent matching report). The initial optimization goal for E2E scenario testing is defined as "reducing test execution time by 30% and test resource consumption by 20% while ensuring core business scenario test coverage." Based on this optimization goal, testers (manually) input an initial E2E test case set (including "resume parsing accuracy test," "talent profile matching test," etc.). The system constructs an initial test resource library using 100 test cases, such as "job requirement matching test" and "interview scoring data synchronization test," along with related business process information (e.g., data interaction rules between the resume parsing module and the talent profiling module, and role permission settings for the interview evaluation module). Based on this initial test resource library, the system automatically extracts the module call relationships in each test case's operation steps (e.g., "resume parsing test" requires calls to the file upload module, OCR recognition module, and field extraction module), performs business path parsing and correlation analysis on the test cases (e.g., identifying that "talent profiling matching test" depends on the output data of "resume parsing test"), and generates... The system generates a test case dependency graph (with nodes representing test cases and edges representing dependencies) and critical path markers (marking the high-frequency core path "resume parsing → talent profile matching → interview assessment"). Testers (humans) verify the graph and markers based on business experience (e.g., knowing that "talent profile matching" is a core profit-generating function in the talent analysis software), correcting any missing "dependencies between the salary prediction module and the talent profile module," and identifying core test scenarios (including 8 scenarios such as resume parsing accuracy, talent-job matching, and interview data synchronization). Subsequently, based on the aforementioned optimization goals and core test scenarios, the system automatically generates 3 sets of candidate strategies. (Examples: Strategy 1: Streamline the 5 test cases that repeatedly cover "resume format verification", sort the test cases by business value, and execute them in parallel on 3 test machines; Strategy 2: Merge the 8 test cases of "parsing resumes of different formats" into 3 combined test cases, sort the test cases by execution time, and execute them in parallel on 2 test machines; Strategy 3: Delete 10 low-priority test cases such as "historical salary data query test", sort the test cases by failure risk, and execute them in parallel on 4 test machines). Testers (humans) combined actual resource constraints (only 2 available test machines) and business priorities ("talent-job matching test" has the highest priority) and selected Strategy 2 as the target optimization strategy.Based on the target optimization strategy, the system automatically performs test case simplification (removing two duplicate "resume field validation" test cases), merging (merging the "PDF resume parsing," "Word resume parsing," and "Excel resume parsing" test cases into a "multi-format resume parsing verification test case," which includes three branch verification points), and adjusting the execution order (assigning the dependency-free "interview evaluation rule test" and "resume parsing test" to the same parallel group to reduce resource waiting time), generating an optimized test case set (a total of 82 test cases). Testers (humans) use sampling verification (selecting 15 test cases from core scenarios such as "talent-job matching test" and executing the complete test process) to confirm complete coverage of core business scenarios. Afterward, the system deploys the optimized test case set to a cloud testing environment (configuring two test machines with 8 CPU cores and 16GB of memory) and executes them automatically, collecting execution data in real time (e.g., the "multi-format resume parsing verification test case" execution time is 2 minutes and resource utilization is 30%). The system processes and analyzes abnormal information (such as "error in parsing the date of birth field in an Excel resume"), generating a preliminary optimization effect evaluation report (showing 98% test coverage, 32% reduction in execution time compared to the historical average, and 21% reduction in resource consumption). Testers (manually) analyze the report (confirming coverage meets standards) and abnormal information (determining the "date of birth parsing error" is a script-related issue, requiring no additional test cases), confirming that no adjustment to the optimization strategy is needed. Finally, based on the analysis results, the system adds the "Excel resume parsing exception handling steps" to the initial test resource library and updates the strategy model formed by the target optimization strategy (adjusting the "format priority weight during test case merging"). A dynamic feedback mechanism is established; when the talent analysis software undergoes version iteration (e.g., adding a "talent background check module") or business process changes (e.g., "talent-job matching algorithm upgrade"), the system automatically triggers a new round of optimization process prompts. After testers confirm, continuous optimization from test resource library update to strategy evaluation is executed.
[0112] Figure 2 This is a flowchart of a method for optimizing E2E scenario testing based on target-driven human-machine collaboration, according to an embodiment of the present invention, which involves determining the optimization target for E2E scenario testing, and constructing an initial test resource library based on the optimization target by manually inputting an initial E2E test case set and related business process information.
[0113] like Figure 2 As shown, in one or more embodiments, preferably, determining the E2E scenario test optimization target, and based on the optimization target, constructing an initial test resource library by manually inputting an initial E2E test case set and related business process information, specifically includes:
[0114] S201. Extract core test metrics from the business requirements document, wherein the core metrics include historical test coverage baseline, historical test execution time average, and historical test resource consumption peak.
[0115] S202. Dynamically calculate the optimization target using the first calculation formula. The optimization target includes an upper limit threshold for improving coverage, a lower limit threshold for shortening execution time, and a threshold for reducing resource consumption.
[0116] S203. Manually enter the initial E2E test case set in a structured format according to the test case ID, the business scenario, the preconditions, the operation steps, and the expected results.
[0117] S204. Collect the role and permission matrix of the business process, the list of data interaction interfaces, and the system module dependencies as relevant business process information, and use the matrix lookup table mapping method to establish the role-interface-module association mapping table.
[0118] S205. The system stores the above information in a three-level structure of scenario-use case-process element, and uses maximum-minimum value normalization to process the use case priority attribute value, mapping it to the 0-1 range to form an initial test resource library with an index mechanism, which supports fast retrieval by business scenario and use case attribute.
[0119] The first calculation formula is:
[0120]
[0121] Where T_cov is the upper limit threshold for coverage improvement, T_time is the lower limit threshold for execution time reduction, T_resource is the threshold for resource consumption reduction, P_cov is the historical test coverage baseline, P_time is the historical test average execution time, and P_resource is the historical test peak resource consumption.
[0122] This embodiment is applied to the optimization of E2E scenario testing for talent analysis software. Specifically, the core testing metrics are first extracted from the business requirements document of the talent analysis software (such as the V2.0 version requirements specification). These metrics include a historical test coverage baseline value of 92% (referring to the proportion of core business scenarios covered in the previous version's tests), a historical test execution time average of 120 minutes (referring to the average execution time of the previous version's full E2E tests), and a historical test resource usage peak of 60% (referring to the highest CPU and memory usage ratio in the previous version's tests). Then, the optimization target is dynamically calculated using the first calculation formula. Substituting P_cov=92% into T_cov=P_cov×1.2, the upper limit threshold for coverage improvement is obtained as T_cov=110.4%. The actual value is taken at the upper limit of 100%, that is, to ensure that the coverage is not less than 98%. Substituting P_time=120 minutes into T_time=P_time×0.6, we get the lower limit threshold for execution time reduction T_time=72 minutes (that is, the execution time must be ≤72 minutes). Substituting P_resource=60% into T_resource=P_resource×0.7, we get the resource consumption reduction threshold T_resource=42% (that is, the peak resource consumption must be ≤42%). Then the testers (manually) follow the steps: "Test Case ID (e.g., TC001), business scenario (resume parsing), preconditions (upload 10 PDF resumes with complete fields), operation steps (1. Log in to the system; 2. Go to the resume upload page; 3. Select 10 PDF resumes and upload; 4.The system uses a structured format (waiting for parsing completion), and the expected result (100% accuracy in parsing the name, education, and work experience fields of 10 resumes) to input an initial E2E test case set containing 100 test cases. Then, it collects a role and permission matrix of business processes (e.g., "HR roles can operate resume uploads and interview assessments, administrator roles can operate system configurations and export data"), a list of data interaction interfaces (e.g., the API interfaces between the resume parsing module and the OCR service, and the interaction interfaces between the talent profile module and the job database), and system module dependencies (e.g., the salary prediction module depends on the "years of service" and "job level" data from the talent profile module) as relevant business process information. A matrix lookup table mapping method (using roles as rows, interfaces as columns, and modules as cross values to construct a two-dimensional table) is used to establish a role-interface-module mapping. A mapping table is created (e.g., HR role → resume upload interface → resume parsing module). Finally, the system stores the above information in a three-level structure: "Scenario (e.g., resume parsing scenario) - Use case (e.g., TC001-TC015) - Process element (e.g., HR role, resume upload API interface, resume parsing module)" in a MySQL database. The use case priority attribute values are normalized using a maximum-minimum value normalization process (e.g., the original priority "high" corresponds to 10 points, "medium" to 5 points, and "low" to 2 points; after mapping to the 0-1 range, "high" becomes 1.0, "medium" becomes 0.5, and "low" becomes 0.2). This forms an initial test resource library with an indexing mechanism (indexed by business scenario name and use case ID), allowing testers to quickly retrieve use cases TC001-TC015 by "resume parsing scenario".
[0123] Figure 3 The system in the E2E scenario test optimization method based on target human-machine collaboration, according to an embodiment of the present invention, automatically performs business path parsing and correlation analysis on the test cases in the initial test resource library, generates test case dependency graphs and critical path identifiers, and manually verifies and corrects the graphs and identifiers based on business experience to determine the flowchart of the core test scenario.
[0124] like Figure 3 As shown, in one or more embodiments, preferably, the system automatically performs business path parsing and correlation analysis on the test cases in the initial test resource library, generates a test case dependency graph and critical path identifiers, and manually verifies and corrects the graph and identifiers based on business experience to determine the core test scenarios, specifically including:
[0125] S301. The system extracts the module call sequence from the operation steps of the test cases and uses a directed graph algorithm to construct a business path model.
[0126] S302. By calculating the number of shared module nodes and data transmission relationships between use cases, generate an association matrix containing direct and indirect dependencies, and construct a use case dependency graph based on the association matrix.
[0127] S303. Calculate the path importance based on the path occurrence frequency, fault impact range, and business value weight using the second calculation formula.
[0128] S304. Manually review the accuracy of node associations and the completeness of critical paths in the graph through a visual interface, supplement and annotate any missing core business paths, and finally determine the core test scenarios.
[0129] The second calculation formula is:
[0130]
[0131] Where I_path represents path importance, F represents path occurrence frequency (a normalized value), S represents fault impact range (a normalized value), V represents business value weight (a normalized value), W_f represents the weight coefficient for path occurrence frequency, W_s represents the weight coefficient for fault impact range, and W_v represents the weight coefficient for business value weight. .
[0132] This embodiment is applied to the E2E scenario testing optimization of talent analysis software. In specific implementation, the system first extracts the module call sequence from the operation steps of each test case from the initial test resource library (e.g., the module call sequence corresponding to the operation steps of "Talent-Job Matching Test" is: Login Module → Job Creation Module → Resume Upload Module → Resume Parsing Module → Talent Profile Module → Matching Algorithm Module → Result Display Module). A directed graph algorithm (using directional nodes to represent modules and arrowed edges to represent the module call order, such as an arrow pointing from "Resume Parsing Module" to "Talent Profile Module" indicating the former calling the latter) is used to construct a business path model. Then, the number of shared module nodes between test cases is calculated (e.g., ...). The "Resume Parsing Test" and "Talent Profile Test" share two nodes: the "Resume Parsing Module" and the "Login Module," and their data transfer relationships (e.g., the "parsed resume data" output by the "Resume Parsing Test" serves as the input data for the "Talent Profile Test"). This generates a relational matrix containing direct dependencies (e.g., the "Talent Profile Test" directly depends on the "Resume Parsing Test") and indirect dependencies (e.g., the "Salary Prediction Test" indirectly depends on the "Resume Parsing Test" through the "Talent Profile Test"). The matrix uses use cases as rows and columns, with a value of "1" indicating a dependency and "0" indicating no dependency. Based on this matrix, a use case dependency graph is constructed (nodes represent use cases, and edges represent dependencies, such as TC001 (Resume Parsing Test) and TC0...). There are edges marked with "direct dependency" between 20 (talent profiling test) paths; then, based on the path occurrence frequency (the percentage of execution times of the "login → resume upload → parsing → profiling → matching" path in historical tests, normalized to 0.8), the scope of failure impact (if this path fails, the two core functions "talent matching" and "interview assessment" will be unavailable, normalized to 0.9), and the business value weight (this path corresponds to the core profit-generating function of the software, normalized to 0.95), the path importance is calculated using the second calculation formula I_path=(F×W_f)+(S×W_s)+(V×W_v), where the weight is dynamically adjusted through the coefficient weight correction method (initially determined by the analytic hierarchy process). Initially, W_f=0.3, W_s=0.4, and W_v=0.3. Later, due to high repair costs for the "talent matching" fault, W_s was adjusted to 0.5, W_v to 0.3, and W_f to 0.2. Substituting these values into the calculation, we get I_path=(0.8×0.2)+(0.9×0.5)+(0.95×0.3)=0.16+0.45+0.285=0.895. Then, using the threshold curve method, we set the critical path threshold (with path length (number of modules) as the horizontal axis and business value (after normalization) as the vertical axis, fitting an S-shaped curve, with the area above the curve being the critical path region). The calculated business value for the path "Login → Resume Upload → Parsing → Profile → Matching" is 0.95 is located above the curve and marked as the critical path. Finally, testers (humans) reviewed the accuracy of node associations in the graph (confirming that the dependencies between "Salary Prediction Test" and "Talent Profile Test" were correctly labeled) and the completeness of the critical path (supplementing the missing critical path "Login → Job Creation → Matching → Interview Assessment") through a visual interface (displaying the test case dependency graph and critical path markings). This ultimately determined the core test scenarios (including 8 scenarios such as resume parsing accuracy, talent-job matching, interview data synchronization, and the reasonableness of salary predictions).
[0133] Specifically, the automatic business path parsing and correlation analysis process is as follows: First, the system uses Natural Language Processing (NLP) technology and a predefined module dictionary to extract key operational verbs (such as "call," "upload," and "parse") and object objects (such as "OCR recognition module" and "talent profiling interface") from the "operation steps" description of the test cases. These are then mapped to specific system modules or interfaces, forming a module call sequence. For example, from the operation step "call the OCR service to parse resume text," the module "OCR recognition module" can be extracted. Subsequently, the system uses modules as nodes and the call order between modules as directed edges, employing a depth-first search (DFS) algorithm to traverse the module call sequences of all test cases, constructing a global directed graph model of business paths. For correlation analysis, the system calculates the number of shared module nodes between use cases (Jaccard similarity coefficient) and analyzes data flow (such as whether the output of one use case is the input of the next), generating an adjacency matrix with use cases as rows and columns. This matrix is the correlation matrix, where a value of "1" indicates a direct dependency, and intermediate values such as "0.5" indicate indirect dependencies or weak correlations. This adjacency matrix is the direct data foundation for constructing the use case dependency graph.
[0134] The specific implementation of "setting the critical path threshold using the threshold curve method and fitting an S-shaped curve" is as follows: The system plots a scatter plot with the calculated I_path (path importance) of each path as the vertical axis and the number of modules contained in the path (path length) as the horizontal axis. To distinguish between critical and non-critical paths, an S-shaped curve is fitted using a logistic regression model. After fitting, all paths in the region above the curve (i.e., the region where the actual y value is greater than the fitted y value) are identified as critical paths. The advantage of this method is that it can dynamically set the threshold based on the non-linear relationship between path length and importance, rather than using a fixed value, thus more accurately adapting to the business characteristics of different systems.
[0135] Figure 4This is a flowchart of an E2E scenario test optimization method based on target human-machine collaboration in an embodiment of the present invention. The system automatically generates candidate strategies for test case simplification, priority ranking, and execution scheduling based on the optimization target and the core test scenario. The candidate strategies are evaluated and screened manually in combination with resource constraints and business priorities to determine the target optimization strategy.
[0136] like Figure 4 As shown, in one or more embodiments, preferably, the system automatically generates candidate strategies for test case simplification, priority ranking, and execution scheduling based on the optimization objective and the core test scenario. The candidate strategies are then manually evaluated and screened based on resource constraints and business priorities to determine the target optimization strategy, specifically including:
[0137] S401. The system uses the core test scenario coverage rate of no less than 95% as a classification constraint, and uses the third calculation formula to extract the objective function to eliminate redundant test cases.
[0138] S402. Based on the importance of the path corresponding to the use case, the historical execution time and the failure risk, the uncertainty weight is calculated using the fourth calculation formula and then integrated to form the final priority ranking rule.
[0139] S403. Based on the number of test environments and test case resource requirements, calculate the completion time using the fifth calculation formula, and allocate tasks with the goal of minimizing the maximum completion time.
[0140] S404. Combine the above solutions into multiple candidate strategies and manually select the target optimization strategy that meets the actual test resource conditions.
[0141] The third calculation formula is:
[0142]
[0143] ARGMIN() is used for extraction. The objective function is a function that minimizes the value of X_i, where X_iZ is the value of the i-th test case. It eliminates redundant test cases. X_i is a binary decision variable; X_i=0 indicates the deletion of the i-th test case, and X_i=1 indicates the retention of the i-th test case. For all core test scenarios j, this objective function is subject to the following constraints: Where C_j is the coverage contribution of use case i to scenario j, and T_j is the total coverage requirement of scenario j;
[0144] The fourth calculation formula is:
[0145]
[0146] Where E is the information entropy of a certain metric, and P_m is the proportion of the value of the m-th use case on that metric to the total value of that metric for all use cases. N is the total number of use cases, and W_e is the uncertainty weight of this indicator calculated based on information entropy;
[0147] The fifth calculation formula is:
[0148]
[0149] Here, Makespan is the latest completion time among all execution machines, i.e., the total completion time, and T_k is the sum of the execution times of all test cases assigned to the k-th execution machine. The optimization objective is to minimize the value of Makespan by adjusting task allocation while satisfying resource constraints.
[0150] This embodiment is applied to the E2E scenario testing optimization of talent analysis software. In specific implementation, the system first uses a core test scenario coverage rate of no less than 95% as a classification constraint, and then uses the third calculation formula...
[0151] Extract the objective function to eliminate redundant test cases, where X_i is a binary decision variable (X_i=0 means delete the i-th test case, X_i=1 means keep it), and the constraint is that for all core test scenarios j, (For example, in the core scenario "resume parsing accuracy", T_j=100%, C_j is the coverage contribution of use case i to this scenario, C_j=20% for TC001 and C_j=20% for TC002. If both TC001 and TC002 are retained, the coverage contribution reaches 40%, satisfying the constraint.) Extracted through calculation... The minimum value of X_i is used to delete 18 redundant test cases, such as "Resume Format Validation (Duplicate)" and "Historical Interview Data Query". Then, based on the importance of the corresponding path for each test case (e.g., the path importance of TC020 (Talent-Job Matching Test) is 0.895), historical execution time (TC020's historical average execution time is 5 minutes), and failure risk (TC020's historical failure rate is 15%), the uncertainty weight is calculated using the fourth calculation formula. First, the information entropy E is calculated for each indicator. For example, in the historical execution time indicator, TC020's value_m = 5 minutes, and the total value of this indicator for all test cases Σ(value) = 300 minutes. The calculated value is E≈0.08. Then, W_e = (E) / Σ(E) (Σ(E) is the sum of the information entropy of the three indicators, e.g., 0.24), resulting in W_e≈0.33. Similarly, W_e≈0.4 for path importance and W_e≈0.27 for failure risk are calculated. These are then combined to form the final priority ranking rule (path importance weight 0.4 + historical execution time weight 0.33 + failure risk weight 0.27), ranking TC020 as number 1. Then, based on the test cycle... The number of test cases (2 test machines, denoted as k1 and k2) and resource requirements for test cases (e.g., TC020 requires 2 CPU cores and 4GB of memory) are used to calculate the completion time using the fifth calculation formula Makespan=MAX(Σ(T_k)), where T_k is the sum of the execution times of all test cases assigned to the k-th execution machine. If TC020 (5 minutes) and TC001 (3 minutes) are assigned to k1, Σ(T_1)=8 minutes. If TC030 (4 minutes) and T_k are assigned to k2, Σ(T_1)=8 minutes. C010 (3 minutes) is assigned to k2, Σ(T_2)=7 minutes, Makespan=8 minutes. By adjusting the task allocation (assigning TC010 to k1 and TC001 to k2), Σ(T_1)=5+3=8 minutes, Σ(T_2)=4+3=7 minutes, and Makespan remains at 8 minutes (minimized). Then, the above scheme of "simplifying 18 test cases + sorting by fusion weight + allocating 2 test machines" is combined with two other schemes (such as "simplifying 15 test cases + sorting by business value + allocating 3 test machines" and "simplifying 20 test cases + sorting by failure risk + allocating 2 test machines") into 3 candidate strategies. Finally, the testers (human) evaluate the candidate strategies based on resource constraints (only 2 test machines are available) and business priorities ("talent-job matching test" should be executed first) and select the scheme of "simplifying 18 test cases + sorting by fusion weight + allocating 2 test machines" as the target optimization strategy. The process of automatically generating candidate strategies is based on a predefined optimization strategy rule base. This rule base contains a variety of validated, composable atomic rules: 1) Simplification rules: such as "delete test cases that repeatedly cover the same core path and have a priority lower than a set threshold" and "merge test cases with operation sequence similarity higher than X%". 2) Ranking rules: such as "descending order by path importance", "ascending order by historical execution time", and "descending order by failure risk". 3) Scheduling rules: such as "greedy algorithm" and "binary particle swarm optimization (BPSO) algorithm considering resource constraints" for task allocation.
[0152] Figure 5This is a flowchart illustrating the target-based human-machine collaboration-based E2E scenario test optimization method of an embodiment of the present invention. Based on the target optimization strategy, the system automatically performs test case simplification, merging, and execution order adjustment to generate an optimized test case set. The optimized test case set is then manually sampled and verified to ensure the complete coverage of core business scenarios.
[0153] like Figure 5 As shown, in one or more embodiments, preferably, based on the target optimization strategy, the system automatically performs simplification, merging, and execution order adjustment of test cases to generate an optimized test case set. The optimized test case set is then manually sampled and verified to ensure complete coverage of core business scenarios. Specifically, this includes:
[0154] S501. The system deletes low-priority use cases that repeatedly cover the same core path according to the simplification rules in the target optimization strategy.
[0155] S502. Identify use cases with the same continuous operation sequence, merge them into a combined use case containing multiple branch verification points, and use the sixth calculation formula to calculate the target value so that the target value corresponding to the fitted curve and the original data points is minimized.
[0156] S503. Adjust the execution order of test cases according to the dependency relationship of test cases and the division of parallel execution groups to reduce the waiting time of cross-group resources;
[0157] S504. The optimized test case set is manually verified using a segmented sampling method. It is divided into three segments: high, medium, and low, according to the business complexity of the core scenario. The sampling ratio of the high complexity segment is not less than 30%, the medium complexity segment is not less than 20%, and the low complexity segment is not less than 10%. The complete test process is executed to verify the validity and coverage of the test cases, and the optimized test case set is formed.
[0158] The sixth calculation formula is:
[0159]
[0160] Where MBZ is the target value, Y_i is the parameter value of the i-th original data point, X_i is the sequence or index of the i-th original data point, and A and B are the fitting coefficients to be solved, where A is the slope and B is the intercept. The optimal A and B are determined by minimizing the sum of squared errors of all data points, MBZ.
[0161] This embodiment is applied to the E2E scenario test optimization of talent analysis software. In specific implementation, the system first deletes low-priority test cases that repeatedly cover the "resume parsing core path (upload → parsing → field validation)" according to the simplification rules in the target optimization strategy (such as TC005 "single format resume repeated upload test", priority 0).2. After normalization); then identify test cases with the same continuous operation sequence (such as TC001 "PDF resume parsing test", TC002 "Word resume parsing test", TC003 "Excel resume parsing test", whose operation sequence is "login → upload resume → wait for parsing → verify fields", only the resume format is different), merge them into combined test cases containing multiple branch verification points ("multi-format resume parsing verification test case", containing 3 branch verification points for PDF, Word and Excel, respectively verifying the field parsing accuracy of the corresponding resume formats), and use the sixth calculation formula MBZ=Σ((Y_i-(A×X_i+B))²) to calculate the target value, where Yi_i is The execution time of the original test cases is determined (e.g., Y_1=3 minutes for TC001, Y_2=4 minutes for TC002, Y_3=5 minutes for TC003), and X_i is the index of the original test cases (X_1=1, X_2=2, X_3=3). The fitting coefficients A=1 (slope) and B=2 (intercept) are determined by minimizing MBZ, so that the sum of squared errors between the fitted curve (Y=X+2) and the original data points is minimized (MBZ=(3-(1×1+2))²+(4-(1×2+2))²+(5-(1×3+2))²=0). Then, based on the test case dependencies (e.g., TC020 "Talent-Job Matching Test" depends on the parsing results of TC001 (which has been merged),... The test cases were divided into parallel execution groups ("Job Creation Test" and "Interview Assessment Rule Test", which have no dependencies, were divided into parallel group 1, and "Resume Parsing Test", "Talent Profiling Test" and "Talent-Job Matching Test" were divided into serial group 2). The execution order of the test cases was adjusted (parallel group 1 was executed first, followed by serial group 2), and the cross-group resource waiting time was reduced (to avoid parallel group 1 being idle when serial group 2 was occupying resources). Finally, testers (manually) used a segmented sampling method to verify the optimized test case set (a total of 82 cases), and divided them into high (such as "Talent-Job Matching Test", which involves algorithm models and has high complexity) and medium (such as "Resume Parsing Test", which involves format processing and has high complexity) based on the business complexity of the core scenarios. The test cases were divided into three segments: high complexity (30%), medium complexity (e.g., "user login test," which only verifies account and password, low complexity), and low complexity (10%). A total of 12 test cases were selected and executed to perform a complete test process (e.g., executing the "multi-format resume parsing verification test," uploading resumes in three formats and confirming 100% accuracy in field parsing; executing the "talent-job matching test," confirming the matching results were consistent with expectations). This verified the effectiveness of the test cases and the completeness of coverage of core business scenarios (all eight core scenarios were sampled and covered), ultimately forming the optimized test case set.
[0162] Figure 6This is a flowchart of a target-based human-machine collaboration-based E2E scenario test optimization method according to an embodiment of the present invention. The system deploys the optimized test case set to the test environment and executes it automatically, collects execution data and abnormal information in real time, generates a preliminary optimization effect evaluation report, and manually analyzes the evaluation report and abnormal information to determine whether it is necessary to supplement test cases or adjust the optimization strategy.
[0163] like Figure 6 As shown, in one or more embodiments, preferably, the system deploys the optimized test case set to the test environment and executes it automatically, collects execution data and anomaly information in real time, generates a preliminary optimization effect evaluation report, and manually analyzes the evaluation report and anomaly information to determine whether additional test cases or adjustments to the optimization strategy are needed, specifically including:
[0164] S601. The system allocates the optimized test case set to the test environment according to the scheduling scheme, triggers automated execution through interface calls, and uses edge computing to perform real-time data preprocessing on the local test node.
[0165] S602. Real-time collection of test case execution status, time consumption, resource consumption and exception stack information. The time consumption data is processed by normalization of maximum and minimum values and converted into relative time consumption in the range of 0 and 1. Exception information is divided into environment type, script type and business logic type according to preset classification constraint rules.
[0166] S603. Generate an optimization effect evaluation report that includes coverage achievement rate, long-term cumulative efficiency improvement value, and resource consumption reduction rate, wherein the long-term cumulative efficiency improvement value is calculated using the seventh calculation formula.
[0167] S604. For optimization indicators and high-frequency anomaly types that do not meet the standards in the manual analysis report, use the eighth calculation formula to calculate the similarity, determine whether to add edge scenario use cases or adjust the use case priority sorting rules, and form optimization and adjustment opinions.
[0168] The seventh calculation formula is:
[0169]
[0170] Where V_cumulative is the long-term cumulative efficiency improvement value, V_t is the efficiency improvement value observed in the t-th time period, decay_factor is the decay factor, which is a constant between 0 and 1, representing the decay rate of historical data, t is the time period, the further away from the current time, the larger the value of t, the smaller the value of (decay_factor)t, and the lower its weight.
[0171] The eighth calculation formula is:
[0172]
[0173] Where Similarity is the similarity between the current abnormal pattern A and the historical case pattern B of two vectors. The closer the value is to 1, the more similar they are. A_i and B_i are the values of vector A and vector B in the i-th feature dimension, respectively. This formula calculates the difference between the two vectors in direction, ignoring their magnitude / modulus.
[0174] This embodiment is applied to the E2E scenario testing optimization of talent analysis software. In specific implementation, the system first allocates the optimized test case set (82 test cases) to the cloud testing environment (k1 configured with 8 CPU cores and 16GB memory, k2 configured with 8 CPU cores and 16GB memory) according to the scheduling scheme of the target optimization strategy (2 test machines k1 and k2; k1 is allocated 40 test cases such as "multi-format resume parsing and verification test" and "talent profiling test," k2 is allocated 42 test cases such as "talent-job matching test" and "interview evaluation test"). Automatic testing is then triggered via the Jenkins interface. The execution is automated (calling the Selenium framework to execute test case scripts). Edge computing is used to perform real-time data preprocessing locally on the test nodes (k1, k2) (e.g., calculating the execution time of the "multi-format resume parsing and verification test case" locally on k1, without transmitting it to a remote server for processing). Then, the execution status (success / failure), execution time (e.g., the "multi-format resume parsing and verification test case" on k1 took 4 minutes), resource usage (CPU usage peaked at 35% and memory usage peaked at 40% during execution on k1), and exception information (e.g., the "talent-job matching test" on k2) are collected in real time. An error occurred: "Job requirement data not loaded," with the exception stack trace indicating "database connection timeout." The time-consuming data was processed using a maximum / minimum value normalization method (the maximum time for all test cases was 10 minutes, and the minimum was 2 minutes; 4 minutes was mapped to (4-2) / (10-2)=0.25, i.e., a relative time consumption of 0.25). The exception information was categorized using preset classification constraints (environmental issues: server, database, network problems; script issues: element location failure, parameter passing errors; business logic issues: algorithm calculation errors, data validation failures). The exception was classified into environmental issues ("database connection timeout" belongs to...). (Environmental category); then generate a preliminary optimization effect evaluation report, including coverage achievement rate (actually covering 8 core scenarios, achievement rate 100%), long-term cumulative efficiency improvement value (calculated using the seventh calculation formula V_cumulative=Σ(V_t×(decay_factor)^t), assuming decay_factor=0.8 (historical data decay rate is relatively slow), V_1=32% (current cycle efficiency improvement value) at t=1, V_2=28% (previous cycle) at t=2, and V_3=25% (previous two cycles) at t=3, then... The reduction in resource consumption (peak resource usage decreased from 60% to 35%, a reduction of 41.67%); finally, the analysis report from the test personnel (manual) identified the non-compliant optimization indicators (no non-compliant indicators) and high-frequency anomaly types (only one environmental anomaly), using the eighth calculation formula. Calculate the similarity between the current anomaly pattern A (feature dimensions: database connection, timeout, error frequency, A=[1,1,1]) and the historical case pattern B (historical "database connection timeout" case features, B=[1,1,0.8]). (Close to 1, extremely high similarity) It is determined that the anomaly is an occasional environmental problem, and there is no need to add edge scenario use cases or adjust the optimization strategy. The optimization adjustment opinion is "the current optimization strategy is effective, and only the stability of the database connection needs to be monitored".
[0175] Figure 7 This is a flowchart of a target-based human-machine collaboration-based E2E scenario test optimization method according to an embodiment of the present invention, which updates the initial test resource library and the strategy model formed by the target optimization strategy, establishes a dynamic feedback mechanism, and automatically triggers a new round of optimization process prompts when the application system undergoes version iteration or business process changes. After manual confirmation, the aforementioned steps are executed for continuous optimization.
[0176] like Figure 7 As shown, in one or more embodiments, preferably, updating the initial test resource library and the strategy model formed by the target optimization strategy establishes a dynamic feedback mechanism. When the application system undergoes version iteration or business process changes, a new round of optimization process prompts is automatically triggered. After manual confirmation, the aforementioned steps of continuous optimization are executed, specifically including:
[0177] S701. Based on the analysis results, the system adds supplementary test cases to the test resource library and uses the ninth calculation formula to iteratively correct the weight parameters in the strategy model.
[0178] S702. Establish a dynamic feedback mechanism that includes a version change identification interface and a business process comparison algorithm. Calculate the similarity of the business processes before and after the change using the tenth calculation formula. When the similarity is lower than the preset threshold, an optimization prompt will be automatically triggered.
[0179] S703. After manual confirmation, the system calls historical optimization parameters as initial values, uses a prediction function (based on trend prediction of polynomial fitting) to estimate the achievability of the optimization target, and performs full-process optimization from test resource library update to strategy evaluation to achieve dynamic adaptation between test strategy and system iteration.
[0180] The ninth calculation formula is:
[0181] Where W_new is the corrected weight and W_old is the original weight. The correction factor is derived from the deviation between the manual analysis results or effect evaluation report and the expected value. C is the confidence coefficient, which is a value between 0 and 1, representing the reliability of the analysis results. The higher the confidence level, the greater the correction magnitude.
[0182] The tenth calculation formula is:
[0183]
[0184] Where Similarity_bp represents the similarity of the business processes before and after the change, and V_pre_i and V_cur_i are the values of the business processes before and after the change on the i-th feature dimension, respectively.
[0185] This embodiment is applied to the E2E scenario testing optimization of talent analysis software. In specific implementation, the system first adds the "database connection timeout exception handling steps" to the "exception handling knowledge base" module of the initial test resource library based on the aforementioned analysis results ("the current optimization strategy is effective, only database connection stability needs to be monitored", and there are no new test cases required). At the same time, it uses the ninth calculation formula. The weight parameters in the strategy model are iteratively adjusted. For example, the "environmental stability weight in use case priority ranking" W_old=0.1, due to the occurrence of an environment-related anomaly. (This weight needs to be increased), C=0.9 (the anomaly analysis results are manually confirmed to be reliable and have high confidence), then After correction, the weight was increased from 0.1 to 0.145; then, a dynamic feedback mechanism was established, including a version change identification interface (connecting to the version management system of the talent analysis software, such as GitLab, to obtain version iteration information in real time), a business process comparison algorithm (extracting the feature dimensions of the business process, such as the number of modules, the number of interface calls, and the data flow), and using the tenth calculation formula. Calculate the similarity of business processes before and after the change. When the software iterates from V2.0 to V2.1 (adding a "talent background check module"), the business process characteristics before the change are V_pre = [8 modules, 15 interfaces, 10 data flows], and after the change, V_cur = [9 modules, 18 interfaces, 12 data flows]. The calculated similarity is... Correction here: Feature values should be adjusted after adding a new module, such as... Recalculate No, actually adding new modules will lead to a decrease in similarity, assuming... (Due to the addition of 2 data flow entries in the background check module), then Still high, adjusted to ; If the preset threshold is 0.95, and it is still higher than the threshold, then if V_cur=[10,25,18], then The level remains high, assuming significant changes to the business process.
[0186] (Preset threshold) The system automatically triggers optimization prompts; after confirmation by the tester (manually), the system calls historical optimization parameters (such as the weights of the previous optimization W_f=0.2, W_s=0.5, W_v=0.3) as initial values, and uses a trend prediction function based on polynomial fitting (such as fitting the reduction in execution time of the previous 3 optimizations to obtain...) (x represents the number of optimizations, and the predicted reduction in execution time for this optimization is up to 35%). The achievability of the optimization goal is estimated (it is determined that "execution time ≤ 72 minutes" can be achieved). Subsequently, the entire process optimization is performed, from updating the test resource library (adding "talent background check module test cases") to strategy evaluation (recalculating path importance and generating candidate strategies). The "talent background check module test" is incorporated into the core test scenario, and the test case scheduling scheme is adjusted (10 background check test cases are allocated to k2) to achieve dynamic adaptation of the test strategy and system iteration.
[0187] According to a second aspect of the present invention, an E2E scenario testing optimization system based on target human-machine collaboration is provided.
[0188] Figure 8 This is a structural diagram of an E2E scenario testing optimization system based on target human-machine collaboration, according to an embodiment of the present invention.
[0189] In one or more embodiments, preferably, the E2E scenario testing optimization system based on target human-machine collaboration includes:
[0190] The resource library module 801 is used to determine the optimization goals for E2E scenario testing. Based on the optimization goals, an initial E2E test case set and related business process information are manually input to build the initial test resource library.
[0191] The scenario determination module 802 is used by the system to automatically perform business path parsing and correlation analysis on the test cases in the initial test resource library, generate test case dependency graphs and critical path identifiers, and manually verify and correct the graphs and identifiers based on business experience to determine the core test scenarios.
[0192] The strategy optimization module 803 is used by the system to automatically generate candidate strategies for test case simplification, priority ranking, and execution scheduling based on the optimization target and the core test scenario. The candidate strategies are evaluated and screened manually in combination with resource constraints and business priorities to determine the target optimization strategy.
[0193] The test case optimization module 804 is used to automatically simplify, merge, and adjust the execution order of test cases based on the target optimization strategy, generate an optimized test case set, and manually sample and verify the optimized test case set to ensure the complete coverage of core business scenarios.
[0194] The test case analysis module 805 is used to deploy the optimized test case set to the test environment and execute it automatically, collect execution data and abnormal information in real time, generate a preliminary optimization effect evaluation report, and manually analyze the evaluation report and abnormal information to determine whether it is necessary to add test cases or adjust the optimization strategy.
[0195] The dynamic feedback module 806 is used to update the initial test resource library and the strategy model formed by the target optimization strategy, and to establish a dynamic feedback mechanism. When the application system undergoes version iteration or business process changes, a new round of optimization process prompts will be automatically triggered, and the aforementioned steps will be executed for continuous optimization after manual confirmation.
[0196] According to a third aspect of the present invention, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the method as described in any one of the first aspects of the present invention.
[0197] According to a fourth aspect of the present invention, an electronic device is provided. Figure 9 This is a structural diagram of an electronic device according to one embodiment of the present invention. Figure 9 The electronic device shown is a general-purpose E2E scenario testing optimization device based on target-oriented human-machine collaboration. For example... Figure 9As shown, the electronic device 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 902 or loaded from storage unit 908 into random access memory (RAM) 903. The RAM 903 may also store various programs and data required for the operation of the electronic device 900. The CPU 901, ROM 902, and RAM 903 are interconnected via bus 904. An input / output (I / O) interface 905 is also connected to bus 904.
[0198] Multiple components in electronic device 900 are connected to I / O interface 905, including: input unit 906, output unit 907, and storage unit 908. Processing unit 901 executes the various methods and processes described above, such as the methods described in the first aspect of embodiments of the present invention. For example, in some embodiments, the methods described in the first aspect of embodiments of the present invention can be implemented as computer software programs stored in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by CPU 901, one or more operations of the methods described in the first aspect of embodiments of the present invention can be performed. Alternatively, in other embodiments, CPU 901 can be configured to perform one or more operations of the methods described in the first aspect of embodiments of the present invention by any other suitable means (e.g., by means of firmware).
[0199] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0200] In this invention, the initial test resources are manually input and the system automatically parses the business path and generates a dependency graph in coordination. Combined with manual verification and correction of critical paths, the core test scenarios are accurately located, avoiding the omission of key business logic due to automatic system analysis, and ensuring that the test focuses on the core functions.
[0201] In this invention, the system automatically generates candidate strategies according to the optimization goal, and the target strategy is screened manually in combination with resource constraints. Then, the system performs test case simplification and merging and manual sampling verification, which realizes efficient optimization of the test case set. While shortening the test execution time and reducing resource consumption, it ensures complete coverage of the core scenarios.
Claims
1. An optimization method for E2E scenario testing based on target human-machine collaboration, characterized in that, The method includes: Determine the optimization goals for E2E scenario testing, and based on these goals, construct an initial test resource library by manually inputting an initial test case set and related business process information. The system analyzes the business paths and relationships of test cases, generates a test case dependency graph and critical path identifiers, and determines the core test scenarios after manual verification and correction. Based on the optimization objectives and the core test scenarios, the system automatically generates candidate strategies for test case simplification, priority ranking, and execution scheduling. The candidates are then evaluated and screened manually in conjunction with resource constraints and business priorities to determine the target optimization strategy. The system executes test cases by simplifying, merging, and adjusting the execution order, generating an optimized test case set, and manually sampling to verify the completeness of its core business scenario coverage; The system deploys and executes the optimized test case set, collects execution data and exception information in real time, generates an optimization effect evaluation report, and decides whether to add test cases or adjust strategies after manual analysis. Update the test resource library and the strategy model formed by the target optimization strategy, establish a dynamic feedback mechanism, automatically trigger optimization prompts when the system version or business process changes, and execute a new round of optimization after manual confirmation; The strategy for determining the target optimization includes: With a core scenario coverage rate of ≥95% as a constraint, redundant test cases are eliminated using a third calculation formula; Based on the importance of the path corresponding to the use case, the historical execution time and failure risk, the fourth calculation formula is used to calculate the uncertainty weight of the indicator based on information entropy, and then the final priority ranking rule is formed. The fifth calculation formula is used to allocate tasks with the goal of minimizing the maximum completion time. The above schemes for test case simplification, priority ranking, and execution scheduling are combined into candidate strategies, and target strategies are manually selected based on test resources and business priorities. The third calculation formula is: X_iZ=ARGMIN(Σ(X_i)) Here, ARGMIN() is the function that extracts the value of X_i when Σ(X_i) is minimized, X_iZ is the value of the i-th test case, which is used as the objective function to eliminate redundant test cases. X_i is a binary decision variable, where X_i=0 means to delete the i-th test case, and X_i=1 means to keep the i-th test case. For all core test scenarios j, this objective function is subject to the constraint: Σ(C_j×X_i)>=0.95×T_j, where C_j is the coverage contribution of test case i to scenario j, and T_j is the total coverage requirement of scenario j. The fourth calculation formula is: E=(Σ(P_m×log(P_m))) / log(N) W_e=(E) / Σ(E) Where E is the information entropy of a certain indicator, P_m is the proportion of the value of the m-th use case on the indicator to the total value of the indicator of all use cases, P_m=value_m / Σ(value), N is the total number of use cases, W_e is the uncertainty weight of the indicator calculated based on the information entropy; Σ(E) is the sum of the information entropy of all indicators used to calculate the uncertainty weight. The fifth calculation formula is: Makespan=MAX(Σ(T_k)) Here, Makespan is the latest completion time among all execution machines, i.e., the total completion time, and T_k is the sum of the execution times of all test cases assigned to the k-th execution machine. The optimization objective is to minimize the value of Makespan by adjusting task allocation while satisfying resource constraints.
2. The E2E scenario testing optimization method based on target human-machine collaboration as described in claim 1, characterized in that, The construction of the initial test resource library includes: Extract core test metrics from business requirements, including historical test coverage baseline, average execution time, and peak resource usage; Calculate the optimization objective using the first calculation formula: The initial test case set was manually entered in a structured format; Establish a role-interface-module association mapping table, store it as a three-level structure of scenario-use case-process element, and normalize the priority of use cases to form an indexed initial test resource library; The first calculation formula is: Where T_cov is the upper limit threshold for coverage improvement, T_time is the lower limit threshold for execution time reduction, T_resource is the threshold for resource consumption reduction, P_cov is the historical test coverage baseline, P_time is the historical test average execution time, and P_resource is the historical test peak resource consumption.
3. The E2E scenario testing optimization method based on target human-machine collaboration as described in claim 1, characterized in that, The core test scenarios are defined as follows: Extract the module call sequence from the test cases and construct a directed graph of business paths; Calculate the relationships between module nodes and data transfer between use cases, and generate an association matrix and dependency graph; Calculate the path importance using the second calculation formula; The key paths were manually verified and supplemented through a visual interface to ultimately determine the core test scenarios; The second calculation formula is: I_path=(F×W_f)+(S×W_s)+(V×W_v) Where I_path is the path importance, F is the path occurrence frequency (a normalized value), S is the fault impact range (a normalized value), V is the business value weight (a normalized value), W_f is the weight coefficient of the path occurrence frequency, W_s is the weight coefficient of the fault impact range, W_v is the weight coefficient of the business value weight, and W_f+W_s+W_v=1.
4. The E2E scenario testing optimization method based on target human-machine collaboration as described in claim 1, characterized in that, The generated optimized test case set includes: Delete low-priority use cases that repeatedly cover the same path according to the strategy; For use cases with the same operation sequence, the sixth calculation formula is used to calculate the best fit value; Adjust the execution order based on dependencies and parallel groups; Manual segmented sampling verification was conducted, with sampling ratios of no less than 30%, 20%, and 10% for high, medium, and low complexity scenarios, respectively, to ensure complete coverage. The sixth calculation formula is: MBZ=Σ((Y_i-(A×X_i+B)) 2 ) Where MBZ is the target value, Y_i is the parameter value of the i-th original data point, X_i is the sequence or index of the i-th original data point, and A and B are the fitting coefficients to be solved, where A is the slope and B is the intercept. The optimal A and B are determined by minimizing the sum of squared errors of all data points, MBZ.
5. The E2E scenario testing optimization method based on target human-machine collaboration as described in claim 1, characterized in that, The execution and evaluation include: The test case set is assigned to the test environment and executed, and execution data and exception information are collected in real time. Normalize time-consuming data and classify abnormal information; Calculate the long-term cumulative efficiency improvement using the seventh calculation formula; The eighth calculation formula is used to calculate the similarity of abnormal patterns; Used to determine whether additional use cases or strategies need to be adjusted; Manual analysis and evaluation of reports and anomalies are used to formulate optimization and adjustment suggestions; The seventh calculation formula is: V_cumulative=Σ(V_t×(decay_factor) t ) Where V_cumulative is the long-term cumulative efficiency improvement value, V_t is the efficiency improvement value observed in the t-th time period, decay_factor is the decay factor, which is a constant between 0 and 1, representing the decay rate of historical data, t is the time period, the further away from the current time, the larger the value of t, the smaller the value of (decay_factor)t, and the lower its weight. The eighth calculation formula is: Similarity=(Σ(A_i×B_i)) / (sqrt(Σ(A_i 2 ))×sqrt(Σ(B_i 2 ))) Where Similarity is the similarity between the current abnormal pattern A and the historical case pattern B of two vectors. The closer the value is to 1, the more similar they are. A_i and B_i are the values of vector A and vector B in the i-th feature dimension, respectively. This formula calculates the difference between the two vectors in direction, ignoring their magnitude / modulus.
6. The E2E scenario testing optimization method based on target human-machine collaboration as described in claim 1, characterized in that, The dynamic feedback and continuous optimization include: Update the strategy weights using the ninth calculation formula; Use the tenth calculation formula to calculate the similarity of the business process before and after the change; If the value is below the threshold, an optimization prompt will be triggered. After manual confirmation, the system calls historical parameters to predict trends and performs full-process optimization; The ninth calculation formula is: W_new = W_old + (Δ × C) Where W_new is the corrected weight, W_old is the original weight, Δ is the correction amount, the value and sign of which come from the deviation between the manual analysis results or effect evaluation report and the expected value, and C is the confidence coefficient, which is a value between 0 and 1, representing the reliability of the analysis results. The higher the confidence, the greater the correction. The tenth calculation formula is: Similarity_bp=(Σ(V_pre_i×V_cur_i)) / (sqrt(Σ(V_pre_i 2 ))×sqrt(Σ(V_cur_i 2 ))) Where Similarity_bp represents the similarity of the business processes before and after the change, and V_pre_i and V_cur_i are the values of the business processes before and after the change on the i-th feature dimension, respectively.
7. A computer-readable storage medium storing computer program instructions thereon, characterized in that, The computer program instructions, when executed by a processor, implement the method as described in any one of claims 1-6.
8. An electronic device comprising a memory and a processor, characterized in that, The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of claims 1-6.