Data processing function test method and device, equipment and storage medium

By obtaining the target function identifier and preset function test mapping table, and automatically searching and generating test data, the problems of high labor costs, low testing efficiency and inconsistent data in the existing technology are solved, and more efficient and accurate data processing function testing is achieved.

CN119988205APending Publication Date: 2025-05-13CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311478736.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-08
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In the prior art, when testing the data processing system functional test, multiple testers are required to artificially construct the test data types and data, resulting in high labor costs and low testing efficiency, and the constructed test data may not be consistent with the actual requirements, resulting in insufficient testing coverage and reducing the accuracy of the test.

Method used

Provide a test method for data processing functions. By obtaining the target function identifier and preset function test mapping table, finding the required test data types and data, generating preset test data tables, and testing based on the table, avoiding artificial construction of test data.

Benefits of technology

It reduces labor costs, improves testing efficiency, ensures that the test data coverage is more comprehensive, and enhances the accuracy of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988205A_ABST
    Figure CN119988205A_ABST
Patent Text Reader

Abstract

The invention provides a data processing function testing method and device, equipment and a storage medium, and can be applied to the technical field of big data. The method comprises the steps of obtaining a target function identifier and a preset function test mapping table in response to monitoring that a tester executes a trigger operation of testing a target function through an operation interface; searching at least one target test data type identifier required for testing the target function in a preset function test mapping table according to the target function identifier; obtaining a preset test data table, and searching target test data corresponding to each target test data type in the preset test data table according to each target test data type identifier; and obtaining a target function test execution file according to the target function identifier, and testing the target function according to the target function test execution file and the target test data corresponding to each target test data type. According to the method, the test efficiency is improved, and the test accuracy is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a method, device, equipment and storage medium for testing data processing functions. Background Art

[0002] With the continuous development of the field of big data technology, the functions of data processing systems are becoming more and more complex, and the types of data involved are diverse.

[0003] Currently, when testing the functions included in a data processing system, multiple testers are generally responsible for testing each function of the data processing system, and each tester manually constructs a test data type and test data corresponding to each function, thereby testing the functions included in the data processing system based on the above test data type and test data.

[0004] However, this method in which each tester manually constructs the test data type and test data corresponding to each function not only increases labor costs and reduces test efficiency, but also the test data constructed by each tester may differ from the actual test requirements, making the test data coverage insufficient and reducing the accuracy of the test. Summary of the invention

[0005] The present application provides a testing method, device, equipment and storage medium for data processing functions, which are used to solve the technical problems in the prior art that increase labor costs, reduce testing efficiency, and the test data constructed by each tester may differ from the actual testing requirements, making the test data coverage insufficient and reducing the accuracy of the test.

[0006] In a first aspect, the present application provides a method for testing a data processing function, which is used in a testing device for a data processing function, comprising: in response to monitoring a trigger operation of a tester executing a test target function through an operation interface, obtaining a target function identifier and a preset function test mapping table; the preset function test mapping table includes a mapping relationship between a plurality of preset function identifiers and a plurality of preset test data type identifiers corresponding to each preset function;

[0007] Searching the preset function test mapping table for at least one target test data type identifier required for testing the target function according to the target function identifier;

[0008] Obtain a preset test data table, and search for target test data corresponding to each target test data type in the preset test data table according to each target test data type identifier; the preset test data table includes preset test data corresponding to all preset test data types; the preset test data is generated according to the preset test data type and the preset construction strategy;

[0009] A target function test execution file is acquired according to the target function identifier, and the target function is tested according to the target function test execution file and the target test data corresponding to each target test data type.

[0010] Optionally, in the method as described above, the preset construction strategy includes a structured query language SQL function construction strategy and a loop import construction strategy, and before the method responds to monitoring that the tester performs a trigger operation of the test target function through the operation interface, it also includes: in response to monitoring that the tester performs a trigger operation of generating preset test data through the operation interface, obtaining a preset test data type identifier and a preset construction strategy mapping table; the preset construction strategy mapping table includes a mapping relationship between multiple preset test data type identifiers and preset construction strategies corresponding to each preset test data type; determining the preset construction strategy corresponding to each preset test data type according to the preset construction strategy mapping table; in response to determining that the preset construction strategy corresponding to the preset test data type is a loop import construction strategy, obtaining a preset sample data table corresponding to the preset test data type, and constructing the preset test data according to the preset sample data table using the loop import construction strategy; in response to determining that the preset construction strategy corresponding to the preset test data type is an SQL function construction strategy, obtaining a preset sample function corresponding to the preset test data type, and constructing the preset test data according to the preset sample function using the SQL function construction strategy; the preset sample function is obtained according to the preset sample data table; and storing the preset test data corresponding to each preset test data type in the preset test data table.

[0011] Optionally, the method as described above, before responding to monitoring the test personnel executing the trigger operation of generating preset test data through the operation interface, further includes: in response to monitoring the test personnel executing the trigger operation of creating a new data table through the operation interface, obtaining the preset table creation execution file corresponding to each preset test data type, and using the preset table creation execution file to create a new data table in the database corresponding to each preset test data type; determining whether an exception occurs in the database corresponding to each preset test data type when creating the new data table, if not, obtaining each newly created data table, and determining that each newly created data table is the preset sample table corresponding to each preset test data type.

[0012] Optionally, the method as described above, after determining that each newly created data table is a preset sample table corresponding to each preset test data type, further includes: in response to monitoring that the tester performs a trigger operation of inserting data through the operation interface, obtaining a preset sample table corresponding to each preset test data type and a corresponding preset data insertion execution file, and using the preset data insertion execution file to insert data into the preset sample table; determining whether an exception occurs in each preset sample table when inserting data, if not, obtaining each preset sample table for inserted data, and determining that the preset sample table for each inserted data is the preset sample data table corresponding to each preset test data type.

[0013] Optionally, the method as described above, after determining whether an exception occurs in the database corresponding to each preset test data type when a new data table is created, or after determining whether an exception occurs in each preset sample table when data is inserted, further includes: if so, generating a target exception log based on the abnormal preset test data type identifier; sending the target exception log to the corresponding operation interface, so that the tester can be informed of the preset test data type in which the exception occurs through the operation interface.

[0014] Optionally, the method as described above, after storing the preset test data corresponding to each preset test data type in a preset test data table, further includes: performing a copy operation on the preset test data table, and storing the copied preset test data table; in response to monitoring that the tester performs a trigger operation to update the preset test data table through the operation interface, obtaining the copied preset test data table and target update data; using the target update data to update the copied preset test data table, and determining that the updated preset test data table is the preset test data table required for the next functional test.

[0015] In a second aspect, the present application provides a test device for a data processing function, including: an acquisition module, for acquiring a target function identifier and a preset function test mapping table in response to monitoring a trigger operation of a tester executing a test target function through an operation interface; the preset function test mapping table includes a mapping relationship between a plurality of preset function identifiers and a plurality of preset test data type identifiers corresponding to each preset function;

[0016] A search module, configured to search, according to the target function identifier, in the preset function test mapping table for at least one target test data type identifier required for testing the target function;

[0017] The acquisition module is also used to acquire a preset test data table;

[0018] The search module is further used to search the preset test data table for target test data corresponding to each target test data type according to each target test data type identifier; the preset test data table includes preset test data corresponding to all preset test data types; the preset test data is generated according to the preset test data type and the preset construction strategy;

[0019] The acquisition module is further used to acquire the target function test execution file according to the target function identifier;

[0020] The test module is used to test the target function according to the target function test execution file and the target test data corresponding to each target test data type.

[0021] Optionally, in the device as described above, the preset construction strategy includes a structured query language SQL function construction strategy and a loop import construction strategy; before the response to monitoring the tester executing the trigger operation of the test target function through the operation interface, it also includes: a determination module, a construction module and a storage module; the acquisition module is also used to obtain a preset test data type identifier and a preset construction strategy mapping table in response to monitoring the tester executing the trigger operation of generating preset test data through the operation interface; the preset construction strategy mapping table includes a mapping relationship between multiple preset test data type identifiers and preset construction strategies corresponding to each preset test data type; the determination module is used to determine the preset construction strategy corresponding to each preset test data type according to the preset construction strategy mapping table; the acquisition module The block is also used for, in response to determining that the preset construction strategy corresponding to the preset test data type is a loop import construction strategy, obtaining a preset sample data table corresponding to the preset test data type; the construction module is used to construct the preset test data according to the preset sample data table by adopting the loop import construction strategy; the acquisition module is also used for, in response to determining that the preset construction strategy corresponding to the preset test data type is an SQL function construction strategy, obtaining a preset sample function corresponding to the preset test data type; the construction module is also used to construct the preset test data according to the preset sample function by adopting the SQL function construction strategy; the preset sample function is obtained according to the preset sample data table; the storage module is used to store the preset test data corresponding to each preset test data type in a preset test data table.

[0022] In a third aspect, the present application provides a data processing function test device, comprising: a processor, and a memory communicatively connected to the processor;

[0023] The memory stores computer-executable instructions;

[0024] The processor executes the computer-executable instructions stored in the memory to implement the method according to the first aspect.

[0025] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.

[0026] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method described in the first aspect when executed by a processor.

[0027] The test method, device, equipment and storage medium of the data processing function provided by the present application, in response to monitoring the trigger operation of the tester to perform the test target function through the operation interface, obtain the target function identifier and the preset function test mapping table; the preset function test mapping table includes the mapping relationship between multiple preset function identifiers and multiple preset test data type identifiers corresponding to each preset function; according to the target function identifier, at least one target test data type identifier required for testing the target function is searched in the preset function test mapping table; a preset test data table is obtained, and according to each target test data type identifier, the target test data corresponding to each target test data type is searched in the preset test data table; the preset test data table includes the preset test data corresponding to all preset test data types; the preset test data is generated according to the preset test data type and the preset construction strategy; the target function test execution file is obtained according to the target function identifier, and the target function is tested according to the target function test execution file and the target test data corresponding to each target test data type. Since at least one preset test data type required for executing the test is set in advance for each preset function, a preset function test mapping table is formed, and the preset test data of each preset test data type is generated in advance according to all preset test data types and the corresponding preset construction strategy, forming a preset test data table. Therefore, after monitoring that the operation of testing the target function is triggered, by obtaining the target function identifier and the preset function test mapping table, at least one target test data type required to perform the test on the target function can be found in the above mapping table. By obtaining the preset test data table, the target test data corresponding to at least one target test data type can be found in the above data table. Therefore, by obtaining the target function test execution file, the target function can be tested according to the target function test execution file and the target test data corresponding to each target test data type. This eliminates the need for each tester to manually construct the test data type and test data corresponding to each function, reduces labor costs, and improves test efficiency. It also avoids the risk that the test data constructed by each tester may differ from the actual test requirements, improves the comprehensiveness of test data coverage, and enhances test accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0029] Figure 1 An application scenario diagram of a method for testing a data processing function provided in one embodiment of the present application;

[0030] Figure 2 A flowchart of a method for testing a data processing function provided in one embodiment of the present application;

[0031] Figure 3 A flowchart of a method for testing a data processing function provided by another embodiment of the present application;

[0032] Figure 4 A schematic diagram of the structure of a test device for data processing function provided in one embodiment of the present application;

[0033] Figure 5 A schematic diagram of the structure of a test device for data processing functions provided in one embodiment of the present application.

[0034] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0036] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0037] At present, when testing the functions included in the data processing system, generally multiple testers are responsible for testing each function of the data processing system. Specifically, each tester selects the data type required to test each function based on the test requirements of each function, and constructs the test data corresponding to the above data type based on the selection result. Then when each tester needs to test each function, he obtains the test data corresponding to the required data type, and tests each function according to the test execution file of each function and the above corresponding test data. Therefore, each tester needs to manually construct the test data type and test data corresponding to each function according to the test requirements of each function, which increases labor costs and reduces test efficiency. In addition, the test data constructed by each tester may differ from the actual test requirements, so that the scope of test data coverage is not comprehensive enough, reducing the accuracy of the test.

[0038] Therefore, in the face of technical problems in the prior art, in order to reduce labor costs and improve test efficiency, instead of each tester constructing test data by themselves, all data types are collected in advance based on survey results or other methods, and test data of all data types are uniformly constructed. In order to avoid the risk that the test data constructed by each tester may differ from the actual test requirements and improve the comprehensiveness of test data coverage, instead of each tester selecting the test data type based on the function to be tested, at least one test data type is uniformly set for each function to be tested in advance. Then when a function needs to be tested, at least one test data type set for the function is determined according to the function identifier, and according to the above test data type, the test data required for testing the function is obtained from the test data of all data types, so that the function is tested according to the test data required by the function and the test execution file of the function. There is no need to manually select the test data type and construct the test data, which reduces labor costs and improves test efficiency. And improves the comprehensiveness of test data coverage and enhances the accuracy of testing.

[0039] Figure 1 An application scenario diagram of a method for testing a data processing function provided in one embodiment of the present application, such as Figure 1As shown, the system corresponding to the test method of the data processing function in the embodiment of the present application includes: a test device 1 for data processing function, a database 2, and a terminal 3 corresponding to the test device for data processing function. Among them, the test device 1 for data processing function is an electronic device for executing the test method of the data processing function, and the database 2 is a database corresponding to the test device 1 for data processing function. Among them, the test device 1 for data processing function is connected to the terminal 3 corresponding to the test device for data processing function and the database 2. First, the tester selects the target function identifier required for the test in the operation interface of the test device corresponding to the data processing function terminal 3, and triggers the test operation based on the identifier. In response to monitoring that the operation of testing the target function is triggered, the test device 1 for data processing function obtains the target function identifier and obtains the preset function test mapping table through the database 2. Then, according to the target function identifier, at least one target test data type identifier required for testing the target function is searched in the preset function test mapping table, and the preset test data table is obtained through the database 2. Finally, according to each target test data type identifier, the target test data corresponding to each target test data type is searched in the preset test data table, and the target function test execution file is obtained according to the target function identifier, so as to test the target function according to the target function test execution file and the target test data corresponding to each target test data type. Among them, the preset function test mapping table includes a mapping relationship between multiple preset function identifiers and multiple preset test data type identifiers corresponding to each preset function, and the preset test data table includes preset test data corresponding to all preset test data types, and the preset test data is generated according to the preset test data type and the preset construction strategy.

[0040] The data processing function testing method provided in this application is intended to solve the above technical problems in the prior art.

[0041] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0042] Figure 2 A flowchart of a method for testing a data processing function provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the execution device of the embodiment of the present application is a test device for data processing function, and specifically can be a test device for data processing function located in the test device for data processing function. Then, the present embodiment includes:

[0043] Step 201, in response to monitoring a trigger operation of a tester executing a test target function through an operation interface, obtain a target function identifier and a preset function test mapping table. The preset function test mapping table includes mapping relationships between multiple preset function identifiers and multiple preset test data type identifiers corresponding to each preset function.

[0044] The target function is any data processing function to be tested. The target function identifier is any identifier that can characterize the identity of the target function. For example, the target function can be a data collection function, a data transfer function, etc. The target function identifier can be an identifier such as "collection" or "transfer".

[0045] The preset function test mapping table is a table storing each preset function and multiple preset test data types required to test each preset function, and may specifically include a mapping relationship between multiple preset function identifiers and multiple preset test data type identifiers corresponding to each preset function.

[0046] Among them, the preset function is any data processing function. The preset function identifier is any identifier that can characterize the identity of the preset function. The preset test data type is any data type collected through survey results or other channels. The preset test data type identifier is any identifier that can characterize the preset test data type. Exemplarily, the preset test data type can be a hive data type, a byte data type, etc. The preset test data type identifier can be an identifier such as "hive", "byte", etc.

[0047] In this embodiment, all preset functions and all preset test data types can be determined in advance, and multiple preset test data types required to test each preset function can be determined according to the specific requirements of each preset function. After the determination is completed, each preset function identifier is associated with a plurality of preset test data type identifiers corresponding to each preset function and stored. Exemplarily, if the preset function is a data acquisition function, the preset test data type for testing the data acquisition function can be all preset test data types, and "acquisition" is associated with all preset test data type identifiers and stored.

[0048] Based on this, when the tester has a need to test the target function, the tester can select the target function identifier of the required test on the operation interface of the corresponding terminal of the test device of the data processing function, and click the test component based on the selection result. In response to monitoring that the test component is triggered, the test device of the data processing function obtains the selected target function identifier and obtains the pre-stored preset function test mapping table.

[0049] Step 202: search, according to the target function identifier, in a preset function test mapping table for at least one target test data type identifier required for testing the target function.

[0050] The target test data type is a data type required for testing a target function, and the target test data type identifier is any identifier that can represent the target test data type.

[0051] In this embodiment, after obtaining the target function identifier and the preset function test mapping table, the field where the target function identifier is located can be identified first, and based on the identification result, the preset function identifier with the same field as the target function identifier is searched in the preset function test mapping table, and at least one preset test data type identifier with a mapping relationship with the preset function identifier with the same field is searched. The at least one preset test data type identifier is determined as the at least one target test data type identifier required for testing the target function.

[0052] Step 203, obtain a preset test data table, and search the preset test data table for target test data corresponding to each target test data type according to each target test data type identifier. The preset test data table includes preset test data corresponding to all preset test data types. The preset test data is generated according to the preset test data type and the preset construction strategy.

[0053] The preset test data table is a data table storing all test data, specifically including preset test data corresponding to all preset test data types. The preset test data is data used for testing, specifically generated according to the preset test data type and the preset construction strategy. The preset construction strategy is a strategy for constructing test data.

[0054] In this embodiment, the preset construction strategy applicable to each preset test data type can be determined in advance based on all preset test data types, and the applicable preset construction strategy can be used to construct test data of each preset test data type based on the determination result, and the test data of each preset test data type can be stored as a preset test data table.

[0055] Based on this, after determining at least one target test data type identifier required for the test target function, each target test data type identifier can be obtained, and a pre-stored preset test data table can be obtained. The field structure of each target test data type identifier is identified, and based on the identification result, the preset test data table is searched for test data with the same field structure as each target test data type identifier, so as to determine that the test data with the same field structure as each target test data type identifier is the target test data corresponding to each target test data type.

[0056] Step 204 , obtaining a target function test execution file according to the target function identifier, and testing the target function according to the target function test execution file and the target test data corresponding to each target test data type.

[0057] The target function test execution file is an execution file required for testing the target function, and may specifically include multiple execution statements.

[0058] In this embodiment, preset function test execution files of various preset functions can be designed in advance according to different preset functions, and the names of the above files can be set to be the same as the preset function identifiers, and all preset function test execution files can be stored based on the setting results.

[0059] Based on this, after finding the target test data corresponding to each target test data type, all preset function test execution files can be found through the corresponding storage medium, and the preset function test execution file named the same as the target function identifier can be found in all preset function test execution files according to the target function identifier, and the above preset function test execution file is determined as the target function test execution file. Obtain the target function test execution file, and obtain the target test data corresponding to each of the above target test data types, and use each execution statement in the target function test execution file to process the target test data in turn, so as to test the target function. Exemplarily, if the target function is a data acquisition function, each execution statement in the test execution file corresponding to the data acquisition function is used to collect and process test data of all data types in turn.

[0060] The test method for data processing function provided in this embodiment, in response to monitoring the trigger operation of the tester executing the test target function through the operation interface, obtains the target function identifier and the preset function test mapping table; the preset function test mapping table includes the mapping relationship between multiple preset function identifiers and multiple preset test data type identifiers corresponding to each preset function; searches for at least one target test data type identifier required for testing the target function in the preset function test mapping table according to the target function identifier; obtains the preset test data table, and searches for the target test data corresponding to each target test data type in the preset test data table according to each target test data type identifier; the preset test data table includes the preset test data corresponding to all preset test data types; the preset test data is generated according to the preset test data type and the preset construction strategy; obtains the target function test execution file according to the target function identifier, and tests the target function according to the target function test execution file and the target test data corresponding to each target test data type. Since at least one preset test data type required for executing the test is set in advance for each preset function, a preset function test mapping table is formed, and the preset test data of each preset test data type is generated in advance according to all preset test data types and the corresponding preset construction strategy, forming a preset test data table. Therefore, after monitoring that the operation of testing the target function is triggered, by obtaining the target function identifier and the preset function test mapping table, at least one target test data type required to perform the test on the target function can be found in the above mapping table. By obtaining the preset test data table, the target test data corresponding to at least one target test data type can be found in the above data table. Therefore, by obtaining the target function test execution file, the target function can be tested according to the target function test execution file and the target test data corresponding to each target test data type. This eliminates the need for each tester to manually construct the test data type and test data corresponding to each function, reduces labor costs, and improves test efficiency. It also avoids the risk that the test data constructed by each tester may differ from the actual test requirements, improves the comprehensiveness of test data coverage, and enhances test accuracy.

[0061] Figure 3 A flowchart of a method for testing a data processing function provided by another embodiment of the present application is shown in FIG. Figure 3 As shown, as an optional embodiment, based on the above embodiment, the preset construction strategy of this embodiment includes a structured query language SQL function construction strategy and a loop import construction strategy, and before responding to the trigger operation of monitoring the tester to execute the test target function through the operation interface, the following steps are also included:

[0062] Step 301, in response to monitoring that a tester performs a trigger operation to generate preset test data through an operation interface, obtain a preset test data type identifier and a preset construction strategy mapping table. The preset construction strategy mapping table includes a mapping relationship between multiple preset test data type identifiers and preset construction strategies corresponding to each preset test data type.

[0063] The preset test data is the test data corresponding to the preset test data type. The preset construction strategy includes a structured query language SQL function construction strategy and a loop import construction strategy. The structured query language SQL function construction strategy is a strategy for constructing test data using SQL functions. The loop import construction strategy is a strategy for constructing test data using loop import.

[0064] The preset construction strategy mapping table is a table storing all preset test data types and preset construction strategies applicable to each preset test data type, and specifically includes a mapping relationship between multiple preset test data type identifiers and preset construction strategies corresponding to each preset test data type.

[0065] It is understandable that during test execution, it is necessary to ensure that the preset test data of each preset test data type can be obtained smoothly. Therefore, before responding to the trigger operation of the tester executing the test target function through the operation interface, each preset test data needs to be constructed first.

[0066] In this embodiment, the preset construction strategy applicable to each preset test data type can be determined in advance according to different preset test data types, and a mapping relationship is established between each preset test data type identifier and the preset construction strategy applicable to each preset test data type, and the above mapping relationship is stored as a preset construction strategy mapping table. Exemplarily, if the preset test data type is a hive data type, it is determined that the preset construction strategy applicable to the hive data type is a loop import construction strategy, and a mapping relationship is established between "hive" and the loop import construction strategy.

[0067] Based on this, when the tester has a need to construct preset test data of each preset test data type, the tester can select the preset test data type identifier on the operation interface of the corresponding terminal of the test device of the data processing function, and click the generation component based on the selection result. In response to monitoring that the generation component is triggered, the test device of the data processing function obtains the selected preset test data type identifier and obtains the pre-stored preset construction strategy mapping table.

[0068] Step 302: Determine the preset construction strategy corresponding to each preset test data type according to the preset construction strategy mapping table.

[0069] In this embodiment, after obtaining the preset test data type identifier and the preset construction strategy mapping table, the field where the preset test data type identifier is located can be identified first, and based on the identification result, the preset construction strategy that has a mapping relationship with the preset test data type identifier can be searched in the preset construction strategy mapping table, and the preset construction strategy that has a mapping relationship with the preset test data type identifier can be determined as the preset construction strategy corresponding to the preset test data type, thereby determining the preset construction strategy corresponding to each preset test data type.

[0070] Step 303, in response to determining that the preset construction strategy corresponding to the preset test data type is a loop import construction strategy, obtain a preset sample data table corresponding to the preset test data type, and construct the preset test data using the loop import construction strategy according to the preset sample data table.

[0071] The preset sample data table is a data table required for constructing preset test data, and can specifically store sample data corresponding to a preset test data type.

[0072] In this embodiment, when the preset construction strategy is a loop import construction strategy, before the tester executes the trigger operation of generating preset test data through the operation interface, the tester needs to create a new data acquisition and exchange job in the operation interface and import the preset sample data table corresponding to the preset test data type to use the table as the source data source. At the same time, a destination data source belonging to the same preset test data type is established, and a field mapping relationship is configured between the source data source and the destination data source for data acquisition and exchange. Based on the above configuration results, the time period and quantity level required for the execution of the data acquisition and exchange job are selected.

[0073] Based on this, in response to determining that the preset construction strategy corresponding to the preset test data type is a loop import construction strategy, the source data source corresponding to the preset test data type, that is, the preset sample data table, is obtained based on the above data acquisition and exchange operation, and the data acquisition and exchange task is performed on the sample data in the preset sample data table according to the above configuration result. Then, in response to reaching the above quantity level within the above time period, the task is terminated and the destination data source is obtained, and the data included in the destination data source is determined as the preset test data.

[0074] Step 304: In response to determining that the preset construction strategy corresponding to the preset test data type is the SQL function construction strategy, a preset sample function corresponding to the preset test data type is obtained, and the preset test data is constructed using the SQL function construction strategy according to the preset sample function. The preset sample function is obtained according to the preset sample data table.

[0075] The preset sample function is a function required to construct preset test data, which is specifically obtained according to a preset sample data table.

[0076] In this embodiment, when the preset construction strategy is an SQL function construction strategy, before the tester executes the trigger operation of generating preset test data through the operation interface, the tester needs to write and store the preset sample function corresponding to the preset test data type based on the sample data in the preset sample data table corresponding to the preset test data type.

[0077] Based on this, in response to determining that the preset construction strategy corresponding to the preset test data type is the SQL function construction strategy, the preset sample function corresponding to the preset test data type is obtained and executed. Then, in response to the end of the execution, the execution result corresponding to the preset sample function is obtained, and the data in the above execution result is determined as the preset test data.

[0078] Step 305 , storing the preset test data corresponding to each preset test data type in a preset test data table.

[0079] In this embodiment, based on constructing preset test data corresponding to each preset test data type, a new data table is established, and the preset test data corresponding to each preset test data type is stored in the new data table to form a preset test data table.

[0080] The data processing function testing method provided by the present embodiment comprises a preset construction strategy including a structured query language SQL function construction strategy and a loop import construction strategy. Before responding to monitoring that a tester performs a trigger operation of a test target function through an operation interface, in response to monitoring that a tester performs a trigger operation of generating preset test data through an operation interface, a preset test data type identifier and a preset construction strategy mapping table are obtained; the preset construction strategy mapping table includes a mapping relationship between a plurality of preset test data type identifiers and preset construction strategies corresponding to each preset test data type; the preset construction strategy corresponding to each preset test data type is determined according to the preset construction strategy mapping table; in response to determining that the preset construction strategy corresponding to the preset test data type is a loop import construction strategy, a preset sample data table corresponding to the preset test data type is obtained, and the preset test data is constructed according to the preset sample data table using the loop import construction strategy; in response to determining that the preset construction strategy corresponding to the preset test data type is an SQL function construction strategy, a preset sample function corresponding to the preset test data type is obtained, and the preset test data is constructed according to the preset sample function using the SQL function construction strategy; the preset sample function is obtained according to the preset sample data table; and the preset test data corresponding to each preset test data type is stored in the preset test data table. Since the SQL function construction strategy can quickly construct data based on the written function, but there are some data types that cannot be constructed using the SQL function construction strategy, by introducing a loop import construction strategy that can support any data type and pre-determining the strategy applicable to each preset test data type, the preset test data type identifier can be obtained after the operation of generating preset test data is detected to be triggered, and the strategy applicable to the preset test data type can be determined based on the preset test data type identifier. Therefore, when it is determined that the preset construction strategy corresponding to the preset test data type is the loop import construction strategy, by obtaining the preset sample data table corresponding to the preset test data type, the loop import construction strategy can be used to construct the preset test data. When it is determined that the preset construction strategy corresponding to the preset test data type is the SQL function construction strategy, by obtaining the preset sample function corresponding to the preset test data type, the SQL function construction strategy can be used to construct the preset test data. Finally, the preset test data corresponding to each preset test data type is stored in the preset test data table. Therefore, the strategy applicable to the preset test data type can be quickly determined, and the preset test data corresponding to each preset test data type can be constructed according to the applicable strategy, thereby improving the efficiency of constructing data.

[0081] As an optional embodiment, based on the above embodiment, this embodiment further includes the following steps before responding to monitoring that the tester performs a triggering operation of generating preset test data through the operation interface:

[0082] Step 401, in response to monitoring that the tester executes a trigger operation of creating a new data table through the operation interface, obtain the preset table creation execution file corresponding to each preset test data type, and use the preset table creation execution file to create a new data table in the database corresponding to each preset test data type.

[0083] The preset table creation execution file is an execution file required when creating a new data table, and specifically includes multiple execution statements.

[0084] It is understandable that when generating preset test data, it is necessary to ensure that the preset sample data table corresponding to each preset test data type can be successfully obtained. Therefore, before responding to the monitoring of the tester performing a trigger operation to generate preset test data through the operation interface, it is necessary to first establish the preset sample data table corresponding to each preset test data type.

[0085] In this embodiment, preset table creation execution files corresponding to each preset test data type may be designed in advance according to different preset test data types, and all preset table creation execution files may be stored.

[0086] Based on this, when the tester has the need to create a data table of each preset test data type, the tester can select each preset test data type identifier on the operation interface of the terminal corresponding to the test equipment with data processing function, and click the new component based on the selection result. In response to monitoring that the new component is triggered, the test equipment with data processing function obtains the pre-stored preset table creation execution file corresponding to each preset test data type, and uses multiple execution statements in each preset table creation execution file to create a new data table in the database corresponding to each preset test data type.

[0087] Step 402, determining whether an exception occurs when creating a new data table in the database corresponding to each preset test data type, if not, obtaining each newly created data table, and determining each newly created data table to be a preset sample table corresponding to each preset test data type.

[0088] Among them, the preset sample table is the newly created data table.

[0089] It is understandable that since the designed preset table creation execution files may have errors, after creating a new data table in the data corresponding to each preset test data type, it is necessary to determine whether an exception occurs when creating the new data table in the database corresponding to each preset test data type.

[0090] Specifically, it can be determined whether there is a newly created data table in each database whose field structure is the field structure corresponding to the preset test data type. If so, it means that no exception occurred when creating the new data table in each database. In this case, the newly created data table in each database is obtained, and it is determined that the above-mentioned newly created data table is the preset sample table corresponding to each preset test data type.

[0091] The test method for data processing function provided in this embodiment, before responding to monitoring that the tester performs a trigger operation of generating preset test data through the operation interface, in response to monitoring that the tester performs a trigger operation of creating a new data table through the operation interface, obtains the preset table creation execution file corresponding to each preset test data type, and uses the preset table creation execution file to create a new data table in the database corresponding to each preset test data type; judges whether an exception occurs in the database corresponding to each preset test data type when creating a new data table, if not, obtains each newly created data table, and determines that each newly created data table is a preset sample table corresponding to each preset test data type. Since it is necessary to establish a preset sample data table corresponding to each preset test data type before constructing the preset test data, by pre-designing the preset table creation execution file corresponding to each preset test data type, after monitoring the operation of triggering the new data table on the operation interface, the preset table creation execution file can be used to create a new data table in the database corresponding to each preset test data type. And by judging whether the newly created data table is abnormal, when it is determined that no abnormality occurs, it can be determined that each newly created data table is a preset sample table corresponding to each preset test data type. This enables a new data table to be quickly created in each database, thereby smoothly obtaining a preset sample table corresponding to each preset test data type, thereby improving the efficiency of establishing the preset sample table.

[0092] As an optional embodiment, based on the above embodiment, after determining that each newly created data table is a preset sample table corresponding to each preset test data type, this embodiment further includes the following steps:

[0093] Step 501, in response to monitoring that the tester performs a trigger operation of inserting data through the operation interface, obtain the preset sample table corresponding to each preset test data type and the corresponding preset data insertion execution file, and use the preset data insertion execution file to insert data into the preset sample table.

[0094] The preset data insertion execution file is an execution file required when inserting data into a preset sample table, and specifically includes a plurality of execution statements.

[0095] In this embodiment, the preset data insertion execution files corresponding to the preset test data types may be designed in advance according to different preset test data types, and all the preset data insertion execution files may be stored.

[0096] Based on this, the test personnel can select each preset test data type identifier on the operation interface of the corresponding terminal of the test equipment with data processing function based on the preset sample table corresponding to each preset test data type that has been obtained, and click to insert the data component based on the selection result. In response to monitoring that the insert data component is triggered, the test equipment with data processing function obtains the preset sample table corresponding to each preset test data type, obtains the preset data insertion execution file corresponding to each preset test data type that is pre-stored, and uses multiple execution statements in each preset data insertion execution file to insert data into each preset sample table accordingly.

[0097] Step 502, determining whether each preset sample table has an exception when inserting data, if not, obtaining each preset sample table for inserting data, and determining that each preset sample table for inserting data is a preset sample data table corresponding to each preset test data type.

[0098] It is understandable that since there may be a risk of errors in inserting each preset data into the execution file, after inserting data into each preset sample table, it is necessary to determine whether an abnormality occurs in the data insertion into each preset sample table.

[0099] Specifically, it can be determined whether there are identifiable fields in each preset sample table. If so, it means that no exception occurs when inserting data in each preset sample table. Then, the preset sample table for each inserted data is obtained, and it is determined that the preset sample table for the inserted data is the preset sample data table corresponding to each preset test data type.

[0100] It can be understood that the preset data insertion execution files corresponding to each preset test data type designed in this embodiment and the preset table creation execution files corresponding to each preset test data type designed in the previous embodiment can both be backed up and stored so that they can be directly used when needed in other testing work.

[0101] The test method for data processing function provided in this embodiment, after determining that each newly created data table is a preset sample table corresponding to each preset test data type, in response to monitoring that the tester performs a trigger operation of inserting data through the operation interface, obtains the preset sample table corresponding to each preset test data type and the corresponding preset data insertion execution file, and inserts data into the preset sample table using the preset data insertion execution file; determines whether each preset sample table has an exception when inserting data, if not, obtains each preset sample table for inserting data, and determines that each preset sample table for inserting data is a preset sample data table corresponding to each preset test data type. By pre-designing the preset data insertion execution file corresponding to each preset test data type, it is possible to obtain the preset sample table corresponding to each preset test data type and the corresponding preset data insertion execution file after monitoring that the inserting data operation is triggered, and the preset data insertion execution file can be used to insert data into the preset sample table. And by determining whether each preset sample table has an exception when inserting data, when it is determined that no exception occurs, the preset sample table for inserting data can be determined as the preset sample data table corresponding to each preset test data type. This enables data to be quickly inserted into each preset sample table, thereby smoothly obtaining a preset sample data table corresponding to each preset test data type, thereby improving the efficiency of generating the preset sample data table.

[0102] As an optional embodiment, based on the third embodiment or the above embodiment, after determining whether an exception occurs when creating a new data table in the database corresponding to each preset test data type, or after determining whether an exception occurs when inserting data in each preset sample table, this embodiment further includes the following steps:

[0103] Step 601: If yes, generate a target exception log based on the preset test data type identifier of the exception.

[0104] The target exception log is a log indicating that an exception has occurred in a preset test data type of the tester.

[0105] In this embodiment, it is determined whether an exception occurs when creating a new data table in the database corresponding to each preset test data type, or whether an exception occurs when inserting data into each preset sample table. If so, it means that the preset data insertion execution file corresponding to each preset test data type, or the preset table creation execution file corresponding to each preset test data type may have an error, and the preset test data type identifier that occurs an exception when creating a new data table, or the preset test data type identifier that occurs an exception when inserting data, is obtained, and a target exception log is generated based on the above identifier.

[0106] For example, if an exception occurs in the hive data type when creating a new data table, the target exception log may contain a log containing "hive new data table exception". If an exception occurs in the hive data type when inserting data, the target exception log may contain a log containing "hive insert data exception".

[0107] Step 602: Send the target exception log to the corresponding operation interface, so that the tester can know the preset test data type of the exception through the operation interface.

[0108] In this embodiment, after the target exception log is generated, the target exception log is obtained and sent to the corresponding operation interface. Then, after obtaining the target exception log, the tester can know the preset test data type where the exception occurs according to the content in the target exception log, and can adjust the preset table creation execution file corresponding to the preset test data type where the exception occurs, or the preset data insertion execution file.

[0109] The test method for the data processing function provided in the present embodiment, after determining whether an exception occurs in the database corresponding to each preset test data type when creating a new data table, or after determining whether an exception occurs in each preset sample table when inserting data, if so, a target exception log is generated based on the abnormal preset test data type identifier; the target exception log is sent to the corresponding operation interface so that the tester can know the preset test data type that has an exception through the operation interface. Since it is necessary to adjust the preset table creation execution file or the preset data insertion execution file corresponding to the preset test data type that has an exception, after determining that an exception has occurred, by obtaining the abnormal preset test data type identifier, a target exception log can be generated and sent to the corresponding operation interface, so that the tester can know the preset test data type that has an exception through the operation interface, and adjust the corresponding preset table creation execution file or the preset data insertion execution file in a timely manner, further improving the efficiency of establishing a preset sample table and generating a preset sample data table.

[0110] As an optional embodiment, based on the second embodiment, after storing the preset test data corresponding to each preset test data type in the preset test data table, this embodiment further includes the following steps:

[0111] Step 701: perform a copy operation on a preset test data table, and store the copied preset test data table.

[0112] It is understandable that after the preset test data corresponding to each preset test data type is stored in the preset test data table, the preset test data table can be used in a specific test process. However, since subsequent tests may have new preset test data types, or there are preset test data types that need to be deleted, it is necessary to perform a copy operation on the preset test data table to adjust it according to subsequent specific needs.

[0113] In this embodiment, a preset test data table may be obtained, and the preset test data table may be copied to obtain a duplicate preset test data table, and the duplicate preset test data table may be stored.

[0114] Step 702 : in response to monitoring that the tester performs a trigger operation of updating the preset test data table through the operation interface, obtaining the copied preset test data table and target update data.

[0115] The target update data is preset test data corresponding to the new preset test data type.

[0116] In this embodiment, when there is a need to add a preset test data table, the tester can import the target update data in the operation interface of the corresponding terminal of the test device with data processing function, and click the component of updating the preset test data table based on the import result. In response to monitoring that the component of updating the preset test data table is triggered, the test device with data processing function obtains the imported target update data and obtains the pre-stored copied preset test data table.

[0117] It can be understood that the specific data construction method of the target update data is similar to steps 301-304, and will not be described in detail here.

[0118] Step 703: Use the target update data to update the copied preset test data table, and determine that the updated preset test data table is the preset test data table required for the next functional test.

[0119] In this embodiment, after the copied preset test data table and the target update data are obtained, the field of the target update data is identified to determine the preset test data type to which it belongs. Based on the determination result, the preset test data corresponding to the preset test data type is searched in the copied preset test data table, so that the preset test data is updated to the target update data, thereby completing the update of the copied preset test data table.

[0120] It is understandable that after the update is completed, the updated preset test data table can be determined as the preset test data table required for the next functional test, so that during the next functional test, the updated preset test data table is used in the specific test process.

[0121] It is understandable that when there is a need to delete the preset test data table, the tester can select the preset test data type identifier to be deleted in the operation interface of the corresponding terminal of the test equipment with data processing function, and click to delete the component of the preset test data table based on the selection result. In response to monitoring that the component for deleting the preset test data table is triggered, the test equipment with data processing function obtains the preset test data type identifier to be deleted and obtains the pre-stored copied preset test data table. The preset test data corresponding to the preset test data type to be deleted in the copied preset test data table is deleted, and it is determined that the deleted preset test data table is the preset test data table required for the next functional test.

[0122] The test method for data processing function provided in this embodiment, after storing the preset test data corresponding to each preset test data type in a preset test data table, performs a copy operation on the preset test data table, and stores the copied preset test data table; in response to monitoring that the tester performs a trigger operation to update the preset test data table through the operation interface, obtains the copied preset test data table and the target update data; uses the target update data to update the copied preset test data table, and determines that the updated preset test data table is the preset test data table required for the next functional test. Since the preset test data table may need to be updated later, by performing a copy operation on the preset test data table and storing it, the copied preset test data table and the target update data can be obtained after monitoring that the operation of updating the preset test data table is triggered, and the copied preset test data table can be updated using the target update data, thereby determining that the updated preset test data table is the preset test data table required for the next functional test. The preset test data corresponding to the preset test data type included in the preset test data table is continuously optimized, and the comprehensiveness of the test data coverage is further improved, thereby further enhancing the accuracy of the test.

[0123] Figure 4 A schematic diagram of a test device for a data processing function according to an embodiment of the present application is shown in FIG. Figure 4 As shown, the data processing function test device provided in this embodiment is located in the data processing function test equipment. Then the data processing function test device 80 provided in this embodiment includes: an acquisition module 81, a search module 82, and a test module 83.

[0124] Among them, the acquisition module 81 is used to obtain the target function identifier and the preset function test mapping table in response to monitoring the trigger operation of the test personnel executing the test target function through the operation interface; the preset function test mapping table includes a mapping relationship between multiple preset function identifiers and multiple preset test data type identifiers corresponding to each preset function; the search module 82 is used to search for at least one target test data type identifier required for the test target function in the preset function test mapping table according to the target function identifier; the acquisition module 81 is also used to obtain the preset test data table; the search module 82 is also used to search for the target test data corresponding to each target test data type in the preset test data table according to each target test data type identifier; the preset test data table includes the preset test data corresponding to all preset test data types; the preset test data is generated according to the preset test data type and the preset construction strategy; the acquisition module 81 is also used to obtain the target function test execution file according to the target function identifier; the testing module 83 is used to test the target function according to the target function test execution file and the target test data corresponding to each target test data type.

[0125] The data processing function testing device provided in this embodiment can be executed Figure 2 The specific implementation principles and technical effects of the method embodiments shown are similar and will not be repeated here.

[0126] Optionally, the preset construction strategy includes a structured query language SQL function construction strategy and a loop import construction strategy;

[0127] Correspondingly, the data processing function testing device provided in this embodiment further includes: a determination module, a construction module, and a storage module.

[0128] Among them, the acquisition module 81 is also used to obtain a preset test data type identifier and a preset construction strategy mapping table in response to monitoring the tester performing a trigger operation of generating preset test data through the operation interface before the trigger operation of the test target function is detected through the operation interface; the preset construction strategy mapping table includes a mapping relationship between multiple preset test data type identifiers and preset construction strategies corresponding to each preset test data type; the determination module is used to determine the preset construction strategy corresponding to each preset test data type according to the preset construction strategy mapping table; the acquisition module 81 is also used to obtain a preset sample data table corresponding to the preset test data type in response to determining that the preset construction strategy corresponding to the preset test data type is a loop import construction strategy; the construction module is used to construct the preset test data using the loop import construction strategy according to the preset sample data table; the acquisition module 81 is also used to obtain the preset sample function corresponding to the preset test data type in response to determining that the preset construction strategy corresponding to the preset test data type is an SQL function construction strategy; the construction module is also used to construct the preset test data using the SQL function construction strategy according to the preset sample function; the preset sample function is obtained according to the preset sample data table; the storage module is used to store the preset test data corresponding to each preset test data type in a preset test data table.

[0129] Optionally, the data processing function testing device provided in this embodiment further includes: a new creation module and a judgment module.

[0130] Among them, the acquisition module 81 is also used to obtain the preset table creation execution file corresponding to each preset test data type in response to monitoring the test personnel performing the trigger operation of generating preset test data through the operation interface, in response to monitoring the test personnel performing the trigger operation of creating a new data table through the operation interface. The new creation module is used to use the preset table creation execution file to create a new data table in the database corresponding to each preset test data type; the judgment module is used to judge whether an exception occurs in the database corresponding to each preset test data type when creating a new data table. The acquisition module 81 is also used to obtain each newly created data table if not. The determination module is also used to determine that each newly created data table is a preset sample table corresponding to each preset test data type.

[0131] Optionally, the data processing function testing device provided in this embodiment further includes: an insertion module.

[0132] Among them, the acquisition module 81 is also used for obtaining the preset sample table corresponding to each preset test data type and the corresponding preset data insertion execution file in response to monitoring that the test personnel execute the trigger operation of inserting data through the operation interface after the determination module determines that each newly created data table is the preset sample table corresponding to each preset test data type. The insertion module is used to insert data into the preset sample table using the preset data insertion execution file; the judgment module is also used to judge whether an exception occurs in each preset sample table when inserting data. The acquisition module 81 is also used to obtain the preset sample table of each inserted data if not. The determination module is also used to determine that the preset sample table of each inserted data is the preset sample data table corresponding to each preset test data type.

[0133] Optionally, the data processing function testing device provided in this embodiment further includes: a generating module and a sending module.

[0134] Among them, the generation module is used to determine whether the database corresponding to each preset test data type has an exception when creating a new data table, or whether an exception occurs when inserting data into each preset sample table. If so, a target exception log is generated based on the abnormal preset test data type identifier; the sending module is used to send the target exception log to the corresponding operation interface so that the tester can know the preset test data type with an exception through the operation interface.

[0135] Optionally, the data processing function testing device provided in this embodiment further includes: a copy module and an update module.

[0136] Among them, the copy module is used to perform a copy operation on the preset test data table after the storage module stores the preset test data corresponding to each preset test data type in the preset test data table, and the storage module is also used to store the copied preset test data table; the acquisition module 81 is also used to obtain the copied preset test data table and target update data in response to monitoring that the tester performs a trigger operation to update the preset test data table through the operation interface; the update module is used to update the copied preset test data table with the target update data, and the determination module is used to determine that the updated preset test data table is the preset test data table required for the next functional test.

[0137] The data processing function testing device provided in this embodiment can execute any one of the above method embodiments. The specific implementation principles and technical effects are similar and will not be repeated here.

[0138] Figure 5 A schematic diagram of a test device for a data processing function provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the data processing function testing device 90 provided in this embodiment includes: a processor 91 and a memory 92 which is communicatively connected with the processor.

[0139] The memory 92 stores computer-executable instructions; the processor 91 executes the computer-executable instructions stored in the memory 92 to implement the test method for the data processing function provided by any of the above embodiments. The relevant descriptions can be understood by referring to the relevant descriptions and effects corresponding to the steps in the accompanying drawings, and no further details are given here.

[0140] The program may include program code, and the program code includes computer-executable instructions. The memory 92 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0141] In this embodiment, the memory 92 is connected to the processor 91 via a bus. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0142] The embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the test method of the data processing function provided in any of the above embodiments. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.

[0143] An embodiment of the present application also provides a computer program product, including a computer program, which implements the test method of the data processing function provided by any one of the above embodiments when the computer program is executed by a processor.

[0144] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0145] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0146] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0147] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.

[0148] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. If not specifically stated, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. If not specifically stated, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc.

[0149] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. 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 memory and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0150] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0151] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0152] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for testing a data processing function, characterized in that: The method is used for testing equipment for data processing functions, and the method comprises: In response to monitoring that a tester performs a triggering operation of testing a target function through an operation interface, a target function identifier and a preset function test mapping table are obtained; the preset function test mapping table includes a mapping relationship between a plurality of preset function identifiers and a plurality of preset test data type identifiers corresponding to each preset function; Searching the preset function test mapping table for at least one target test data type identifier required for testing the target function according to the target function identifier; Obtain a preset test data table, and search for target test data corresponding to each target test data type in the preset test data table according to each target test data type identifier; the preset test data table includes preset test data corresponding to all preset test data types; the preset test data is generated according to the preset test data type and the preset construction strategy; A target function test execution file is acquired according to the target function identifier, and the target function is tested according to the target function test execution file and the target test data corresponding to each target test data type.

2. The method according to claim 1, characterized in that The preset construction strategy includes a structured query language SQL function construction strategy and a loop import construction strategy; Before responding to the trigger operation of monitoring that the tester executes the test target function through the operation interface, the method further includes: In response to monitoring that the tester performs a trigger operation to generate preset test data through the operation interface, a preset test data type identifier and a preset construction strategy mapping table are obtained; the preset construction strategy mapping table includes a mapping relationship between multiple preset test data type identifiers and preset construction strategies corresponding to each preset test data type; Determine the preset construction strategy corresponding to each preset test data type according to the preset construction strategy mapping table; In response to determining that the preset construction strategy corresponding to the preset test data type is a loop import construction strategy, obtaining a preset sample data table corresponding to the preset test data type, and constructing the preset test data using the loop import construction strategy according to the preset sample data table; In response to determining that the preset construction strategy corresponding to the preset test data type is an SQL function construction strategy, obtaining a preset sample function corresponding to the preset test data type, and constructing preset test data according to the preset sample function using the SQL function construction strategy; the preset sample function is obtained according to a preset sample data table; The preset test data corresponding to each preset test data type is stored in a preset test data table.

3. The method according to claim 2, characterized in that Before the tester is detected to have executed a trigger operation to generate preset test data through the operation interface, the method further includes: In response to monitoring that the tester executes a trigger operation of creating a new data table through the operation interface, obtaining a preset table creation execution file corresponding to each preset test data type, and using the preset table creation execution file to create a new data table in the database corresponding to each preset test data type; It is determined whether an exception occurs when creating a new data table in the database corresponding to each preset test data type. If not, each newly created data table is obtained and determined to be a preset sample table corresponding to each preset test data type.

4. The method according to claim 3, characterized in that: After determining that each newly created data table is a preset sample table corresponding to each preset test data type, the method further includes: In response to monitoring that the tester performs a trigger operation of inserting data through the operation interface, obtaining a preset sample table corresponding to each preset test data type and a corresponding preset data insertion execution file, and inserting data into the preset sample table using the preset data insertion execution file; It is determined whether each preset sample table has an exception when inserting data. If not, the preset sample table for each inserted data is obtained, and the preset sample table for each inserted data is determined to be the preset sample data table corresponding to each preset test data type.

5. The method according to claim 3 or 4, characterized in that: After determining whether an exception occurs when creating a new data table in the database corresponding to each preset test data type, or after determining whether an exception occurs when inserting data into each preset sample table, the method further includes: If yes, then generate a target exception log based on the preset test data type identifier of the exception; The target exception log is sent to the corresponding operation interface so that the tester can learn the preset test data type of the exception through the operation interface.

6. The method according to claim 2, characterized in that After storing the preset test data corresponding to each preset test data type in the preset test data table, the method further includes: Performing a copy operation on the preset test data table, and storing the copied preset test data table; In response to monitoring that the tester performs a trigger operation of updating the preset test data table through the operation interface, obtaining the copied preset test data table and target update data; The copied preset test data table is updated using the target update data, and the updated preset test data table is determined to be the preset test data table required for the next functional test.

7. A data processing function testing device, characterized in that: include: An acquisition module is used to acquire a target function identifier and a preset function test mapping table in response to monitoring a trigger operation of a tester executing a test target function through an operation interface; the preset function test mapping table includes a mapping relationship between a plurality of preset function identifiers and a plurality of preset test data type identifiers corresponding to each preset function; A search module, configured to search, according to the target function identifier, in the preset function test mapping table for at least one target test data type identifier required for testing the target function; The acquisition module is also used to acquire a preset test data table; The search module is further used to search the preset test data table for target test data corresponding to each target test data type according to each target test data type identifier; The preset test data table includes preset test data corresponding to all preset test data types; The preset test data is generated according to the preset test data type and the preset construction strategy; The acquisition module is further used to acquire the target function test execution file according to the target function identifier; The test module is used to test the target function according to the target function test execution file and the target test data corresponding to each target test data type.

8. The device according to claim 7, characterized in that The preset construction strategy includes a structured query language SQL function construction strategy and a loop import construction strategy; before the trigger operation of monitoring that the tester executes the test target function through the operation interface, it also includes: a determination module, a construction module and a storage module; The acquisition module is further used to acquire a preset test data type identifier and a preset construction strategy mapping table in response to monitoring that the tester performs a trigger operation to generate preset test data through the operation interface; the preset construction strategy mapping table includes a mapping relationship between multiple preset test data type identifiers and preset construction strategies corresponding to each preset test data type; A determination module, used to determine the preset construction strategy corresponding to each preset test data type according to the preset construction strategy mapping table; The acquisition module is further used to acquire a preset sample data table corresponding to the preset test data type in response to determining that the preset construction strategy corresponding to the preset test data type is a loop import construction strategy; A construction module, used for constructing preset test data according to the preset sample data table by adopting the loop import construction strategy; The acquisition module is further configured to acquire a preset sample function corresponding to the preset test data type in response to determining that the preset construction strategy corresponding to the preset test data type is an SQL function construction strategy; The construction module is further used to construct preset test data according to the preset sample function using the SQL function construction strategy; the preset sample function is obtained according to the preset sample data table; The storage module is used to store the preset test data corresponding to each preset test data type in a preset test data table.

9. A test device for data processing function, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.