Financial certificate issuing test method and device, electronic equipment and storage medium
By constructing a test case table and modifying the business occurrence time and certificate issuance time to preset times, a business data insertion script is generated, which solves the problem of low efficiency in traditional financial certificate issuance testing. This enables rapid coverage of all business scenarios within the same time period and improves testing efficiency.
Patent Information
- Application Number
- CN202210860755.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-21
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-07-21
AI Technical Summary
Traditional financial certificate testing methods are inefficient and cannot quickly cover all business scenarios, especially when there are a large number of front-end business scenarios that occur at different times.
By constructing a test case table and modifying the business occurrence time and certificate issuance time to preset times, a business data insertion script is generated, allowing all business scenario data to be tested within the same time period.
It achieves rapid coverage of all business scenarios within the same time period and improves the efficiency of financial certificate testing.
Smart Images

Figure CN115237768B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a financial certificate testing method and device, electronic equipment, and storage medium. Background Art
[0002] Currently, the test of financial certificate production requires testing the corresponding business scenarios, and the business scenario data is passed into the certificate production interface for certificate production based on the occurrence time of the business scenario.
[0003] However, front-end business scenarios are numerous and occur at different times. In order to cover all business scenarios, actual financial certificate creation business scenario testing requires identifying different businesses and different occurrence times. Then, calling the certificate creation interface to pass the business scenario data into different time periods for testing. Consequently, traditional financial certificate creation testing methods are inefficient and fail to quickly cover all business scenarios. Summary of the Invention
[0004] The main purpose of the embodiments of the present application is to propose a financial certificate testing method and device, electronic equipment and storage medium, aiming to improve the efficiency of financial certificate testing.
[0005] To achieve the above objectives, a first aspect of an embodiment of the present application provides a financial certificate testing method, the method comprising:
[0006] Construct a test case table based on the certified data;
[0007] Obtain the business data insertion script for the business scenario corresponding to the test case table;
[0008] Constructing first business table data according to the business data insertion script and the test case table;
[0009] Execute the certificate-making task according to the first business table data and the preset time, and generate a certificate-making result;
[0010] Verify the certificate production result according to the test case table and generate a financial certificate production test result;
[0011] The business data insertion script is generated by the following steps:
[0012] Extracting a first field set from the test case table, the first field set including a business table primary key, a policy number, and a business table name;
[0013] Modify the business occurrence time and certificate issuance time corresponding to the first field set to the preset time;
[0014] The first field set is spliced into the query condition as a splicing parameter to generate the business data insertion script.
[0015] In some embodiments, constructing a test case table based on the certified data includes:
[0016] Acquire first data from a voucher type information base table, the first data including the voucher type, the execution frequency, and the name of the business table;
[0017] Put the first data into the cursor;
[0018] Circularly extract the first data from the cursor and pass it into the query statement as a parameter to perform query, thereby obtaining the certified data;
[0019] A piece of data is extracted from each field of the certified data and written into the test case table to complete the construction of the test case table.
[0020] In some embodiments, the step of generating a business data insertion script for a business scenario corresponding to the test case table further includes:
[0021] Inserting the business data into the script to solidify the information;
[0022] The business data after information solidification is inserted into the script and written into the directory field of the test case table.
[0023] In some embodiments, constructing first business table data according to the business data insertion script and the test case table includes:
[0024] Query the directory field of the test case table to obtain the business data insertion script;
[0025] Insert the business data into the script and put it into the cursor;
[0026] The business data is cyclically extracted from the cursor and inserted into a script and executed to construct the first business table data.
[0027] In some embodiments, executing the certificate-making task according to the first business table data and the preset time to generate the certificate-making result includes:
[0028] Call the daily certificate interface, use the preset time as the input start time, and the current time as the end time;
[0029] The first business table data is input into the daily certificate making interface to generate the certificate making result.
[0030] In some embodiments, before constructing the first business table data according to the business data insertion script and the test case table, the method further includes deleting second business table data, where the second business table data includes the business table data, expense detail table data, and voucher detail table data corresponding to the certified data, specifically including:
[0031] Acquire a second field set from the test case table, where the second field set includes the business table primary key, the business table name, and the voucher type;
[0032] Put the second field set into the cursor;
[0033] The second field set is cyclically extracted from the cursor and passed as a parameter to a delete statement to delete the second business table data.
[0034] In some embodiments, the financial certificate production test result includes that the first business table data is not used for certificate production or the first business table data is used for certificate production but the certificate production fails;
[0035] After verifying the certificate production result according to the test case table to generate a financial certificate production test result, the method further includes recording the financial certificate production test result through the test case table, specifically including:
[0036] If the financial certificate production test result is that the first business table data is not used for certificate production, recording the financial certificate production test result in the test case table;
[0037] If the financial certificate production test result is that the first business table data is used for certificate production but the certificate production fails, the financial certificate production test result and the branch code are recorded in the test case table.
[0038] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a financial certificate testing device, the device comprising:
[0039] The first module is used to construct a test case table based on the certified data;
[0040] The second module is used to obtain the business data insertion script of the business scenario corresponding to the test case table;
[0041] A third module is configured to generate the business data insertion script. The third module includes an extraction module, a modification module, and a generation module. The extraction module is configured to extract a first field set from the test case table, the first field set including the business table primary key, the policy number, and the business table name. The modification module is configured to modify the business occurrence time and certificate issuance time corresponding to the first field set to a preset time. The generation module is configured to splice the first field set as a splicing parameter into the query condition to generate the business data insertion script.
[0042] A fourth module is configured to construct first business table data according to the business data insertion script and the test case table;
[0043] A fifth module is configured to execute a certificate-making task according to the first business table data and the preset time, and generate a certificate-making result;
[0044] The sixth module is used to check the certificate production results according to the test case table and generate financial certificate production test results.
[0045] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory, a processor, a program stored on the memory and runnable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the method described in the first aspect above is implemented.
[0046] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method described in the first aspect above.
[0047] The financial certificate production testing method and device, electronic device and storage medium proposed in this application construct a test case table based on the certificated data, and modify the corresponding business occurrence time and certificate production time through the first field set of the test case table, unify the business occurrence time and certificate production time into a preset time, and then splice the first field set into the query condition as a splicing parameter to generate a business data insertion script, so that all business scenario data of the first business table data subsequently constructed according to the business data insertion script are included in the preset time to the current time, and the occurrence time of all business scenarios is concentrated, thereby realizing the testing of all business scenario data in the same time period, quickly covering all business scenarios, and improving the testing efficiency of financial certificate production. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a flowchart of the financial certificate testing method provided in the embodiment of the present application;
[0049] Figure 2 yes Figure 1 Flowchart of step S101 in FIG.
[0050] Figure 3 This is a flowchart of the steps for generating a business data insertion script of the financial certificate production test method provided in an embodiment of the present application;
[0051] Figure 4 This is a flowchart of the second business table data deletion step of the financial certificate testing method provided in an embodiment of the present application;
[0052] Figure 5 yes Figure 1 Flowchart of step S103 in FIG.
[0053] Figure 6 yes Figure 1 Flowchart of step S104 in FIG.
[0054] Figure 7 This is a flow chart of the financial certificate test method provided by the embodiment of the present application, which records the financial certificate test results through a test case table;
[0055] Figure 8 This is a structural diagram of the financial certificate testing device provided in an embodiment of the present application;
[0056] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0058] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0060] First, let’s analyze some of the terms used in this application:
[0061] Data processing is a fundamental aspect of systems engineering and automatic control. Data processing permeates all areas of social production and life. The development of data processing technology and the breadth and depth of its applications have significantly impacted the progress of human society. The fundamental purpose of data processing is to extract and derive valuable and meaningful data for specific individuals from large amounts of data that may be disorganized and difficult to understand. The data processing process can be broadly divided into three stages: data preparation, processing, and output. In the data preparation stage, data is entered offline onto punched cards, punched paper tape, magnetic tape, or disk. This stage can also be called the data entry stage. After data entry, it is processed by a computer. To do this, the user first creates a program and enters it into the computer. The computer processes the data according to the program's instructions and requirements. Processing refers to one or a combination of the eight aforementioned aspects. The final output is various textual and numerical tables and reports.
[0062] Financial voucher preparation: that is, financial vouchers, including accounting vouchers, receipt vouchers, transfer vouchers, and payment vouchers.
[0063] A business scenario is an analytical approach for specific businesses or processes. It focuses on the operational logic of a particular business type or set of processes in a specific environment. Business scenarios are used to analyze processes because business processes may vary across different product types, or even for the same product at different stages of its lifecycle. For example, the manufacturing process for the same product may be divided into build-to-order and build-to-stock, depending on customer needs or timeframes. Therefore, business processes must be analyzed in different scenarios to verify their rationality and optimize and improve them based on business scenarios. In architectural design, business scenarios can also verify the granularity and accuracy of business components (CBMs) within the business architecture. By defining the services and interfaces of business components and connecting them through these interfaces, business scenarios are formed for their operation. Business scenarios first describe the big picture of all relevant business components. Second, if there are unconnectable business components or if connections span different hierarchies, this indicates that the scope or definition of the business components is inaccurate, requiring verification and validation of the business components. When designing business scenarios for business components, we must first clearly define the elements of the business components, namely, purpose, activities, resources, governance, and services. On the basis of accurately describing the input and output data content, interface form, and service objects of the business services, different business components are connected to each other through interfaces to form a complete scenario diagram of the logical relationship between the business component operations.
[0064] A cursor is a data buffer created by the system for users to store the results of SQL statement execution. Each cursor area has a name. Users can use SQL statements to retrieve records from the cursor one by one, assign them to primary variables, and then forward them to the main language for further processing. A cursor provides a flexible means of operating on data retrieved from a table; a cursor is a method of processing data. To view or process data in a result set, a cursor provides the ability to navigate forward or backward through the result set, one or more rows at a time. A cursor is essentially a mechanism for extracting one record at a time from a result set consisting of multiple records. A cursor can be thought of as a temporary file consisting of a query result set (which can be zero, one, or multiple records retrieved by a related select statement) and a cursor position pointing to a specific record in the result set. This allows users to navigate forward or backward through the query result set and process data in the result set. With a cursor, users can access any row in the result set. After positioning the cursor on a row, operations can be performed on that row or on a block of rows from that position.
[0065] Based on this, the embodiments of the present application provide a financial certificate testing method and device, an electronic device and a storage medium, aiming to improve the efficiency of financial certificate testing.
[0066] The financial certificate testing method and device, electronic device and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the financial certificate testing method in the embodiments of the present application is described.
[0067] The embodiments of the present application can acquire and process relevant data based on data processing technology. Among them, data processing is a technical process for analyzing and processing data (including numerical and non-numerical data). It includes processing and processing such as analysis, organization, calculation, and editing of various raw data. It has a wider meaning than data analysis. With the increasing popularity of computers, numerical calculation accounts for a very small proportion in the field of computer applications, and information management through computer data processing has become the main application. Such as surveying and mapping management, warehouse management, accounting management, transportation management, technical intelligence management, office automation, etc. In terms of geographic data, there are both a large amount of natural environment data (various resource data such as land, water, climate, and biology), and a large amount of social and economic data (population, transportation, industry and agriculture, etc.), which often require comprehensive data processing. Therefore, it is necessary to establish a geographic database, systematically organize and store geographic data to reduce redundancy, develop data processing software, and make full use of database technology for data management and processing.
[0068] Computer data processing mainly includes eight aspects: data acquisition (collecting the required information), data conversion (converting information into a form that the machine can receive), data grouping (specifying codes and effectively grouping relevant information), data organization (organizing data or arranging data in certain ways for processing), data calculation (performing various arithmetic and logical operations to obtain further information), data storage (saving the original data or the results of the calculation for later use), data retrieval (finding useful information) and data sorting (arranging data in order according to certain requirements).
[0069] Currently, the test of financial certificate production requires testing the corresponding business scenarios, and the business scenario data is passed into the certificate production interface for certificate production based on the occurrence time of the business scenario.
[0070] However, front-end business scenarios are numerous and occur at different times. In order to cover all business scenarios, actual financial certificate creation business scenario testing requires identifying different businesses and different occurrence times. Then, calling the certificate creation interface to pass the business scenario data into different time periods for testing. Consequently, traditional financial certificate creation testing methods are inefficient and fail to quickly cover all business scenarios.
[0071] To this end, an embodiment of the present application provides a financial certificate testing method, which constructs a test case table based on the certificate data, and modifies the corresponding business occurrence time and certificate issuance time through the first field set of the test case table, unifies the business occurrence time and certificate issuance time into a preset time, and then splices the first field set into the query condition as a splicing parameter to generate a business data insertion script, so that all business scenario data of the first business table data subsequently constructed according to the business data insertion script are included in the preset time to the current time, and the occurrence time of all business scenarios is concentrated, thereby realizing the testing of all business scenario data within the same time period, quickly covering all business scenarios, and improving the testing efficiency of financial certificate issuance.
[0072] The financial certificate making test method provided in the embodiment of the present application relates to the field of data processing technology. The financial certificate making test method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or can be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the financial certificate making test method, etc., but is not limited to the above forms.
[0073] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0074] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0075] Figure 1 This is an optional flowchart of the financial certificate testing method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S105.
[0076] Step S101, constructing a test case table based on the certified data;
[0077] In some embodiments, the certified data may be collected from a test repository, wherein the test repository is used to store the certified data in real time, and by constructing a test case table based on the certified data, automatic updating of test cases is achieved.
[0078] Optionally, when the financial certification testing method of an embodiment of the present invention is applied to an insurance contract scenario, such as the financial certification of International Financial Reporting Standards 17-Insurance Contracts (IFRS17), the certified data includes voucher type, policy number, expense type, insurance type code, primary key, evaluation method, and business table name.
[0079] In some embodiments, the collected certified data is written into the test case table as data information to be certified.
[0080] See also Figure 2 In some embodiments, step S101 may include but is not limited to steps S201 to S204:
[0081] Step S201, obtaining first data from a voucher type information base table;
[0082] In some embodiments, the first data includes the voucher type, execution frequency, and business table name. The voucher type information base table is a table in the financial system that stores basic information and execution information about financial vouchers. Optionally, the voucher type information base table can be a table already in the financial system or a table pre-generated prior to the financial voucher production test.
[0083] Step S202, putting the first data into the cursor;
[0084] In some embodiments, a cursor can be viewed as a temporary file consisting of a query result set for the first data. The query result set can include zero, one, or multiple records retrieved by a related select statement, and a cursor position pointing to a specific record in the result set. This provides the ability to browse forward or backward through the query result set and process data in the result set. The cursor can be used to access any row of data in the query result set for the first data. After placing the cursor on a row, operations can be performed on that row or on a block of rows starting from that position.
[0085] Step S203, cyclically extracting the first data from the cursor and passing it into the query statement as a parameter to perform a query, thereby obtaining the certified data;
[0086] In some embodiments, the first data extracted from the cursor loop is passed as a parameter to a query statement for concatenation, resulting in a new query statement concatenated with the first data. The query statement concatenated with the first data is then used to perform a query to obtain the certified data. It is understood that in an insurance contract scenario, the certified data obtained by querying and extracting the query statement concatenated with the first data includes the voucher type, policy number, expense type, insurance type code, primary key, assessment method, and business table name.
[0087] Optionally, the query statement may be a statement built into the business system, or may be a statement pre-edited based on certified data in the test library, which is not limited in the present invention.
[0088] Step S204 , extracting a piece of data from each field of the certified data and writing it into the test case table, thereby completing the construction of the test case table.
[0089] In some embodiments, a piece of data is taken from each of the certificate type, policy number, expense type, insurance type code, primary key, evaluation method and business table name to form a case of the information combination of the data to be certified, and the case of the information combination of the data to be certified is written into the test case table to complete the construction of the test case table.
[0090] In some embodiments, it is understandable that before writing the case of the information combination of the data to be certified, an empty test case table is first created.
[0091] Step S102: Obtain the business data insertion script for the business scenario corresponding to the test case table;
[0092] According to step S101 , it can be understood that each test case table corresponds to a business scenario, and the business data insertion scripts for the business scenarios corresponding to the test case tables obtained in step S102 can be used cyclically.
[0093] It is understandable that it is necessary to first generate a business data insertion script for the business scenario corresponding to the test case table. In some embodiments, the generated business data insertion script is written into the directory field (content field) of the test case table.
[0094] See also Figure 3 In some embodiments, the steps of generating the business data insertion script for the business scenarios corresponding to the test case tables in step S102 may include but are not limited to steps S301 to S303:
[0095] Step S301, extracting a first field set from the test case table;
[0096] In some embodiments, the first field set includes the business table primary key, the policy number, and the business table name.
[0097] Step S302: Modify the business occurrence time and certificate issuance time corresponding to the first field set to the preset time;
[0098] In some embodiments, the corresponding business table data is queried according to the first field set extracted in step S301, and the business occurrence time and certificate issuance time in the business table data are modified to preset time.
[0099] In some embodiments, the preset time = current time - 1 day, that is, the business occurrence time = current time - 1 day; 1# certificate issuance time = current time - 1 day. By modifying the business occurrence time and certificate issuance time in the business table data to the preset time, the business data of the business scenarios corresponding to each test case table are included in the time from the preset time to the current time. If the preset time = current time - 1 day, the business data of the business scenarios corresponding to each test case table are included in one day, and all existing business scenarios can be tested with one day's data subsequently, achieving rapid coverage of all business scenarios, improving the testing efficiency of business scenarios, and thereby improving the efficiency of financial certificate issuance testing.
[0100] Step S303: splice the first field set into the query condition as a splicing parameter to generate a business data insertion script.
[0101] In some embodiments, the business table primary key, policy number, and business table name are used as splicing parameters and spliced into the query condition to generate a business data insertion script. In some embodiments, the business data insertion script:
[0102] insert into TST_I17_DATA(XX,XX,XX,XX...)SELECT(xx,xx,xx...)where xx=business table primary key....xx=policy number...xx=business table name....
[0103] Please continue reading Figure 3 In some embodiments, after generating the business data insertion script for the business scenario corresponding to each test case table, the business data insertion script is solidified and written into the test case table, which may specifically include but is not limited to steps S304 to S305:
[0104] Step S304, solidifying the business data insertion script;
[0105] In some embodiments, the business data generated in step S303 is inserted into the script for information solidification.
[0106] Step S305: insert the solidified business data into the script and write it into the directory field of the test case table.
[0107] Step S103, constructing first business table data according to the business data insertion script and the test case table;
[0108] Understandably, in a business system, certified data cannot be duplicated. If duplicated, the corresponding data stored in the business system (e.g., business table data, expense detail table data, and voucher detail table data) will be duplicated, resulting in data conflicts and disrupting data storage and management.
[0109] In some embodiments, before constructing the first business table data based on the business data insertion script and test case table, the second business table data needs to be deleted first. The second business table data includes the business table data, expense detail table data and voucher detail table data corresponding to the certified data.
[0110] See also Figure 4 In some embodiments, the step of deleting the second business table data may include but is not limited to steps S401 to S403:
[0111] Step S401, obtaining a second field set from the test case table;
[0112] In some embodiments, the second field set includes a business table primary key, a business table name, and a voucher type.
[0113] Step S402, putting the second field set into the cursor;
[0114] In some embodiments, a cursor can be viewed as a temporary file consisting of a query result set for the second field set. The query result set can contain zero, one, or multiple records retrieved by a related select statement, and a cursor position pointing to a specific record in the result set. This provides the ability to browse forward or backward through the query result set and process data in the result set. The cursor can be used to access any row of data in the query result set for the second field set. After positioning the cursor on a row, operations can be performed on that row or on a block of rows starting from that position.
[0115] Step S403: cyclically extract the second field set from the cursor and pass it into the delete statement as a parameter to delete the second business table data.
[0116] In some embodiments, the second field set extracted from the cursor loop is passed as a parameter to a delete statement for concatenation, resulting in a new delete statement concatenated with the second field set. The delete statement concatenated with the second field set is then used to delete the second business table data. It will be appreciated that in an insurance contract scenario, the second business table data deleted using the delete statement concatenated with the second field set includes business table data, expense detail table data, and voucher detail table data.
[0117] In some embodiments, the deletion statement may be a built-in statement in the business system, or a statement pre-edited based on the business table data (second business table data) corresponding to the certified data in the test library. The present invention does not limit this.
[0118] It is understandable that after deleting the second business table data, the business table data of the business scenario data corresponding to each test case table, ie, the first business table data, can be reconstructed without causing data conflict.
[0119] It is understandable that, since the probability of data for all business scenarios appearing on the same day in production is extremely small, the time points at which business data appear in the second business table data are relatively scattered. When the second business table data is used for financial certificate testing, it is difficult to cover all business scenarios, and the efficiency of financial certificate testing is low (especially when performing regression testing, it is impossible to quickly cover all business scenarios). The reconstructed first business table data, because the corresponding business table data is queried according to the first field set in step S302, and the business occurrence time and certificate time in the business table data are modified to a preset time (such as the current time - 1 day), the business data in the first business table data is included in the time from the preset time to the current time. In the subsequent financial certificate testing using the first business table data, all existing business scenarios can be tested with the business data from the preset time to the current time, achieving rapid coverage of all business scenarios, improving the testing efficiency of business scenarios, and thereby improving the efficiency of financial certificate testing.
[0120] See also Figure 5 In some embodiments, step S103 may include but is not limited to steps S501 to S503:
[0121] Step S501: query the directory field of the test case table to obtain the business data insertion script;
[0122] According to step S305 , the business data insertion script after information solidification is written in the directory field of the test case table, and the business data insertion script is extracted from the directory field of each test case table.
[0123] Step S502, inserting the business data into the script and putting it into the cursor;
[0124] In some embodiments, all extracted business data insertion scripts are placed into a cursor. A cursor can be viewed as a temporary file consisting of the query result set of the business data insertion script. The query result set can be zero, one, or multiple records retrieved by a related select statement, and a cursor position pointing to a specific record in the result set. This provides the ability to browse forward or backward through the query result set and process data in the result set. A cursor can be used to access any row of data in the query result set of the business data insertion script. After placing the cursor on a row, operations can be performed on that row or on a block of rows starting from that position.
[0125] Step S503: cyclically extracting business data from the cursor, inserting it into a script and executing it, and constructing the first business table data.
[0126] In some embodiments, the business data extracted from the cursor loop is inserted into the script as a parameter into the sql_insert statement, and the corresponding command: EXECUTE IMMEDIATE sql_insert.content is used in the stored procedure to complete the statement execution of the insert script and construct the first business table data.
[0127] In some embodiments, after completing the construction of the first business table data, the identification field in the test case table is synchronously updated, such as updating delete_flag = 'N', where N indicates that it has been inserted but not deleted, which is used as a basis for judgment when the financial certificate testing method described in the present invention is repeatedly executed in the subsequent execution.
[0128] Step S104, executing the certificate-making task according to the first business table data and the preset time, and generating a certificate-making result;
[0129] See also Figure 6 In some embodiments, step S104 may include but is not limited to steps S601 to S602:
[0130] Step S601: Call the daily certificate interface, set the preset time as the input start time, and the current time as the end time;
[0131] In some embodiments, according to step S403, the business data in the first business table data is included in the time from the preset time to the current time. Therefore, in some embodiments, the business data of all business scenarios can be tested by using the preset time as the input start time and the current time as the end time.
[0132] It is understandable that using the preset time as the entry start time complies with the certificate-making logic of the financial system, and matches the modified business occurrence time and certificate-making time in step S302.
[0133] Step S602: input the first business table data into the daily certificate making interface to generate a certificate making result.
[0134] In some embodiments, the first business table data is input into the daily certificate interface to generate a financial certificate instruction, which is used to trigger the business system to perform financial certificate issuance based on the first business table data.
[0135] Optionally, a certificate template is obtained from the server of the financial system according to a financial certificate instruction, and the financial certificate instruction contains the number or identifier of the certificate template. After the business system receives the financial certificate instruction, it parses the financial certificate instruction and extracts the number or identifier of the certificate template in the financial certificate instruction through parsing. The number or identifier of the certificate template is a unique identifier used to identify the certificate template. The certificate template is a template used to perform financial certification for each financial data in the first business table data. In some embodiments, a certificate template acquisition request is generated based on the extracted certificate template number or identifier, and the certificate template acquisition request is sent to the server of the business system. The server of the business system extracts the number or identifier of the certificate template in the template acquisition request, queries the certificate template corresponding to the extracted certificate template number or identifier, returns the queried certificate template, and performs financial certification on the first business table data according to the certificate template.
[0136] Optionally, if it is financial certification under an insurance contract scenario, such as financial certification under International Financial Reporting Standards 17-Insurance Contracts (IFRS17), the first business table data (business scenario data or 1# accounting scenario conversion) is converted to the IFRS7 accounting scenario according to the IFRS17 accounting scenario conversion rules, and the IFRS7 accounting scenario is converted into a detailed accounting voucher according to the accounting rules and account rules. The core element of the detailed accounting voucher is the accounting account, followed by the common elements of the voucher line (voucher header) and other segment values, flexible fields and amounts of the voucher line.
[0137] Step S105: Check the certificate production result according to the test case table to generate a financial certificate production test result.
[0138] In some embodiments, the financial certification test result includes that the first business table data is not used for certification or that the first business table data is used for certification but the certification fails.
[0139] After step S105 in some embodiments, the financial certification test method of the embodiment of the present invention further includes recording the financial certification test results in a test case table. Figure 7 The test case table for recording the financial certificate test results may include but is not limited to steps S701 to S702:
[0140] Step S701: If the financial certificate production test result is that the first business table data is not used for certificate production, the financial certificate production test result is recorded in the test case table;
[0141] In some embodiments, if the financial certification test result is that the first business table data is not used for certification, the financial certification test result is recorded through the check_msg field of the test case table, wherein the content recorded in the check_msg field is "no data obtained".
[0142] Step S702: If the financial certificate production test result is that the first business table data is used for certificate production but fails, the financial certificate production test result and the branch code are recorded in the test case table.
[0143] In some embodiments, if the financial certificate production test result indicates that the data in the first business table was used for certificate production but failed, the financial certificate production test result is recorded in the check_msg field of the test case table, and the data written into the branch code (segment1) field of the expense details table during the certificate production process is written into the check_msg field of the test case table. The content recorded in the check_msg field is "branch code + failed certificate production."
[0144] In some embodiments, the identification (branch code, such as CE\EO\D) defined in the branch code (segment1) field and the content recorded in the check_msg field of the test case table are combined to quickly identify abnormal scenarios in the financial certificate issuance process, for example:
[0145] …
[0146] String CLAIM_ERROR_FLAG = "CE"; / / Claim exemption insurance interface failed
[0147] String VOU_DC_FLAG = "D"; / / Voucher debit / credit imbalance check failed
[0148] String EVENT_OCCUR_FLAG = "EO"; / / Failed to obtain the claim accident date
[0149] String VOU_ANO_EQ_FLAG = "E"; / / Entry not matched
[0150] …
[0151] The embodiment of the present application uses the check_msg field of the test case table to record the financial certificate production test results, so that after the certificate production is completed, the financial certificate production results and abnormal scenarios that occur during the financial certificate production process can be quickly and conveniently obtained, greatly improving the efficiency of the financial certificate production test process and the verification of the financial certificate production test results.
[0152] Steps S101 to S105 shown in the embodiment of the present application construct a test case table based on the certificate data, and modify the corresponding business occurrence time and certificate issuance time through the first field set of the test case table, unify the business occurrence time and certificate issuance time into a preset time, and then use the first field set as a splicing parameter to splice into the query condition, generate a business data insertion script, so that all business scenario data of the first business table data subsequently constructed according to the business data insertion script are included in the preset time to the current time, and the occurrence time of all business scenarios is concentrated, thereby realizing the testing of all business scenario data in the same time period, quickly covering all business scenarios, and improving the testing efficiency of financial certificate issuance.
[0153] See also Figure 8 The present application also provides a financial certificate testing device that can implement the above-mentioned financial certificate testing method. The device includes:
[0154] The first module is used to construct a test case table based on the certified data;
[0155] The second module is used to obtain the business data insertion script for the business scenario corresponding to the test case table;
[0156] The third module is used to generate a business data insertion script. The third module includes an extraction module, a modification module, and a generation module. The extraction module is used to extract a first field set from the test case table. The first field set includes the business table primary key, the policy number, and the business table name. The modification module is used to modify the business occurrence time and certificate issuance time corresponding to the first field set to a preset time. The generation module is used to splice the first field set as a splicing parameter into the query condition to generate a business data insertion script.
[0157] A fourth module is used to construct first business table data according to the business data insertion script and the test case table;
[0158] The fifth module is used to execute the certificate production task according to the data in the first business table and the preset time, and generate the certificate production result;
[0159] The sixth module verifies the certificate production results according to the test case table and generates the financial certificate production test results.
[0160] The specific implementation of the financial certificate production and testing device is basically the same as the specific embodiment of the above-mentioned financial certificate production and testing method, and will not be repeated here.
[0161] The present application also provides an electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory. When the program is executed by the processor, the aforementioned financial certificate production and testing method is implemented. The electronic device can be any smart terminal, including a tablet computer and an in-vehicle computer.
[0162] See also Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0163] The processor 901 can be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0164] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called by the processor 901 to execute the financial certificate testing method of the embodiments of this application.
[0165] Input / output interface 903, used to implement information input and output;
[0166] Communication interface 904, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0167] Bus 905 , which transmits information between various components of the device (e.g., processor 901 , memory 902 , input / output interface 903 , and communication interface 904 );
[0168] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0169] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned financial certificate testing method.
[0170] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0171] The recommendation method, recommendation device, electronic device and storage medium provided in the embodiments of the present application construct a test case table based on the certificate data, and modify the corresponding business occurrence time and certificate issuance time through the first field set of the test case table, unify the business occurrence time and certificate issuance time into a preset time, and then splice the first field set into the query condition as a splicing parameter to generate a business data insertion script, so that all business scenario data of the first business table data subsequently constructed according to the business data insertion script are included in the preset time to the current time, and the occurrence time of all business scenarios is concentrated, thereby realizing the testing of all business scenario data in the same time period, quickly covering all business scenarios, and improving the testing efficiency of financial certificate issuance.
[0172] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0173] It will be understood by those skilled in the art that Figure 1-7 The technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figures, or a combination of certain steps, or different steps.
[0174] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0175] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0176] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0177] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0178] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0179] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0180] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0181] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0182] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A financial certificate testing method, characterized in that: The method comprises: Construct a test case table based on the certified data; Obtain the business data insertion script for the business scenario corresponding to the test case table; Constructing first business table data according to the business data insertion script and the test case table; Execute the certificate-making task according to the first business table data and the preset time, and generate a certificate-making result; Verify the certificate production result according to the test case table and generate a financial certificate production test result; The business data insertion script is generated by the following steps: Extracting a first field set from the test case table, the first field set including a business table primary key, a policy number, and a business table name; Modify the business occurrence time and certificate issuance time corresponding to the first field set to the preset time; Splicing the first field set as a splicing parameter into the query condition to generate the business data insertion script; The step of constructing a test case table based on the certified data includes: Acquire first data from a voucher type information base table, the first data including the voucher type, the execution frequency, and the name of the business table; Put the first data into the cursor; Circularly extract the first data from the cursor and pass it into the query statement as a parameter to perform query, thereby obtaining the certified data; A piece of data is extracted from each field of the certified data and written into the test case table to complete the construction of the test case table.
2. The financial certificate testing method according to claim 1, characterized in that: The step of generating a business data insertion script for a business scenario corresponding to the test case table further includes: Inserting the business data into the script to solidify the information; The business data after information solidification is inserted into the script and written into the directory field of the test case table.
3. The financial certificate testing method according to claim 2, characterized in that: The step of constructing first business table data according to the business data insertion script and the test case table includes: Query the directory field of the test case table to obtain the business data insertion script; Insert the business data into the script into the cursor; The business data is cyclically extracted from the cursor and inserted into a script and executed to construct the first business table data.
4. The financial certificate testing method according to claim 1, characterized in that: The step of executing the certificate-making task according to the first business table data and the preset time to generate a certificate-making result includes: Call the daily certificate interface, use the preset time as the input start time, and the current time as the end time; The first business table data is input into the daily certificate making interface to generate the certificate making result.
5. The financial certificate testing method according to any one of claims 1 to 4, characterized in that: Before constructing the first business table data according to the business data insertion script and the test case table, the method further includes deleting the second business table data, wherein the second business table data includes the business table data, expense detail table data, and voucher detail table data corresponding to the certificated data, specifically including: Acquire a second field set from the test case table, where the second field set includes the business table primary key, the business table name, and the voucher type; Put the second field set into the cursor; The second field set is cyclically extracted from the cursor and passed as a parameter to a delete statement to delete the second business table data.
6. The financial certificate testing method according to any one of claims 1 to 4, characterized in that: The financial certificate production test result includes that the first business table data is not used for certificate production or the first business table data is used for certificate production but the certificate production fails; After verifying the certificate production result according to the test case table to generate a financial certificate production test result, the method further includes recording the financial certificate production test result through the test case table, specifically including: If the financial certificate test result is that the first business table data is not used for certificate making, the financial certificate test result is recorded through the test case table; If the financial certificate production test result is that the first business table data is used for certificate production but the certificate production fails, the financial certificate production test result and the branch code are recorded in the test case table.
7. A financial certificate testing device, characterized in that: The device comprises: The first module is used to construct a test case table based on the certified data; The second module is used to obtain the business data insertion script of the business scenario corresponding to the test case table; A third module is configured to generate the business data insertion script. The third module includes an extraction module, a modification module, and a generation module. The extraction module is configured to extract a first field set from the test case table, the first field set including the business table primary key, the policy number, and the business table name. The modification module is configured to modify the business occurrence time and certificate issuance time corresponding to the first field set to a preset time. The generation module is configured to splice the first field set as a splicing parameter into the query condition to generate the business data insertion script. A fourth module is configured to construct first business table data according to the business data insertion script and the test case table; A fifth module is configured to execute a certificate-making task according to the first business table data and the preset time, and generate a certificate-making result; The sixth module verifies the certificate production result according to the test case table and generates a financial certificate production test result; The step of constructing a test case table based on the certified data includes: Acquire first data from a voucher type information base table, the first data including the voucher type, the execution frequency, and the name of the business table; Put the first data into the cursor; Circularly extract the first data from the cursor and pass it into the query statement as a parameter to perform query, thereby obtaining the certified data; A piece of data is extracted from each field of the certified data and written into the test case table to complete the construction of the test case table.
8. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for implementing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the method described in any one of claims 1 to 6 are implemented.
9. A storage medium, which is a computer-readable storage medium and is used for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any one of claims 1 to 6.
Citation Information
Patent Citations
Currency fund system automation testing method and device, equipment and storage medium
CN107741906A
Test data generation method and device, storage medium and intelligent equipment
CN111221726A