A reporting system testing method, system, device and storage medium
By parsing the interface document and using the orthogonal table generation algorithm, the report system is directly tested, which solves the problem of low testing efficiency in the existing technology and achieves efficient and accurate report system testing.
Patent Information
- Application Number
- CN202111603214.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-11-26
- Filing Date
- 2021-12-24
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-12-24
AI Technical Summary
The testing efficiency of the existing report system is low, requiring manual inspection of the generated report data, and the upstream system text data needs to be rechecked if it is missing or incorrect, resulting in reduced testing efficiency.
By parsing the interface documents of the upstream system, generating simulated data and using an orthogonal table generation algorithm to filter and separate normal and abnormal data, the report system can be tested directly, skipping the process of generating data text, and combined with the abnormal data filtering and separation method to improve testing efficiency. and accuracy.
The test process is shortened, the test efficiency is improved, the amount of data collection is reduced, the data accuracy is improved, the re-verification process caused by data errors is avoided, and efficient testing of the reporting system is achieved.
Smart Images

Figure CN114265780B_ABST
Abstract
Description
[0001] This application claims priority to a Chinese patent application filed with the China Patent Office on November 26, 2021, with application number 202111425577.3 and invention name “A testing method, system, device and storage medium for a reporting system”, the entire contents of which are incorporated by reference in this application. Technical Field
[0002] The present invention relates to the financial field, and in particular to a test method, system, equipment and storage medium for a reporting system. Background Art
[0003] The reporting system is a system that generates corresponding reports based on business data. Since the reporting system needs to process a large amount of data in the process of generating reports, and the correctness of this data will directly affect the accuracy of the final generated reports, it is necessary to test the reporting system to ensure the accuracy of the reports output by the reporting system.
[0004] Currently, testing a reporting system usually requires that the data source system first provide text containing basic data. After the basic data text is generated, the test system starts to load the text, processes the text content, generates the final report, and manually checks the generated report data. When the text data of the upstream system is missing or erroneous, it will directly lead to abnormal data in the output report. At this time, the text content provided by the data source system needs to be checked again, which reduces the efficiency of testing the reporting system. Therefore, how to improve the testing efficiency of the reporting system has become a problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a test method, system, device and storage medium for a report system, so as to realize efficient testing of the report system. The specific technical solution is as follows:
[0006] A method for testing a reporting system, comprising:
[0007] The interface document output by the upstream system is parsed according to a preset parsing algorithm to obtain the text structure of the interface document, the text structure is further parsed using the preset parsing algorithm to obtain text field information, and the text field information is loaded into a preset report test system database table, wherein the upstream system is a data source system that provides the report system with basic data required to generate reports, the content of the interface document includes a description of the basic data type and an explanation of the basic data, and the text field information includes: text field range, text field constraints and text field type.
[0008] The interface document is simulated and numbered according to numbering rules to obtain a first number of fields of the interface document, and a simulated field value and a simulated field range corresponding to each of the fields are obtained, wherein the numbering rules include: the text field range, the text field constraint condition, the text field type and a key field pool.
[0009] The field and the simulated field range are input as first input parameters into a preset orthogonal table generation algorithm, so that the preset orthogonal table generation algorithm generates a first orthogonal data table according to the first input parameters.
[0010] Data filtering and separation are performed on the normal data and the abnormal data in the first orthogonal data table to obtain a normal test data set including normal data and an abnormal test data set including abnormal data.
[0011] The normal test data set and / or the abnormal test data set are input into the upstream system as a second input parameter, so that the upstream system processes the second input parameter to obtain a first text, wherein the first text is a test text generated by the upstream system according to the second input parameter.
[0012] The reporting system is tested based on the first text.
[0013] Optionally, filtering and separating the normal data and the abnormal data in the first orthogonal data table to obtain a normal test data set including normal data and an abnormal test data set including abnormal data specifically includes:
[0014] Using a preset abnormal data filtering algorithm, in the abnormal data set of each abnormal data field type, one abnormal data is randomly selected to obtain a second number of the abnormal data, wherein the abnormal data set is a data set obtained by dividing the abnormal data in the first orthogonal data table by the preset abnormal data filtering algorithm according to the abnormal data field type, and the number of the abnormal data field types is the second number.
[0015] Using a preset data separation algorithm, the normal data in the first orthogonal data table and the second number of abnormal data are separated to obtain the normal test data set including the normal data and the abnormal test data set including the abnormal data, wherein the normal data is data that matches the normal data field type in the preset report test system database table, and the abnormal data in the abnormal test data set is the second number of abnormal data.
[0016] Optionally, completing the test of the report system based on the first text includes:
[0017] The first text is input into the reporting system so that the reporting system generates a test report according to the first text.
[0018] The second text generated by the upstream system according to the basic data is cleaned and rewritten to generate a third text.
[0019] The first text and the third text are compared to obtain a test result.
[0020] Optionally, simulating number creation according to a number creation rule on the interface document to obtain a first number of fields of the interface document, and obtaining a simulated field value and a simulated field range corresponding to each of the fields, includes:
[0021] The interface document is input into a preset simulation mathematical model, so that the preset simulation mathematical model extracts the fields from the content in the interface document according to the key field pool and the text field type. After the extraction of a first number of fields of the interface document is completed, the preset simulation mathematical model simulates the field values and field ranges of the first number of fields according to the text field range and the text field constraint condition to obtain the simulated field value and the simulated field range corresponding to each of the fields, wherein the field value is the content in the column represented by the corresponding field, and a one-to-one correspondence between each of the fields and the corresponding simulated field value is established, and a one-to-one correspondence between each of the fields and the corresponding simulated field range is established.
[0022] Optionally, the cleaning and rewriting the second text generated by the upstream system according to the basic data to generate a third text includes:
[0023] By using a preset filtering and rewriting algorithm, according to the necessary fields configured in the preset report test system field library, the second text is subjected to field filtering, non-essential fields are filtered, the second text after the field filtering is cleaned, and the cleaned second text is rewritten to obtain the third text including only the necessary fields.
[0024] Optionally, comparing the first text and the third text to obtain a test result includes:
[0025] Using a preset comparison algorithm, the consistency of the first text and the third text is compared, and a test result is output, wherein the consistency includes: consistency of text structure, consistency of field names and consistency of field values, and the test result includes: consistency or inconsistency.
[0026] A test system for a reporting system, comprising:
[0027] A parsing module is used to parse the interface document output by the upstream system according to a preset parsing algorithm to obtain the text structure of the interface document, further parse the text structure using the preset parsing algorithm to obtain text field information, and load the text field information into a preset report test system database table, wherein the upstream system is a data source system that provides the report system with basic data required to generate reports, the content of the interface document includes a description of the basic data type and an explanation of the basic data, and the text field information includes: text field range, text field constraints and text field type.
[0028] The simulation numbering module is used to simulate the interface document according to the numbering rules, obtain the first number of fields of the interface document, and obtain the simulation field value and simulation field range corresponding to each of the fields, wherein the numbering rules include: the text field range, the text field constraint conditions, the text field type and the key field pool.
[0029] The orthogonal table generation module is used to input the field and the simulated field range as first input parameters into a preset orthogonal table generation algorithm, so that the preset orthogonal table generation algorithm generates a first orthogonal data table according to the first input parameters.
[0030] The data filtering and separation module is used to perform data filtering and separation on the normal data and the abnormal data in the first orthogonal data table to obtain a normal test data set including normal data and an abnormal test data set including abnormal data.
[0031] An upstream system call module is used to input the normal test data set and / or the abnormal test data set as a second input parameter into the upstream system, so that the upstream system processes the second input parameter to obtain a first text, wherein the first text is a test text generated by the upstream system based on the second input parameter.
[0032] A text comparison module completes the test of the report system based on the first text.
[0033] Optionally, the text comparison module includes:
[0034] The report system calling submodule is used to input the first text into the report system so that the report system generates a test report according to the first text.
[0035] The third text generation submodule is used to clean and rewrite the second text generated by the upstream system according to the basic data to generate a third text.
[0036] The result output submodule is used to compare the first text and the third text to obtain a test result.
[0037] A test device for a reporting system, comprising:
[0038] processor;
[0039] A memory for storing instructions executable by the processor.
[0040] The processor is configured to execute the instructions to implement the reporting system testing method as described in any one of the above items.
[0041] A computer-readable storage medium, when instructions in the computer-readable storage medium are executed by the processor of the test device, enables the test device to execute the test method of the reporting system as described in any one of the above items.
[0042] The test method, system, device and storage medium of the report system provided by the embodiment of the present invention, after parsing the interface document, the interface document is simulated and numbered, so that the present invention skips the process of starting the test after the data text is generated by the upstream system compared with the prior art, and directly performs the test operation on the report system according to the basic data in the interface document, shortens the test process, and improves the test efficiency. At the same time, the present invention adopts the orthogonal test method and combines the method of filtering and separating abnormal data, so that the present invention reduces the number of data required to be collected on the basis of ensuring the integrity of data sampling, improves the accuracy of collected data, and improves the test efficiency. Finally, the present invention inputs the second input parameter after the abnormal data filtering and separation process into the upstream system, so that the upstream system generates a test text according to the second input parameter. The test text is compared with the upstream system text generated by the upstream system according to the above basic data for consistency, further ensuring the accuracy of the test result, avoiding the process of re-verification due to data errors in the prior art, and improving the test efficiency. It can be seen that the present invention realizes efficient testing of the report system.
[0043] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 A flowchart of a method for testing a reporting system provided by an embodiment of the present invention;
[0046] Figure 2 A block diagram of a test system for a reporting system provided by an embodiment of the present invention;
[0047] Figure 3 A block diagram of a test device for a reporting system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] The test method, system, device, and storage medium of a report system provided by the present invention can be used in the financial field or other fields, for example, in the report test application scenario in the financial field. Other fields are any fields other than the financial field, for example, the field of automated office. The above is only an example and does not limit the application field of the test method, system, device, and storage medium of a report system provided by the present invention.
[0050] The present invention provides a method for testing a report system. Figure 1 As shown, including:
[0051] S101. Parse the interface document output by the upstream system according to the preset parsing algorithm to obtain the text structure of the interface document, further parse the text structure using the preset parsing algorithm to obtain text field information, and load the text field information into the preset report test system database table. The upstream system is a data source system that provides the report system with the basic data required to generate reports. The content of the interface document includes the description of the basic data type and the explanation of the basic data. The text field information includes: text field range, text field constraint conditions and text field type.
[0052] The preset report test system database table is a tool for storing data in the database of the report test system using tables as organizational units. After the text field information is loaded into the preset report test system database table, the preset report test system database table will include the text information of the parsed interface document, wherein the text information includes but is not limited to field type, field name and field parsing.
[0053] Optionally, in an optional embodiment of the present invention, the above text field range refers to a field, and the upstream system will provide a certain range for the value of this field, and the value of this field will not exceed this range under normal circumstances. The above text field constraint refers to the association relationship between different fields, for example, the value of field A is equal to that of field B. The above text field types include but are not limited to: string type, integer type and floating point type.
[0054] Optionally, in an optional embodiment of the present invention, the above-mentioned interface document is an electronic form including basic data for generating a report and explanatory content of the basic data. The present invention does not impose too many restrictions on the specific type of the above-mentioned electronic form.
[0055] S102: simulate the interface document according to the numbering rule, obtain the first number of fields of the interface document, and obtain the simulated field value and simulated field range corresponding to each field. The numbering rule includes: text field range, text field constraint condition, text field type and key field pool.
[0056] The above-mentioned simulation number generation is to extract fields according to text field types and key field pools through a preset simulation number generation model, and then perform secondary processing on the above-mentioned extracted field data by calling text field ranges and text field constraints to obtain simulated field values and simulated field ranges.
[0057] Optionally, in an optional embodiment of the present invention, the key field pool is used to store the value of no less than one commonly used field. When simulating a field, the data of the field is searched from the key field pool to make the simulation of the field more accurate.
[0058] Optionally, in an optional embodiment of the present invention, the present invention utilizes the information in the interface document, takes the text field range, text field constraint conditions, text field type and key field pool as number-generating rules, and performs a process of manufacturing simulation data. Compared with the prior art, the present invention skips the process of generating data text by the upstream system before starting the test, and directly performs test operations on the reporting system based on the basic data in the interface document, thereby shortening the test process and improving test efficiency.
[0059] S103: Input the field and the simulated field range as a first input parameter into a preset orthogonal table generation algorithm, so that the preset orthogonal table generation algorithm generates a first orthogonal data table according to the first input parameter.
[0060] Optionally, in an optional embodiment of the present invention, the above-mentioned preset orthogonal table generation algorithm processes the above-mentioned first input parameter through an orthogonal test method to generate an orthogonal data table containing each field name and corresponding field value (including normal values and abnormal values) required by the reporting system when generating a report.
[0061] The orthogonal test method is a scientific test design method that selects appropriate and representative data from a large amount of experimental data to arrange the test reasonably. The first orthogonal data table is the final combination of simulation data.
[0062] Optionally, in another optional embodiment of the present invention, when the above-mentioned preset orthogonal table generation algorithm is used to process the above-mentioned first input parameter, the specific process is as follows:
[0063] 1. First, the data in the first input parameter is separated and screened according to the field and text field range to obtain the factor k and factor level m required for the orthogonal test. The orthogonal data table L containing n orthogonal data groups is calculated by formula (1), wherein the factor k corresponds to the field, and the factor level m corresponds to the text field range:
[0064] L n m k Formula (1)
[0065] 2. Calculate the number of data groups in the above orthogonal data table using formula (2):
[0066] n=k×(m-1)+1 Formula (2)
[0067] S104: Perform data filtering and separation on the normal data and the abnormal data in the first orthogonal data table to obtain a normal test data set including normal data and an abnormal test data set including abnormal data.
[0068] The above normal data and abnormal data are determined by the above preset orthogonal table generation algorithm according to the normal text field range recorded in the above preset report test system database table. When the text field range of one data is within the above normal text field range, the type of the data is determined to be normal data. When the text field range of another data is outside the above normal text field range, the type of the data is determined to be abnormal data.
[0069] Optionally, in other optional embodiments of the present invention, the above-mentioned normal data and abnormal data can be set according to different application scenarios, and the present invention does not impose too many restrictions.
[0070] Optionally, in an optional embodiment of the present invention, the above normal data and abnormal data are filtered according to the following formula (3) using a preset abnormal data filtering algorithm:
[0071] L n m1 k1 m2 k2 Formula (3)
[0072] Among them, m1 is the value range of the abnormal field after filtering, m2 is the value range of the normal field, k1 is the number of abnormal fields, k2 is the number of normal fields, and the value of k in the above formula 1 is the sum of k1 and k2 in the above formula 3 (k=k1+k2). In other optional embodiments of the present invention, the above m1 can be set to a variable value according to different application scenarios.
[0073] Since only one abnormal data as an example is needed to characterize an abnormal type, the preset abnormal data filtering algorithm is used to randomly select one abnormal data from the multiple abnormal data corresponding to each abnormal type in the orthogonal data table according to different abnormal types, and use the abnormal data to characterize the abnormal type corresponding to the abnormal data.
[0074] Optionally, in an optional embodiment of the present invention, a preset data separation algorithm is used to classify the normal data and abnormal data after being filtered by the preset abnormal data filtering algorithm. Specifically:
[0075] All normal data are placed in a normal test data set using a preset data separation algorithm, and abnormal data filtered by the preset abnormal data filtering algorithm is placed in an abnormal test data set.
[0076] Optionally, in an optional embodiment of the present invention, the present invention adopts an orthogonal test method combined with a method of filtering and separating abnormal data. Compared with the prior art, the present invention reduces the amount of data that needs to be collected, improves the accuracy of collected data, and improves testing efficiency while ensuring the integrity of data sampling.
[0077] In order to facilitate the understanding of the above step S103 and step S104, a specific embodiment of the present invention is used for description:
[0078] An existing interface document that has been simulated and numerically generated is set up. The document has 5 fields, each field involves 6 values (text field range), and the above fields and text field ranges are separated using a preset orthogonal table generation algorithm to obtain the factor k and factor level m required for the orthogonal experiment, where factor k=5 and factor level m=6.
[0079] The above-mentioned preset orthogonal table generation algorithm generates an orthogonal data table according to the above-mentioned factor k and factor level m using the above-mentioned formula (1), and calculates the number of orthogonal data groups n of the above-mentioned orthogonal data table using the above-mentioned formula (2): n=k×(m-1)+1=5×(6-1)+1=26.
[0080] Now, a similar anomaly calculation is performed on one field in the above orthogonal data table containing 26 groups of data. The field involves 6 values, of which 3 are anomalies of the same type (the value range of the field is 4 at this time). The above anomaly data is simplified according to the above formula 3:
[0081] L n m1 k1 m2 k2 =L n 6 4 4 1 =4×(6-1)+1×(4-1)+1=24.
[0082] When separating the data in the orthogonal table after abnormal data simplification, it is necessary to filter the field data whose field values are considered invalid. If no processing is performed, the report content where the invalid field data is located will be empty when the final report is generated. If 6 groups of data are divided into 6 groups of data that need to be filtered according to the field values in the above 24 groups of data, the final output result is: 18 groups of normal test data and 6 groups of abnormal test data.
[0083] S105. Input the normal test data set and / or the abnormal test data set as the second input parameter into the upstream system, so that the upstream system processes the second input parameter to obtain a first text, wherein the first text is a test text generated by the upstream system according to the second input parameter.
[0084] Optionally, in an optional embodiment of the present invention, the present invention inputs the second input parameter after the abnormal data filtering and separation process into the upstream system, so that the upstream system generates a test text according to the second input parameter. The test text is compared with the upstream system text generated by the upstream system according to the basic data. When the test text is consistent, it means that the report system is currently in a normal operating state. When the test text is inconsistent, it means that the report system is currently in a normal operating state.
[0085] S106: Complete testing of the report system based on the first text.
[0086] Optionally, performing data filtering and separation on the normal data and the abnormal data in the first orthogonal data table to obtain a normal test data set including normal data and an abnormal test data set including abnormal data specifically includes:
[0087] Using a preset abnormal data filtering algorithm, in the abnormal data set of each abnormal data field type, one abnormal data is randomly selected to obtain a second number of abnormal data, wherein the abnormal data set is a data set obtained by dividing the abnormal data in the first orthogonal data table by the abnormal data field type using the preset abnormal data filtering algorithm, and the number of abnormal data field types is the second number.
[0088] Using a preset data separation algorithm, the normal data and the second number of abnormal data in the first orthogonal data table are separated to obtain a normal test data set including normal data and an abnormal test data set including abnormal data, wherein the normal data is data that matches the normal data field type in the preset report test system database table, and the abnormal data in the abnormal test data set is the second number of abnormal data.
[0089] Optionally, the report system is tested based on the first text, including:
[0090] The first text is input into a report system so that the report system generates a test report according to the first text.
[0091] Optionally, in an optional embodiment of the present invention, the first text is input into the reporting system so that the reporting system generates a test report based on the first text, and the test report is used to test whether the reporting system operates normally, and at the same time test whether the processing logic of the test data by the reporting system meets the preset standard. The basis for determining whether the reporting system operates normally and the preset standard can be set according to the actual application scenario, and the present invention does not impose too many restrictions on this.
[0092] The second text generated by the upstream system based on the basic data is cleaned and rewritten to generate the third text.
[0093] It should be noted that in actual applications, the second text generated by the above-mentioned upstream system based on the basic data contains non-essential fields that are not configured in the preset report test system database table. Therefore, it is necessary to clear the non-essential fields in the above-mentioned second text and perform a rewrite operation to generate a text file based on the same preset report test system database table as the above-mentioned first text.
[0094] It is understandable to those skilled in the art that the above-mentioned process of cleaning and rewriting the second text can be implemented in a variety of ways, such as implementing the process of cleaning and rewriting the above-mentioned second text through natural language processing (Natural Language Processing, NLP).
[0095] The first text and the third text are compared to obtain a test result.
[0096] It is understandable to those skilled in the art that the above process of comparing the first text and the third text may be implemented in a variety of ways, such as manual comparison.
[0097] Optionally, the above-mentioned simulating numbering of the interface document according to the numbering rule to obtain the first number of fields of the interface document, and obtaining the simulated field value and simulated field range corresponding to each field, includes:
[0098] The interface document is input into a preset simulation mathematical model, so that the preset simulation mathematical model extracts fields from the content in the interface document according to the key field pool and the text field type. After the extraction of the first number of fields in the interface document is completed, the preset simulation mathematical model simulates the field values and field ranges of the first number of fields according to the text field range and the text field constraint conditions, and obtains the simulated field value and simulated field range corresponding to each field, wherein the field value is the content in the column represented by the corresponding field, and a one-to-one correspondence between each field and the corresponding simulated field value is established, and a one-to-one correspondence between each field and the corresponding simulated field range is established.
[0099] Optionally, the second text generated by the upstream system according to the basic data is cleaned and rewritten to generate the third text, including:
[0100] By using a preset filtering and rewriting algorithm, according to the necessary fields configured in the preset report test system field library, the second text is subjected to field filtering, non-essential fields are filtered, the second text after field filtering is cleaned, and the cleaned second text is rewritten to obtain a third text including only necessary fields.
[0101] Optionally, the above necessary fields may be set by those skilled in the art according to actual application scenarios, and the present invention does not impose too many restrictions on this.
[0102] The present invention cleans and rewrites the second text, filters out unnecessary field data, and reduces the amount of processed data while further improving the accuracy of the data, thereby ensuring the accuracy of subsequent comparison results.
[0103] Optionally, in an optional embodiment of the present invention, the above-mentioned preset screening and rewriting algorithm includes but is not limited to a grammar checking model, a text cleaning function and a spelling checking model. The specific implementation method is subject to achieving the technical effect of the present invention, and the present invention does not impose too many restrictions on this.
[0104] Optionally, the comparing the first text and the third text to obtain a test result includes:
[0105] The first text and the third text are compared for consistency using a preset comparison algorithm, and a test result is output, wherein consistency includes: consistency of text structure, consistency of field names, and consistency of field values, and the test result includes: consistency or inconsistency.
[0106] After parsing the interface document, the present invention simulates the interface document, so that compared with the prior art, the present invention skips the process of starting the test after the data text is generated by the upstream system, and directly performs the test operation on the report system according to the basic data in the interface document, shortens the test process, and improves the test efficiency. At the same time, the present invention adopts the orthogonal test method and combines the method of filtering and separating abnormal data, so that compared with the prior art, on the basis of ensuring the integrity of data sampling, the number of data that needs to be collected is reduced, the accuracy of the collected data is improved, and the test efficiency is improved. Finally, the present invention inputs the second input parameter after the abnormal data filtering and separation process into the upstream system, so that the upstream system generates a test text according to the second input parameter. The test text is compared with the upstream system text generated by the upstream system according to the above basic data for consistency, further ensuring the accuracy of the test result, avoiding the process of re-verification due to data errors in the prior art, and improving the test efficiency. It can be seen that the present invention realizes efficient testing of the report system.
[0107] Corresponding to the embodiment of the test method of the report system, the present invention also provides a test system of the report system, such as Figure 2 As shown, the test system of the reporting system includes:
[0108] The parsing module 201 is used to parse the interface document output by the upstream system according to the preset parsing algorithm, obtain the text structure of the interface document, further parse the text structure using the preset parsing algorithm, obtain text field information, and load the text field information into the preset report test system database table, wherein the upstream system is a data source system that provides the report system with the basic data required to generate reports, and the content of the interface document includes the description of the basic data type and the explanation of the basic data, and the above-mentioned text field information includes: text field range, text field constraint conditions and text field type.
[0109] The simulation numbering module 202 is used to simulate the interface document according to the numbering rules, obtain the first number of fields of the interface document, and obtain the simulated field value and simulated field range corresponding to each field, wherein the numbering rules include: text field range, text field constraint conditions, text field type and key field pool.
[0110] The orthogonal table generation module 203 is used to input the field and the simulated field range as the first input parameter into the preset orthogonal table generation algorithm, so that the preset orthogonal table generation algorithm generates a first orthogonal data table according to the first input parameter.
[0111] The data filtering and separation module 204 is used to perform data filtering and separation on the normal data and the abnormal data in the first orthogonal data table to obtain a normal test data set including normal data and an abnormal test data set including abnormal data.
[0112] The upstream system call module 205 is used to input the normal test data set and / or the abnormal test data set as the second input parameter into the upstream system, so that the upstream system processes the second input parameter to obtain the first text, wherein the first text is the test text generated by the upstream system according to the second input parameter.
[0113] The text comparison module 206 completes the test of the report system based on the first text.
[0114] Optionally, the data filtering and separation module 204 is configured as follows:
[0115] Using a preset abnormal data filtering algorithm, in the abnormal data set of each abnormal data field type, one abnormal data is randomly selected to obtain a second number of abnormal data, wherein the abnormal data set is a data set obtained by dividing the abnormal data in the first orthogonal data table by the abnormal data field type using the preset abnormal data filtering algorithm, and the number of abnormal data field types is the second number.
[0116] Using a preset data separation algorithm, the normal data and the second number of abnormal data in the first orthogonal data table are separated to obtain a normal test data set including normal data and an abnormal test data set including abnormal data, wherein the normal data is data that matches the normal data field type in the preset report test system database table, and the abnormal data in the abnormal test data set is the second number of abnormal data.
[0117] Optionally, the text comparison module 206 includes:
[0118] The report system calls a submodule, which is used to input the first text into the report system, so that the report system generates a test report according to the first text.
[0119] The third text generation submodule is used to clean and rewrite the second text generated by the upstream system based on the basic data to generate a third text.
[0120] The result output submodule is used to compare the first text and the third text to obtain a test result.
[0121] Optionally, the analog number generation module 202 is configured as follows:
[0122] The interface document is input into a preset simulation mathematical model, so that the preset simulation mathematical model extracts fields from the content in the interface document according to the key field pool and the text field type. After the extraction of the first number of fields in the interface document is completed, the preset simulation mathematical model simulates the field values and field ranges of the first number of fields according to the text field range and the text field constraint conditions, and obtains the simulated field value and simulated field range corresponding to each field, wherein the field value is the content in the column represented by the corresponding field, and a one-to-one correspondence between each field and the corresponding simulated field value is established, and a one-to-one correspondence between each field and the corresponding simulated field range is established.
[0123] Optionally, the third text generation submodule is configured as follows:
[0124] By using a preset filtering and rewriting algorithm, according to the necessary fields configured in the preset report test system field library, the second text is subjected to field filtering, non-essential fields are filtered, the second text after field filtering is cleaned, and the cleaned second text is rewritten to obtain a third text including only necessary fields.
[0125] Optionally, the above result output submodule is configured as:
[0126] The first text and the third text are compared for consistency using a preset comparison algorithm, and a test result is output, wherein consistency includes: consistency of text structure, consistency of field names, and consistency of field values, and the test result includes: consistency or inconsistency.
[0127] A test device for a reporting system, such as Figure 3 As shown, including:
[0128] Processor 301;
[0129] The memory 302 is used to store instructions executable by the processor 301 .
[0130] The processor 301 is configured to execute instructions to implement any of the above-mentioned reporting system testing methods.
[0131] A computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor 301 of a test device, the test device can execute any of the above-mentioned methods for testing a reporting system.
[0132] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
[0133] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0134] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0135] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. It should also be noted that the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0136] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0137] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for testing a reporting system, characterized in that: include: Parse the interface document output by the upstream system according to a preset parsing algorithm to obtain the text structure of the interface document, further parse the text structure using the preset parsing algorithm to obtain text field information, and load the text field information into a preset report test system database table, wherein the upstream system is a data source system that provides the report system with basic data required for generating reports, the content of the interface document includes a description of the basic data type and an explanation of the basic data, and the text field information includes: text field range, text field constraint conditions and text field type; For the interface document, simulate number generation according to number generation rules, obtain a first number of fields of the interface document, and obtain a simulated field value and a simulated field range corresponding to each of the fields, wherein the number generation rules include: the text field range, the text field constraint condition, the text field type, and a key field pool; Inputting the field and the simulated field range as first input parameters into a preset orthogonal table generation algorithm, so that the preset orthogonal table generation algorithm generates a first orthogonal data table according to the first input parameters; Performing data filtering and separation on the normal data and the abnormal data in the first orthogonal data table to obtain a normal test data set including normal data and an abnormal test data set including abnormal data; Inputting the normal test data set and / or the abnormal test data set as a second input parameter into the upstream system, so that the upstream system processes the second input parameter to obtain a first text, wherein the first text is a test text generated by the upstream system according to the second input parameter; Inputting the first text into the reporting system so that the reporting system generates a test report according to the first text; Cleaning and rewriting the second text generated by the upstream system according to the basic data to generate a third text; The first text and the third text are compared to obtain a test result.
2. The method according to claim 1, characterized in that: The filtering and separating the normal data and the abnormal data in the first orthogonal data table to obtain a normal test data set including normal data and an abnormal test data set including abnormal data specifically includes: Using a preset abnormal data filtering algorithm, randomly select one abnormal data in the abnormal data set of each abnormal data field type to obtain a second number of the abnormal data, wherein the abnormal data set is a data set obtained by dividing the abnormal data in the first orthogonal data table by the preset abnormal data filtering algorithm according to the abnormal data field type, and the number of the abnormal data field types is the second number; Using a preset data separation algorithm, the normal data in the first orthogonal data table and the second number of abnormal data are separated to obtain the normal test data set including the normal data and the abnormal test data set including the abnormal data, wherein the normal data is data that matches the normal data field type in the preset report test system database table, and the abnormal data in the abnormal test data set is the second number of abnormal data.
3. The method according to claim 1, characterized in that The step of simulating number generation for the interface document according to number generation rules to obtain a first number of fields of the interface document, and obtaining a simulated field value and a simulated field range corresponding to each of the fields, includes: The interface document is input into a preset simulation mathematical model, so that the preset simulation mathematical model extracts the fields from the content in the interface document according to the key field pool and the text field type. After the extraction of a first number of fields of the interface document is completed, the preset simulation mathematical model simulates the field values and field ranges of the first number of fields according to the text field range and the text field constraint condition to obtain the simulated field value and the simulated field range corresponding to each of the fields, wherein the field value is the content in the column represented by the corresponding field, and a one-to-one correspondence between each of the fields and the corresponding simulated field value is established, and a one-to-one correspondence between each of the fields and the corresponding simulated field range is established.
4. The method according to claim 1, characterized in that: The step of cleaning and rewriting the second text generated by the upstream system according to the basic data to generate a third text includes: By using a preset filtering and rewriting algorithm, according to the necessary fields configured in the preset report test system field library, the second text is subjected to field filtering, non-essential fields are filtered, the second text after the field filtering is cleaned, and the cleaned second text is rewritten to obtain the third text including only the necessary fields.
5. The method according to claim 1, characterized in that The comparing the first text and the third text to obtain a test result includes: Using a preset comparison algorithm, the consistency of the first text and the third text is compared, and the test result is output, wherein the consistency includes: consistency of text structure, consistency of field names and consistency of field values, and the test result includes: consistency or inconsistency.
6. A reporting system testing system, characterized in that: include: A parsing module, used to parse the interface document output by the upstream system according to a preset parsing algorithm to obtain the text structure of the interface document, further parse the text structure using the preset parsing algorithm to obtain text field information, and load the text field information into a preset report test system database table, wherein the upstream system is a data source system that provides the report system with basic data required for generating reports, the content of the interface document includes a description of the basic data type and an explanation of the basic data, and the text field information includes: text field range, text field constraint conditions and text field type; A simulation number generation module is used to simulate the interface document according to the number generation rule, obtain a first number of fields of the interface document, and obtain a simulation field value and a simulation field range corresponding to each of the fields, wherein the number generation rule includes: the text field range, the text field constraint condition, the text field type and a key field pool; An orthogonal table generation module, used for inputting the field and the simulated field range as a first input parameter into a preset orthogonal table generation algorithm, so that the preset orthogonal table generation algorithm generates a first orthogonal data table according to the first input parameter; A data filtering and separation module, used for performing data filtering and separation on the normal data and the abnormal data in the first orthogonal data table to obtain a normal test data set including normal data and an abnormal test data set including abnormal data; an upstream system calling module, configured to input the normal test data set and / or the abnormal test data set as a second input parameter into the upstream system, so that the upstream system processes the second input parameter to obtain a first text, wherein the first text is a test text generated by the upstream system according to the second input parameter; The text comparison module includes: a report system calling submodule, a third text generating submodule and a result output submodule, wherein the report system calling submodule is used to input the first text into the report system so that the report system generates a test report according to the first text; The third text generation submodule is used to clean and rewrite the second text generated by the upstream system according to the basic data to generate a third text; The result output submodule is used to compare the first text and the third text to obtain a test result.
7. A test device for a reporting system, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the reporting system testing method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of a test device of a reporting system, the test device of the reporting system is enabled to execute the test method of the reporting system according to any one of claims 1 to 5.
