System automatic testing method and system for audit business process

By training the big model to generate dynamic test case scripts and simulate the audit business process under the Playwright framework, the problem that existing testing methods are difficult to cover complex audit business logic is solved, and efficient and flexible testing coverage is achieved.

CN119127718BActive Publication Date: 2025-02-28BEIJING ZHIZHENYUN INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411574231.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-28
Estimated Expiration
2044-11-06

AI Technical Summary

Technical Problem

Existing automated testing methods are difficult to efficiently generate and execute test case scripts for audit business processes, resulting in limited test coverage and adaptability.

Method used

By training big models, we can understand a variety of specific audit business processes and rules, automatically generate dynamic and flexible test case scripts, and simulate users' audit business processes for testing under the Playwright framework.

Benefits of technology

Improves testing efficiency, reduces labor costs, improves test coverage and quality, and is able to adapt to complex and changing audit business processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure SMS_45
    Figure SMS_45
Patent Text Reader

Abstract

The present invention provides a method and system for automatic system testing of audit business processes. The method includes: an audit business process data indexing step, a large model training step, a large model test case script generation step, and a test case script integration running step. The present invention can understand a variety of specific audit business processes and rules by training a large model, so that the large model can automatically generate dynamic and flexible test case scripts, and simulate the user's audit business process under the Playwright framework for testing, thereby improving test efficiency, reducing labor costs, and improving test coverage and quality, thereby solving the above technical problems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of digital technology, and in particular relates to a system automatic testing method and system for audit business processes. Background Art

[0002] Due to the special requirements of audit business in terms of risk compliance, standardized operation and professionalism, the audit business system that supports the automation of audit processes also has special attributes, including: (1) Data diversity: The audit system needs to process data of different types and formats, such as financial statements, transaction records, vouchers, etc. (2) User diversity: The users of the audit system include auditors, corporate management, regulatory agencies, etc. Different users have different requirements and operating permissions for the system. (3) Business rule complexity and specificity: Audit business rules are numerous and frequently updated, and different audit objectives, audit objects, and audit contents often correspond to specific business rules. The system needs to be able to adapt to changes in these rules. (4) Information security and confidentiality: The information processed by the audit system is often highly sensitive, so the system needs to have strong security and confidentiality. (5) Integration difficulty: The audit system usually needs to be integrated with other internal enterprise systems (such as financial systems, ERP systems, etc.), which increases the complexity of system implementation.

[0003] Therefore, in the process of system development, automated testing of audit business systems is an important research direction. Existing testing methods often rely on manually writing test cases, which is not only time-consuming and labor-intensive, but also difficult to cover complex business logic and user operations. In addition, as the complexity of audit business systems increases, the maintenance and update of test cases are becoming increasingly difficult.

[0004] At present, although there are some automated testing tools, such as Selenium and Playwright, which can simulate user operations, these tools usually require a lot of configuration and programming work, and generally can only select templates from the test case library according to fixed rules and combine them to form test cases, resulting in single and solid test cases. It is not easy to generate test case scripts for specific business processes, and the test coverage and adaptability are greatly restricted. Therefore, how to efficiently generate and execute test case scripts for audit business processes has become a major challenge in the current field of automated testing. Summary of the invention

[0005] The present invention provides a method and system for automatic system testing of audit business processes. The present invention can understand a variety of specific audit business processes and rules by training a large model, so that the large model can automatically generate dynamic and flexible test case scripts, and simulate the user's audit business process for testing under the Playwright framework, thereby improving test efficiency, reducing labor costs, and improving test coverage and quality, thereby solving the above technical problems.

[0006] In a first aspect, the present invention provides a system automatic testing method for audit business processes, characterized by comprising:

[0007] Audit business process data indexing step: by collecting and analyzing the audit business processes in the sample set, determine and mark the key operations and verification points of the audit business system;

[0008] The big model training step uses the annotated audit business data in the sample set to train the big model so that it can understand and generate test case scripts that conform to the audit business logic;

[0009] The big model test case script generation step uses the trained big model to automatically generate a series of test case scripts that simulate users performing operations according to the audit business process based on the previously analyzed and understood audit business data;

[0010] The test case script integration running step integrates the generated test case script with the Playwright framework based on the API of the Playwright framework, and executes the test case script through the Playwright framework.

[0011] Preferably, the audit business process data indexing step specifically includes:

[0012] Draw sub-steps in the flowchart, draw the audit business process diagram, and mark the functions and operations of each link;

[0013] Operation identification sub-step: Based on the flowchart, identify all key operations and mark the key operations;

[0014] Verification point determination sub-step: for each key operation, determine the corresponding verification point and mark the verification content, verification method, and verification standard of the verification point.

[0015] Preferably, in the large model test case script generation step, the test case script is used to reproduce the user's operating behavior in various functional interfaces of the audit business system according to the audit business process, including: web page interaction, which will contain instructions to start the browser and navigate to a specific URL to provide an interactive environment for subsequent operations; filling in form fields to simulate user input behavior, and filling data for each field in the form according to predetermined data input rules; button click, after completing the necessary data input, the script will simulate the user clicking the submit button to trigger the next business process.

[0016] Preferably, the specific steps of integrating the generated test case script with the Playwright framework include: initializing the Playwright environment, initializing a test environment through the API of the Playwright framework, which includes starting a browser instance and creating a new browser context; loading the test case script generated by the large model into the test context of Playwright, the script containing a series of operation instructions to be executed; simulating user operations, simulating user operations such as clicks, inputs, and navigation through the API of the Playwright framework; while executing the test case script, real-time monitoring of log output and abnormal conditions to ensure the stability and reliability of the test; after the test is executed, collecting the test results.

[0017] Preferably, the automatic system testing method for audit business processes also includes: a script dynamic optimization step, collecting the operation status of the audit business system, and dynamically adjusting the test case script according to feedback, and continuing testing and dynamic optimization until the expected test coverage is achieved.

[0018] Preferably, during the execution of the test case script, the operation status of the audit business system is collected and feedback information including key performance indicators and system responses is recorded, including: response time, recording the average response time of the system to each operation to evaluate the efficiency of the system; error log, capturing any error information generated by the system during the execution of the operation for subsequent problem analysis and resolution; abnormal behavior, monitoring whether the system has any abnormal behavior.

[0019] Preferably, the dynamic adjustment of the test case script according to feedback specifically includes: using the big model to perform the following analysis and adjustment on the test case script according to the feedback information: conducting in-depth analysis on the collected data to identify possible performance bottlenecks or functional defects; based on the analysis results, the big model modifies the test case script; and re-executing the test using the adjusted script to verify whether the problem is resolved.

[0020] Preferably, the process of dynamically adjusting the test case script according to the feedback information of the audit business system includes: constructing a feedback information feature parser and test case converter . The feedback information feature analyzer Using the VIT model, input Represents a feedback information vector sample in each sample pair, and the above response time, error information type, and abnormal behavior type can be used as vector elements of the feedback information vector sample; A parameter vector consisting of all parameters of the feedback information feature parser, which outputs the structural features of the feedback information; a test case converter It is the Text Transformers model, input represents the test case sample in each sample pair, is the parameter vector composed of all parameters in the test case converter, which outputs the test case structural features; the large model also includes the linear projection matrix of the feedback information structural features and the test case structural features, and the matrix parameters are expressed as and ; The sample set of paired samples consisting of feedback information vector samples and test case samples is expressed as , is the total capacity of the sample set.

[0021] Preferably, during the pre-training process, the parameters of the feedback information feature parser and the test case converter are initialized as , and initialize the matrix parameters ; In each training round (epoch), Randomly divide into A small batch of samples: , ,here ; for The small batch sample pairs of the batch will be Input the feedback information feature parser and test case converter respectively to obtain the feedback information structure features and test case structure features of the small batch samples, which are expressed as , ; In each small batch of samples, the same paired sample Feedback information structure characteristics and test case structure characteristics Constitute positive sample pairs, from different paired samples Feedback information structure characteristics and test case structure characteristics are combined together to form a negative sample pair, where ; Using the linear projection matrix, linearly project the two sets of features to obtain two sets of features of the same dimension, and normalize them to:

[0022] ;

[0023] ;

[0024] here , ; and is the matrix parameter of the linear projection for this batch of samples; function Represents the matrix The value of each row is divided by the square root of the sum of the squares of all elements in that row; using the characteristics of linear projection and , construct the training loss function as follows: First, calculate the feature and The cosine similarity matrix of :

[0025] ;

[0026] here, is a The matrix of are predefined hyperparameters; then the symmetric loss function based on contrastive loss is calculated:

[0027]

[0028] in yes No. elements; then, calculate the loss function All parameters relative to the feedback information feature parser and test case converter and the linear projection matrix The gradient is:

[0029] ;

[0030] here, Is All parameters in compose the parameter vector, Indicates that for The values ​​of the above parameters for each batch of samples; the training model parameters are continuously updated during the training of each batch:

[0031] ;

[0032] here, is the learning rate; after training, the optimal parameter vector is output , thus obtaining the feedback information feature parser and test case converter and linear projection matrix after training optimization , , , .

[0033] On the other hand, the present application also discloses an automatic testing system for audit business processes, which is characterized by comprising:

[0034] The audit business process data indexing unit determines and marks the key operations and verification points of the audit business system by collecting and analyzing the audit business processes in the sample set.

[0035] The audit test big model unit includes a big model trained using labeled audit business data in a sample set, which can understand and generate test case scripts that conform to the audit business logic; and through the trained big model, based on the previously analyzed and understood audit business data, it automatically generates a series of test case scripts that simulate users performing operations according to the audit business process.

[0036] The present invention can understand various specific audit business processes and rules by training a large model, so that the large model can automatically generate dynamic and flexible test case scripts, and simulate the user's audit business process for testing under the Playwright framework; based on the characteristics of the large model, it can support highly dynamic, multi-round interactive audit business system testing, adapt to complex and changing audit business processes, and can analyze and evaluate the test results in real time, improve test coverage, improve test quality and test efficiency, reduce labor costs, and continuously optimize the test case script generation capability of the large model during the iteration process. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A flowchart of the system automatic testing method for the audit business process of this application;

[0038] Figure 2 This is a block diagram of the automatic testing system for audit business processes in this application. DETAILED DESCRIPTION

[0039] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0040] In order to more clearly understand the above-mentioned purpose, features and advantages of the present application, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It is to be understood that the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. The specific embodiments described herein are merely used to explain the present application, rather than to limit the present application. Based on the described embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.

[0041] Figure 1This is a flowchart of the system automatic testing method for the audit business process of this application. Figure 1 , the method comprises the following steps.

[0042] The audit business process data indexing step S1 determines and marks the key operations and verification points of the audit business system by collecting and analyzing the audit business processes in the sample set.

[0043] As the primary task of building a dedicated big model for the vertical field of audit business system testing, it is necessary to use the massive samples included in the sample set, through targeted training and fine-tuning, so that the big model based on pre-training has the ability to understand and generate in-depth analysis of the specific processes of audit business. Therefore, this step S1 involves comprehensive labeling of the audit business process, with the aim of identifying and labeling the key operating steps and key points that must be verified. Specifically, it is necessary to disassemble the audit business process link by link, and record in detail the operating requirements, data flow and possible risk points of each link. Through this analysis process, we can clearly understand which operations must be performed by the user during the normal audit process, and which data or status needs to be specially checked to confirm the correctness of the system. This step is the basis for the subsequent generation of test case scripts, ensuring that the big model can accurately understand and simulate the user's actual audit business operation behavior.

[0044] The specific audit business process determination and annotation can include the following detailed analysis process: (1) Flowchart drawing: Draw the audit business process diagram and mark the functions and operations of each link. (2) Operation identification: Based on the flowchart, identify all key operations, such as login, data entry, review, etc., and mark the key operations. (3) Verification point determination: For each key operation, determine the corresponding verification point, such as data verification, permission check, etc., and mark the verification content, verification method, verification standard, etc. of the verification point.

[0045] In order to implement the specific operation of this step S1, the following file formats and editing software can be used to draw the flowchart of the audit business process and mark the key operations and verification points. (1) The file formats that can be used include: XML format (for Visio), VPML (Visual Paradigm XML) or BPMN (Business Process Model and Notation); (2) The editing software that can be used includes: Microsoft Visio: can draw flowcharts and save them in XML format; Visual Paradigm: supports exporting to VPML format and can also import BPMN format; Lucidchart: supports BPMN format and can create and edit flowcharts online. In order to facilitate the subsequent training and fine-tuning of the large model, in this step, the annotation information in the flowchart is accessible. Usually, this information can be saved in the flowchart element properties in text form; and the flowchart and related annotations need to be exported to a machine-readable format, such as XML or JSON; if the BPMN format is used, most BPMN editors can export to XML, which is more convenient for reading and processing large models. It is also necessary to ensure that the exported file contains sufficient information, such as operation steps, verification points, conditions, etc., so that the large model can better understand the audit business process and perform training and fine-tuning.

[0046] The big model training step S2 uses the annotated audit business data in the sample set to train the big model so that it can understand and generate test case scripts that conform to the audit business logic.

[0047] Through the above step S1, firstly, the audit business data covering various audit scenarios are collected and organized. These data include various key operations and verification points in the audit business process; by marking these data, the name, function, operation type and related verification rules of each key operation are clearly defined.

[0048] Furthermore, during the big model training process in step S2, the big model can identify and understand the basic operating logic and verification rules of the audit business process by learning these labeled audit business data, so that in the subsequent test case script generation stage, it can generate scripts that both conform to the audit business process and can effectively test system functions.

[0049] In step S3, the large model test case script generation step automatically generates a series of test case scripts that simulate users performing operations according to the audit business process through the trained large model and based on the audit business data previously analyzed and understood.

[0050] The process of generating test case scripts from a large model can be expressed as:

[0051]

[0052] in Represents the generated test case script; The script generation function representing the large model, It represents the operation logic and verification rules of the audit business process that the large model has learned through training. Represents user data that populates the test case script.

[0053] The test case script is used to reproduce the user's operating behavior in various functional interfaces of the audit business system according to the audit business process, including but not limited to the following operations: (1) Web page interaction: The script will contain instructions to start the browser and navigate to a specific URL to provide an interactive environment for subsequent operations; (2) Filling in form fields: The script will simulate user input behavior and fill in data for each field in the form according to predetermined data input rules; (3) Button click: After completing the necessary data input, the script will simulate the user clicking the submit button to trigger the next business process.

[0054] The test case script integration operation step S4 integrates the generated test case script with the Playwright framework based on the API of the Playwright framework, and executes the test case script through the Playwright framework.

[0055] Playwright is a commonly used automated testing framework in this field. It supports multiple browsers and can simulate users' real operations in the most efficient way.

[0056] The following are the detailed steps for integrating and executing test case scripts: (1) Initialize the Playwright environment: First, initialize a test environment through the API of the Playwright framework, which includes starting a browser instance and creating a new browser context; (2) Load the test case script: Then, load the test case script generated by the large model into the test context of Playwright; the script contains a series of operation instructions to be executed; (3) Simulate user operations: Simulate user operations such as clicks, input, navigation, etc. through the API of the Playwright framework. The following are examples of API calls that may be used during the execution process; (4) While executing the test case script, monitor the log output and abnormal conditions in real time to ensure the stability and reliability of the test; (5) Collect test results: After the test is executed, collect the test results, including success or failure, execution time, error information, etc.

[0057] Preferably, the automatic system testing method for audit business processes also includes a script dynamic optimization step S5: collecting the operation status of the audit business system, and dynamically adjusting the test case script according to the feedback, and continuing the testing and dynamic optimization until the expected test coverage is achieved.

[0058] The focus of this step is to collect feedback information from the audit business system in real time during the testing process, and based on this, based on the big model's extremely fast, flexible and low-cost generation capabilities for test case scripts, make precise dynamic adjustments to the test case scripts to ensure the effectiveness and comprehensiveness of the testing activities.

[0059] Specifically, during the execution of the test case script, the behavior of the audit business system is closely monitored, and feedback information including key performance indicators and system responses is recorded, including but not limited to the following: (1) Response time: record the average response time of the system to each operation to evaluate the efficiency of the system; (2) Error log: capture any error information generated by the system during the execution of the operation for subsequent problem analysis and resolution; (3) Abnormal behavior: monitor whether the system has any abnormal behavior, such as unexpected interface jumps or data inconsistencies.

[0060] After collecting the feedback information, the big model is used to analyze and adjust the test case script according to the feedback information: (1) Analyze feedback: conduct in-depth analysis of the collected data to identify possible performance bottlenecks or functional defects; (2) Adjust script: Based on the analysis results, the big model modifies the test case script, such as adding tests for boundary conditions or adjusting the order of operation steps; (3) Continuous testing: Use the adjusted script to re-execute the test to verify whether the problem has been resolved.

[0061] For example, after executing a series of test case scripts, it was found that the response time of a certain operation of the audit system was too long. By analyzing the performance data, it was determined that the reason for the long response time might be the inefficient database query. The test case script was adjusted to add relevant test content for database optimization. Subsequently, the test was re-executed to verify whether the adjusted script could improve the system's response time.

[0062] Thus, an iterative process from collecting feedback to achieving satisfactory test coverage is formed. This process may be repeated many times until our test case scripts can cover all key business scenarios and the performance and functionality of the audit system meet the expected quality standards. Through such continuous testing and optimization, we ensure that the audit system can run stably in the real environment and meet the business needs of users.

[0063] The following is a detailed description of how the big model dynamically adjusts the test case script based on the feedback information from the audit business system. In order to achieve the above process, the big model constructs a feedback information feature parser. and test case converter . The feedback information feature analyzer Using the VIT (Vision Transformer) model, input Represents a feedback information vector sample in each sample pair, and the above response time, error information type, and abnormal behavior type can be used as vector elements of the feedback information vector sample; The parameter vector is composed of all parameters of the feedback information feature parser, and the feedback information feature parser outputs the structural features of the feedback information. Test case converter It is the Text Transformers model, input represents the test case sample in each sample pair, is the parameter vector composed of all parameters in the test case converter, which outputs the test case structural features. The large model also includes the linear projection matrix of the feedback information structural features and the test case structural features. The matrix parameters are expressed as and The sample set of paired samples consisting of feedback information vector samples and test case samples is expressed as , is the total capacity of the sample set.

[0064] During the pre-training process, the parameters of the feedback information feature parser and the test case converter are initialized as , and initialize the matrix parameters In each training epoch, Randomly divide into A small batch of samples: , ,here ; for The small batch sample pairs of the batch will be Input the feedback information feature parser and test case converter respectively to obtain the feedback information structure features and test case structure features of the small batch samples, which are expressed as , In each mini-batch, the same paired sample Feedback information structure characteristics and test case structure characteristics Constitute positive sample pairs, from different paired samples Feedback information structure characteristics and test case structure characteristics are combined together to form a negative sample pair, where The linear projection matrix is ​​used to linearly project the two sets of features to obtain two sets of features of the same dimension, and then normalized to:

[0065] ;

[0066] ;

[0067] here , ; and is the matrix parameter of the linear projection for this batch of samples; function Represents the matrix The value of each row is divided by the square root of the sum of the squares of all elements in that row. Using the characteristics of linear projection and , construct the training loss function as follows: First, calculate the feature and The cosine similarity matrix of :

[0068] ;

[0069] here, is a The matrix of are predefined hyperparameters; then the symmetric loss function based on contrastive loss is calculated:

[0070]

[0071] in yes No. elements; then, calculate the loss function All parameters relative to the feedback information feature parser and test case converter and the linear projection matrix The gradient is:

[0072] ;

[0073] here, Is All parameters in compose the parameter vector, Indicates that for The values ​​of the above parameters for each batch of samples; the training model parameters are continuously updated during the training of each batch:

[0074] ;

[0075] here, is the learning rate; after training, the optimal parameter vector is output , thus obtaining the feedback information feature parser and test case converter and linear projection matrix after training optimization , , , .

[0076] For the large model after pre-training optimization, the feedback information obtained from monitoring is input into the trained feedback information feature parser , and the linear projection matrix optimized by training , mapped to the feature vector of feedback information, expressed as For a batch of test cases automatically generated by this large model, it is represented as , through the trained test case converter and the linear projection matrix , mapped to a set of feature vectors of test case structural features . Then, we obtain the structural feature vector of the feedback information and the feature vector group of the test case structure characteristics The inner product between ; Eigenvector With this feature vector group The test case in which the inner product of the feature vector corresponding to the test case is the largest is considered to be adapted to the feedback information; for example The inner product is the largest, then the feedback information is considered to be The corresponding test cases are adapted, and then the adapted test cases are combined into the test case script.

[0077] Figure 2 The block diagram of the automatic testing system for auditing business processes of the present invention is shown. The system specifically includes:

[0078] The audit business process data indexing unit determines and marks the key operations and verification points of the audit business system by collecting and analyzing the audit business processes in the sample set.

[0079] The audit test big model unit includes a big model trained using labeled audit business data in a sample set, which can understand and generate test case scripts that conform to the audit business logic; and through the trained big model, based on the previously analyzed and understood audit business data, it automatically generates a series of test case scripts that simulate users performing operations according to the audit business process.

[0080] Therefore, the present invention can understand various specific audit business processes and rules by training the big model, so that the big model can automatically generate dynamic and flexible test case scripts, and simulate the user's audit business process for testing under the Playwright framework; based on the characteristics of the big model, it can support highly dynamic, multi-round interactive audit business system testing, adapt to complex and changing audit business processes, and can analyze and evaluate the test results in real time, improve test coverage, improve test quality and test efficiency, reduce labor costs, and continuously optimize the test case script generation capability of the big model during the iteration process.

[0081] Those skilled in the art will appreciate that the description of each embodiment has its own emphasis, and for parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0082] Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations all fall within the scope defined by the attached claims. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed by the present invention, and these modifications or substitutions should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

[0083] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A system automatic testing method for audit business processes, characterized in that: include: Audit business process data indexing step: by collecting and analyzing the audit business processes in the sample set, determine and mark the key operations and verification points of the audit business system; The big model training step uses the annotated audit business data in the sample set to train the big model so that it can understand and generate test case scripts that conform to the audit business logic; The big model test case script generation step, through the trained big model, based on the previously analyzed and understood audit business data, automatically generates a series of test case scripts that simulate users performing operations according to the audit business process. During the execution of the test case script, the operation status of the audit business system is collected, and feedback information including key performance indicators and system responses is recorded, including: response time, recording the average response time of the system to each operation to evaluate the efficiency of the system; error log, capturing any error information generated by the system during the execution of the operation, for subsequent problem analysis and resolution; abnormal behavior, monitoring whether the system has any abnormal behavior; The test case script integration running step integrates the generated test case script with the Playwright framework based on the API of the Playwright framework, and executes the test case script through the Playwright framework; It also includes the script dynamic optimization step, collects the operation status of the audit business system, and dynamically adjusts the test case script according to the feedback, including: using the big model to perform the following analysis and adjustments to the test case script according to the feedback information: in-depth analysis of the collected data to identify performance bottlenecks or functional defects; based on the analysis results, the big model modifies the test case script; re-executes the test using the adjusted script to verify whether the problem has been resolved, and continues testing and dynamic optimization until the expected test coverage is achieved; The process of dynamically adjusting the test case script based on the feedback information of the audit business system includes: constructing a feedback information feature parser and test case converter ; Among them, the feedback information feature analyzer Using the VIT model, input Represents a feedback information vector sample in each sample pair, wherein the above response time, error information type, and abnormal behavior type are used as vector elements of the feedback information vector sample; A parameter vector consisting of all parameters of the feedback information feature parser, which outputs the structural features of the feedback information; a test case converter It is the Text Transformers model, input represents the test case sample in each sample pair, is the parameter vector composed of all parameters in the test case converter, which outputs the test case structural features; the large model also includes the linear projection matrix of the feedback information structural features and the test case structural features, and the matrix parameters are expressed as and ; The sample set of paired samples consisting of feedback information vector samples and test case samples is expressed as , is the total capacity of the sample set.

2. The method according to claim 1, characterized in that The audit business process data indexing step specifically includes: Draw sub-steps in the flowchart, draw the audit business process diagram, and mark the functions and operations of each link; Operation identification sub-step: Based on the flowchart, identify all key operations and mark the key operations; Verification point determination sub-step: for each key operation, determine the corresponding verification point and mark the verification content, verification method, and verification standard of the verification point.

3. The method according to claim 2, characterized in that In the large model test case script generation step, the test case script is used to reproduce the user's operating behavior in various functional interfaces of the audit business system according to the audit business process, including: web page interaction, which will contain instructions to start the browser and navigate to the corresponding URL to provide an interactive environment for subsequent operations; filling in form fields, simulating user input behavior, and filling data for each field in the form according to predetermined data input rules; button click, after completing the form field input, the script will simulate the user clicking the submit button to trigger the next business process.

4. The method according to claim 3, characterized in that The specific steps of integrating the generated test case script with the Playwright framework include: initializing the Playwright environment, initializing a test environment through the API of the Playwright framework, which includes starting a browser instance and creating a new browser context; loading the test case script generated by the large model into the test context of Playwright, where the script contains a series of operation instructions to be executed; simulating user operations, through the API of the Playwright framework; while executing the test case script, monitoring log output and abnormal conditions in real time to ensure the stability and reliability of the test; and collecting test results after the test is completed.

5. The method according to claim 4, characterized in that During the pre-training process, the parameters of the feedback information feature parser and the test case converter are initialized as , and initialize the matrix parameters ; In each training round (epoch), Randomly divide into A small batch of samples: , ,here ; for The small batch sample pairs of the batch will be Input the feedback information feature parser and test case converter respectively to obtain the feedback information structure features and test case structure features of the small batch samples, which are expressed as , ; In each mini-batch, the same paired sample Feedback information structure characteristics and test case structure characteristics Constitute positive sample pairs, from different paired samples Feedback information structure characteristics and test case structure characteristics are combined together to form a negative sample pair, where ; Using the linear projection matrix, linearly project the two sets of features to obtain two sets of features of the same dimension, and normalize them to: ; ; here , ; and is the matrix parameter of the linear projection for this batch of samples; function Represents the matrix The value of each row is divided by the square root of the sum of the squares of all elements in that row; using the characteristics of linear projection and , construct the training loss function as follows: First, calculate the feature and The cosine similarity matrix of : ; here, is a The matrix of are predefined hyperparameters; then the symmetric loss function based on contrastive loss is calculated: in yes No. elements; then, calculate the loss function All parameters relative to the feedback information feature parser and test case converter and the linear projection matrix The gradient is: ; here, Is All parameters in compose the parameter vector, Indicates that for The values ​​of the above parameters for each batch of samples; the training model parameters are continuously updated during the training of each batch: ; here, is the learning rate; After training is completed, the optimal parameter vector is output , thus obtaining the feedback information feature parser and test case converter and linear projection matrix after training optimization , , , .

6. An automatic testing system for audit business processes, characterized in that: include: The audit business process data indexing unit collects and analyzes the audit business processes in the sample set to identify and mark the key operations and verification points of the audit business system; The audit test big model unit includes a big model trained with the audit business data labeled in the sample set, which can understand and generate test case scripts that conform to the audit business logic; and through the trained big model, based on the previously analyzed and understood audit business data, automatically generates a series of test case scripts that simulate users performing operations according to the audit business process. During the execution of the test case script, the operation status of the audit business system is collected, and feedback information including key performance indicators and system responses is recorded, including: response time, recording the average response time of the system to each operation to evaluate the efficiency of the system; error log, capturing any error information generated by the system during the execution of the operation, for subsequent problem analysis and resolution; abnormal behavior, monitoring whether the system has any abnormal behavior; The test case script integration running unit integrates the generated test case script with the Playwright framework based on the API of the Playwright framework, and executes the test case script through the Playwright framework; It also includes a script dynamic optimization unit, which collects the operation status of the audit business system and dynamically adjusts the test case script according to the feedback, including: using the big model to perform the following analysis and adjustments to the test case script according to the feedback information: conducting in-depth analysis of the collected data to identify performance bottlenecks or functional defects; based on the analysis results, the big model modifies the test case script; using the adjusted script to re-execute the test to verify whether the problem has been resolved, and continuing testing and dynamic optimization until the expected test coverage is achieved; The process of dynamically adjusting the test case script based on the feedback information of the audit business system includes: constructing a feedback information feature parser and test case converter ; Among them, the feedback information feature analyzer Using the VIT model, input Represents a feedback information vector sample in each sample pair, wherein the above response time, error information type, and abnormal behavior type are used as vector elements of the feedback information vector sample; A parameter vector consisting of all parameters of the feedback information feature parser, which outputs the structural features of the feedback information; a test case converter It is the Text Transformers model, input represents the test case sample in each sample pair, is the parameter vector composed of all parameters in the test case converter, which outputs the test case structural features; the large model also includes the linear projection matrix of the feedback information structural features and the test case structural features, and the matrix parameters are expressed as and ; The sample set of paired samples consisting of feedback information vector samples and test case samples is expressed as , is the total capacity of the sample set.

Citation Information

Patent Citations

  • Behavior audit automatic test method based on S7 industrial protocol

    CN111444108A

  • Automatic test case generation device based on large language model

    CN117806980A