Automatic testing method, device and equipment for business software, medium and product
By performing real-time monitoring of business software and processing with artificial intelligence models, business test reports are generated, solving the problems of low efficiency, high cost, and poor accuracy of existing automated testing methods, and realizing efficient and low-cost automated testing.
Patent Information
- Application Number
- CN202511792298.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-01-16
AI Technical Summary
Existing automated testing methods for business software suffer from problems such as low testing efficiency, high demand for human resources, high testing costs, and poor accuracy and comprehensiveness of test results.
By monitoring the target software in real time, target test data is obtained, and this data is processed based on a pre-trained artificial intelligence model to generate business test reports, including test sample generation, error analysis, risk prediction, and integrity assessment.
It improves the efficiency of software testing, saves human resources, reduces testing costs, and ensures the accuracy and comprehensiveness of test results.
Smart Images

Figure CN121349897A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence, specifically to the application of artificial intelligence in the field of financial technology, and particularly to an automated testing method, apparatus, equipment, medium, and product for business software. Background Technology
[0002] In today's software development field, ensuring the quality of business software is of paramount importance, and automated testing, as a crucial means to improve software quality and testing efficiency, is widely used. However, existing automated testing methods have many problems that urgently need to be addressed.
[0003] First, current automated testing often requires deep coupling with the code of the system under test, resulting in a high degree of intrusion during deployment. For example, when automating testing of large-scale business software, significant modifications to the underlying code structure may be necessary to implement testing functions. This not only increases deployment complexity but may also introduce new risks, making compatibility issues with the test code more likely to arise during subsequent software upgrades or maintenance. Second, due to deep coupling with the code, the maintenance cost of automated testing remains high. As business software functions are continuously updated and iterated, the code structure and logic also change accordingly. This necessitates frequent adjustments and modifications to the automated test code to adapt to these changes. This requires testers to possess deep coding knowledge and extensive development experience, consuming significant manpower and time. Furthermore, traditional automated testing solutions cannot capture real-time user operation paths. Actual user behavior in business software is often random and diverse, while traditional testing solutions can only simulate operations according to preset processes, failing to accurately reflect users' actual operating habits and behavioral patterns. This leads to discrepancies between test results and actual user experience. Finally, traditional methods for assessing test completeness largely rely on human experience. Testers use their experience to judge whether the tests are comprehensive and cover key business logic and risk points. However, this approach is highly subjective, and different testers may have different judgment standards, which can easily lead to inaccurate test completeness assessments and fail to effectively guarantee the quality of the business software.
[0004] In summary, existing automated testing methods for business software suffer from low testing efficiency, high human resource requirements, high testing costs, and poor accuracy and comprehensiveness of test results. Summary of the Invention
[0005] This invention provides an automated testing method, apparatus, equipment, medium, and product for business software, which can solve the problems of low efficiency, high demand for human resources, high cost of software testing, and poor accuracy and comprehensiveness of software test results in existing automated testing methods for business software.
[0006] In a first aspect, embodiments of the present invention provide an automated testing method for business software, the method comprising:
[0007] The target software is monitored in real time, and when the target software meets the triggering conditions, the target test data matching the target software is obtained.
[0008] The target test data is processed to obtain at least one target test type that matches the target software;
[0009] Based on pre-trained artificial intelligence models, the target test data and target test types are processed to obtain a business test report that matches the target software.
[0010] Secondly, embodiments of the present invention provide an automated testing apparatus for business software, the apparatus comprising:
[0011] The monitoring module is used to monitor the target software in real time, and when the target software is detected to meet the trigger conditions, it acquires target test data that matches the target software.
[0012] A data processing module is used to process the target test data to obtain at least one target test type that matches the target software;
[0013] The report generation module is used to process the target test data and target test types based on pre-trained artificial intelligence models to obtain a business test report that matches the target software.
[0014] Thirdly, embodiments of the present invention provide an electronic device, the electronic device comprising:
[0015] At least one processor; and
[0016] A memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to execute an automated testing method for business software as described in any embodiment of the present invention.
[0018] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute and implement an automated testing method for business software as described in any embodiment of the present invention.
[0019] Fifthly, embodiments of the present invention provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements an automated testing method for business software as described in any embodiment of the present invention.
[0020] The technical solution of this invention monitors the target software in real time, and when the target software meets the triggering conditions, acquires target test data matching the target software. Then, the target test data is processed to obtain at least one target test type matching the target software. Finally, based on pre-trained artificial intelligence models, the target test data and each target test type are processed to obtain a business test report matching the target software. This solves the problems of low efficiency, high human resource requirements, high cost, and poor accuracy and comprehensiveness of software test results in existing automated testing methods for business software. It achieves automated testing of business software, improves testing efficiency, saves human resources, reduces the cost of software testing, and ensures the accuracy and comprehensiveness of software test results.
[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart of an automated testing method for business software provided according to Embodiment 1 of the present invention;
[0024] Figure 2 This is a flowchart of an automated testing method for business software provided according to Embodiment 2 of the present invention;
[0025] Figure 3 This is a schematic diagram of the structure of an automated testing device for business software provided according to Embodiment 3 of the present invention;
[0026] Figure 4 This is a schematic diagram of the structure of an electronic device that implements an automated testing method for business software according to an embodiment of the present invention. Detailed Implementation
[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, any variations of the terms "comprising" and "having" are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0029] Example 1
[0030] Figure 1 This is a flowchart of an automated testing method for business software provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation of automated testing of business software. The method can be executed by an automated testing device for business software. The automated testing device for business software can be implemented in hardware and / or software form. The automated testing device for business software can be configured in a terminal or server with automated testing function for business software.
[0031] like Figure 1 As shown, the method includes:
[0032] S110. Monitor the target software in real time, and when the target software meets the triggering conditions, acquire the target test data that matches the target software.
[0033] The target test data includes: the operation event flow, log stack, colored network traffic, current interface screenshot, and database records of the target software within a preset time period; the target test types include: test sample generation, error analysis, risk prediction, and integrity assessment.
[0034] The triggering conditions can be set and modified by the user according to the actual implementation scenario. For example, the triggering conditions can be: the operation frequency of the target software reaches a set threshold, a specific business function is triggered to execute, the system load is in a preset low power consumption range (such as CPU utilization is less than 70%), etc.
[0035] Furthermore, the operation event stream is used to record the user's operation sequence and corresponding context information on the target software interface; the log stack includes various operation logs and error stack information generated during the operation of the target software; the colored network traffic is network data obtained by marking communication port requests in the business transaction link through mirror port bypass parsing technology; the current interface screenshot can be dynamically generated by a preset optical character recognition engine for intelligent identification and collection of interface element status and interface element information; the database record includes database operations and data changes involved in the operation of the target software.
[0036] Furthermore, the test sample generation involves: performing cluster analysis based on the collected operation event stream to automatically generate test samples that fit actual business scenarios, such as boundary value tests; the error analysis involves: using an optical character recognition engine to identify interface error pop-ups, combining log stack tracing and database rollback records to jointly locate and troubleshoot the root cause of errors; the risk prediction involves analyzing the correlation patterns between historical defects and operation streams to predict potential quality risks in advance; and the integrity assessment is used to evaluate the test coverage effect of the target software.
[0037] S120. Process the target test data to obtain at least one target test type that matches the target software.
[0038] The process of processing the target test data to obtain at least one target test type matching the target software includes: parsing the operation event stream in the target test data to determine whether the operation event stream contains an operation event link that meets a preset standard; after determining that the operation event link is included, parsing the colored network traffic in the target test data to obtain a target service module matching the colored network traffic; obtaining a preset target service module table and determining whether the target service module matches the target service module table; and when the target service module matches the target service module table, setting the target test type matching the target software as test sample generation.
[0039] Specifically, the preset standard can be a standard set and modified by the user according to the actual implementation scenario. For example, the preset standard can be: the operation event link is a complete event link or the operation event link includes no less than three nodes, etc.; further, after determining that there is an operation event link that meets the standard in the operation event flow, the colored network traffic in the target test data is further parsed, and key fields such as service identifiers and interface information in the traffic are extracted through traffic protocol parsing technology, thereby locating the target business module corresponding to the colored network traffic; then, the preset target business module table is retrieved. The target business module table stores a list of all core business modules in the target software that need to generate test samples and their corresponding business characteristics. The parsed target business modules are compared and matched with the module information and characteristics in the table; when it is confirmed that the target business module exists in the target business module table and the characteristics match, it can be determined that in the current scenario, test samples need to be generated to verify the integrity of the business process, and the target test type matching the target software is set as test sample generation.
[0040] Furthermore, processing the target test data to obtain at least one target test type matching the target software includes: parsing the current interface screenshot in the target test data to determine whether the current interface screenshot contains preset error characteristics; after determining that it contains error characteristics, parsing the log stack and database records in the target test data to obtain exception stack information matching the log stack and operation rollback records matching the database records; determining whether the error characteristics, exception stack information, and operation rollback records are from the same source; and after determining that the three are from the same source, setting the target test type matching the target software as error analysis.
[0041] In this embodiment, the preset error characteristics can be common error pop-up styles, error message text templates, and abnormal interface layouts. Furthermore, if error characteristics are detected, the log stack is parsed, and the code call path, error code, and exception description at the time of the exception are extracted using stack traceback technology to obtain matching exception stack information. Simultaneously, database records are queried, filtering out database operation records corresponding to the current operation timestamp and business identifier, identifying whether transaction rollback records exist, and obtaining operation rollback records. Then, through timestamp alignment, business identifier association, and data change causal analysis, it is determined whether the error characteristics, exception stack information, and operation rollback records correspond to an exception triggered by the same business request at the same time. When it is verified that the three are from the same source, it can be determined that the root cause of the exception needs to be located and analyzed; therefore, the target test type is set as error analysis.
[0042] Those skilled in the art should understand that the method for determining whether error characteristics, exception stack information, and operation rollback records are from the same source when the target test data is known is a mature existing technology. This embodiment only introduces its steps, without going into detail about its principles and calculation process.
[0043] Further, processing the target test data to obtain at least one target test type matching the target software includes: acquiring historical defect data and calculating the similarity between the operation event flow features and historical defect features using cosine similarity; determining whether the similarity is greater than a preset similarity threshold; after determining that the similarity is greater than the preset similarity threshold, parsing the operation event flow and detecting whether the operation event flow contains preset high-risk behavior features according to a preset high-risk behavior feature table; if preset high-risk features are detected in the operation event flow, extracting the high-risk features as target features and processing the target features and the operation event flow using a pre-trained long short-term memory network model to obtain a target risk probability matching the operation event flow; determining whether the target risk probability is greater than a preset risk threshold, and after determining that the target risk probability is greater than the preset risk threshold, setting the target test type matching the target software as risk prediction.
[0044] In a specific implementation scenario of this embodiment, the process for determining the risk prediction type can be as follows: First, retrieve past defect records of the target software from the historical defect database, extract the operation event flow features and defect attribute features corresponding to each defect. The operation event flow features include feature values of abnormal operation sequences matching the defect record, and the defect attribute features are the defect level and affected modules of the defect record. Then, use a cosine similarity algorithm to calculate the similarity between the currently collected operation event flow features and the historical defect operation event flow features. The cosine similarity algorithm measures the degree of feature similarity by converting feature vectors into spatial vectors and calculating the cosine value of the angle between the vectors. The closer the cosine value is to 1, the higher the similarity. Then, compare the calculated similarity with a preset similarity threshold. If the similarity is greater than the threshold, it indicates that the current operation... The process exhibits a risk tendency similar to historical defects. Therefore, a fine-grained analysis of the current operational event flow is performed, matching each element against a pre-defined high-risk behavior feature table to detect the presence of such features. If a high-risk feature is detected, it is immediately extracted as a target feature and input into a pre-trained Long Short-Term Memory (LSTM) network model. This LTM model is trained based on historical operational data and risk event association data of the target software, enabling it to capture the temporal dependencies of operational sequences. Through temporal analysis of the target feature and the complete operational event flow, it outputs the target risk probability matching the current operational event flow. Finally, the target risk probability is compared with a pre-defined risk threshold. If the risk probability exceeds the threshold, it indicates a high quality risk in the current business process, requiring early warning. Therefore, the target test type is set as risk prediction.
[0045] Those skilled in the art should understand that the method of calculating the similarity between the currently collected operation event flow features and the historical defect operation event flow features using the cosine similarity algorithm when the past defect records of the target software are known is a mature existing technology. This embodiment will not elaborate on its calculation process and calculation principle.
[0046] Further, processing the target test data to obtain at least one target test type matching the target software includes: parsing the operation event flow in the target test data to obtain at least one target business scenario matching the target test data; obtaining a pre-configured total number of scenarios, and determining whether the target test data has quantifiable and statistically significant scenario coverage based on the total number of scenarios and each target business scenario; after determining that scenario coverage exists, parsing the log stack and database records in the target test data to obtain the code execution rate matching the target test data; determining whether the code execution rate is quantifiable and statistically significant based on preset quantitative statistical rules, and after confirming that the code execution rate is quantifiable and statistically significant, jointly parsing the colored network traffic and operation event flow in the target test data to obtain a data completeness result matching the target test data; determining whether the data completeness result is quantifiable and statistically significant; and if the data completeness result is quantifiable and statistically significant, setting at least one target test type matching the target software as a completeness assessment.
[0047] Specifically, the determination process for the integrity assessment type is as follows: First, the operation event flow in the target test data is analyzed in a scenario-based manner, mapping continuous operation events to corresponding business scenarios (such as "personal account balance inquiry scenario" and "corporate transfer and remittance scenario"), resulting in at least one target business scenario; then, the pre-configured total number of target software business scenarios is retrieved. The total number of business scenarios can be determined based on the target software's requirements document and business specifications. By calculating the ratio of the number of target business scenarios to the total number of business scenarios, it is determined whether quantifiable scenario coverage can be formed. The calculation formula for scenario coverage is: Scenario Coverage = Number of Target Business Scenarios / Total Number of Business Scenarios; if it is confirmed that the scenario coverage is quantifiable, the log stack and database records are jointly analyzed. By using the code execution markers and function call records in the log stack, combined with the code modules corresponding to the database operations, the number of executed lines of code and the total number of database operations are counted. The code execution rate is obtained by calculating the percentage of lines of code. Simultaneously, based on preset quantitative statistical rules, it is determined whether the code execution rate meets the quantifiable statistical conditions. These quantifiable statistical rules can be set and modified by the user according to the actual implementation scenario. For example, a quantifiable statistical rule suitable for the implementation scenario of this embodiment could be: the code execution rate statistics must include all core functional module code, and the statistical error must not exceed 5%. After confirming that the code execution rate is quantifiable, the colored network traffic and operation event flow are jointly analyzed to obtain data completeness results. Finally, it is determined whether the data completeness results can be quantified statistically through preset indicators (such as data combination coverage, data transmission success rate, etc., which can be set by the user according to the actual implementation scenario). If the scenario coverage, code execution rate, and data completeness results all meet the quantifiable statistical conditions, it indicates that the completeness of the test coverage can be fully evaluated. Therefore, the target test type is set as completeness evaluation.
[0048] The process involves jointly analyzing the colored network traffic and the operation event flow to obtain a data completeness result. This includes: verifying the data transmission integrity of the colored network traffic using a cyclic redundancy check algorithm; simultaneously, performing integrity checks on the operation event flow using a data verification rule engine; and evaluating the combined coverage of the data within the collection period using a multi-dimensional coverage metric algorithm. The integrity verification results, integrity check results, and coverage results are then integrated to obtain the data completeness result.
[0049] Those skilled in the art should understand that the methods for calculating the scenario coverage, code execution rate, and data completeness of the software based on the software's log stack and database are mature existing technologies, and the specific steps of these methods will not be described in detail in this embodiment.
[0050] S130. Based on the pre-trained artificial intelligence models, the target test data and target test types are processed to obtain a business test report that matches the target software.
[0051] The technical solution of this invention monitors the target software in real time, and when the target software meets the triggering conditions, acquires target test data matching the target software. The target test data is then processed to obtain at least one target test type matching the target software. Finally, based on pre-trained artificial intelligence models, the target test data and target test types are processed to obtain a business test report matching the target software. This achieves automated testing of business software, improves software testing efficiency, saves human resources, reduces the cost of software testing, and ensures the accuracy and comprehensiveness of software test results.
[0052] Example 2
[0053] Figure 2 This is a flowchart of an automated testing method for business software provided in Embodiment 2 of the present invention. This embodiment is a refinement based on the above embodiment. Specifically, this embodiment refines the method of processing the target test data and target test types based on pre-trained artificial intelligence models to obtain a business test report matching the target software.
[0054] like Figure 2 As shown, the method includes:
[0055] S210. Monitor the target software in real time, and when the target software meets the triggering conditions, acquire the target test data that matches the target software.
[0056] The target test data includes: the operation event flow, log stack, colored network traffic, current interface screenshot, and database records of the target software within a preset time period; the target test types include: test sample generation, error analysis, risk prediction, and integrity assessment.
[0057] S220. Process the target test data to obtain at least one target test type that matches the target software.
[0058] S230. Generate test data packets that match each target test type based on the target test data and each target test type.
[0059] Specifically, based on the above steps, for the test sample generation type, the operation event chain, the corresponding colored network traffic service identifier, and database records are extracted from the target test data to form a test data package that matches the test sample generation type; for the error analysis type, the current interface screenshot, log stack, and database records containing error characteristics are extracted to generate a test data package that matches the error analysis type; for the risk prediction type, the operation event flow, high-risk features in the operation event flow, and historical defect records of the risk prediction type are selected to form a test data package that matches the risk prediction type; for the integrity assessment type, the scenario coverage, target business scenario list, total number of scenarios, and code execution rate calculated by the above steps are obtained to generate a test data package that matches the integrity assessment type.
[0060] S240. Based on the target test type of each test data packet, input each test data packet into a pre-configured artificial intelligence model that matches each test data packet to obtain the test results that match each test data packet.
[0061] In a specific implementation scenario of this embodiment, for example, when the test data packet corresponds to the test sample generation type, it is input into a test sample generation model trained based on a converter model architecture. The test sample generation model is pre-trained with a large number of business scenario operation flows and test sample data to identify key nodes and data parameter distribution patterns in the operation event chain, and automatically generate a test sample set covering dimensions such as boundary values, abnormal inputs, and scenario branches. If the test data packet corresponds to the error analysis type, it is input into an anomaly localization model built based on a graph neural network. The anomaly localization model learns the code call graph structure of the log stack, the correlation between database operations and business anomalies, and can perform correlation analysis on the input multi-source data, output the error root cause localization result and the corresponding repair suggestion scheme. For test data packets of the risk prediction type, they are input into a pre-trained Long Short-Term Memory (LSTM) network risk prediction model. This model is used to capture the temporal dependencies of operational flows. By analyzing the temporal and risk characteristics of the input, it outputs the specific risk level corresponding to the target risk probability, the scope of business modules that the risk may affect, and the estimated probability threshold for risk triggering. When the test data packet corresponds to the integrity assessment type, it is input into an integrity scoring model built based on a multi-dimensional weighted algorithm. This integrity scoring model performs weighted calculations on the input quantitative data according to preset weight coefficients for scenario coverage, code execution rate, and data combination completeness, outputting a three-dimensional scoring result, a list of uncovered scenarios, details of unexecuted code modules, and a data combination coverage gap analysis. Each model's output test result must include the model's calculation confidence level for reference during subsequent result aggregation.
[0062] It should be noted that the specific types of artificial intelligence models mentioned above are merely examples of models that can perform the functions described in the example scenario provided in this embodiment. The artificial intelligence model can be any type of open source model that can implement and perform the above functions. In practical applications, the specific types of artificial intelligence models can be set and adjusted according to the actual needs of users. This embodiment does not limit the types of artificial intelligence models.
[0063] S250. Aggregate the test results to obtain a business test report that matches the target software.
[0064] The technical solution of this invention involves real-time monitoring of target software. When the target software meets triggering conditions, target test data matching the target software is acquired. This target test data is then processed to obtain at least one target test type matching the target software. Next, test data packets matching each target test type are generated based on the target test data and each target test type. Based on the target test type of each test data packet, each test data packet is input into a pre-configured artificial intelligence model matching each test data packet to obtain test results matching each test data packet. Finally, the test results are aggregated to obtain a business test report matching the target software. This achieves automated testing of business software, improves software testing efficiency, saves human resources, reduces software testing costs, and ensures the accuracy and comprehensiveness of software test results.
[0065] Example 3
[0066] Figure 3 This is a schematic diagram of the structure of an automated testing device for business software provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes:
[0067] The monitoring module 310 is used to monitor the target software in real time, and when the target software is detected to meet the triggering conditions, it acquires target test data that matches the target software.
[0068] The data processing module 320 is used to process the target test data to obtain at least one target test type that matches the target software;
[0069] The report generation module 330 is used to process the target test data and target test types based on pre-trained artificial intelligence models to obtain a business test report that matches the target software.
[0070] The technical solution of this invention monitors the target software in real time, and when the target software meets the triggering conditions, acquires target test data matching the target software. The target test data is then processed to obtain at least one target test type matching the target software. Finally, based on pre-trained artificial intelligence models, the target test data and target test types are processed to obtain a business test report matching the target software. This achieves automated testing of business software, improves software testing efficiency, saves human resources, reduces the cost of software testing, and ensures the accuracy and comprehensiveness of software test results.
[0071] Based on the above embodiments, the data processing module 320 includes:
[0072] The link determination unit is used to parse the operation event stream in the target test data and determine whether the operation event stream contains an operation event link that meets a preset standard.
[0073] The traffic parsing unit is used to parse the colored network traffic in the target test data after determining that it contains an operation event link, so as to obtain the target service module that matches the colored network traffic.
[0074] A business matching unit is used to obtain a preset target business module table and determine whether the target business module matches the target business module table.
[0075] The first setting unit is used to set the target test type that matches the target software as test sample generation after determining that the target business module matches the target business module table.
[0076] Based on the above embodiments, the data processing module 320 further includes:
[0077] The screenshot unit is used to parse the current interface screenshot in the target test data and determine whether the current interface screenshot contains preset error features;
[0078] The rollback record acquisition unit is used to parse the log stack and database record in the target test data after determining that it contains error characteristics, and obtain the exception stack information that matches the log stack and the operation rollback record that matches the database record.
[0079] The same-origin determination unit is used to determine whether the error characteristics, exception stack information and the operation rollback record are data from the same origin.
[0080] The second setting unit is used to set the target test type matching the target software as error analysis after determining that the three are data from the same source.
[0081] Based on the above embodiments, the data processing module 320 further includes:
[0082] A similarity calculation unit is used to acquire historical defect data and calculate the similarity between the operation event flow features and the historical defect features using cosine similarity.
[0083] A threshold determination unit is used to determine whether the similarity is greater than a preset similarity threshold;
[0084] A high-risk detection unit is used to parse the operation event stream after determining that the similarity is greater than a preset similarity threshold, and to detect whether the operation event stream contains preset high-risk behavior features according to a preset high-risk behavior feature table.
[0085] The risk probability calculation unit is used to extract the high-risk feature as a target feature if a preset high-risk feature is detected in the operation event stream, and to process the target feature and the operation event stream through a pre-trained long short-term memory network model to obtain the target risk probability matching the operation event stream.
[0086] The third setting unit is used to determine whether the target risk probability is greater than a preset risk threshold, and after determining that the target risk probability is greater than the preset risk threshold, to set the target test type that matches the target software as risk prediction.
[0087] Based on the above embodiments, the data processing module 320 further includes:
[0088] The business scenario parsing unit is used to parse the operation event stream in the target test data to obtain at least one target business scenario that matches the target test data.
[0089] The coverage calculation unit is used to obtain the pre-configured total number of scenarios and determine whether the target test data has quantifiable and statistically significant scenario coverage based on the total number of scenarios and each target business scenario.
[0090] The execution rate calculation unit is used to parse the log stack and database records in the target test data after determining that there is scene coverage, and to obtain the code execution rate that matches the target test data.
[0091] The joint parsing unit is used to determine whether the code execution rate is quantifiable and statistically quantifiable based on preset quantification and statistical rules, and after confirming that the code execution rate is quantifiable and statistically quantifiable, it performs joint parsing on the colored network traffic and operation event flow in the target test data to obtain a data completeness result that matches the target test data.
[0092] A quantitative statistical judgment unit is used to determine whether the data completeness result can be quantified and statistically analyzed.
[0093] The fourth setting unit is used to set at least one target test type matching the target software as integrity assessment after the data completeness result can be quantified and statistically analyzed.
[0094] Based on the above embodiments, the report generation module 330 includes:
[0095] The data packet generation unit is used to generate test data packets that match each target test type based on the target test data and each target test type.
[0096] The model processing unit is used to input each test data packet into a pre-configured artificial intelligence model that matches each test data packet based on the target test type of each test data packet, and obtain the test results that match each test data packet.
[0097] The result aggregation unit is used to aggregate the test results to obtain a business test report that matches the target software.
[0098] The automated testing device for business software provided in this embodiment of the invention can execute the automated testing method for business software provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0099] Example 4
[0100] Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0101] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory 12 and an access memory 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the read-only memory 12 or loaded from the storage unit 18 into the access memory 13. The access memory 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, read-only memory 12, and access memory 13 are interconnected via a bus 14. An input / output interface 15 is also connected to the bus 14.
[0102] Multiple components in electronic device 10 are connected to input / output interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of monitors, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0103] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing units, graphics processing units, various special-purpose artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as an automated testing method for business software.
[0104] Accordingly, the method includes:
[0105] The target software is monitored in real time, and when the target software meets the triggering conditions, the target test data matching the target software is obtained.
[0106] The target test data is processed to obtain at least one target test type that matches the target software;
[0107] Based on pre-trained artificial intelligence models, the target test data and target test types are processed to obtain a business test report that matches the target software.
[0108] In some embodiments, an automated testing method for business software may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via read-only memory 12 and / or communication unit 19. When the computer program is loaded into access memory 13 and executed by processor 11, one or more steps of the automated testing method for business software described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute an automated testing method for business software by any other suitable means (e.g., by means of firmware).
[0109] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays, application-specific integrated circuits (ASICs), application-specific standard products (ASICs), systems-on-a-chip (SoCs), payload programmable logic devices, computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0110] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0111] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, optical fibers, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0112] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a cathode ray tube or liquid crystal display) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0113] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0114] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system to address the shortcomings of traditional physical hosts, such as high management difficulty and weak business scalability.
[0115] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and no limitation is imposed herein.
Claims
1. A method of automated testing of business software, characterized by, The method comprises the following steps: real-time monitoring of target software, and obtaining target test data matched with the target software when it is monitored that the target software meets a triggering condition; processing the target test data to obtain at least one target test type matched with the target software; processing the target test data and the target test types based on pre-trained artificial intelligence models to obtain a business test report matched with the target software.
2. The method of claim 1, wherein, The target test data comprises operation event streams, log stacks, colored network traffic, current interface screenshots and database records of the target software within a preset time period. The target test types comprise test sample generation, error analysis, risk prediction and integrity evaluation.
3. The method according to any of claims 1-2, characterized in that, The processing of the target test data to obtain at least one target test type matched with the target software comprises the following steps: analyzing the operation event streams in the target test data to determine whether the operation event streams contain operation event links meeting preset standards; after determining that the operation event streams contain operation event links, analyzing the colored network traffic in the target test data to obtain a target business module matched with the colored network traffic; obtaining a preset target business module table to determine whether the target business module matches the target business module table; after determining that the target business module matches the target business module table, setting the target test type matched with the target software as test sample generation.
4. The method according to any one of claims 1-2, characterized in that, The processing of the target test data to obtain at least one target test type matched with the target software further comprises the following steps: analyzing the current interface screenshots in the target test data to determine whether the current interface screenshots contain preset error features; after determining that the current interface screenshots contain error features, analyzing the log stacks and database records in the target test data respectively to obtain abnormal stack information matched with the log stacks and operation rollback records matched with the database records; determining whether the error features, abnormal stack information and operation rollback records are homologous data; after determining that the three are homologous data, setting the target test type matched with the target software as error analysis.
5. The method according to any of claims 1-2, characterized by, The processing of the target test data to obtain at least one target test type matched with the target software further comprises the following steps: obtaining historical defect data and calculating the similarity between the operation event stream features and historical defect features by using cosine similarity; determining whether the similarity is greater than a preset similarity threshold; after determining that the similarity is greater than the preset similarity threshold, analyzing the operation event streams to detect whether the operation event streams contain preset high-risk behavior features according to a preset high-risk behavior feature table; if it is detected that the operation event streams contain preset high-risk features, extracting the high-risk features as target features, and processing the target features and the operation event streams by using a pre-trained long short-term memory network model to obtain a target risk probability matched with the operation event streams. determining whether the target risk probability is greater than a preset risk threshold, and setting a target test type matched with the target software as risk prediction when it is determined that the target risk probability is greater than the preset risk threshold.
6. The method according to any one of claims 1-2, characterized in that, processing the target test data to obtain at least one target test type matched with the target software, further comprising: parsing the operation event flow in the target test data to obtain at least one target business scenario matched with the target test data; obtaining a total number of scenarios pre-configured, and determining whether there is a quantifiable statistical scenario coverage of the target test data according to the total number of scenarios and each target business scenario; when it is determined that there is a scenario coverage, parsing the log stack and database records in the target test data to obtain a code execution rate matched with the target test data; determining whether the code execution rate is quantifiable based on a preset quantifiable statistical rule, and jointly parsing the dyeing network traffic and operation event flow in the target test data to obtain a data completeness result matched with the target test data when it is determined that the code execution rate is quantifiable; determining whether the data completeness result is quantifiable; if the data completeness result is quantifiable, setting at least one target test type matched with the target software as integrity evaluation.
7. The method of claim 1, wherein, processing the target test data and each target test type based on each pre-trained artificial intelligence model to obtain a business test report matched with the target software, comprising: generating a test data packet matched with each target test type based on the target test data and each target test type; inputting each test data packet into a pre-configured artificial intelligence model matched with each test data packet based on the target test type of each test data packet to obtain a test result matched with each test data packet; aggregating each test result to obtain a business test report matched with the target software.
8. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the automatic test method of the business software according to any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to implement the automatic test method of the business software according to any one of claims 1-7 when executed.
10. A computer program product, characterised in that, The computer program product comprises a computer program which, when executed by a processor, implements the automatic test method of the business software according to any one of claims 1-7. The computer program product comprises a computer program which, when executed by a processor, implements the automatic test method of the business software according to any one of claims 1-7.