A method and system for constructing a software testing management framework and measurement system.

By identifying the critical paths of the software system and establishing a test resource allocation model, the problem of lack of targeted testing coverage evaluation in the traditional testing framework and relying on manual labor on testing resource allocation is solved, and a more efficient and controllable software testing process is achieved.

CN119201754BActive Publication Date: 2025-04-04SHENZHEN FARBEN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411700031.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-04-04
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

In the traditional software testing framework, the test coverage evaluation lacks targetedness, and the allocation of test resources depends on manual experience or preset rules, making it difficult to ensure the coverage and testing efficiency of key functions.

Method used

By obtaining the code structure data of the software system, identifying key paths, conducting test coverage evaluation and execution efficiency simulation analysis, establishing a test resource allocation model, adjusting test strategies in real time, building a multi-dimensional test monitoring system, optimizing defect prediction and testing stability evaluation.

Benefits of technology

It improves the pertinence and efficiency of testing, ensures full coverage of key functions, optimizes the utilization of test resources, reduces the complexity of defect detection and cause analysis, and improves the transparency and controllability of the test process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201754B_ABST
    Figure CN119201754B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of software testing technology, and in particular to a method and system for constructing a software testing management framework and a measurement system. The method comprises the following steps: obtaining code structure data of a software system, including code hierarchy data, call relationship data, and business function data; identifying and analyzing the critical paths of the software system according to the code structure data, conducting test coverage evaluation, and mapping the coverage effects under different test scenarios to obtain coverage feature graph data; simulating and analyzing the execution efficiency of different test paths according to the coverage feature graph data to obtain execution efficiency data; and establishing a test resource allocation model according to the test parameters corresponding to different paths and the execution efficiency data. By acquiring code structure data and constructing a coverage feature graph, the present invention can identify and test the critical paths of a software system in a targeted manner, thereby improving the accuracy and comprehensiveness of test coverage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software testing technology, and in particular to a method and system for constructing a software testing management framework and a measurement system. Background Art

[0002] Software testing is an important step to ensure that software meets functional, performance, and security requirements during the development and delivery phases. The main purpose of testing is to identify and fix defects before actual use, thereby improving the quality of software. The software testing management framework is a structure used to systematize and standardize the software testing process to ensure that testing activities are carried out in an orderly manner to improve software quality and development efficiency. An effective software testing management framework should include multiple key aspects, such as testing strategies, processes, tools, roles, and reports.

[0003] In traditional testing frameworks, test coverage assessments often lack specificity, and the allocation of test resources relies more on manual experience or preset rules, making it difficult to ensure coverage of key functions and test efficiency. As software projects expand in size and complexity, single coverage analysis is no longer sufficient to support comprehensive quality assurance. In addition, defect detection and cause analysis often lack systematicity, making prevention and optimization measures untimely, affecting the adjustment of the overall testing strategy and project delivery cycle. Summary of the invention

[0004] Based on this, it is necessary for the present invention to provide a method and system for constructing a software testing management framework and a measurement system to solve at least one of the above technical problems.

[0005] To achieve the above objectives, a method for constructing a software testing management framework and a measurement system includes the following steps:

[0006] Step S1: Obtain code structure data of the software system, including code hierarchy data, call relationship data, and business function data; identify and analyze the key paths of the software system according to the code structure data, perform test coverage evaluation, and map the coverage effects under different test scenarios to obtain coverage feature graph data;

[0007] Step S2: Simulate and analyze the execution efficiency of different test paths according to the coverage feature graph data to obtain execution efficiency data; establish a test resource allocation model according to the test parameters corresponding to different paths and the execution efficiency data; adjust the test strategy in real time according to the preset coverage target and the test resource allocation model to obtain strategy adjustment data; construct a multi-dimensional test monitoring system according to the strategy adjustment data to obtain a test process control model;

[0008] Step S3: Obtain defect feature data at different test stages; perform cause analysis on the defect feature data and extract correlation to obtain defect distribution data; perform defect prediction based on the defect distribution data and the test process control model, and obtain the optimal test solution to obtain optimized test strategy data;

[0009] Step S4: obtaining performance indicator data of the test execution process; constructing a test stability model according to the performance indicator data; evaluating the reliability of the test process according to the test stability model, and correcting the fluctuation factors, thereby obtaining stability score data;

[0010] Step S5: aligning the efficiency parameters of the stability score data and the optimized test strategy data to obtain comprehensive test plan data.

[0011] The present invention can identify the critical path by acquiring code structure data (such as hierarchical data, call relationship and business function data). Evaluating the test coverage of the critical path of the software helps to identify which parts need more in-depth testing and ensure the comprehensiveness and efficiency of the test. In addition, the generation of the test coverage feature graph provides visual coverage information, so that test engineers can more easily identify and optimize the coverage effect of different test scenarios and ensure the depth and breadth of test coverage. The simulation analysis of the coverage feature graph data is performed to evaluate the execution efficiency of different test paths, and the performance of each path can be accurately understood. This allows test engineers to make more refined allocations for test resources and optimize the utilization of test resources. By establishing a test resource allocation model and adjusting the test strategy in real time, the system can flexibly adapt to different test objectives and resource conditions. The constructed multi-dimensional test monitoring system improves the transparency and controllability of the test process, facilitates the identification and response to potential test bottlenecks or problems, and ultimately improves the test efficiency and effect. By acquiring and analyzing defect feature data, the root cause and distribution pattern of the defect can be identified. This cause analysis and correlation extraction provide deep insights to help test engineers predict the distribution of defects and take preventive measures. Defect prediction combined with the test process control model helps optimize the test plan, thereby reducing the possibility of defects in future tests and improving the test quality. By obtaining optimized test strategy data, more efficient test plans can be formulated for specific situations, reducing the waste of test resources and improving the defect detection rate. By obtaining and analyzing the performance indicators during the test execution process, a detailed test stability model can be built, which is crucial for evaluating the reliability of the test process. The stability model helps identify and correct the fluctuation factors in the test process, thereby providing accurate stability scoring data. This scoring data can be used to analyze the stability and consistency of test cases in the actual operating environment, provide reliable basic data support for subsequent tests, help improve the test plan, and improve the performance of the system in real scenarios. The stability scoring data and the optimized test strategy data are aligned to generate a comprehensive test plan. This step ensures the effectiveness and execution of the comprehensive plan, which can cover the test requirements of the system under different conditions. Through this process, the test plan has a high degree of feasibility and pertinence, and can balance the test objectives of different dimensions, including stability, coverage, and execution efficiency. The final comprehensive test plan improves the overall efficiency and quality of the test and reduces the test problems caused by unstable or unoptimized strategies.

[0012] The present invention also provides a system for constructing a software test management framework and a measurement system, which is used to execute the above-mentioned method for constructing a software test management framework and a measurement system. The system for constructing a software test management framework and a measurement system comprises:

[0013] The code analysis module is used to obtain the code structure data of the software system, including code hierarchy data, call relationship data, and business function data; identify and analyze the key paths of the software system based on the code structure data, evaluate the test coverage, and map the coverage effects under different test scenarios to obtain coverage feature graph data;

[0014] The efficiency optimization module is used to simulate and analyze the execution efficiency of different test paths according to the coverage feature map data, so as to obtain the execution efficiency data; establish a test resource allocation model according to the test parameters corresponding to different paths and the execution efficiency data; adjust the test strategy in real time according to the preset coverage target and the test resource allocation model, so as to obtain the strategy adjustment data; build a multi-dimensional test monitoring system according to the strategy adjustment data, so as to obtain the test process control model;

[0015] The defect prediction module is used to obtain defect feature data at different test stages; perform cause analysis on the defect feature data and extract correlation to obtain defect distribution data; perform defect prediction based on the defect distribution data and the test process control model, and obtain the optimal test solution to obtain optimized test strategy data;

[0016] The stability evaluation module is used to obtain the performance indicator data of the test execution process; build a test stability model based on the performance indicator data; evaluate the reliability of the test process based on the test stability model, and correct the fluctuation factors to obtain stability score data;

[0017] The solution integration module is used to align the efficiency parameters of the stability score data and the optimized test strategy data to obtain the comprehensive test solution data.

[0018] The present invention can fully understand the structure of the software system by acquiring code level data, call relationship data and business function data, help the development and testing team to better understand the system architecture and find potential problems. By identifying the critical path, it is ensured that the test focuses on the most critical functions and paths, thereby improving the pertinence and effectiveness of the test and reducing unnecessary repeated testing. The generation of the coverage feature map helps the test team to clearly map the coverage effects under different test scenarios, help determine which areas have not been fully tested, and optimize the test strategy. Through the coverage feature map, the test strategy can be adjusted in a targeted manner to ensure that the test focuses on covering the critical paths and functions, and improve the comprehensiveness and quality of the test. Through simulation analysis of the execution efficiency of different test paths, performance bottlenecks can be found, and the test execution path can be optimized in a targeted manner to improve the overall test efficiency. The establishment of the test resource allocation model can accurately allocate resources according to the execution efficiency and test objectives, ensure the maximum utilization of test resources, and reduce resource waste. The test resource allocation model and coverage target are evaluated in real time, and the test strategy is dynamically adjusted to ensure that the test process is optimized according to demand at different stages, and the flexibility of the test is improved. Through the multi-dimensional test monitoring system, the test progress, resource utilization and coverage can be monitored and adjusted in real time to ensure that each link in the test process remains efficient and stable. Through the collection and cause analysis of defect feature data, the root causes of potential defects can be identified in the early stage of testing, and measures can be taken in advance to reduce risks. By extracting the correlation patterns between defects, potential defect propagation paths and patterns can be identified, thereby avoiding the repeated occurrence of certain problems. Through defect prediction, test resources can be effectively allocated, and the test focus can be placed on the areas where defects are most likely to occur, thereby improving the efficiency of resource use. Through the defect prediction results, more targeted optimization test strategies can be obtained, the accuracy of the test can be improved, and sufficient testing of high-risk areas can be ensured. By constructing a test stability model, the reliability of the test execution process can be comprehensively evaluated, the stability and consistency of the test results can be ensured, and the fluctuation of test results caused by external factors can be avoided. By analyzing the fluctuation factors (such as environmental factors, load factors, etc.), external factors that may affect the results during the test process can be found, and measures can be taken to correct them, thereby improving the stability of the test. The stability score data can quantify the stability of the test process, help the team fully understand whether there are problems in the test process, and adjust the strategy in time to ensure the reliability of the test process. By integrating the stability score with the optimization test strategy data, the optimization results of different modules can be comprehensively considered to develop a comprehensive and implementable test plan. In the multi-dimensional integration process, it can ensure the coordinated optimization of various indicators (such as stability, execution efficiency, resource allocation, etc.) and avoid other negative effects caused by single-dimensional optimization.Through the formulation of a comprehensive test plan, the test team can have a clearer understanding of the implementation steps and strategies, ensuring that the test plan is not only scientific but also operational, and ensuring the comprehensiveness and efficiency of the test. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments thereof made with reference to the following drawings:

[0020] Figure 1 A schematic diagram of the steps of the method for constructing a software testing management framework and a measurement system of the present invention;

[0021] Figure 2 for Figure 1 Detailed step flow diagram of step S1;

[0022] Figure 3 for Figure 1 Detailed step flow chart of step S2 in FIG. DETAILED DESCRIPTION

[0023] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.

[0024] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.

[0025] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.

[0026] To achieve this, please refer to Figures 1 to 3The present invention provides a method for constructing a software testing management framework and a measurement system, the method comprising the following steps:

[0027] Step S1: Obtain code structure data of the software system, including code hierarchy data, call relationship data, and business function data; identify and analyze the key paths of the software system according to the code structure data, perform test coverage evaluation, and map the coverage effects under different test scenarios to obtain coverage feature graph data;

[0028] Step S2: Simulate and analyze the execution efficiency of different test paths according to the coverage feature graph data to obtain execution efficiency data; establish a test resource allocation model according to the test parameters corresponding to different paths and the execution efficiency data; adjust the test strategy in real time according to the preset coverage target and the test resource allocation model to obtain strategy adjustment data; construct a multi-dimensional test monitoring system according to the strategy adjustment data to obtain a test process control model;

[0029] Step S3: Obtain defect feature data at different test stages; perform cause analysis on the defect feature data and extract correlation to obtain defect distribution data; perform defect prediction based on the defect distribution data and the test process control model, and obtain the optimal test solution to obtain optimized test strategy data;

[0030] Step S4: obtaining performance indicator data of the test execution process; constructing a test stability model according to the performance indicator data; evaluating the reliability of the test process according to the test stability model, and correcting the fluctuation factors, thereby obtaining stability score data;

[0031] Step S5: aligning the efficiency parameters of the stability score data and the optimized test strategy data to obtain comprehensive test plan data.

[0032] In the embodiment of the present invention, reference Figure 1 FIG. 1 is a schematic diagram of a method for constructing a software test management framework and a measurement system according to the present invention. In this example, the method for constructing a software test management framework and a measurement system includes the following steps:

[0033] Step S1: Obtain code structure data of the software system, including code hierarchy data, call relationship data, and business function data; identify and analyze the key paths of the software system according to the code structure data, perform test coverage evaluation, and map the coverage effects under different test scenarios to obtain coverage feature graph data;

[0034] When the embodiment of the present invention obtains the code structure data of the software system, the source code is first parsed, and the module hierarchy, the relationship between the class and the interface and other data are identified through the code hierarchy analysis to obtain the code hierarchy data. At the same time, the code is analyzed for call relationship, the function call chain, method dependency and call mode are identified, and call relationship data is generated. In addition, a function identification model is constructed through business function annotation and code mapping to identify the core business process to generate business function data. The above data are integrated to obtain complete code structure data. Then, the key path is identified based on the code structure data, the program control flow graph is generated through the detection of the loop structure and the conditional judgment node, the cyclomatic complexity of the code block is calculated, and the path weight is assigned according to the coverage requirement to generate the key path data. Through the coverage evaluation of the key path data and the mapping under different test scenarios, the coverage feature map data is finally obtained. In practical applications, for example, in the test of the transaction module in the financial system, the high-frequency call module can be set as the key path area and assigned a higher weight to ensure the comprehensive coverage of the core business process.

[0035] Step S2: Simulate and analyze the execution efficiency of different test paths according to the coverage feature graph data to obtain execution efficiency data; establish a test resource allocation model according to the test parameters corresponding to different paths and the execution efficiency data; adjust the test strategy in real time according to the preset coverage target and the test resource allocation model to obtain strategy adjustment data; construct a multi-dimensional test monitoring system according to the strategy adjustment data to obtain a test process control model;

[0036] The embodiment of the present invention simulates the execution time, resource consumption and concurrent performance of each test path according to the coverage feature graph data obtained in step S1, and simulates concurrent scenarios through multi-threaded simulation to obtain execution efficiency data. A multi-objective optimization model is constructed based on the execution efficiency data and path test parameters (such as input parameter type, parameter range) to determine the optimal test resource allocation plan, and the model is evaluated and adjusted according to the preset coverage target. Real-time adjustment strategies include execution order optimization, resource occupancy optimization, etc., to generate strategy adjustment data, and based on this, a multi-dimensional test monitoring system including progress monitoring, resource utilization monitoring, etc. is constructed to obtain a test process control model. In practice, for testing high-load application systems (such as e-commerce transaction systems), path simulation needs to set specific transaction load parameters and resource configuration to ensure efficient execution under pressure.

[0037] Step S3: Obtain defect feature data at different test stages; perform cause analysis on the defect feature data and extract correlation to obtain defect distribution data; perform defect prediction based on the defect distribution data and the test process control model, and obtain the optimal test solution to obtain optimized test strategy data;

[0038] The embodiment of the present invention collects defect reports at different stages of testing, and extracts characteristic data such as the triggering conditions, impact range, and recurrence probability of the defects. These characteristic data are clustered and analyzed according to dimensions such as code quality, business logic, and security vulnerabilities to obtain defect cause data, and the defect correlation pattern is mined to construct a defect propagation link diagram. Combining the defect distribution characteristic data and the test process control model, high-risk areas are identified by predicting the defect propagation trend, and then optimized test strategy data is generated. In application scenarios, such as in the security testing of banking systems, for defects in network communication modules, the risk of vulnerability propagation can be identified through correlation analysis, and optimization strategies for priority testing and resource allocation can be formulated.

[0039] Step S4: obtaining performance indicator data of the test execution process; constructing a test stability model according to the performance indicator data; evaluating the reliability of the test process according to the test stability model, and correcting the fluctuation factors, thereby obtaining stability score data;

[0040] The embodiment of the present invention obtains performance indicator data during the test execution process, including test execution time, resource occupancy rate, etc., and performs statistical analysis on these data, calculates stability based on parameters such as success rate and result consistency, and obtains stability parameter data. A stability model is constructed to evaluate the reliability during the test process, and the cause of fluctuation factors (such as environmental fluctuations and load fluctuations) is analyzed through test execution data, and the fluctuation factors are identified and corrected to generate the final stability score data. For example, in a real-time data system for high-frequency data processing, if the environmental resource configuration is insufficient, the fluctuation factors are corrected and the execution stability is improved to ensure the consistency and repeatability of the results.

[0041] Step S5: aligning the efficiency parameters of the stability score data and the optimized test strategy data to obtain comprehensive test plan data.

[0042] The embodiment of the present invention aligns the stability score data obtained in step S4 with the optimized test strategy data in step S3, extracts efficiency indicators such as execution efficiency and resource utilization, and extracts strategy parameters according to the optimization strategy. By establishing a multi-dimensional mapping relationship, the strategy implementation plan and resource allocation plan are aligned with dimensions such as time, resources, coverage and quality, and finally form comprehensive test plan data. For the test scenario of complex ERP systems, time alignment (such as peak and valley test adjustment) and resource alignment (prioritized resource allocation to core processes) can effectively improve the efficiency and quality of comprehensive testing.

[0043] Preferably, step S1 comprises the following steps:

[0044] Step S11: Acquire source code data of the software system; perform code hierarchy analysis on the source code data to obtain code hierarchy data, wherein the code hierarchy analysis includes directory structure analysis of code files, hierarchical relationship analysis of modules, extraction of inheritance relationships between classes, and identification of interface implementation relationships;

[0045] The embodiment of the present invention first extracts the source code files of the software system and stores them in a database for code structure analysis. Through a directory structure parsing tool (such as an AST parser or a custom script), the directory structure of the code file is traversed, and the path information, file hierarchy and other data of each file are used to generate a directory structure diagram. Then, a static code analysis tool (such as SonarQube) is used to identify the hierarchical relationship between modules, and the dependency hierarchy and interface position of each module are extracted. For object-oriented languages, a class parsing tool is further used to extract the inheritance relationship and interface implementation relationship between classes, and a class diagram is generated. Finally, code hierarchy data including directories, module hierarchies, class inheritance relationships and interfaces is obtained. In a complex ERP system, hierarchical analysis helps to identify business logic and interface locations, and provides basic data for subsequent call chain analysis.

[0046] Step S12: identifying the calling relationship based on function calls, dependencies between methods, and synchronous and asynchronous calling modes according to the source code data, and extracting the calling chain depth information, thereby obtaining calling relationship data;

[0047] Based on the source code analysis, the embodiment of the present invention uses a function call analysis tool (such as Doxygen or Understand) to identify the method call relationship in the code file. When parsing the call relationship, the callee and caller information of each function is extracted, and the function dependency is analyzed to identify the synchronous and asynchronous call modes and mark their call types. On this basis, the call chain depth is extracted through a recursive algorithm, the maximum depth and average depth of the call chain are calculated, and the call chain data structure is formed. Finally, the call relationship information is integrated to form complete call relationship data. Taking the e-commerce platform system as an example, synchronous and asynchronous calls in the order management module can be identified to ensure the stable performance of high-frequency calls.

[0048] Step S13: establishing a function-code mapping relationship according to the business function annotations in the source code data, and identifying the core business process according to the call relationship data, thereby obtaining business function data;

[0049] The embodiment of the present invention first obtains the business function annotations in the source code file, and identifies the keywords describing the business functions from the annotations through natural language processing technology (such as keyword extraction). Then, based on the call relationship data, a mapping relationship between the annotation keywords and the code modules and functions is established to generate a corresponding relationship between the functions and the codes. Further, the business function nodes in the core business process are marked, such as order processing, payment process and other modules, to construct a core business process diagram. Finally, complete business function data is obtained. For example, in a banking system, core function modules such as fund transfer and account query can be identified, and they can be individually marked and tracked for subsequent analysis.

[0050] Step S14: merging the code hierarchy data, call relationship data and business function data into code structure data;

[0051] The embodiment of the present invention merges the code hierarchy data obtained in step S11, the call relationship data obtained in step S12, and the business function data in step S13. The merging process aligns the call relationship with the code hierarchy structure by means of data mapping, ensuring that the module, class, and interface levels of each call chain are clear. Then, the function mapping relationship is combined with the call chain data to generate comprehensive code structure data containing structure, function, and dependency. For business modules with multi-level calls in the banking system, the merged code structure data can display the call path and corresponding function module of each business module, which is convenient for the identification of subsequent key paths.

[0052] Step S15: Identify and analyze the critical paths of the software system according to the code structure data, and assign weights to them, thereby obtaining path weight data;

[0053] The embodiment of the present invention identifies the critical path of the software system through a graph traversal algorithm (such as depth-first search) based on the code structure data obtained in step S14. During the traversal process, weights are assigned to the paths according to dimensions such as the calling depth of the module and the business importance of the functional module to ensure that the paths of the core business modules have higher weights. Finally, path weight data containing the weight of each path is obtained. For the risk analysis module of the financial system, the paths related to funds can be set as critical paths with priority, and they can be marked with high weights to ensure that such paths are covered first in the test.

[0054] Step S16: Evaluate coverage based on the path weight data, and map the coverage effects under different test scenarios to obtain coverage feature map data.

[0055] The embodiment of the present invention uses the path weight data generated in step S15 to evaluate the test coverage. Use coverage analysis tools (such as JaCoCo or LCOV) to monitor the code coverage effect under different test scenarios, and record the coverage of different weighted paths by each test scenario. In the data visualization process, the coverage is mapped to the weighted path, and coverage feature graph data is generated to show the correlation between the test scenario and the coverage. When applied to a high-concurrency system, a stress test scenario can be set and a coverage comparison can be performed to verify the critical path coverage of the system in a concurrent scenario.

[0056] The present invention conducts an in-depth hierarchical structure analysis on the source code data of the software system, so that the test team can clearly understand the organizational structure of the code and the relationship between modules. This analysis covers the identification of directory structure parsing, module hierarchical relationship, class inheritance relationship and interface implementation relationship, so that testers can fully understand the structure and dependency of the code, thereby more easily identifying the complexity area and potential risk points of the system. This detailed code hierarchy data lays a solid foundation for subsequent testing and analysis, and improves the pertinence of test coverage and the effectiveness of test planning. Identifying the dependency between function calls and methods, including synchronous and asynchronous call modes, helps to understand the complexity of the code execution process. The extraction of call chain depth information can reveal key code paths and potential performance bottlenecks. This analysis allows test engineers to focus on complex and critical call paths, help determine high priority areas in test coverage, optimize test strategies and resource allocation, thereby improving the efficiency and comprehensive coverage of the test. Mapping functions and codes based on business function annotations in the source code helps to identify the parts of the code that are directly related to business needs. Combining call relationship data to identify core business processes can ensure that the test process focuses on the most critical business logic paths. This mapping relationship enables testers to clearly identify which code segments are associated with core business functions, ensuring that key business processes are covered during testing and reducing business risks caused by failure to test important logic. Merging code hierarchy data, call relationship data, and business function data into complete code structure data provides a comprehensive and detailed perspective on the software system. This integrated data supports more complex analysis, such as critical path identification and weight assignment, which helps to more accurately assess the complexity and criticality of software systems and promote more efficient and targeted testing processes. The integrated data provides a unified data source for subsequent coverage evaluation and path analysis, enhancing the systematicness and consistency of testing. Identifying the critical paths of the software system through analysis of code structure data and assigning weights helps determine which paths are critical to the operation and function of the system. This weight assignment enables testers to prioritize the testing of the most important code paths to ensure that the reliability and performance of key functions are fully verified. Weight data not only helps optimize test resources, but also enables risk management during the test process, reducing test omissions or resource waste. Coverage evaluation based on path weight data enables test engineers to clearly understand the coverage effect under different test scenarios. The coverage feature graph provides a visual tool for mapping test coverage and efficiency, helping to identify code sections that are not fully covered and weak points on critical paths. This visual and data-driven coverage assessment improves the transparency and operability of testing, allowing test engineers to make more informed test strategy adjustments and improve overall test coverage and effectiveness.

[0057] Preferably, step S15 comprises the following steps:

[0058] Step S151: performing code branch logic and loop structure analysis according to the code structure data, and identifying conditional judgment nodes and loop entry points, thereby obtaining program control flow graph data;

[0059] The embodiment of the present invention first uses a static analysis tool (such as a Control Flow Graph Generator) to parse the code branch logic and loop structure in the code structure data to generate a control flow graph of the code. During the parsing process, the conditional judgment nodes (such as if-else statements) and loop entry points (such as for and while loops) in the program are identified. By presenting the control flow graph in a structured manner, the positions of each logical branch and loop structure in the code are clearly displayed, and finally the program control flow graph data is obtained. In large-scale online trading systems, complex business logic involves multiple layers of conditional judgments and loop structures. The execution path of the code logic can be effectively monitored and analyzed through the control flow graph.

[0060] Step S152: performing call frequency statistics on the code blocks of the program control flow graph data, and marking the code blocks with call frequencies in the top 20% as high-frequency call areas, thereby obtaining high-frequency call code data;

[0061] The embodiment of the present invention counts the calling frequency of each code block based on the program control flow graph data. The calling times of the code block are obtained by running historical data records or performance analysis tools (such as gprof, Perf). According to the statistical results, the code blocks with the calling frequency in the top 20% are marked as high-frequency calling areas. Finally, high-frequency calling code data is formed. For real-time response systems, such as transaction matching engines, by marking high-frequency calling areas, system bottlenecks can be processed preferentially to improve the execution efficiency of core functional modules.

[0062] Step S153: performing an exception handling logic analysis on the program control flow graph data, and marking the code block containing the exception handling as an exception handling area, thereby obtaining the exception handling area data;

[0063] The embodiment of the present invention further analyzes the exception handling logic of each code block based on the program control flow graph data. Use static code analysis tools (such as FindBugs or PMD) to identify code blocks containing exception handling statements, especially try-catch statements, exception capture and throwing, etc. Mark the code block containing exception handling as an exception handling area, and output the exception handling area data. Taking the financial system as an example, some transaction interface modules have complex exception capture logic. By marking the exception handling area data, the exception handling of key functions can be tested in detail.

[0064] Step S154: extracting code blocks involving data processing and calculation from the program control flow graph data, and marking them as core logic areas, thereby obtaining core logic code data;

[0065] The embodiment of the present invention uses a control flow graph to identify code blocks involving data processing and calculation logic. Based on code annotations or variable analysis, code blocks that process large amounts of data or perform complex calculations are extracted and marked as core logic areas. Finally, core logic code data is obtained. For large data processing systems, the core logic area is usually a computationally intensive code. By identifying the core logic area, the accuracy and performance of data calculation can be focused on during testing.

[0066] Step S155: Calculate the cyclomatic complexity of the code block according to the program control flow graph data, thereby obtaining the code cyclomatic complexity data, wherein the cyclomatic complexity calculation is specifically cyclomatic complexity = the number of edges in the control flow graph - the number of nodes in the control flow graph + 2*the number of connected components in the control flow graph;

[0067] The embodiment of the present invention calculates the cyclomatic complexity of each code block according to the program control flow graph data. The specific calculation formula is: cyclomatic complexity = number of edges in the control flow graph - number of nodes in the control flow graph + 2 × number of connected components in the control flow graph. The higher the cyclomatic complexity, the greater the code complexity and the higher the risk. The code cyclomatic complexity data is obtained by calculation. In high-frequency trading systems, high cyclomatic complexity code blocks often need to be paid special attention to reduce the difficulty of code maintenance and improve operational stability.

[0068] Step S156: performing code division according to the high-frequency call code data, the exception handling area data, the core logic code data, and the code circle complexity data, thereby obtaining critical path segment data and non-critical path segment data;

[0069] The embodiment of the present invention divides the code into critical path segments and non-critical path segments based on the high-frequency call code data, exception handling area data, core logic code data, and code cyclomatic complexity data obtained above. High-frequency call areas, exception handling areas, core logic areas, and high cyclomatic complexity code blocks are preferentially classified as critical path segments, and the rest are non-critical path segments, and finally critical path segment data and non-critical path segment data are obtained. This division is particularly important in high-concurrency systems, and can help identify high-load paths to improve system performance and reliability.

[0070] Step S157: Assign weights to the critical path segment data and non-critical path segment data based on test coverage to obtain path weight data, wherein the weight assignment specifically ranges from 1.2-1.5 for the critical path segment weight coefficient and from 0.8-1.0 for the non-critical path segment weight coefficient.

[0071] Based on the aforementioned path division results, the embodiment of the present invention assigns test coverage weights to the critical path segments and non-critical path segments respectively. The weight coefficient value range of the critical path segment is set to 1.2-1.5, and the weight coefficient value range of the non-critical path segment is set to 0.8-1.0. Through the differentiated setting of the weight coefficient, the test strategy will focus more on the critical path segment to ensure that high-priority code blocks obtain higher test coverage, and finally generate path weight data. Applied in complex business systems, ensuring high coverage of critical path segments can significantly improve the stability of the system in core business processes.

[0072] The present invention can build a complete program control flow graph by parsing the branch logic and loop structure in the code structure and identifying the conditional judgment node and loop entry point. This process helps to reveal the execution path and potential complexity of the code, thereby providing a basis for subsequent test path selection and coverage evaluation. The generation of program control flow graph data enables the development and testing team to visualize and understand the decision and loop structure of the software, improve the comprehensiveness and effectiveness of the test, especially when ensuring that different paths are properly tested. By counting the call frequency of each code block in the program control flow and marking the high-frequency call area, it is helpful to identify the core modules with higher frequency of use in the software. These high-frequency called code blocks are usually crucial to the performance and stability of the system, so they should be given higher priority during the test process. Marking high-frequency call data not only helps to identify the key areas of the test, but also optimizes the allocation of test resources, ensures that the most important code is fully tested, and reduces potential performance bottlenecks and system crash risks. By analyzing the exception handling logic in the program control flow graph and marking the exception handling area, the code blocks that handle errors and abnormal situations can be effectively identified. Such analysis is crucial to improving the robustness and fault tolerance of the system, because the exception handling part usually involves the handling of unexpected inputs and edge cases. Ensuring test coverage of these code blocks can help prevent runtime errors and unhandled exceptions, thereby improving system reliability. By extracting core logic code blocks involving data processing and calculations from the program control flow graph and marking them as core logic areas, you can ensure that the test team focuses on the code parts that are critical to the system's functionality. The core logic is usually where the system performs its main functions. Testing these areas can better verify the system's business logic and prevent key functional defects. Marking these areas also helps testers prioritize testing to ensure that the system's business value and functional integrity are guaranteed. The cyclomatic complexity of the code blocks is calculated, and the complexity of the code is quantified by the formula (cyclomatic complexity = number of edges in the control flow graph - number of nodes in the control flow graph + 2*number of connected components in the control flow graph). Code blocks with high cyclomatic complexity usually mean more complex logic and are prone to introducing errors. Identifying these high-complexity areas can help testers focus on these parts during testing, increase the depth and pertinence of test coverage, reduce potential code defects and improve maintainability. Code division is performed by integrating high-frequency call code data, exception handling area data, core logic code data and cyclomatic complexity data to form critical path segments and non-critical path segments. Critical path segments usually contain the core functions of the system and highly complex codes, which are crucial to the overall performance and stability of the system. Marking these paths helps testers to reasonably allocate test resources, make the test plan more targeted and prioritized, and ensure that the most important paths are tested first when resources are limited. By assigning weights to critical path segments and non-critical path segments based on test coverage, test priorities can be clearly defined in the test strategy.The weight coefficient of the critical path segment is set to 1.2-1.5, reflecting the importance of these paths and requiring higher testing attention. The weight coefficient of the non-critical path segment is set to 0.8-1.0, indicating that these paths have a relatively low priority. Such a weight assignment mechanism can help the test team to plan and execute tests reasonably, match the test coverage with the actual risk of the system, and improve test efficiency and overall system quality.

[0073] Preferably, step S156 includes the following steps:

[0074] According to the high-frequency calling code data, exception handling area data, core logic code data and code circle complexity data, the code segment that is located in the high-frequency calling area or the exception handling area, belongs to the core logic area, and the code circle complexity exceeds the preset threshold is determined as a critical path segment, otherwise it is a non-critical path segment, thereby obtaining the critical path segment data and the non-critical path segment data.

[0075] The embodiment of the present invention further screens the code segments according to the obtained high-frequency call code data, exception handling area data, core logic code data and code cyclomatic complexity data, with the purpose of accurately identifying the critical path segments. The specific implementation process is as follows: First, by comparing the high-frequency call code data with the exception handling area data, the code blocks located in the high-frequency call area or the exception handling area are screened out; then, the code segments belonging to the core logic area are extracted from the screened code blocks to ensure that these code segments have high-frequency call or exception handling functions while also undertaking key business logic. Afterwards, the cyclomatic complexity of the screened code segments is calculated, and the calculated cyclomatic complexity value is compared with the preset threshold. If the cyclomatic complexity exceeds the preset threshold (such as the preset threshold is 10), the code segment is identified as a critical path segment, otherwise it is a non-critical path segment. Finally, the qualified code segments are merged into the critical path segment data, and the other code segments are merged into the non-critical path segment data. When applied to a high-security financial transaction system, this screening mechanism can ensure that the high-frequency call and complex exception handling paths of the core transaction module obtain a higher coverage test priority, further enhancing the robustness and responsiveness of the system.

[0076] The present invention combines multiple indicators (high-frequency calls, exception handling, core logic and cyclomatic complexity) to determine the data of critical path segments, which helps to improve the accuracy of the evaluation. A single indicator may not fully reflect the importance of the code, and the combination of these factors can ensure that the focus is on the code segments that are critical to the system. In this way, testers can clearly identify which code segments require higher attention and improve the overall effectiveness of the test. By screening code segments that meet the following conditions: located in the high-frequency call area or exception handling area, belonging to the core logic area, and the cyclomatic complexity exceeds the preset threshold, high-risk code segments can be identified. These code segments are often the source of system performance bottlenecks, potential defects or problems that may be caused by complex logic. Therefore, marking these code segments as critical path segments helps testers to more specifically troubleshoot potential serious problems during testing. Since test resources are usually limited, code segments that meet multiple conditions are determined as critical path segments, so that test resources can be more concentrated on the parts that have the greatest impact on system stability and performance. This prioritization helps optimize test time and cost and ensure that high-value tests are fully executed. By focusing on testing critical path segments (i.e., code segments that meet the conditions), exception handling and complex logic can be effectively verified, reducing the risk of unhandled exceptions or logic errors in actual operation. The marking of exception handling areas is particularly important because it ensures the robustness of the system in edge cases and improves the system's ability to cope with unexpected inputs and abnormal situations. Code segments with cyclomatic complexity exceeding a preset threshold usually indicate that the code is complex and may have maintainability and readability issues. By classifying these complex areas as critical path segments and increasing testing and optimization efforts, developers can discover and simplify redundant logic or optimize algorithms, thereby improving the overall maintainability of the code. This multi-indicator comprehensive judgment method helps ensure that test coverage does not only stay on the surface, but goes deep into the most important and complex code segments in the system. More comprehensive testing of these areas can effectively improve the depth and breadth of test coverage and reduce the possibility of test omissions.

[0077] Preferably, step S2 comprises the following steps:

[0078] Step S161: Calculate the weighted test coverage rate according to the path weight data to obtain test coverage rate evaluation data, where weighted test coverage rate = (weight coefficient of critical path segment * number of critical path coverage lines + weight coefficient of non-critical path segment * number of non-critical path coverage lines) / total number of code lines;

[0079] The embodiment of the present invention performs weighted processing on the number of covered lines of the critical path and non-critical path segments according to the path weight data, thereby calculating the weighted test coverage. The specific implementation method is: first, extract the number of covered lines of the critical path segments and non-critical path segments, for example, the number of covered lines of the critical path is 300 lines, and the number of covered lines of the non-critical path is 700 lines; then according to the weight coefficient (assuming that the weight coefficient of the critical path segment is 1.4, and the weight coefficient of the non-critical path segment is 0.9), the weighted test coverage calculation formula is applied to the total number of lines of 1000 lines, and the calculated weighted test coverage is (1.4300 +0.9700) / 1000=1.05, forming coverage evaluation data for further analysis of the coverage effect.

[0080] Step S162: performing uncovered code segment feature analysis on the code blocks in the test coverage evaluation data that are lower than a preset test coverage threshold, thereby obtaining uncovered code type data, wherein the types of the uncovered code type data include high-frequency calls but not covered, exception handling but not covered, and core logic but not covered;

[0081] The embodiment of the present invention performs feature analysis on code blocks in coverage evaluation data that are below a preset coverage threshold. The specific method is: extract the type and function label of uncovered code, and divide the uncovered code segments into three situations: high-frequency calls but not covered, exception handling but not covered, and core logic but not covered. For example, when it is found that the high-frequency calls but not covered code segment is 20 lines, it is classified as a high-frequency call uncovered type. Obtaining the uncovered code type data in this way lays the foundation for the next step of test case generation.

[0082] Step S163: generating different types of test case template data according to the uncovered code type data, including a load test case template, an exception injection test case template, and a boundary value test case template;

[0083] The embodiment of the present invention generates different types of test case template data according to uncovered code type data. The specific process is: if the uncovered code segment belongs to the high-frequency call but uncovered type, a load test case template is generated; if the uncovered code segment belongs to the exception handling but uncovered type, an exception injection test case template is generated; if the uncovered code segment belongs to the core logic but uncovered type, a boundary value test case template is generated. For example, in the load test case template generated by the high-frequency call uncovered area, the load condition of multiple users accessing at the same time can be set to ensure the integrity of the test coverage feature.

[0084] Step S164: Prioritizing the test case template data based on the weight coefficients to obtain supplementary test suggestion data;

[0085] The embodiment of the present invention prioritizes the generated test case template data based on the weight coefficient to determine the supplementary priority of the test. The specific method is: setting priority coefficients for different types of test case templates, for example, setting the priority coefficient of the critical path load test to 1.5, and the priority coefficient of the boundary value test to 1.2. The supplementary test suggestions are sorted according to these priorities, for example, high-priority test cases are generated first, thereby forming supplementary test suggestion data arranged by priority.

[0086] Step S165: Map the coverage effects under different test scenarios according to the supplementary test suggestion data to obtain coverage feature map data.

[0087] The embodiment of the present invention maps the coverage effects of different test scenarios according to the supplementary test suggestion data to generate new coverage feature graph data. The specific method is: execute the use cases in the supplementary test suggestion data, record the increase in the actual number of coverage lines, and update the coverage feature graph. For example, after adding the load test case, the coverage feature graph shows that the critical path coverage rate increases from 85% to 95%. The coverage feature graph data intuitively displays the coverage effect after optimization, providing a basis for test strategy adjustment and further test optimization.

[0088] The present invention uses path weight data to perform weighted test coverage calculation to reflect the importance of different code segments. By weighting the critical path and non-critical path segments respectively and combining the number of covered lines to calculate the overall coverage, it is ensured that the test coverage is not just a simple line count, but a more accurate reflection of the important areas of the system. This method more truly reflects the coverage of system stability and core functions, and helps test managers to better evaluate the effectiveness of the test. By performing feature analysis on code blocks below the preset test coverage threshold, it is identified which code segments belong to the uncovered high-frequency call area, exception handling area or core logic area. This can help the test team quickly locate the key code that is neglected in the test and avoid potential risks from being missed. This step ensures that the test not only covers the "easy to test" code, but also focuses on those important parts that may hide defects but are neglected by the test. Different types of test case templates are generated according to the uncovered code type data, such as load test case templates, exception injection test case templates and boundary value test case templates. This method of strategically generating test cases helps to improve the pertinence and efficiency of the test. In particular, in complex systems, suitable test case templates can be generated according to the uncovered code type, reducing the time for manually writing test cases and improving the test quality. Prioritization based on weight coefficients is performed based on the generated test case template data to ensure that the most important test tasks are executed first. Such a sorting strategy can optimize the allocation of test resources, allowing the test team to prioritize the code segments with the greatest impact and highest risk on the system. Sorting based on weight coefficients helps to achieve the maximum test coverage and quality within limited time and resources. Based on the supplementary test suggestion data, the coverage effects under different test scenarios are mapped to generate coverage feature map data. This mapping provides a visual coverage analysis, allowing testers to intuitively see the changes and improvement effects of test coverage under different scenarios. This not only helps to quickly identify weak links in testing, but also helps to verify the effectiveness of adjusted test strategies and support continuous improvement of the testing process. These steps work together to form a complete, data-driven test optimization process. Through weighted coverage calculation, identification of uncovered code features, template generation, priority sorting, and effect mapping, the entire process aims to improve the comprehensiveness, accuracy, and effectiveness of testing. It enables the test team to: effectively allocate test resources and focus on high-risk and critical code segments. Reduce the probability of missed defects and ensure that the core functions and edge conditions of the system are effectively verified through uncovered feature analysis and specific use case template generation. Improve system reliability and increase the depth and breadth of testing through targeted supplementary testing and prioritization. Ultimately, this approach ensures that test coverage is not just a statistic, but an indicator that actually reflects system stability and robustness, providing a higher level of support for software quality assurance.

[0089] Preferably, step S2 comprises the following steps:

[0090] Step S21: constructing a test path execution model according to the coverage feature graph data, and performing simulation analysis on the execution time, resource consumption and concurrent performance of different test paths, so as to obtain execution efficiency data;

[0091] The embodiment of the present invention constructs a test path execution model based on the coverage feature graph data, and simulates and analyzes the execution time, resource consumption and concurrent performance of each test path to obtain execution efficiency data. The specific method is: first, according to the critical path and non-critical path marked in the coverage feature graph, a simulation model of path execution is established. In the model, by setting the execution time, resource consumption and number of concurrent threads for each path, the simulation calculation is run. For example, increase the resource allocation on the critical path by 10% and observe the effect of reducing its execution time. The average execution efficiency data is obtained through multiple simulations, and the difference in execution efficiency between the critical path and the non-critical path is recorded to provide a reference for resource allocation.

[0092] Step S22: obtaining input parameter types, parameter ranges, and test data characteristics of different test paths, and establishing a test resource allocation model based on multi-objective optimization according to the execution efficiency data;

[0093] The embodiment of the present invention obtains the input parameter type, parameter range and test data characteristics of different test paths, and establishes a multi-objective optimized test resource allocation model based on the execution efficiency data. The specific method is: first, the parameter characteristics of each path are extracted. For example, the parameter type of the critical path A is integer, the parameter range is [0, 100], and the test data characteristic is high concurrent processing requirements. Then, the execution efficiency data is used as a constraint condition, and a multi-objective optimization algorithm (such as a genetic algorithm) is used to comprehensively optimize resource allocation and test coverage goals, and finally a test resource allocation model is obtained. For example, fewer resources are allocated to paths with high execution efficiency, while the resource allocation ratio is increased for critical paths with low execution efficiency, so as to achieve the best balance between coverage and resource usage.

[0094] Step S23: the test resource allocation model is evaluated in real time according to the preset coverage target, and the test execution strategy is dynamically adjusted based on the evaluation result, so as to obtain strategy adjustment data, wherein the strategy adjustment includes test case execution order adjustment, resource allocation ratio adjustment and concurrency adjustment;

[0095] The embodiment of the present invention evaluates the test resource allocation model in real time according to the preset coverage target, and dynamically adjusts the test execution strategy based on the evaluation results, thereby obtaining strategy adjustment data. The specific method is: set a coverage target (such as 90%), regularly monitor the gap between the current coverage of each path and the target, and adjust the various resources in the resource allocation model. For example, when the coverage of a critical path is lower than 80%, the execution order of its test cases is advanced through strategy adjustment, the allocation of CPU and memory resources is increased, and the concurrency is improved. After the strategy is dynamically adjusted, the strategy adjustment data is generated according to the new execution situation to ensure that the test coverage is achieved.

[0096] Step S24: construct a multi-dimensional test monitoring system including test progress monitoring, resource utilization monitoring, and coverage achievement monitoring according to the strategy adjustment data, so as to obtain test monitoring indicator data;

[0097] The embodiment of the present invention constructs a multi-dimensional test monitoring system including test progress monitoring, resource utilization monitoring and coverage achievement monitoring according to the policy adjustment data, thereby obtaining test monitoring indicator data. The specific method is: setting the monitoring module to record various indicators of test execution in real time, such as resource utilization per second, real-time coverage achievement and execution progress of test cases. The system updates the monitoring parameters according to the policy adjustment data to ensure the synchronization of various monitoring indicators. The generated test monitoring indicator data includes resource utilization (such as 80%), coverage achievement (such as 85%) and test progress (such as 60%), providing data support for further optimization of the test process.

[0098] Step S25: Perform time series analysis and trend prediction on the test monitoring indicator data, establish a feedback adjustment mechanism, and thus obtain a test process control model, wherein the control model includes test progress deviation correction control, resource utilization efficiency optimization control, coverage achievement progress control, and test quality assurance control.

[0099] The embodiment of the present invention performs time series analysis and trend prediction on the test monitoring indicator data, establishes a feedback adjustment mechanism, and thus obtains a test process control model. The specific method is: perform time series analysis on the collected monitoring indicator data, such as analyzing the time series trend of resource utilization and coverage achievement, and use linear regression or ARIMA model to predict the coverage achievement progress in the next hour. According to the prediction results, a feedback adjustment mechanism is established to correct the test progress deviation, optimize resource utilization efficiency, and control coverage achievement. For example, when the predicted test progress lags behind, increase test resources or adjust the test strategy, thereby forming a control model that includes progress, resources, and quality assurance.

[0100] The present invention constructs a test path execution model based on coverage feature graph data, and performs simulation analysis of the execution time, resource consumption and concurrent performance of the test path. Through simulation analysis, it is possible to identify which test paths have low execution efficiency and consume more resources, helping the test team to optimize the test strategy in a timely manner. Through the evaluation of different paths, test resources can be allocated more accurately, invalid test execution can be reduced, and important paths can be ensured to be efficiently executed, thereby improving the efficiency of the overall test process. By obtaining the input parameters, parameter ranges and test data characteristics of different test paths, and combining the execution efficiency data, a test resource allocation model based on multi-objective optimization is established. This optimization model comprehensively considers various resource requirements (such as execution time, resource consumption and concurrent performance, etc.), ensuring that resource allocation can improve test efficiency as much as possible while meeting the test objectives. Through multi-objective optimization, resource waste can be avoided, and the rationality and resource utilization of test execution can be improved. Real-time evaluation is performed according to the preset coverage target and test resource allocation model, and the test execution strategy is dynamically adjusted based on the evaluation results. This dynamic adjustment mechanism includes the adjustment of the test case execution order, resource allocation ratio and concurrency, ensuring that the test process can achieve the expected coverage target to the maximum extent at each stage. Real-time adjustment can effectively deal with changes that may occur during the test process, such as test progress lags, resource bottlenecks, etc., to ensure that test tasks can be completed on time and improve test efficiency. Based on the strategy adjustment data, a multi-dimensional test monitoring system is built, including test progress monitoring, resource utilization monitoring, and coverage achievement monitoring. This multi-dimensional monitoring system can track various key indicators in the test process in real time, helping testers to understand the test progress and resource usage in a timely manner, quickly discover potential problems, and make adjustments. By monitoring these key data, it is possible to ensure that the test goals are achieved smoothly and avoid resource waste and time delays. By performing time series analysis and trend prediction on the test monitoring indicator data, a feedback adjustment mechanism is established, and finally a test process control model is obtained. The control model includes correction of test progress deviation, optimization of resource utilization efficiency, control of coverage achievement progress, and assurance control of test quality. Through real-time feedback adjustment, the test team can promptly discover and respond to deviations, bottlenecks, and quality problems in the test, ensuring that the test process is more stable and efficient. This control model maintains a balance between test progress and quality in dynamic adjustment, preventing excessive adjustments or resource waste during the test process.These steps work together to reduce unnecessary test path execution through simulation analysis and optimal resource allocation, making testing more efficient; ensure flexibility and adaptability in the test process through real-time evaluation and dynamic adjustment of test strategies, and effectively avoid delays in test plans; reasonably allocate resources through multi-objective optimization models to maximize resource utilization and avoid waste; ensure the quality of testing and reduce the risk of missed tests through multi-dimensional monitoring and feedback control mechanisms; help the test team make timely decisions and adjustments in a dynamic environment through monitoring and analysis of key indicators such as test progress, resource utilization, and coverage. Ultimately, these steps ensure the comprehensiveness, scientificity, and efficiency of testing, helping project teams achieve optimal test coverage and quality assurance within limited time and resources.

[0101] Preferably, step S3 comprises the following steps:

[0102] Step S31: acquiring defect report data of different test phases, and extracting features of the severity, impact scope, triggering conditions, and recurrence probability of the defects according to the defect report data, thereby obtaining defect feature data;

[0103] The embodiment of the present invention extracts data from defect reports at different test stages, analyzes the severity, impact range, trigger conditions, and recurrence probability of the defects, and obtains defect feature data. The specific method is: first parse the field information in the defect report document, such as severity (such as high, medium, low), impact range (module or function range), trigger conditions (specific input or operation steps), and recurrence probability (such as 80%). Then, feature extraction and quantification are performed for each defect record, the severity of the defect is assigned to 3, 2, and 1, and the recurrence probability is converted to a percentage, and finally structured defect feature data is generated to provide input for further analysis.

[0104] Step S32: performing cluster analysis on the defect feature data, and performing multi-dimensional cause analysis based on code quality, business logic, performance efficiency, and security vulnerabilities, thereby obtaining defect cause data;

[0105] The embodiment of the present invention performs cluster analysis on the defect feature data, and combines dimensions such as code quality, business logic, performance efficiency and security vulnerabilities to perform multi-dimensional cause analysis to obtain defect cause data. The specific method is: based on the defect feature data, a clustering algorithm (such as K-means or DBSCAN) is used to identify the clustering pattern of defects. Subsequently, each defect cluster is associated with factors such as code quality (such as cyclomatic complexity), business logic (such as core function paths), performance (such as high-frequency call areas) and security vulnerabilities (such as input validation vulnerabilities). The impact of each causal factor on the defect is determined through statistical analysis methods, and these causal data are recorded to provide a basis for correlation analysis.

[0106] Step S33: performing association rule mining based on the defect cause data, identifying the correlation pattern between defects, and establishing a defect propagation link diagram, thereby obtaining defect association data;

[0107] The embodiment of the present invention performs association rule mining based on defect cause data, identifies correlation patterns between defects, and establishes a defect propagation link diagram to obtain defect association data. The specific method is: using an association rule mining algorithm (such as Apriori or FP-growth) to analyze the association relationship between different features in the defect cause data and extract frequently occurring defect combination patterns. For example, when the cyclomatic complexity of a functional module is high and the call frequency is high, the probability and severity of defect recurrence are also high. Based on these association relationships, a defect propagation link diagram is constructed to identify the propagation path of the defect between different modules, and generate defect association data.

[0108] Step S34: integrating and analyzing the defect cause data and the defect association data to obtain defect distribution data, wherein the defect distribution data includes module-level defect distribution characteristics, function-level defect distribution characteristics, and code-level defect distribution characteristics;

[0109] The embodiment of the present invention integrates and analyzes the defect cause data and the defect association data to obtain defect distribution data, covering the defect distribution characteristics at the module level, function level and code level. The specific method is: integrating the defect cause and association data, and analyzing the distribution characteristics of defects at different levels of the system. Through hierarchical statistics, such as analyzing the number and type distribution of defects in each module, modules and functional paths with higher defect density are identified. Ultimately, defect distribution data including module level, function level and code level is formed to provide a reference for subsequent prediction of high-risk areas.

[0110] Step S35: predicting potential high-risk defect areas based on the defect distribution data and the test process control model, thereby obtaining defect prediction data;

[0111] The embodiment of the present invention predicts potential high-risk defect areas based on defect distribution data and a test process control model to obtain defect prediction data. The specific method is: combining the high defect density module of the defect distribution data, as well as the coverage and resource usage in the test process control model, predicts high-risk areas that may be exposed in future tests. For example, areas with high cyclomatic complexity and incomplete coverage in the code hierarchy are marked, and the possibility of defect reproduction in these areas is predicted through timing analysis to generate defect prediction data.

[0112] Step S36: Adjust the test plan based on the test resource priority allocation strategy, test case design optimization strategy, test execution sequence adjustment strategy and automated test coverage strategy according to the defect prediction data, so as to obtain optimized test strategy data.

[0113] The embodiment of the present invention formulates a test scheme adjustment strategy based on defect prediction data, including a test resource priority allocation strategy, a test case design optimization strategy, a test execution order adjustment strategy, and an automated test coverage strategy to obtain optimized test strategy data. The specific method is: based on the information of high-risk areas in the defect prediction data, prioritize the allocation of test resources, such as increasing test personnel and time, optimize the test case design for the corresponding area (such as adding boundary values ​​and exception handling test cases), and adjust the test execution order so that high-risk areas are executed first. At the same time, enhance automated test coverage to ensure the stability of key areas. Finally, an optimized test strategy is formed to improve the comprehensiveness and efficiency of defect detection.

[0114] The present invention can more accurately understand the nature and impact of each defect by extracting the various features of the defect in detail. For example, the treatment methods of serious defects and low-priority defects will be different, and the scope of impact and triggering conditions can help the test team predict other problems that may be caused by the defects. Defect feature data provides basic data support for further cluster analysis, cause analysis and prediction, ensuring that the subsequent steps have data-driven accuracy. Through multi-dimensional cause analysis, the root cause behind the defect can be identified, such as whether it is due to code quality problems, logical errors, or performance or security issues, thereby providing targeted strategies for repair. Cause analysis can help identify areas that are prone to defects in different fields. Based on these analysis results, the test team can focus on high-risk areas for in-depth testing to improve the effectiveness and quality of the test. By mining the association rules between defects, it can be revealed which defects may trigger each other, or the repair of one defect may lead to the exposure of other defects. This provides decision support for defect management and repair strategies. The defect propagation link diagram helps to visualize the interdependencies between defects, enabling the team to predict the impact of defects after repair, and help make more effective repair decisions. Through defect distribution analysis at different levels, such as module level, function level, and code level, it is possible to identify which parts of the system are most prone to defects, thereby providing a basis for the delineation of key test areas. Defect distribution information at different levels helps to reasonably arrange test strategies and repair sequences. If a module or function frequently has defects, repairing or testing these modules first will improve the overall quality of the system. By integrating defect distribution data and control models, it is possible to identify high-risk areas that may exist in the system in advance, allowing the test team to conduct more intensive and detailed tests in a targeted manner to reduce the risk of missed defects. For the predicted high-risk areas, the test team can reasonably allocate more test resources, concentrate on tackling key problems, and improve test results. By allocating resources to high-risk areas first, it is possible to avoid waste of resources and improve the targeting and efficiency of testing; based on defect prediction data, the design of test cases is optimized to ensure coverage of potential high-risk scenarios and reduce the risk of missing key defects; by dynamically adjusting the test execution sequence and automated test coverage strategy, it is possible to more flexibly respond to new situations that arise during the test process and ensure maximum test results. These steps work together to build a comprehensive defect management and test strategy optimization process, which can effectively improve the accuracy of defect prediction and management and provide data-driven decision support for the test team. Through data-driven defect analysis, high-risk areas can be identified more accurately and resource allocation can be optimized to reduce resource waste; through defect cause analysis and association rule mining, potential high-risk defects can be predicted and prevented, reducing the cost of later repairs; through key coverage of high-risk areas and optimization of test strategies, the comprehensiveness and depth of testing are ensured, thereby improving the overall test quality.

[0115] Preferably, step S4 comprises the following steps:

[0116] Step S41: Acquire performance indicator data during the test execution process, including test execution time indicator, resource occupancy indicator, test result stability indicator and test environment availability indicator;

[0117] The embodiment of the present invention collects performance indicator data from the test execution process, covering the test execution time (such as the average execution time of each test case), resource usage (such as CPU and memory usage), the stability of the test results (such as the fluctuation range of the results), and the availability of the test environment (such as the environment running time and downtime). The specific method is: real-time monitoring of each test execution, obtaining the above indicator data through the monitoring system, and recording it in the database for subsequent stability analysis. For example, in the process of large-scale software testing, the resource usage of each module in different test stages is recorded to provide accurate data for subsequent evaluation.

[0118] Step S42: Statistically analyzing the performance indicator data, and calculating stability parameters based on the test case execution success rate, test result consistency ratio, test environment available time ratio, and test resource utilization efficiency, thereby obtaining stability parameter data;

[0119] The embodiment of the present invention performs statistical analysis on the collected performance indicator data, and calculates test stability related parameters, including the test case execution success rate (the proportion of successful test cases), the test result consistency ratio (the proportion of consistent results in multiple executions), the test environment available time ratio (the availability of the test environment within the predetermined time) and the test resource utilization efficiency (the ratio of actual resource occupancy to preset resources), so as to obtain stability parameter data. The specific method is: statistically calculate the numerical distribution of each performance indicator, and use a formula to quantitatively calculate the stability parameter. For example, when calculating the test result consistency ratio, compare the results of multiple identical tests, determine the consistency ratio, and generate stability parameter data to reflect the stability of the test environment and execution.

[0120] Step S43: establishing a test stability evaluation model according to the stability parameter data; evaluating the reliability of the test process based on the test stability model, thereby obtaining reliability evaluation data, wherein the evaluation content includes test process consistency evaluation, test result repeatability evaluation and test environment reliability evaluation;

[0121] The embodiment of the present invention constructs a test stability evaluation model based on stability parameter data, and the evaluation model structure includes test process consistency evaluation, test result repeatability evaluation and test environment reliability evaluation. The specific method is: by substituting the stability parameter data into the evaluation model, the overall reliability score of the test process is calculated. The model contains weight settings for multiple evaluation indicators, and the weighted average method is applied to obtain the final evaluation score. For example, the reliability of the test environment accounts for 30%, the repeatability of the test results is 40%, and the consistency of the test process is 30%. Combined with these weights and parameters, reliability evaluation data is generated to judge the repeatability and consistency of the test process in different scenarios.

[0122] Step S44: Analyze the causes of abnormal fluctuations in the reliability evaluation data, identify fluctuation factors including environmental factor fluctuations, data factor fluctuations, load factor fluctuations, and configuration factor fluctuations, thereby obtaining fluctuation factor data;

[0123] The embodiment of the present invention performs cause analysis on items with abnormal fluctuations in reliability assessment data, identifies factors that may cause fluctuations, including environmental factors (such as hardware failures or network delays), data factors (such as data deviations or data integrity), load factors (such as test load peaks), and configuration factors (such as abnormal changes in system parameters), thereby generating fluctuation factor data. The specific method is: identify and classify outliers through data mining technology, and analyze the cause of each type of anomaly. For example, in load factor analysis, identify the relationship between high load in a specific time period and fluctuations in test results, and classify such information into load factor data for subsequent corrections.

[0124] Step S45: performing fluctuation factor correction according to the fluctuation factor data, and calculating the test stability score according to the test stability model, thereby obtaining stability score data.

[0125] The embodiment of the present invention corrects various types of fluctuations based on the fluctuation factor data, such as adjusting the resource configuration during the peak period through a load balancing strategy, or restoring and adjusting the abnormal environment configuration. Then, the stability score is recalculated based on the corrected data. The specific method is: the performance indicator after the fluctuation correction is re-substituted into the test stability model to obtain the corrected stability score data. The score range can be set between 0-100 to intuitively display the stability status of the test system. In complex test scenarios, ensure that the corrected score is higher than a preset threshold before further higher-level test steps can be performed to ensure the overall test quality.

[0126] By collecting multiple key performance indicators, the present invention can fully understand the performance of the test process from different dimensions, and help identify problems such as test bottlenecks or waste of resources. These performance data provide basic data support for the analysis of subsequent steps, ensuring that there is sufficient basis for the evaluation of test stability, reliability and environmental availability. Through statistical analysis of key performance indicators, potential problems in test execution can be discovered in a timely manner. For example, a low success rate may indicate that the test case design is unreasonable, and a low environmental availability time ratio may indicate that the test environment is unstable. By calculating the stability parameter, the stability of the test can be quantified, the unstable factors in the test process can be revealed, and data basis can be provided for optimizing the test process. The stability parameter can provide an accurate test process evaluation, helping the test team to adjust the strategy according to the actual data to improve the stability and efficiency of the test process. By establishing a stability evaluation model, the stability of the test process can be systematically quantified and analyzed and evaluated to ensure the consistency of the test process, the repeatability of the results and the reliability of the environment. Based on the model evaluation of the consistency, repeatability and environmental reliability of the test process, the reliability of the test can be comprehensively improved to ensure that the test results are more credible. Through the reliability evaluation data, the test team can make more scientific decisions and optimize the test strategy and process according to the specific reliability performance of the test. By analyzing abnormal fluctuations, the root causes that affect test reliability can be accurately identified. For example, fluctuations in environmental factors may be the key cause of test instability, while fluctuations in load factors may lead to inconsistent test results. Through detailed analysis of fluctuation factors, problems in the test can be targeted and clear guidance can be provided for optimizing the test environment, data processing or resource allocation. Timely discovery of fluctuation causes and adjustments can effectively avoid unnecessary errors or instability during the test process and reduce the impact on test results. By correcting fluctuation factors, the test environment, configuration, data or load can be appropriately adjusted to improve the stability and repeatability of the test. The stability score provides a quantitative indicator for the overall stability of the test, allowing the test team to clearly understand the stability level during the test process and formulate subsequent optimization measures accordingly. By optimizing and correcting fluctuation factors, the final stability score will help improve the overall quality of the test and ensure the consistency and reliability of test results in different environments. Through comprehensive performance data acquisition, stability analysis, fluctuation analysis and correction, problems that occur during the test process can be identified and repaired in a timely manner, improving the stability and reliability of the test. By building a stability assessment model, calculating stability scores, and analyzing the causes of abnormal fluctuations, we can provide accurate data support for the test team, making decisions more scientific and reasonable. By effectively correcting the fluctuation factors during the test process, we can reduce unnecessary waste of resources and time, and improve test efficiency and overall results.Through fluctuation factor correction and test stability scoring, the test team can dynamically adjust the test strategy based on real-time data to ensure the reliability and effectiveness of the test process. Ultimately, these steps provide a solid data foundation and decision support for test stability, reliability, resource utilization efficiency and quality assurance, helping to improve the overall efficiency and quality of the software testing process.

[0127] Preferably, step S5 comprises the following steps:

[0128] Step S51: extracting efficiency indicators including execution efficiency indicators, resource utilization indicators, coverage achievement indicators and defect discovery indicators from the stability score data, thereby obtaining efficiency indicator data;

[0129] The embodiment of the present invention extracts efficiency indicators such as execution efficiency, resource utilization, coverage achievement and defect discovery from the stability scoring data to generate efficiency indicator data. The specific method is: using various performance data contained in the stability scoring data, the test execution efficiency (such as average execution time), resource utilization (such as CPU and memory usage), coverage achievement (such as the ratio of the number of covered code lines to the total number of lines) and the number of defects found are extracted and calculated to obtain various efficiency indicator data. For example, when extracting execution efficiency, the average execution time and resource consumption of all test paths are calculated to facilitate the allocation of subsequent test resources and efficiency improvement.

[0130] Step S52: performing strategy decomposition on the optimization test strategy data and extracting strategy parameters, thereby obtaining strategy parameter data;

[0131] The embodiment of the present invention performs strategy decomposition on the optimized test strategy data, refines the main test strategies therein, extracts various strategy parameters, and thus obtains strategy parameter data. The specific method is: decomposing the test case execution order, resource allocation ratio, concurrency and other contents in the optimized test strategy, and quantifying and extracting each strategy parameter, such as setting the execution order to prioritize the execution of high-risk area test cases, adjusting the resource allocation ratio according to the test scenario requirements, and setting the concurrency in an appropriate range to adapt to different test requirement scenarios. The strategy parameter data obtained in this way will serve as the basis for subsequent mapping relationships.

[0132] Step S53: establishing a multi-dimensional mapping relationship according to the efficiency indicator data and the strategy parameter data, thereby obtaining parameter mapping data, wherein the multi-dimensionality includes time dimension alignment, resource dimension alignment, coverage dimension alignment and quality dimension alignment;

[0133] The embodiment of the present invention establishes a multi-dimensional mapping relationship based on the extracted efficiency index data and strategy parameter data to generate parameter mapping data. The specific method is: with efficiency index and strategy parameter as the two ends, construct mappings of time dimension (such as test time alignment), resource dimension (such as resource utilization optimization), coverage dimension (such as test priority allocation to improve coverage) and quality dimension (such as defect rate control). For example, match the resource allocation ratio with resource utilization, and give priority to scheduling resource-efficient test cases; align the coverage achievement index with the test coverage dimension to ensure that the test coverage of important functions meets the target requirements, and obtain more accurate parameter mapping data.

[0134] Step S54: Formulate implementation strategies for phased implementation plans, resource allocation plans, risk response measures, and quality assurance plans based on the parameter mapping data, thereby obtaining comprehensive test plan data.

[0135] The embodiment of the present invention formulates a phased implementation plan, resource allocation plan, risk response measures and quality assurance plan based on parameter mapping data, thereby generating comprehensive test plan data. The specific method is: first, formulate a phased test plan based on the time dimension, and arrange the goals and priorities of each test phase; then allocate the required test resources based on the resource dimension, optimize the test environment and concurrent task configuration; formulate response measures based on the risk assessment results, such as prioritizing the configuration of test resources for high-risk areas, and configuring corresponding fallback plans; finally, ensure that the coverage and defect rate are within an acceptable range according to the quality dimension, and arrange regular quality assessment and feedback mechanisms in the quality assurance plan to adjust the test strategy in a timely manner.

[0136] The present invention can comprehensively evaluate the efficiency of the test process by extracting efficiency indicators of different dimensions, including execution efficiency, resource utilization efficiency, test coverage achievement, and defect discovery effect. This helps to quickly identify in which aspects the test process can be further optimized. By converting different test dimensions into specific efficiency indicators, the actual effect of the test activity can be quantified, providing data support for the improvement of the test. By extracting resource utilization indicators, it can help identify situations of resource waste or uneven distribution, thereby optimizing resource allocation and improving test efficiency. Through strategy decomposition and parameter extraction, the specific direction of optimizing the test strategy can be clarified. For example, it may involve optimizing the test execution order, resource allocation ratio, or concurrency. After extracting the strategy parameters, refined management can be achieved, and the test strategy can be adjusted according to specific parameters to ensure that the optimization measures of each link are targeted and effective. Decomposing complex optimization strategies into specific parameters can help the test team formulate more operational optimization plans, making the implementation process more efficient. Through multi-dimensional mapping, test goals of different dimensions (such as time, resources, coverage, quality) can be organically combined to ensure that when optimizing the strategy, the goals of all key dimensions are balanced and reasonably adjusted. Multi-dimensional alignment can help control the testing process more accurately, ensure that different aspects of testing (such as resource usage and quality assurance) can work together to improve the overall effectiveness of testing. By establishing mapping relationships in different dimensions, it can provide cross-dimensional data support for the testing team, helping decision makers make comprehensive and data-driven decisions when facing complex situations. By formulating a phased implementation plan, it can ensure that the testing work is carried out in an orderly manner in steps, while avoiding resource waste and duplication of work. Each stage can be optimized according to specific goals and needs. According to the resource allocation plan, it can ensure the reasonable allocation of testing resources at each stage, avoid resource shortages or excessive waste, and improve the efficiency and effectiveness of testing. Through the formulation of risk response measures and quality assurance plans, potential risks can be effectively identified during the testing process and measures can be taken in advance; at the same time, the quality and stability of the test can be guaranteed, and the credibility of the test can be improved. The comprehensive testing plan is comprehensively planned from multiple dimensions to ensure that all aspects of the testing process are fully considered, thereby providing a systematic management framework for the success of the test. By extracting and mapping efficiency indicators and strategy parameters in multiple dimensions, all aspects of the testing process, including time, resources, and coverage, can be comprehensively optimized while ensuring the quality of the test. Strategy decomposition and parameter extraction make the adjustment of test strategies more accurate and operational, and help to continuously adjust and optimize test plans based on real-time data. Through multi-dimensional mapping and the formulation of resource allocation plans, test resources can be allocated more reasonably, resource waste can be reduced, and test efficiency can be improved. Through the integration of risk response and quality assurance plans, potential risks in the test process can be effectively controlled and test quality can be effectively guaranteed.These steps provide comprehensive decision support for the test team, helping them make data-driven decisions, ensuring that each link in the testing process is optimized and improving the overall testing effect.

[0137] The present invention also provides a system for constructing a software test management framework and a measurement system, which is used to execute the above-mentioned method for constructing a software test management framework and a measurement system. The system for constructing a software test management framework and a measurement system comprises:

[0138] The code analysis module is used to obtain the code structure data of the software system, including code hierarchy data, call relationship data, and business function data; identify and analyze the key paths of the software system based on the code structure data, evaluate the test coverage, and map the coverage effects under different test scenarios to obtain coverage feature graph data;

[0139] The efficiency optimization module is used to simulate and analyze the execution efficiency of different test paths according to the coverage feature map data, so as to obtain the execution efficiency data; establish a test resource allocation model according to the test parameters corresponding to different paths and the execution efficiency data; adjust the test strategy in real time according to the preset coverage target and the test resource allocation model, so as to obtain the strategy adjustment data; build a multi-dimensional test monitoring system according to the strategy adjustment data, so as to obtain the test process control model;

[0140] The defect prediction module is used to obtain defect feature data at different test stages; perform cause analysis on the defect feature data and extract correlation to obtain defect distribution data; perform defect prediction based on the defect distribution data and the test process control model, and obtain the optimal test solution to obtain optimized test strategy data;

[0141] The stability evaluation module is used to obtain the performance indicator data of the test execution process; build a test stability model based on the performance indicator data; evaluate the reliability of the test process based on the test stability model, and correct the fluctuation factors to obtain stability score data;

[0142] The solution integration module is used to align the efficiency parameters of the stability score data and the optimized test strategy data to obtain the comprehensive test solution data.

[0143] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.

[0144] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A method for constructing a software testing management framework and a measurement system, characterized in that: The following steps are involved: Step S1: Obtain code structure data of the software system, including code hierarchy data, call relationship data, and business function data; Identify and analyze the critical paths of the software system based on the code structure data, evaluate the test coverage, and map the coverage effects under different test scenarios to obtain coverage feature graph data; Step S2: Simulate and analyze the execution efficiency of different test paths according to the coverage feature graph data to obtain execution efficiency data; establish a test resource allocation model according to the test parameters corresponding to different paths and the execution efficiency data; Adjust the test strategy in real time according to the preset coverage target and test resource allocation model to obtain strategy adjustment data; Build a multi-dimensional test monitoring system based on strategy adjustment data to obtain a test process control model; Step S3: Obtain defect feature data at different test stages; Conduct cause analysis on defect feature data and extract correlation to obtain defect distribution data; Defect prediction is performed based on defect distribution data and test process control models, and the optimal test plan is obtained to obtain optimized test strategy data; Step S4: Obtaining performance indicator data of the test execution process; Construct a test stability model based on performance indicator data; The reliability of the test process is evaluated according to the test stability model, and the fluctuation factors are corrected to obtain the stability score data; Step S5: aligning the efficiency parameters of the stability score data and the optimized test strategy data to obtain comprehensive test plan data.

2. The method for constructing a software testing management framework and a measurement system according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: Acquire source code data of the software system; perform code hierarchy analysis on the source code data to obtain code hierarchy data, wherein the code hierarchy analysis includes directory structure analysis of code files, hierarchical relationship analysis of modules, extraction of inheritance relationships between classes, and identification of interface implementation relationships; Step S12: identifying the calling relationship based on function calls, dependencies between methods, and synchronous and asynchronous calling modes according to the source code data, and extracting the calling chain depth information, thereby obtaining calling relationship data; Step S13: Establishing a function-code mapping relationship according to the business function annotations in the source code data, and identifying the core business process according to the call relationship data, thereby obtaining business function data; Step S14: merging the code hierarchy data, call relationship data and business function data into code structure data; Step S15: identifying and analyzing the critical paths of the software system according to the code structure data, and assigning weights to them, thereby obtaining path weight data; Step S16: Evaluate coverage based on the path weight data, and map the coverage effects under different test scenarios to obtain coverage feature map data.

3. The method for constructing a software testing management framework and a measurement system according to claim 2, characterized in that: Step S15 includes the following steps: Step S151: performing code branch logic and loop structure analysis according to the code structure data, and identifying conditional judgment nodes and loop entry points, thereby obtaining program control flow graph data; Step S152: performing call frequency statistics on the code blocks of the program control flow graph data, and marking the code blocks with call frequencies in the top 20% as high-frequency call areas, thereby obtaining high-frequency call code data; Step S153: performing an exception handling logic analysis on the program control flow graph data, and marking the code block containing the exception handling as an exception handling area, thereby obtaining the exception handling area data; Step S154: extracting code blocks involving data processing and calculation from the program control flow graph data and marking them as core logic areas, thereby obtaining core logic code data; Step S155: Calculate the cyclomatic complexity of the code block according to the program control flow graph data, thereby obtaining the code cyclomatic complexity data, wherein the cyclomatic complexity calculation is specifically cyclomatic complexity = the number of edges in the control flow graph - the number of nodes in the control flow graph + 2*the number of connected components in the control flow graph; Step S156: performing code division according to the high-frequency call code data, the exception handling area data, the core logic code data, and the code circle complexity data, thereby obtaining critical path segment data and non-critical path segment data; Step S157: Assign weights to the critical path segment data and non-critical path segment data based on test coverage to obtain path weight data, wherein the weight assignment specifically ranges from 1.2-1.5 for the critical path segment weight coefficient and from 0.8-1.0 for the non-critical path segment weight coefficient.

4. The method for constructing a software testing management framework and a measurement system according to claim 3, characterized in that: Step S156 includes the following steps: According to the high-frequency calling code data, exception handling area data, core logic code data and code circle complexity data, the code segment that is located in the high-frequency calling area or the exception handling area, belongs to the core logic area, and the code circle complexity exceeds the preset threshold is determined as a critical path segment, otherwise it is a non-critical path segment, thereby obtaining the critical path segment data and the non-critical path segment data.

5. The method for constructing a software testing management framework and a measurement system according to claim 4, characterized in that: Step S2 includes the following steps: Step S161: Calculate the weighted test coverage rate according to the path weight data to obtain test coverage rate evaluation data, where weighted test coverage rate = (weight coefficient of critical path segment * number of critical path coverage lines + weight coefficient of non-critical path segment * number of non-critical path coverage lines) / total number of code lines; Step S162: performing uncovered code segment feature analysis on the code blocks in the test coverage evaluation data that are lower than a preset test coverage threshold, thereby obtaining uncovered code type data, wherein the types of the uncovered code type data include high-frequency calls but not covered, exception handling but not covered, and core logic but not covered; Step S163: generating different types of test case template data according to the uncovered code type data, wherein the test case template data includes a load test case template, an exception injection test case template and a boundary value test case template; Step S164: Prioritizing the test case template data based on the weight coefficients to obtain supplementary test suggestion data; Step S165: Map the coverage effects under different test scenarios according to the supplementary test suggestion data to obtain coverage feature map data.

6. The method for constructing a software testing management framework and a measurement system according to claim 5, characterized in that: Step S2 includes the following steps: Step S21: constructing a test path execution model according to the coverage feature graph data, and performing simulation analysis on the execution time, resource consumption and concurrent performance of different test paths, so as to obtain execution efficiency data; Step S22: obtaining input parameter types, parameter ranges, and test data characteristics of different test paths, and establishing a test resource allocation model based on multi-objective optimization according to the execution efficiency data; Step S23: the test resource allocation model is evaluated in real time according to the preset coverage target, and the test execution strategy is dynamically adjusted based on the evaluation result, so as to obtain strategy adjustment data, wherein the strategy adjustment includes test case execution order adjustment, resource allocation ratio adjustment and concurrency adjustment; Step S24: construct a multi-dimensional test monitoring system including test progress monitoring, resource utilization monitoring, and coverage achievement monitoring according to the strategy adjustment data, so as to obtain test monitoring indicator data; Step S25: Perform time series analysis and trend prediction on the test monitoring indicator data, establish a feedback adjustment mechanism, and thus obtain a test process control model, wherein the control model includes test progress deviation correction control, resource utilization efficiency optimization control, coverage achievement progress control, and test quality assurance control.

7. The method for constructing a software testing management framework and a measurement system according to claim 6, characterized in that: Step S3 includes the following steps: Step S31: acquiring defect report data of different test phases, and extracting features of the severity, impact scope, triggering conditions, and recurrence probability of the defects according to the defect report data, thereby obtaining defect feature data; Step S32: performing cluster analysis on the defect feature data, and performing multi-dimensional cause analysis based on code quality, business logic, performance efficiency, and security vulnerabilities, thereby obtaining defect cause data; Step S33: performing association rule mining based on the defect cause data, identifying the correlation pattern between defects, and establishing a defect propagation link diagram, thereby obtaining defect association data; Step S34: integrating and analyzing the defect cause data and the defect association data to obtain defect distribution data, wherein the defect distribution data includes module-level defect distribution characteristics, function-level defect distribution characteristics, and code-level defect distribution characteristics; Step S35: predicting potential high-risk defect areas based on the defect distribution data and the test process control model, thereby obtaining defect prediction data; Step S36: Adjust the test plan based on the test resource priority allocation strategy, test case design optimization strategy, test execution sequence adjustment strategy and automated test coverage strategy according to the defect prediction data, so as to obtain optimized test strategy data.

8. The method for constructing a software testing management framework and a measurement system according to claim 7, characterized in that: Step S4 includes the following steps: Step S41: Acquire performance indicator data during the test execution process, including test execution time indicator, resource occupancy indicator, test result stability indicator and test environment availability indicator; Step S42: Statistically analyzing the performance indicator data, and calculating stability parameters based on the test case execution success rate, test result consistency ratio, test environment available time ratio, and test resource utilization efficiency, thereby obtaining stability parameter data; Step S43: establishing a test stability evaluation model according to the stability parameter data; evaluating the reliability of the test process based on the test stability model, thereby obtaining reliability evaluation data, wherein the evaluation content includes test process consistency evaluation, test result repeatability evaluation and test environment reliability evaluation; Step S44: Analyze the causes of abnormal fluctuations in the reliability evaluation data, identify fluctuation factors including environmental factor fluctuations, data factor fluctuations, load factor fluctuations, and configuration factor fluctuations, thereby obtaining fluctuation factor data; Step S45: performing fluctuation factor correction according to the fluctuation factor data, and calculating the test stability score according to the test stability model, thereby obtaining stability score data.

9. The method for constructing a software testing management framework and a measurement system according to claim 8, characterized in that: Step S5 includes the following steps: Step S51: extracting efficiency indicators including execution efficiency indicators, resource utilization indicators, coverage achievement indicators and defect discovery indicators from the stability score data, thereby obtaining efficiency indicator data; Step S52: performing strategy decomposition on the optimization test strategy data and extracting strategy parameters, thereby obtaining strategy parameter data; Step S53: establishing a multi-dimensional mapping relationship according to the efficiency indicator data and the strategy parameter data, thereby obtaining parameter mapping data, wherein the multi-dimensionality includes time dimension alignment, resource dimension alignment, coverage dimension alignment and quality dimension alignment; Step S54: Formulate implementation strategies for phased implementation plans, resource allocation plans, risk response measures, and quality assurance plans based on the parameter mapping data, thereby obtaining comprehensive test plan data.

10. A system for building a software testing management framework and a measurement system, characterized in that: The method for constructing a software test management framework and a measurement system according to claim 1 is used to execute the method, wherein the system for constructing a software test management framework and a measurement system comprises: The code analysis module is used to obtain the code structure data of the software system, including code hierarchy data, call relationship data, and business function data; identify and analyze the key paths of the software system based on the code structure data, evaluate the test coverage, and map the coverage effects under different test scenarios to obtain coverage feature graph data; The efficiency optimization module is used to simulate and analyze the execution efficiency of different test paths according to the coverage feature map data, so as to obtain the execution efficiency data; establish a test resource allocation model according to the test parameters corresponding to different paths and the execution efficiency data; adjust the test strategy in real time according to the preset coverage target and the test resource allocation model, so as to obtain the strategy adjustment data; build a multi-dimensional test monitoring system according to the strategy adjustment data, so as to obtain the test process control model; The defect prediction module is used to obtain defect feature data at different test stages; perform cause analysis on the defect feature data and extract correlation to obtain defect distribution data; perform defect prediction based on the defect distribution data and the test process control model, and obtain the optimal test solution to obtain optimized test strategy data; The stability evaluation module is used to obtain the performance indicator data of the test execution process; build a test stability model based on the performance indicator data; evaluate the reliability of the test process based on the test stability model, and correct the fluctuation factors to obtain stability score data; The solution integration module is used to align the efficiency parameters of the stability score data and the optimized test strategy data to obtain the comprehensive test solution data.

Citation Information

Patent Citations

  • Method and system for improving coverage of fuzzy test

    CN112328505A

  • Verification excitation method and system of processor

    CN118095160A