Function bug analysis method and device, electronic equipment and storage medium
By obtaining and analyzing the code of the target software and simulating concurrent operations of multiple users, the multi-user bug problem that is difficult to detect in a single user scenario is solved, and a comprehensive analysis and optimization of the software's functional bugs and performance is achieved.
Patent Information
- Application Number
- CN202411466830.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-02-21
Smart Images

Figure CN119493726A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a functional bug analysis method, device, electronic equipment and storage medium. Background Art
[0002] In software code analysis, the usage scenarios and operation data of a single user are relatively few and may not cover all possible situations of the software. In addition, personalized factors affect the usage habits and operation methods of a single user, which may be unique. The bugs found may be more related to the unique behavior of the user rather than common problems with the software. Summary of the invention
[0003] The present invention proposes a functional bug analysis method, device, electronic device and storage medium, aiming to solve one of the technical problems in the related art at least to a certain extent. The embodiments of the present invention can fully realize functional bug analysis.
[0004] On the one hand, an embodiment of the present invention provides a functional bug analysis method, including:
[0005] Obtain the target code corresponding to the target function of the target software, and transmit the target code to a preset software code review system to obtain a software code test report;
[0006] Create multiple test user instances through pre-set test tools;
[0007] Apply the test user instance to the target software to obtain the test data of the target function;
[0008] The bug results of the target function are obtained based on the data results of the test data;
[0009] The number of test user instances is increased based on a preset increment, and the step of applying the test user instances to the target software is returned to be executed until the preset test conditions are met, and the test data obtained from successive iterations are compared to obtain the stress test results.
[0010] Optionally, obtaining the target code corresponding to the target function of the target software includes the following steps:
[0011] Responding to the test analysis instruction of the test management object, acquiring the target code from the target location;
[0012] The test analysis instructions include analysis selection instructions for target functions of the target software and version selection instructions for the target code; the target location includes a preset control system and / or local storage.
[0013] Optionally, transmitting the target code to a preset software code review system to obtain a software code test report includes the following steps:
[0014] Analyze and model the target code to establish a code model for the target code;
[0015] Perform data analysis based on the code model to obtain a first analysis result;
[0016] Based on the first analysis result, a test case is constructed in combination with preset user requirements;
[0017] Based on the test cases and code models, the execution process of the target code is monitored to obtain the execution monitoring results; the execution monitoring results include execution status, execution time and resource consumption;
[0018] The execution monitoring results are analyzed and sorted based on the preset template to obtain a software code test report.
[0019] Optionally, performing data analysis based on the code model includes at least one of the following steps:
[0020] Perform code complexity analysis on target code based on code model;
[0021] Perform code coverage analysis on target code based on code model;
[0022] Perform performance bottleneck analysis on target code based on code model.
[0023] Optionally, creating multiple test user instances through a preset test tool includes the following steps:
[0024] Create multiple virtual users and corresponding operation scenarios for each virtual user through preset testing tools.
[0025] Optionally, the test user instance includes multiple virtual users and their corresponding operation scenarios; the test data includes a user flow chart, verification data, user authority data, performance operation data and log data; applying the test user instance to the target software to obtain the test data of the target function includes the following steps:
[0026] Conduct instance testing of the target functions of the target software based on virtual users and their corresponding operation scenarios;
[0027] According to the results of the instance test, the operation path and interaction mode of each virtual user are obtained, and then the user flow chart is constructed;
[0028] According to the results of the instance test, the consistency and accuracy of the same or related data operated by different virtual users are obtained to obtain the verification data;
[0029] According to the results of the instance test, it is determined whether the functional availability and data visibility of each virtual user under different permissions meet the requirements of the operation scenarios corresponding to the virtual user, and the user permission data is obtained;
[0030] Monitor server performance indicators during the instance test process to obtain performance operation data;
[0031] In response to the completion action of the instance test, log data of the entire process of the instance test is obtained.
[0032] Optionally, the test data includes a user flow chart, verification data, user authority data, performance operation data and log data; the bug results include interaction conflict bugs, data bugs, authority bugs, performance bugs and information bugs; and obtaining the bug results of the target function based on the data results of the test data includes the following steps:
[0033] Based on the user flow diagram, determine whether there are conflicts or abnormal interaction points in the operation paths and interaction methods of multiple users of the target function. If there are interaction points, get the interaction conflict bug;
[0034] Based on the verification data, the consistency and accuracy of multiple users operating the same or related data at the same time are determined. When the consistency or accuracy fails to be verified, a data bug is obtained;
[0035] Based on the user permission data, determine whether the user has performed operations or data accesses that do not comply with the preset permission regulations. If there are operations or data accesses that do not comply with the preset permission regulations, a permission bug is obtained;
[0036] Determine whether the server performance index exceeds the preset performance bottleneck based on the performance operation data. When the server performance index exceeds the preset performance bottleneck, a performance bug is obtained.
[0037] Determine whether there are abnormal information in the operations of multiple users based on log data, and obtain information bug when abnormal information occurs.
[0038] On the other hand, an embodiment of the present invention provides a functional bug analysis device, including:
[0039] The first module is used to obtain the target code corresponding to the target function of the target software, and transmit the target code to a preset software code review system to obtain a software code test report;
[0040] The second module is used to create multiple test user instances through a preset test tool;
[0041] The third module is used to apply the test user instance to the target software to obtain the test data of the target function;
[0042] The fourth module is used to obtain the bug results of the target function based on the data results of the test data;
[0043] The fifth module is used to increase the number of test user instances based on a preset increment, return to execute the third module until the preset test conditions are met, and compare the test data obtained from successive iterations to obtain the stress test results.
[0044] On the other hand, an embodiment of the present invention provides an electronic device, including: a processor and a memory; the memory is used to store programs; the processor executes the program to implement the above-mentioned functional bug analysis method.
[0045] On the other hand, an embodiment of the present invention provides a computer storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the above-mentioned functional bug analysis method.
[0046] The embodiment of the present invention obtains the target code corresponding to the target function of the target software, transmits the target code to a preset software code review system to obtain a software code test report; creates multiple test user instances through a preset test tool; applies the test user instance to the target software to obtain the test data of the target function; obtains the bug result of the target function based on the data result of the test data; increases the number of test user instances based on a preset increment, returns to execute the step of applying the test user instance to the target software, until the preset test conditions are met, and compares the test data obtained by successive iterations to obtain the stress test result. The present invention includes the following beneficial effects:
[0047] Efficient and accurate code review and testing: By directly obtaining the target code corresponding to the target function of the target software and transferring it to the preset software code review system, accurate code review can be achieved, potential problems can be quickly located, and code quality can be improved. The software code test report can show the test results of the code in detail, including potential errors, performance bottlenecks, etc., providing strong support for subsequent development and optimization.
[0048] Simulation of multi-user concurrent testing: Using the preset test tools to create multiple test user instances can simulate multi-user concurrent operations in a real environment, thereby comprehensively testing the performance and stability of the target software under high concurrency conditions. This testing method helps to discover problems such as data conflicts and performance degradation caused by concurrent operations, and provides direction for software optimization and improvement.
[0049] Systematic test data collation and analysis: After applying the test user instance to the target software, the obtained test data can be systematically collated and analyzed to clearly show the bug results of the target function. This helps the development team to quickly locate and fix bugs and improve the reliability and stability of the software.
[0050] The gradual deepening of stress testing can gradually increase the number of test user instances based on the preset increments, and gradually increase the test pressure to observe the performance of the target software under different pressures. By iterating the test and comparing the test data, the stress test results can be obtained to evaluate the performance of the target software under extreme conditions such as high concurrency and large data volumes. This helps the development team to discover potential performance bottlenecks in advance and make targeted optimizations and improvements.
[0051] Automation and intelligence of the test process: The entire test process, from code review, creation of test user instances, collation and analysis of test data to the gradual deepening of stress testing, can be achieved through preset automation tools and intelligent algorithms. This greatly improves test efficiency, reduces test costs, and also ensures the accuracy and reliability of test results.
[0052] In summary, the present invention provides strong support for software development and optimization, and ensures the quality and stability of the software through the beneficial effects of efficient and accurate code review and testing, simulation of multi-user concurrent testing, systematic test data collation and analysis, gradual deepening of stress testing, and automation and intelligence of testing processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.
[0054] Figure 1 A schematic diagram of an implementation environment for performing functional bug analysis provided by an embodiment of the present invention;
[0055] Figure 2 A flowchart of a functional bug analysis method provided by an embodiment of the present invention;
[0056] Figure 3 A schematic diagram of a process of obtaining a software code test report through a software code review system provided by an embodiment of the present invention;
[0057] Figure 4 A schematic diagram of the expansion process of step S300 provided in an embodiment of the present invention;
[0058] Figure 5 A structural block diagram of a bug system based on a new function of software underlying code logic analysis provided by an embodiment of the present invention;
[0059] Figure 6 A schematic diagram of the logic principle of the data analysis module A provided in an embodiment of the present invention;
[0060] Figure 7 A schematic diagram of the logic principle of the data analysis module B provided in an embodiment of the present invention;
[0061] Figure 8 A flowchart of a bug analysis method for a new function based on software underlying code logic provided by an embodiment of the present invention;
[0062] Fig. 9 A schematic diagram of the structure of a functional bug analysis device provided by an embodiment of the present invention;
[0063] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0065] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100", "second / S200", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0066] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0067] It is understandable that the functional bug analysis method provided in the embodiment of the present invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various types of terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal is a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this.
[0068] like Figure 1 FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present invention. Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected to a network wirelessly or wired to complete data transmission and exchange.
[0069] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0070] In addition, the server 101 can also be a node server in the blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.
[0071] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal 102 and the server 101 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present invention.
[0072] Based on the example Figure 1 In the implementation environment shown, an embodiment of the present invention provides a function bug analysis method. The function bug analysis method is described below using the application of the function bug analysis method in the terminal 102 as an example. It can be understood that the function bug analysis method can also be applied to the server 101.
[0073] Reference Figure 2 , Figure 2 This is a flowchart of a functional bug analysis method applied to a terminal provided by an embodiment of the present invention. The execution subject of the functional bug analysis method can be any of the aforementioned computer devices (including a server or a terminal). Figure 2 , the method comprises the following steps:
[0074] S100, obtaining the target code corresponding to the target function of the target software, and transmitting the target code to a preset software code review system to obtain a software code test report;
[0075] It should be noted that, in some embodiments, obtaining the target code corresponding to the target function of the target software may include the following steps: in response to the test analysis instructions of the test management object, obtaining the target code from the target location; wherein the test analysis instructions include analysis selection instructions for the target function of the target software and version selection instructions for the target code; the target location includes a preset control system and / or local storage.
[0076] For example, in some specific implementations, the code to be analyzed needs to be obtained first, and the target code can be obtained from a version control system, local storage, etc. Specifically, the user can set the analysis parameters, select the functions or code snippets to be analyzed, etc. through the user control module, and control and customize the entire analysis process; and the user can also perform code comparison, such as code comparison between different versions, code comparison between different developers, etc.
[0077] It should be noted that in some embodiments, Figure 3 As shown, the target code is transmitted to a preset software code review system to obtain a software code test report, which may include the following steps: S101, parsing and modeling the target code to establish a code model for the target code; S102, performing data analysis based on the code model to obtain a first analysis result; S103, based on the first analysis result, building a test case in combination with preset user requirements; S104, based on the test case and the code model, monitoring the execution process of the target code to obtain an execution monitoring result; the execution monitoring result includes the execution status, execution time and resource consumption; S105, analyzing and collating the execution monitoring result based on a preset template to obtain a software code test report.
[0078] In some embodiments, data analysis based on the code model may include at least one of the following steps: performing code complexity analysis on the target code based on the code model; performing code coverage analysis on the target code based on the code model; performing performance bottleneck analysis on the target code based on the code model.
[0079] Exemplarily, in some specific implementations, the embodiments of the present invention provide a system for analyzing new function bugs based on the underlying software code logic (i.e., a software code review system). The process logic of step S100 can be implemented by a related system. Specifically, the system includes a detection port, the detection port is connected to a user control module, the user control module is connected to a user comparison module, the user comparison module is connected to a code acquisition module, the code acquisition module is connected to a parsing modeling module, the parsing modeling module is connected to a data analysis module, the data analysis module includes a data analysis module A and a data analysis module B, the data analysis module is connected to a test case module, the test case module is connected to an execution monitoring module, and the execution monitoring module is connected to a result analysis and reporting module. The process steps of implementing step S100 by a system for analyzing new function bugs based on the underlying software code logic can be:
[0080] 1. User control module:
[0081] Through this module, users can set analysis parameters, select functions or code snippets to be analyzed, etc., to control and customize the entire analysis process.
[0082] 2. User comparison module:
[0083] If the user needs to compare codes, such as code comparison between different versions or code comparison between different developers, they can do so at this stage. This module relies on the results of the previous code acquisition and parsing modeling modules.
[0084] 3. Code acquisition module:
[0085] First, you need to obtain the code to be analyzed. You can obtain the target code from the version control system, local storage, etc.
[0086] 4. Analytical modeling module:
[0087] Parse the acquired code and build an abstract model of the code for further analysis. This model can include the structure of the code, function call relationships, class inheritance relationships, etc.
[0088] 5. Data analysis module:
[0089] Use the previously established code model and possible comparison results to perform data analysis, such as code complexity analysis, code coverage analysis, performance bottleneck analysis, etc.
[0090] 6. Test case module:
[0091] Generate or select appropriate test cases based on the results of data analysis and user needs to prepare for subsequent execution monitoring.
[0092] 7.Execution monitoring module:
[0093] Execute test cases and monitor the execution process, recording execution status, time, resource consumption and other information.
[0094] 8. Execution result analysis and reporting module:
[0095] Analyze the results obtained from the execution monitoring module and generate a detailed report, including the execution status of the test cases, problems found, code quality assessment, etc., and present the report to the user.
[0096] In some optional implementations, each module of the system for analyzing new function bugs based on the underlying software code logic may also implement the following functional logic:
[0097] 1. Data analysis module A includes:
[0098] A1. Select data points;
[0099] A2. Calculate the distance between data points; (A data point usually refers to a specific piece of information or measurement value about a system, software or application obtained at a specific time, operation or state. For continuous numerical data points, the difference between their values can be regarded as a distance);
[0100] A3. Compare the calculated data with the set distance threshold;
[0101] A4. Collect and analyze data points that exceed the threshold;
[0102] 2. Data analysis module B includes:
[0103] B1. Data preprocessing;
[0104] B2. Select the number of clusters;
[0105] B3, initialize cluster center;
[0106] B4, assign bugs to clusters;
[0107] B5, update cluster center;
[0108] B6, repeat B4 and B5;
[0109] B7. Result analysis.
[0110] The results analysis includes:
[0111] 1) Collect and analyze the results:
[0112] Get analysis results from bug detection tools, which may include static code analyzers, dynamic testing tools, code coverage tools, etc.
[0113] Organize the analysis results and classify them into different types, such as code errors, performance issues, security vulnerabilities, etc.
[0114] 2) Analyze the bug type and severity:
[0115] Identify the type of each bug, such as syntax error, logic error, memory leak, etc.
[0116] The severity of each bug is assessed and usually divided into three levels: high, medium, and low. The severity can be determined based on the impact of the bug on the software function, the possible consequences, and the urgency of repair.
[0117] 3) Locate the bug:
[0118] Based on the error information and code path in the analysis results, try to locate the specific location of the bug in the code.
[0119] You can use debugging tools, code review, and log analysis to help locate bugs.
[0120] 4) Analyze the cause of the bug:
[0121] Combine the code logic and analysis results to analyze the cause of the bug. Possible causes include code errors, design flaws, environmental problems, etc.
[0122] Data preprocessing includes:
[0123] 1) Data collection:
[0124] First, you need to determine the data you need to collect to perform bug analysis on new features. This may include software log files, user feedback, code version control systems, performance monitoring data, etc.
[0125] Select data collection method:
[0126] Choose the appropriate data collection method based on the data source.
[0127] 2) Data cleaning:
[0128] Handling missing values, there may be missing values in the data, which may affect the results of data analysis. Missing values need to be handled, and methods such as filling, deletion, or interpolation can be used.
[0129] Handling outliers, which are data points that are significantly different from other data, may be caused by data entry errors, system failures, or other reasons. Outliers need to be detected and handled to avoid them from having adverse effects on the analysis results.
[0130] Remove duplicate data. Duplicate data records may exist in the data, which will increase the workload of data analysis and may lead to erroneous results. Duplicate data needs to be removed to ensure the uniqueness of the data.
[0131] 3. User control module:
[0132] It is used to control the number of users to adapt to the analysis of ports with different numbers of users.
[0133] 4. User comparison module:
[0134] By comparing the number of users with the set value, different data analysis modules are selected based on the comparison results.
[0135] 5. Code acquisition module:
[0136] Responsible for extracting relevant underlying code from the software version control system or development environment.
[0137] 6.Analytical modeling module:
[0138] Use parsing tools to convert code into analyzable structures and build logical models.
[0139] 7. Data analysis module:
[0140] Collects various data related to new features, including code execution paths, variable values, system resource usage, user input and actions, etc.
[0141] 8. Test case module:
[0142] Automatically generate or assist in generating effective test cases based on the analysis results.
[0143] 9.Execution monitoring module:
[0144] Execute test cases and monitor the software's running status and output results in real time.
[0145] 10. Result analysis and reporting module:
[0146] Perform detailed analysis on the test results and generate clear and accurate bug reports, including problem description, steps to reproduce, scope of impact, and other information.
[0147] In some specific application scenarios, the following workflow can be implemented by analyzing new function bugs based on the underlying software code logic:
[0148] a. Developers submit code for new features to the system;
[0149] b. The system first starts the code scanning tool to perform static analysis and generate a preliminary analysis report;
[0150] c. Use the dynamic debugging module to perform targeted test runs and record runtime data;
[0151] d. The logical reasoning engine combines static analysis and runtime data to perform logical reasoning and verification;
[0152] e. The data collection and analysis module conducts comprehensive analysis on the collected data to find potential bug clues;
[0153] f. The system improves the accuracy of bug detection: it goes deep into the underlying logic of the code to avoid missing key issues through surface detection.
[0154] S200, creating multiple test user instances through a preset test tool;
[0155] It should be noted that, in some embodiments, creating multiple test user instances by using a preset test tool may include the following steps: creating multiple virtual users and operation scenarios corresponding to each virtual user by using a preset test tool.
[0156] For example, in some specific implementations, a test tool can be used to create multiple virtual users to simulate the situation where different users perform operations at the same time; in some optional application scenarios, a test tool is used to create multiple virtual users: this is to simulate multi-user concurrent operations in a real environment to ensure that the software can run normally under high concurrency. Set the operation scenarios of virtual users: according to the functions of the software and user needs, set different operation scenarios to comprehensively test the performance of the software. Specifically, when selecting a test tool, the main considerations are whether it supports multi-user concurrent testing, whether it is easy to configure and use, and whether it provides detailed performance monitoring and logging functions.
[0157] S300, applying the test user instance to the target software to obtain test data of the target function;
[0158] It should be noted that the test user instance includes multiple virtual users and their corresponding operation scenarios; the test data includes user flow charts, verification data, user authority data, performance operation data and log data; in some embodiments, such as Figure 4As shown, applying the test user instance to the target software to obtain the test data of the target function can include the following steps: S301, performing instance testing on the target function of the target software based on the virtual users and their corresponding operation scenarios; S302, obtaining the operation path and interaction method of each virtual user according to the result of the instance test, and then constructing a user flow chart; S303, obtaining the consistency and accuracy of the same or related data operated by different virtual users according to the result of the instance test, and obtaining verification data; S304, obtaining whether the function availability and data visibility of each virtual user under different permissions comply with the regulations of the operation scenario corresponding to the virtual user according to the result of the instance test, and obtaining user permission data; S305, monitoring the server performance indicators of the test process of the instance test to obtain performance operation data; S306, in response to the completion action of the instance test, obtaining the log data of the entire process of the instance test.
[0159] S400, obtaining a bug result of a target function based on the data result of the test data;
[0160] It should be noted that the test data includes user flow charts, verification data, user authority data, performance operation data and log data; bug results include interaction conflict bugs, data bugs, authority bugs, performance bugs and information bugs; in some embodiments, the bug results of the target function are obtained based on the data results of the test data, which may include the following steps: based on the user flow chart, determine whether there are conflicts or abnormal interaction points in the operation path and interaction method of the target function of multiple users, and when there are interaction points, obtain interaction conflict bugs; based on the verification data, determine the consistency and accuracy of multiple users operating the same or related data at the same time, and when the consistency or accuracy fails to be verified, obtain a data bug; based on the user authority data, determine whether the user has operations or data accesses that do not comply with the preset authority regulations, and when there are operations or data accesses that do not comply with the preset authority regulations, obtain a permission bug; based on the performance operation data, determine whether the server performance index exceeds the preset performance bottleneck, and when the server performance index exceeds the preset performance bottleneck, obtain a performance bug; based on the log data, determine whether abnormal information appears in the operations of multiple users, and when abnormal information appears, obtain an information bug.
[0161] S500, increasing the number of test user instances based on a preset increment, returning to execute the step of applying the test user instances to the target software until the preset test conditions are met, and comparing the test data obtained from successive iterations to obtain the stress test result.
[0162] For example, in some specific implementations, the process steps from step S300 to step S500 may be implemented by the following process logic:
[0163] S1. Use the test tool to create multiple virtual users to simulate the situation where different users perform operations at the same time;
[0164] S2. Understand in detail the possible operation paths and interaction methods of each user in the software;
[0165] S3. Draw a user flow diagram to identify possible interaction points with conflicts or anomalies.
[0166] S4. Check the consistency and accuracy of data when multiple users operate on the same or related data at the same time;
[0167] S5. Check whether the function availability and data visibility of users under different permissions comply with regulations;
[0168] S6. During the multi-user test, monitor the server's performance indicators to find bugs that may be caused by performance bottlenecks;
[0169] S7. Carefully check the server and client logs to find abnormal information that occurs during multi-user operations;
[0170] S8. Gradually increase the number of virtual users, perform stress testing on the software, and observe the stability and failure points under high concurrency.
[0171] It should be understood that the entire process of steps S300 to S500 can be divided into several core stages: a preparation stage, an analysis stage, a testing stage, and a monitoring and tuning stage.
[0172] Preparation stage (S1):
[0173] Use the test tool to create multiple virtual users: This is to simulate the concurrent operation of multiple users in the real environment and ensure that the software can run normally under high concurrency conditions.
[0174] Set up virtual user operation scenarios: According to the software functions and user needs, set up different operation scenarios to comprehensively test the software performance.
[0175] Analysis phase (S2, S3):
[0176] Get a detailed understanding of each user's possible operation paths and interaction methods in the software: This is to deeply understand the user's behavior patterns and thus simulate the user's actual operations more accurately.
[0177] Draw a user flow diagram: Through a flow diagram, you can intuitively display the user's operation process in different scenarios, making it easier to discover potential conflicts or abnormal interaction points.
[0178] Testing phase (S4, S5):
[0179] Check data consistency and accuracy: When multiple users operate the same or related data at the same time, it is necessary to ensure the correctness and consistency of the data to avoid data conflict or loss.
[0180] Check function availability and data visibility: Based on the user's permission settings, check whether the function is available and whether the data is visible to ensure the effectiveness of permission control.
[0181] Monitoring and tuning phase (S6, S7, S8):
[0182] Monitor the performance indicators of the server: During the multi-user test process, it is necessary to monitor the performance indicators of the server in real time, such as CPU usage, memory usage, network bandwidth, etc., in order to detect performance bottlenecks in a timely manner.
[0183] View logs to find abnormal information: By viewing the logs on the server and client, you can find abnormal information that occurs during multi-user operations and locate the problem.
[0184] Stress testing to observe stability and failure points: gradually increase the number of virtual users, perform stress testing on the software, observe the stability and failure points under high concurrency conditions, and ensure that the software can run normally under extreme conditions.
[0185] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.
[0186] First of all, it should be noted that information retrieval based bug localization technology The IRBL method has achieved certain results in program defect localization. The defect localization method based on information retrieval usually builds a data set based on historical resolved defect reports and their corresponding source code, and establishes a model by mining the relevant features between defect reports and codes to analyze new defect reports to be resolved. When applying the IRBL method, the relevant features of defect reports and all project codes are first mined, and the probability of defects in the code is obtained by using the established model, so as to locate the codes with higher probability of defects. It is not difficult to see that the effect of the IRBL method is highly correlated with the mined defect features. Both the source code and the defect report itself contain information related to the defect. For the code, the features that can be used in the IRBL method to assist in positioning include the content, structure information, call information and semantic information of the code. For the defect report, in addition to the title and description containing natural language text, it may also include the stack information of the error provided by the user, the test cases that failed, etc. In the defect localization research based on information retrieval, the associated features between the defect report and the code are also used to assist in defect localization, such as the text similarity between the code and the defect report, similar defect reports, version history information, etc.
[0187] In software code analysis, the usage scenarios and operation data of a single user are relatively few, and may not cover all possible situations of the software, making it difficult to find some bugs that only appear in a complex multi-user interactive environment. Personalization factors affect the usage habits and operation methods of a single user, which may be unique. The bugs found may be more related to the unique behavior of the user rather than common problems with the software. It is impossible to simulate the concurrency of multiple users operating the software at the same time, making it difficult to find concurrency-related bugs, such as resource competition, data inconsistency, etc. Therefore, when analyzing the software, it is necessary to simulate multi-user usage scenarios for analysis to cover all possible situations and boundary conditions.
[0188] In view of this, if Figure 5 As shown, the embodiment of the present invention provides a system for analyzing new function bugs based on the logic of the underlying software code: including a detection port, the detection port is connected to a user control module, the user control module is connected to a user comparison module, the user comparison module is connected to a code acquisition module, the code acquisition module is connected to a parsing modeling module, the parsing modeling module is connected to a data analysis module, the data analysis module includes a data analysis module A and a data analysis module B, the data analysis module is connected to a test case module, the test case module is connected to an execution monitoring module, and the execution monitoring module is connected to a result analysis and reporting module. The system is briefly described as follows:
[0189] 1. As Figure 6 As shown, the data analysis module A includes:
[0190] A1. Select data points;
[0191] A2. Calculate the distance between data points; (A data point usually refers to a specific piece of information or measurement value about a system, software or application obtained at a specific time, operation or state. For continuous numerical data points, the difference between their values can be regarded as a distance);
[0192] A3. Compare the calculated data with the set distance threshold;
[0193] A4. Collect and analyze data points that exceed the threshold;
[0194] 2. If Figure 7 As shown, the data analysis module B includes:
[0195] B1. Data preprocessing;
[0196] B2. Select the number of clusters;
[0197] B3, initialize cluster center;
[0198] B4, assign bugs to clusters;
[0199] B5, update cluster center;
[0200] B6, repeat B4 and B5;
[0201] B7. Result analysis.
[0202] The results analysis includes:
[0203] 1) Collect and analyze the results:
[0204] Get analysis results from bug detection tools, which may include static code analyzers, dynamic testing tools, code coverage tools, etc.
[0205] Organize the analysis results and classify them into different types, such as code errors, performance issues, security vulnerabilities, etc.
[0206] 2) Analyze the bug type and severity:
[0207] Identify the type of each bug, such as syntax error, logic error, memory leak, etc.
[0208] The severity of each bug is assessed and usually divided into three levels: high, medium, and low. The severity can be determined based on the impact of the bug on the software function, the possible consequences, and the urgency of repair.
[0209] 3) Locate the bug:
[0210] Based on the error information and code path in the analysis results, try to locate the specific location of the bug in the code.
[0211] You can use debugging tools, code review, and log analysis to help locate bugs.
[0212] 4) Analyze the cause of the bug:
[0213] Combine the code logic and analysis results to analyze the cause of the bug. Possible causes include code errors, design flaws, environmental problems, etc.
[0214] Data preprocessing includes:
[0215] 1) Data collection:
[0216] First, you need to determine the data you need to collect to perform bug analysis on new features. This may include software log files, user feedback, code version control systems, performance monitoring data, etc.
[0217] Select data collection method:
[0218] Choose the appropriate data collection method based on the data source.
[0219] 2) Data cleaning:
[0220] Handling missing values, there may be missing values in the data, which may affect the results of data analysis. Missing values need to be handled, and methods such as filling, deletion, or interpolation can be used.
[0221] Handling outliers, which are data points that are significantly different from other data, may be caused by data entry errors, system failures, or other reasons. Outliers need to be detected and handled to avoid them from having adverse effects on the analysis results.
[0222] Remove duplicate data. Duplicate data records may exist in the data, which will increase the workload of data analysis and may lead to erroneous results. Duplicate data needs to be removed to ensure the uniqueness of the data.
[0223] 3. User control module:
[0224] It is used to control the number of users to adapt to the analysis of ports with different numbers of users.
[0225] 4. User comparison module:
[0226] By comparing the number of users with the set value, different data analysis modules are selected based on the comparison results.
[0227] 5. Code acquisition module:
[0228] Responsible for extracting relevant underlying code from the software version control system or development environment.
[0229] 6.Analytical modeling module:
[0230] Use parsing tools to convert code into analyzable structures and build logical models.
[0231] 7. Data analysis module:
[0232] Collects various data related to new features, including code execution paths, variable values, system resource usage, user input and actions, etc.
[0233] 8. Test case module:
[0234] Automatically generate or assist in generating effective test cases based on the analysis results.
[0235] 9.Execution monitoring module:
[0236] Execute test cases and monitor the software's running status and output results in real time.
[0237] 10. Result analysis and reporting module:
[0238] Perform detailed analysis on the test results and generate clear and accurate bug reports, including problem description, steps to reproduce, scope of impact, and other information.
[0239] In some specific application scenarios, the system for analyzing new function bugs based on the underlying software code logic can be performed as follows:
[0240] 1. User control module:
[0241] Through this module, users can set analysis parameters, select functions or code snippets to be analyzed, etc., to control and customize the entire analysis process.
[0242] 2. User comparison module:
[0243] If the user needs to compare codes, such as code comparison between different versions or code comparison between different developers, they can do so at this stage. This module relies on the results of the previous code acquisition and parsing modeling modules.
[0244] 3. Code acquisition module:
[0245] First, you need to obtain the code to be analyzed. You can obtain the target code from the version control system, local storage, etc.
[0246] 4. Analytical modeling module:
[0247] Parse the acquired code and build an abstract model of the code for further analysis. This model can include the structure of the code, function call relationships, class inheritance relationships, etc.
[0248] 5. Data analysis module:
[0249] Use the previously established code model and possible comparison results to perform data analysis, such as code complexity analysis, code coverage analysis, performance bottleneck analysis, etc.
[0250] 6. Test case module:
[0251] Generate or select appropriate test cases based on the results of data analysis and user needs to prepare for subsequent execution monitoring.
[0252] 7.Execution monitoring module:
[0253] Execute test cases and monitor the execution process, recording execution status, time, resource consumption and other information.
[0254] 8. Execution result analysis and reporting module:
[0255] Analyze the results obtained from the execution monitoring module and generate a detailed report, including the execution status of the test cases, problems found, code quality assessment, etc., and present the report to the user.
[0256] In some specific application scenarios, the following workflow can be implemented by analyzing new function bugs based on the underlying software code logic:
[0257] a. Developers submit code for new features to the system;
[0258] b. The system first starts the code scanning tool to perform static analysis and generate a preliminary analysis report;
[0259] c. Use the dynamic debugging module to perform targeted test runs and record runtime data;
[0260] d. The logical reasoning engine combines static analysis and runtime data to perform logical reasoning and verification;
[0261] e. The data collection and analysis module conducts comprehensive analysis on the collected data to find potential bug clues;
[0262] f. The system improves the accuracy of bug detection: it goes deep into the underlying logic of the code to avoid missing key issues through surface detection.
[0263] In some preferred implementations, based on the aforementioned system, the present invention can also implement a method for analyzing new function bugs based on the underlying software code logic, such as Figure 8 As shown, the main steps include:
[0264] S1. Use the test tool to create multiple virtual users to simulate the situation where different users perform operations at the same time;
[0265] S2. Understand in detail the possible operation paths and interaction methods of each user in the software;
[0266] S3. Draw a user flow diagram to identify possible interaction points with conflicts or anomalies.
[0267] S4. Check the consistency and accuracy of data when multiple users operate on the same or related data at the same time;
[0268] S5. Check whether the function availability and data visibility of users under different permissions comply with regulations;
[0269] S6. During the multi-user test, monitor the server's performance indicators to find bugs that may be caused by performance bottlenecks;
[0270] S7. Carefully check the server and client logs to find abnormal information that occurs during multi-user operations;
[0271] S8. Gradually increase the number of virtual users, perform stress testing on the software, and observe the stability and failure points under high concurrency.
[0272] For example, in some specific application scenarios, the workflow can be implemented as follows:
[0273] For example, in a new feature for multi-user online collaborative editing of documents:
[0274] a. During the code review, it was found that the conflict handling logic for multiple users saving documents at the same time was not perfect;
[0275] b. During unit testing, it was found that when a user deleted a document paragraph, other users' views were not updated in time;
[0276] c. During the integration test, it was found that when multiple users opened the same document at the same time, the loading speed was slow;
[0277] d. During stress testing, the system crashed when a large number of users were editing at the same time;
[0278] e. Through security testing, it was found that there is a vulnerability that allows low-privilege users to view the content edited by high-privilege users;
[0279] f. Record and track these issues in detail until they are fixed and verified through retesting.
[0280] In summary, the embodiment of the present invention combines the review of software code and proposes a bug detection method for new functions based on the logic analysis of the software's underlying code. By gradually increasing the number of virtual users, the software is stress tested and the stability and failure points under high concurrency are observed. This can cover all possible situations and boundary situations, that is, cover potential bugs and fix them.
[0281] Compared with the prior art, the present invention has at least the following beneficial effects:
[0282] 1. Discover problems in advance: Find and solve bugs before new features are launched to reduce risks and costs.
[0283] 2. Optimize the development process: provide valuable feedback to developers to improve code quality and generate detailed bug reports, including bug descriptions, possible causes, locations, and repair suggestions;
[0284] 3. Comprehensively analyze the bugs in new functions of multi-user software to improve the quality and stability of the software.
[0285] On the other hand, Fig. 9 As shown, an embodiment of the present invention provides a functional bug analysis device 900, which may include:
[0286] The first module 901 is used to obtain the target code corresponding to the target function of the target software, and transmit the target code to a preset software code review system to obtain a software code test report;
[0287] The second module 902 is used to create multiple test user instances through a preset test tool;
[0288] The third module 903 is used to apply the test user instance to the target software to obtain test data of the target function;
[0289] The fourth module 904 is used to obtain the bug result of the target function based on the data result of the test data;
[0290] The fifth module 905 is used to increase the number of test user instances based on a preset increment, return to execute the third module until the preset test condition is reached, and compare the test data obtained by successive iterations to obtain the stress test result.
[0291] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0292] On the other hand, an embodiment of the present invention further provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above sensitive information method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0293] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0294] like Fig.10 As shown, Fig.10 A specific example of the hardware structure of an electronic device 1000 according to an embodiment is shown. The electronic device 1000 includes:
[0295] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0296] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the network node population optimization method of the embodiment of the present invention;
[0297] Input / output interface 1003, used to implement information input and output;
[0298] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0299] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0300] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0301] The electronic device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0302] The contents of the method embodiments of the present invention are all applicable to the electronic device embodiments. The functions specifically implemented by the electronic device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0303] Another aspect of an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.
[0304] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read to Only Memory, CD to ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0305] The contents of the method embodiments of the present invention are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0306] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.
[0307] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0308] It should be noted that, although several modules of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0309] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD to ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present invention.
[0310] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0311] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0312] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0313] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution device, apparatus or device (such as a computer-based device, a device including a processor, or other device that can fetch instructions from an instruction execution device, apparatus or device and execute the instructions), or in conjunction with such instruction execution device, apparatus or device. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution device, apparatus or device, or in conjunction with such instruction execution device, apparatus or device.
[0314] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0315] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0316] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0317] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0318] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A functional bug analysis method, characterized in that: The following steps are involved: Obtaining the target code corresponding to the target function of the target software, and transmitting the target code to a preset software code review system to obtain a software code test report; Create multiple test user instances through pre-set test tools; Applying the test user instance to the target software to obtain test data of the target function; Obtaining the bug result of the target function based on the data result of the test data; The number of the test user instances is increased based on a preset increment, and the step of applying the test user instances to the target software is returned to be executed until a preset test condition is reached, and the test data obtained by successive iterations is compared to obtain a stress test result.
2. The functional bug analysis method according to claim 1, characterized in that: The step of obtaining the target code corresponding to the target function of the target software comprises the following steps: Responding to the test analysis instruction of the test management object, acquiring the target code from the target location; Wherein, the test analysis instruction includes an analysis selection instruction for the target function of the target software and a version selection instruction for the target code; the target location includes a preset control system and / or local storage.
3. The functional bug analysis method according to claim 1, characterized in that: The step of transmitting the target code to a preset software code review system to obtain a software code test report comprises the following steps: Performing analytical modeling on the target code to establish a code model for the target code; Perform data analysis based on the code model to obtain a first analysis result; Based on the first analysis result, construct test cases in combination with preset user needs; Based on the test case and the code model, the execution process of the target code is monitored to obtain an execution monitoring result; the execution monitoring result includes an execution state, an execution time and resource consumption; The execution monitoring results are analyzed and collated based on a preset template to obtain the software code test report.
4. The functional bug analysis method according to claim 3, characterized in that: The performing of data analysis based on the code model comprises at least one of the following steps: Performing code complexity analysis on the target code based on the code model; Performing code coverage analysis on the target code based on the code model; A performance bottleneck analysis is performed on the target code based on the code model.
5. The functional bug analysis method according to claim 1, characterized in that: The step of creating multiple test user instances by using a preset test tool includes the following steps: A plurality of virtual users and an operation scenario corresponding to each of the virtual users are created through a preset testing tool.
6. The functional bug analysis method according to claim 1, characterized in that: The test user instance includes multiple virtual users and their corresponding operation scenarios; the test data includes user flow charts, verification data, user authority data, performance operation data and log data; applying the test user instance to the target software to obtain the test data of the target function includes the following steps: Performing instance testing on the target function of the target software based on the virtual user and the corresponding operation scenario; According to the result of the instance test, the operation path and interaction mode of each virtual user are obtained, and then the user flow chart is constructed; According to the result of the instance test, the consistency and accuracy of the same or related data operated by different virtual users are obtained to obtain the verification data; According to the result of the instance test, whether the function availability and data visibility of each virtual user under different permissions meet the requirements of the operation scenario corresponding to the virtual user is obtained, and the user permission data is obtained; Monitoring the server performance index during the test process of the instance test to obtain the performance operation data; In response to a completion action of the instance test, the log data of the entire process of the instance test is obtained.
7. The functional bug analysis method according to claim 1, characterized in that: The test data includes user flow charts, verification data, user authority data, performance operation data and log data; the bug results include interaction conflict bugs, data bugs, authority bugs, performance bugs and information bugs; the data results based on the test data are collated to obtain the bug results of the target function, including the following steps: Determine, based on the user flow diagram, whether there are conflicting or abnormal interaction points in the operation paths and interaction modes of the target function for multiple users, and obtain the interaction conflict bug when the interaction point exists; Determine the consistency and accuracy of the same or related data operated by multiple users at the same time based on the verification data, and obtain the data bug when the consistency or accuracy fails to be verified; Determine, based on the user authority data, whether the user has performed operations or data accesses that do not comply with preset authority regulations, and obtain the authority bug when there are operations or data accesses that do not comply with the preset authority regulations; Determine whether the server performance index exceeds a preset performance bottleneck based on the performance operation data, and obtain the performance bug when the server performance index exceeds the preset performance bottleneck; Based on the log data, it is determined whether abnormal information occurs in the operations of the plurality of users, and when the abnormal information occurs, the information bug is obtained.
8. A functional bug analysis device, characterized in that: include: The first module is used to obtain the target code corresponding to the target function of the target software, and transmit the target code to a preset software code review system to obtain a software code test report; The second module is used to create multiple test user instances through a preset test tool; A third module is used to apply the test user instance to the target software to obtain test data of the target function; The fourth module is used to obtain the bug result of the target function based on the data result of the test data; The fifth module is used to increase the number of the test user instances based on a preset increment, return to execute the third module until the preset test conditions are met, and compare the test data obtained in successive iterations to obtain the stress test results.
9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 7.
10. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 7 when executed by the processor.