Hash value script generation method and device, equipment and medium
By combining a large language model and a template engine, verification scripts are automatically generated, solving the problem of low verification testing efficiency, improving verification efficiency and data quality, and adapting to complex verification scenarios and business needs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
- Filing Date
- 2024-12-30
- Publication Date
- 2026-06-30
Smart Images

Figure CN122309340A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of testing technology, and more specifically, the embodiments of the present invention relate to a method, apparatus, device and medium for generating verification scripts. Background Technology
[0002] This section is intended to provide background or context for embodiments of the invention as set forth in the claims. The description herein is not an admission that it is prior art simply because it is included in this section.
[0003] Verification testing, as a validation test conducted on a data processing system, aims to ensure the accuracy, consistency, and completeness of calculation results when processing and analyzing data. Through verification testing, the accuracy and consistency of data in different processing stages can be verified, helping to identify potential data processing errors, avoid data loss and duplication, improve data quality and system stability, effectively support business decisions, and reduce business processing risks.
[0004] In related technologies, due to the diversity of data sources and the complexity of verification scenarios, it is usually necessary to develop corresponding scripts or code for verification when conducting verification tests, which results in low verification efficiency. Summary of the Invention
[0005] In this context, embodiments of the present invention aim to provide a method, apparatus, device, and medium for generating verification scripts, so as to achieve automated generation of verification scripts and thereby improve verification efficiency.
[0006] In a first aspect of the present invention, a method for generating a verification script is provided, the method comprising:
[0007] Based on predefined data source information, data type information, and verification range information, a first template description information is generated using a template engine. The verification range information is used to indicate basic verification requirements, and the first template description information is used to indicate the rules for verification according to the basic verification requirements.
[0008] Based on predefined business requirement information, a second template description information is generated using a template engine. The business requirement information is used to indicate the mapping relationship between business scenarios and specific verification requirements, and the second template description information is used to indicate the rules for implementing specific verification requirements.
[0009] Based on the first template information and the second template information, a verification script for verifying numbers is generated using a template engine.
[0010] In one embodiment of the present invention, the step of generating first template description information using a template engine based on predefined data source information, data type information, and verification range information includes:
[0011] Based on predefined data source information and data type information, a first configuration file is generated using a large language model. Different first configuration files are suitable for different combinations of data source information and data type information.
[0012] Based on the first configuration file and the predefined verification range information, the first template description information is generated using a template engine.
[0013] In one embodiment of the present invention, the step of generating a first configuration file based on predefined data source information and data type information using a large language model includes:
[0014] Based on predefined data source information and data type information, generate a first test case for each data field in the data source;
[0015] Based on the first test cases generated for the data source, the first configuration file is generated using a large language model.
[0016] In one embodiment of the present invention, after generating the first template description information using a template engine based on predefined data source information, data type information, and verification range information, the method further includes:
[0017] First simulated test data is generated using a large language model, and then the first template description information is simulated and tested based on the first simulated test data.
[0018] In one embodiment of the present invention, the step of generating second template description information based on predefined business requirement information using a template engine includes:
[0019] Based on predefined business requirement information, a second configuration file is generated using a large language model. Different second configuration files are suitable for different business requirement information.
[0020] Based on the second configuration file, the template description information is generated using a template engine.
[0021] In one embodiment of the present invention, after generating second template description information based on predefined business requirement information using a template engine, the method further includes:
[0022] A second set of simulated test data is generated using a large language model, and the second template description information is simulated and tested based on the second set of simulated test data.
[0023] In one embodiment of the present invention, after generating a verification script for number verification using a template engine based on the first template information and the second template information, the method further includes:
[0024] Run the verification script to generate a verification report, which records the results of successful verification and the results of different verifications.
[0025] In a second aspect of the present invention, an apparatus for generating a verification script is provided, the apparatus comprising:
[0026] The first generation module is used to generate first template description information based on predefined data source information, data type information and verification range information using a template engine. The verification range information is used to indicate basic verification requirements, and the first template description information is used to indicate the rules for verification according to the basic verification requirements.
[0027] The second generation module is used to generate second template description information based on predefined business requirement information using a template engine. The business requirement information is used to indicate the mapping relationship between business scenarios and specific verification requirements, and the second template description information is used to indicate the rules for implementing specific verification requirements.
[0028] The third generation module is used to generate a verification script for verification based on the first template information and the second template information using a template engine.
[0029] In a third aspect of the present invention, a computing device is provided, the computing device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform operations as described in the first aspect and any embodiment of the first aspect for generating a verification script.
[0030] In a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a program is stored, the program being executed by a processor to perform the operations performed by the method for generating a verification script as described in the first aspect and any embodiment of the first aspect.
[0031] According to the method for generating verification scripts according to embodiments of the present invention, a first template description information for indicating rules for verifying data according to basic verification requirements can be generated using a template engine based on predefined data source information, data type information, and verification range information. In addition, a second template description information for indicating rules for implementing specific verification requirements can be generated using a template engine based on predefined business requirement information. Thus, verification scripts for verification can be generated using a template engine based on the first and second template information, thereby achieving automated generation of verification scripts, reducing the verification threshold, and improving verification efficiency. Attached Figure Description
[0032] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein:
[0033] Figure 1 The illustration shows a scenario diagram of a method for generating a verification script according to an embodiment of the present invention;
[0034] Figure 2 A schematic flowchart illustrating a method for generating a verification script according to an embodiment of the present invention is shown.
[0035] Figure 3 A schematic flowchart illustrating a verification process according to an embodiment of the present invention is shown.
[0036] Figure 4 A detailed flowchart illustrating a verification process according to an embodiment of the present invention is shown schematically.
[0037] Figure 5 A block diagram of an apparatus for generating a verification script according to an embodiment of the present invention is shown schematically.
[0038] Figure 6 A schematic diagram of a computer-readable storage medium according to an embodiment of the present invention is shown.
[0039] Figure 7 A schematic diagram of a computing device according to an embodiment of the present invention is shown.
[0040] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
[0041] Furthermore, the number of any elements in the accompanying drawings is for illustrative purposes only and not for limitation, and any naming is for distinction only and has no limiting meaning. Detailed Implementation
[0042] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.
[0043] Those skilled in the art will recognize that embodiments of the present invention can be implemented as a system, apparatus, device, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0044] According to embodiments of the present invention, a method, apparatus, device, and medium for generating verification scripts are proposed.
[0045] In this article, it is important to understand the following terms and their meanings:
[0046] Chat Generative Pretrained Transformer (ChatGPT): ChatGPT is a chatbot model implemented using deep learning technology, primarily employing the Transformer model from neural network models. Through training on a large amount of text data, it becomes capable of understanding and analyzing the grammatical, syntactic, and semantic features of human language, and then generating new, coherent text based on the input text.
[0047] Jinja2: Jinja2 is a powerful, modern template engine for Python that allows developers to separate application business logic from the presentation layer. It uses a specific template syntax, embedding variables, expressions, and control structures within templates. Data is then passed to the template via Python code, ultimately rendering and generating complete text for creating script templates. Through template inheritance and variable substitution, it easily generates different types of verification scripts. It allows defining logic within templates, such as conditional statements and loops, to accommodate complex verification rules.
[0048] Big Data: Big data refers to data sets that cannot be captured, managed, and processed within a certain timeframe using conventional software tools. New processing models are needed to enable stronger decision-making, insightful discovery, and process optimization capabilities to adapt to massive, rapidly growing, and diverse information assets.
[0049] Data verification: Data verification mainly includes data accuracy verification, which checks the correctness of data during data processing by recalculating and comparing with original vouchers to ensure that each data value is accurate; data integrity verification, which checks whether the data is complete and without missing parts by querying and statistical methods to ensure data integrity; and data consistency verification, which confirms the consistency of data across multiple related data sources or systems.
[0050] The principles and spirit of the present invention will be explained in detail below with reference to several representative embodiments. Invention Overview
[0052] The inventors have discovered that, due to the diversity of data sources and the complexity of verification scenarios, data verification testing (especially big data verification testing) usually requires the development of customized scripts or code.
[0053] Compared to standard functional testing, validation testing demands higher standards and requires specialized skills from testers. Customized solutions are needed for different data sources and business scenarios, with no readily available general solutions or technical frameworks. This makes the efficiency and effectiveness of validation highly dependent on the skill level of the testers, resulting in high labor costs. Furthermore, the frequent business changes inherent in the agile iterations of the internet industry lead to even higher regression costs. With the development of the big data era, massive data scenarios are commonplace. How to efficiently and quickly complete validation testing, ensure data accuracy and security, and provide basic data assurance for the business remains a significant challenge.
[0054] After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention will be described in detail below.
[0055] Application Scenarios Overview
[0056] First refer to Figure 1 , Figure 1 The diagram illustrates a scenario illustrating a method for generating a verification script according to an embodiment of the present invention. The method for generating a verification script provided by the present invention can be applied to, for example... Figure 1 In the application scenario shown, server 101 and server 102 can be a single server, multiple servers, a server cluster, a cloud computing platform, etc., but are not limited to these. Server 101 can serve as the server-side of the business system to support its operation, while server 102 can provide the ability to automatically generate verification scripts to verify data within the business system.
[0057] In some embodiments, server 101 can collect data generated during the operation of the business system and send the collected business data to server 102. Server 102 can generate a verification script for verifying the data collected by server 101, and perform verification processing based on the generated script. Alternatively, server 102 can generate a verification script for the business system served by server 101 and send the verification script to server 101, so that server 101 can perform verification processing after collecting the data using the verification script provided by server 102.
[0058] It should be noted that the above is only an exemplary application scenario and does not constitute a limitation of the present invention. In more possible implementations, the server 101 may also have the ability to automatically generate verification scripts so that it can complete the collection and verification of data on its own.
[0059] Exemplary methods
[0060] The following is combined Figure 1 Application scenarios, refer to Figure 2 This section describes a method for generating a verification script according to an exemplary embodiment of the present invention. It should be noted that the above application scenarios are shown only to facilitate understanding of the spirit and principles of the invention, and the embodiments of the invention are not limited in any way. Rather, the embodiments of the invention can be applied to any applicable scenario.
[0061] See Figure 2 , Figure 2 The diagram illustrates a flowchart of a method for generating a verification script according to an embodiment of the present invention, as shown below. Figure 2 As shown, the method includes:
[0062] Step S201: Based on predefined data source information, data type information, and verification range information, generate first template description information using a template engine.
[0063] Optionally, data source information can be used to indicate the type of data source, such as a table (Excel), text (txt), a relational database management system (such as MySQL), a document database (such as MongoDB), etc., but is not limited to these.
[0064] It's important to note that different types of data sources generally have different data organization methods and storage structures. For example, when validating data from different types of data sources, different processing rules are often used. Taking Excel and MongoDB as examples, Excel typically stores data in a table-row-column format, while MongoDB typically stores data in a key-value format. Therefore, the processing rules used when validating data from Excel and MongoDB are often different.
[0065] Optionally, data type information may include structured data, unstructured data, graph data, etc., but is not limited to these.
[0066] It's important to note that there's often a mapping relationship between data types and data source types. A data source can include one or more data types, and different types of data sources can contain the same or different data types. Therefore, the mapping relationship between data types and data source types can be one-to-one, one-to-many, or many-to-many. Furthermore, it's worth noting that different types of data often require different processing rules.
[0067] Optionally, the verification range information is used to indicate basic verification requirements, which may include, but are not limited to, data accuracy verification, data consistency verification, and data integrity verification.
[0068] Optionally, the first template description information can be used to indicate the rules for verifying data according to the basic verification requirements.
[0069] Step S202: Based on predefined business requirement information, generate second template description information using a template engine.
[0070] It should be noted that the basic verification requirements mentioned in step S201 can be applied to different business scenarios. That is, the basic verification requirements are common to different business scenarios. For each business scenario, verification processing needs to be carried out according to the basic verification requirements. However, based on the basic verification requirements, some business scenarios may also have some specific verification requirements for their own business processes or processing needs. Optionally, the business requirement information can be used to indicate the mapping relationship between the business scenario and the specific verification requirements.
[0071] Optionally, specific verification requirements may include multi-field related queries. For example, data in related fields may have strong business relationships, requiring verification of related field data to identify problems. Alternatively, specific verification requirements may include join queries. For example, data in different tables may be dependent on each other, requiring verification of data in related tables to identify problems. Or, specific verification requirements may include some special calculation rules. For example, in some business systems, special calculations may be required to generate business results. For instance, interface layer data often depends on underlying calculations to be generated. This invention does not limit the specific content of specific verification requirements.
[0072] Optionally, the specific verification requirements for different business scenarios may be the same or different, and this invention does not limit this.
[0073] Optionally, the second template description information is used to indicate the rules for implementing specific verification requirements.
[0074] Step S203: Based on the first template information and the second template information, a verification script for verification is generated using a template engine.
[0075] Optionally, the template generation capability (or script generation capability) of the template engine can be utilized to generate a verification script based on the first template information and the second template information, so as to achieve automated generation of the verification script.
[0076] In some embodiments, when generating the first template description information using a template engine based on predefined data source information, data type information, and verification range information in step S201, the following steps can be taken:
[0077] Step S2011: Based on predefined data source information and data type information, generate the first configuration file using a large language model.
[0078] In one possible implementation, a first test case can be generated for each data field in the data source based on predefined data source information and data type information. Then, based on the first test case generated for the data source, a first configuration file can be generated using a large language model.
[0079] It should be noted that a test case is a description of the steps and expected results for verifying a specific function or requirement. It may include how to perform the test, expected behavior, input conditions, operation steps, and expected results.
[0080] Optionally, test cases can be generated in batches for each field in the data source based on predefined data source information and data type information.
[0081] Optionally, the large language model can be ChatGPT, but it is not limited to this. Taking ChatGPT as an example, ChatGPT's Artificial Intelligence (AI) capabilities can be used to map combinations of data sources and data types. This allows ChatGPT's AI capabilities to associate data sources with their corresponding data types, enabling the generation of appropriate configurations based on different data structures.
[0082] It should be noted that the first configuration file can be a file format used to describe how to process or manipulate data. Optionally, the first configuration file may contain information such as strategies for processing input data, field names, data types, conversion rules, validation rules, and formatting methods, but is not limited to these. The first configuration file can be used to guide the generated code or the tasks to be performed.
[0083] For example, the text generation, natural language understanding, and data transformation functions of a large language model can be used to generate a first configuration file, which can describe how to map data from a certain data source to a specific format, or how to map natural language instructions to specific code operations, and so on.
[0084] Optionally, the first configuration file can be represented using formats such as JavaScript Object Notation (JSON), another markup language (YAML Ain't Markup Language, YAML), or extensible markup language (XML), but is not limited to these.
[0085] Alternatively, different first profiles can be applied to different combinations of data source information and data type information.
[0086] Step S2012: Based on the first configuration file and predefined verification range information, generate the first template description information using the template engine.
[0087] In one possible implementation, a first template description can be generated based on a first configuration file, utilizing the template generation capabilities of a template engine to satisfy the verification range information.
[0088] Optionally, the script generation capability of the template engine can be utilized to render the first configuration file based on predefined verification range information to generate the first template description information.
[0089] Optionally, the template engine can be Jinjia2, but it is not limited to this.
[0090] Optionally, the first template description information can be used to describe the basic processing rules for verifying the combination of corresponding data sources and data types to meet basic verification requirements.
[0091] In some embodiments, after generating the first template description information using a template engine based on predefined data source information, data type information, and verification range information, the first simulated test data can also be generated using a large language model to simulate the test of the first template description information based on the first simulated test data.
[0092] Through the above embodiments, the first simulated test data generated by the Big Prophet model can be used as benchmark test data to simulate the accuracy of the basic processing rules described by the first template description information, so as to ensure the robustness and stability of the subsequently generated scripts.
[0093] In some embodiments, step S202, when generating the second template description information based on predefined business requirement information using a template engine, can be achieved through the following steps:
[0094] Step S2021: Based on predefined business requirement information, generate a second configuration file using a large language model.
[0095] Optionally, different business scenarios can correspond to different business requirement information, so that different combinations of data sources and data types can correspond to different business requirement information. The business requirement information corresponding to each combination of data sources and data types can be predefined, so that the business requirement information corresponding to the current combination of data sources and data types can be obtained, and then a second configuration file can be generated based on the predefined business requirement information using a large language model.
[0096] Optionally, the large language model can be ChatGPT, but it is not limited to this. Taking ChatGPT as an example, ChatGPT's AI capabilities can be used to map the combination of data sources and data types, as well as the correspondence between business requirement information. This allows ChatGPT's AI capabilities to associate the combination of data sources and data types with their corresponding business requirement information, so that appropriate configurations can be generated based on different business requirement information.
[0097] It should be noted that the second configuration file can be a file format used to describe how to process or manipulate data according to business requirements. Optionally, the second configuration file may contain information such as strategies for processing input data, transformation rules, validation rules, and formatting methods, but is not limited to these. The second configuration file can be used to guide the generated code or the tasks executed.
[0098] For example, the text generation, natural language understanding, and data transformation functions of a large language model can be used to generate a second configuration file. This second configuration file can describe how to process the corresponding type of data in the data source according to business requirements, and how to map the processing rules to the corresponding code, etc.
[0099] Optionally, the second configuration file can be represented using formats such as JSON, YAML, or XML, but is not limited to these. Generally, the first and second configuration files will be represented using the same format, but are not limited to this; the first and second configuration files can also be represented using different formats.
[0100] Alternatively, different second configuration files can be used to meet different business requirements.
[0101] Step S2022: Based on the second configuration file, generate second template description information using a template engine.
[0102] In one possible implementation, a second template description can be generated based on a second configuration file, utilizing the template generation capabilities of a template engine to meet business requirements.
[0103] Optionally, the script generation capability of the template engine can be used to render a second configuration file to generate second template description information.
[0104] Optionally, the template engine can be Jinjia2, but it is not limited to this.
[0105] Optionally, the second template description information can be used to describe the basic processing rules for verifying data according to business requirements, based on the combination of corresponding data sources and data types, to meet specific verification needs.
[0106] In some embodiments, after generating second template description information using a template engine based on predefined business requirement information, second simulation test data can also be generated using a large language model to simulate and test the second template description information based on the second simulation test data.
[0107] Through the above embodiments, the second simulated test data generated by the Big Prophet model can be used as benchmark test data to mock test the accuracy of the special processing rules described by the second template description information, so as to ensure the robustness and stability of the subsequently generated scripts.
[0108] In some embodiments, for step S203, when generating a verification script for verification using a template engine based on the first template information and the second template information, the script generation capability of the template engine can be utilized to generate an automated verification script based on the basic processing rules described in the first template information and the special processing rules described in the second template information, which can then be used as the verification script for verification.
[0109] In some embodiments, the robustness and stability of the script can be tested by mock testing after generating the first template description information and the second template description information, as described in the above embodiments. Alternatively, the two mock tests can be omitted, and the verification script can be mock tested after it is generated to test its stability and ensure that the script is stable and reliable during actual verification.
[0110] In some embodiments, after generating a verification script for verification using a template engine based on the first template information and the second template information, the verification script can be run to generate a verification report. The verification report is used to record the results of successful verification and the results of different verifications.
[0111] In some embodiments, when running the verification script, the automated script can be executed iteratively and linked with the source data to perform verification tests in order to achieve verification testing.
[0112] Optionally, the verification script may include a part for fulfilling basic verification requirements and a part for fulfilling specific verification requirements. When running the verification script, the part for fulfilling basic verification requirements may be run first to ensure that the basic verification scenario passes, and then the part for fulfilling specific verification requirements may be run to achieve personalized scenario verification.
[0113] Optionally, the basic data verification requirements may include data accuracy verification, data integrity verification, and data consistency verification. Data accuracy verification can be used to verify the accuracy of the total amount of each benchmark field against the source data. Data integrity verification can be used to verify whether there are any missing fields in the required fields. Data consistency verification can, based on accuracy, verify whether the sampled fields are consistent with the source data. If it is determined that the total amount of each benchmark field is accurate with the source data, that there are no missing fields in the required fields, and that the sampled fields are consistent with the source data, then the basic data verification scenario can be determined to have passed. Thus, personalized scenario verification can be performed to achieve data verification based on business scenarios, verification of special calculation logic, and join table verification.
[0114] Optionally, when generating the verification report, both the scenarios of passing and failing the verification can be fully recorded to facilitate testers to follow up on the results and identify problems. However, this is not limited to this; it is also possible to record only the scenarios of failing the verification. This invention does not limit this.
[0115] In some embodiments, the test cases used in the aforementioned verification testing process can be collected and consolidated to form a daily regression set. This allows for the development of inspection and checkpoint capabilities based on Continuous Integration (CI) and scheduled capabilities. That is, validated test cases can be collected and organized into a daily regression set, enabling the use of CI tools and scheduled capabilities to ensure that test cases are executed automatically with each code commit or according to a predetermined plan. Furthermore, regular inspections can be conducted, and checkpoint capabilities can be set at key functional points to ensure the core functionality of the system remains stable.
[0116] See Figure 3 , Figure 3 A schematic flowchart illustrating a verification process according to an embodiment of the present invention is shown, such as... Figure 3 As shown, verification scripts can be generated based on predefined information (including data source information, data type information, verification range information, and business requirement information). The generated verification scripts can then be mock-tested to verify their robustness and stability through mock data. The verification test can be performed by running the scripts to generate verification reports. Furthermore, regression test cases can be accumulated based on the generated scripts to form daily regression sets. This allows for the development of inspection and checkpoint capabilities based on CI and scheduled capabilities.
[0117] See Figure 4 , Figure 4 A detailed flowchart illustrating a verification process according to an embodiment of the present invention is shown schematically, such as... Figure 4 As shown, it can map and bind data sources and data types based on predefined data sources (including Excel, txt, MySQL, MongoDB, etc.) and predefined data types (including structured data, unstructured data, graph data, etc.). Template rules can be defined for combinations of data sources and data types. Based on the combination of data sources and data types, as well as verification range information, a basic rule template is generated. Furthermore, personalized verification rules can be defined to generate special rule templates. Verification scripts are then generated based on the basic rule templates and special rule templates. By executing the verification scripts, a general verification process (including data accuracy verification, data consistency verification, and data integrity verification) and personalized verification (including combined conditions, multiple judgments, business associations, etc.) can be implemented to generate verification reports. Moreover, test case regression sets can also be formed.
[0118] This invention leverages the powerful AI capabilities of large language models (such as ChatGPT) and combines them with the lightweight script template creation capabilities of template engines (such as Jinjia2). It allows for the definition of rule-based templates for different data sources and data types, resulting in universal verification templates. Based on these universal templates, specific fields can be further defined for different business scenarios, ensuring both universality and personalization, making it flexible and convenient for various applications. Furthermore, based on predefined templates, it statistically analyzes the basic data volume, data integrity, and data standardization according to the verification process, accumulating basic regression capabilities. For complex, personalized scenarios, variables can be replaced based on inherited templates to generate different types of verification scripts to adapt to complex verification rules and acceptance scenarios.
[0119] The solution provided by this invention can improve the efficiency of data verification, accumulate regression sets for continuous data verification testing, and save 0.5 person-days of manpower for Quality Assurance (QA) regression testing in at least one iteration. Through automated data verification methods, potential problems can be discovered faster and more accurately, exposing risks in advance. Furthermore, combined with CI and scheduled operations, regression test cases can be integrated into daily inspection capabilities, enabling faster alerting, better overall data quality, and better ensuring the stable operation of online business.
[0120] Exemplary device
[0121] After introducing the method of exemplary embodiments of the present invention, the following references are made. Figure 5 An apparatus for generating verification scripts according to exemplary embodiments of the present invention will be described.
[0122] refer to Figure 5 , Figure 5 A block diagram schematically illustrates an apparatus for generating a verification script according to an embodiment of the present invention, such as... Figure 5 As shown, the device includes:
[0123] The first generation module 501 is used to generate first template description information based on predefined data source information, data type information and verification range information using a template engine. The verification range information is used to indicate basic verification requirements, and the first template description information is used to indicate the rules for verification according to the basic verification requirements.
[0124] The second generation module 502 is used to generate second template description information based on predefined business requirement information using a template engine. The business requirement information is used to indicate the mapping relationship between a business scenario and a specific verification requirement. The second template description information is used to indicate the rules for implementing the specific verification requirement.
[0125] The third generation module 503 is used to generate a verification script for verification based on the first template information and the second template information using a template engine.
[0126] In some embodiments, when the first generation module 501 generates first template description information using a template engine based on predefined data source information, data type information, and verification range information, it is used to:
[0127] Based on predefined data source information and data type information, a first configuration file is generated using a large language model. Different first configuration files are suitable for different combinations of data source information and data type information.
[0128] Based on the first configuration file and the predefined verification range information, the first template description information is generated using a template engine.
[0129] In some embodiments, the first generation module 501, when generating a first configuration file based on predefined data source information and data type information using a large language model, is used to:
[0130] Based on predefined data source information and data type information, generate a first test case for each data field in the data source;
[0131] Based on the first test cases generated for the data source, the first configuration file is generated using a large language model.
[0132] In some embodiments, the apparatus further includes:
[0133] The first testing module is used to generate first simulated test data using a large language model, and to perform simulated testing on the first template description information based on the first simulated test data.
[0134] In some embodiments, when the second generation module 502 generates second template description information based on predefined business requirement information using a template engine, it is used to:
[0135] Based on predefined business requirement information, a second configuration file is generated using a large language model. Different second configuration files are suitable for different business requirement information.
[0136] Based on the second configuration file, the template description information is generated using a template engine.
[0137] In some embodiments, the apparatus further includes:
[0138] The second testing module is used to generate second simulated test data using a large language model, so as to perform simulated testing on the second template description information based on the second simulated test data.
[0139] In some embodiments, the apparatus further includes:
[0140] The third testing module is used to run the verification script to generate a verification report, which records the results of successful verification and the results of different verifications.
[0141] It should be noted that although several modules of the verification script generation device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.
[0142] Exemplary media
[0143] After introducing the medium of exemplary embodiments of the present invention, the following references are made. Figure 6 A computer-readable storage medium for audio data retrieval, according to an exemplary embodiment of the present invention, is described.
[0144] refer to Figure 6 , Figure 6 A schematic diagram of a computer-readable storage medium according to an embodiment of the present invention is shown, such as... Figure 6 As shown, a computer program 600 is stored on a computer-readable storage medium. When the computer program 600 is executed by a processor, it can execute the method for generating verification scripts provided in any embodiment of the present invention.
[0145] Exemplary device
[0146] After introducing the methods, media, and apparatus of exemplary embodiments of the present invention, the following references are made. Figure 7 A computing device for generating verification scripts according to an exemplary embodiment of the present invention will be described.
[0147] refer to Figure 7 , Figure 7 A schematic diagram of a computing device according to an embodiment of the present invention is shown, such as... Figure 7 As shown, the computing device 700 may include, but is not limited to: a processor 710, a memory 720, and a bus 730 connecting different system components (including the memory 720 and the processor 710).
[0148] The memory 720 stores computer instructions that can be executed by the processor 710, enabling the processor 710 to execute the method for generating verification scripts provided in any embodiment of the present invention. The memory 720 may include a random access memory (RAM) 721, a cache memory 722, and / or a read-only memory (ROM) 723. The memory 720 may also include a program tool 727 having a set of program modules 724, including but not limited to: an operating system, one or more application programs, other program modules, and program data. One or more combinations of these program modules may include an implementation of a network environment.
[0149] Bus 730 may include, for example, a data bus, an address bus, and a control bus. The computing device 700 can also communicate with external devices 750 via input / output (I / O) interface 740, such as a keyboard or a Bluetooth device. The computing device 700 can also communicate with one or more networks via network adapter 760, such as a local area network (LAN), a wide area network (WAN), or a public network. Figure 7 As shown, the network adapter 760 can also communicate with other modules of the computing device 700 via the bus 730.
[0150] Exemplary Products
[0151] This invention also provides a computer program product, which includes a computer program. When the program is executed by the processor 710 of the computing device 700, it can implement the method for generating verification scripts provided in any embodiment of this invention.
[0152] Furthermore, although the operations of the method of the present invention are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0153] While the spirit and principles of the invention have been described with reference to several specific embodiments, it should be understood that the invention is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for ease of description. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims
1. A method of generating a proof script, characterized by, The method includes: Based on predefined data source information, data type information, and verification range information, a first template description information is generated using a template engine. The verification range information is used to indicate basic verification requirements, and the first template description information is used to indicate the rules for verification according to the basic verification requirements. Based on predefined business requirement information, a second template description information is generated using a template engine. The business requirement information is used to indicate the mapping relationship between business scenarios and specific verification requirements, and the second template description information is used to indicate the rules for implementing specific verification requirements. Based on the first template information and the second template information, a verification script for verifying numbers is generated using a template engine.
2. The method of claim 1, wherein, The first template description information, generated using a template engine based on predefined data source information, data type information, and verification range information, includes: Based on predefined data source information and data type information, a first configuration file is generated using a large language model. Different first configuration files are suitable for different combinations of data source information and data type information. Based on the first configuration file and the predefined verification range information, the first template description information is generated using a template engine.
3. The method of claim 2, wherein, The first configuration file, generated using a large language model based on predefined data source and data type information, includes: Based on predefined data source information and data type information, generate a first test case for each data field in the data source; Based on the first test cases generated for the data source, the first configuration file is generated using a large language model.
4. The method of claim 1, wherein, After generating the first template description information using a template engine based on predefined data source information, data type information, and verification range information, the method further includes: First simulated test data is generated using a large language model, and then the first template description information is simulated and tested based on the first simulated test data.
5. The method of claim 1, wherein, The second template description information, generated using a template engine based on predefined business requirement information, includes: Based on predefined business requirement information, a second configuration file is generated using a large language model. Different second configuration files are suitable for different business requirement information. Based on the second configuration file, the template description information is generated using a template engine.
6. The method of claim 1, wherein, After generating second template description information based on predefined business requirement information using a template engine, the method further includes: A second set of simulated test data is generated using a large language model, and the second template description information is simulated and tested based on the second set of simulated test data.
7. The method of claim 1, wherein, After generating a verification script for number verification using a template engine based on the first template information and the second template information, the method further includes: Run the verification script to generate a verification report, which records the results of successful verification and the results of different verifications.
8. A device for generating a verification script, characterized in that, The device includes: The first generation module is used to generate first template description information based on predefined data source information, data type information and verification range information using a template engine. The verification range information is used to indicate basic verification requirements, and the first template description information is used to indicate the rules for verification according to the basic verification requirements. The second generation module is used to generate second template description information based on predefined business requirement information using a template engine. The business requirement information is used to indicate the mapping relationship between business scenarios and specific verification requirements, and the second template description information is used to indicate the rules for implementing specific verification requirements. The third generation module is used to generate a verification script for verification based on the first template information and the second template information using a template engine.
9. A computing device, comprising: The computing device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the operations performed by the method for generating the verification script as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that is executed by a processor to perform the operations performed by the method for generating the verification script as described in any one of claims 1 to 7.