CN113326206A - Method, apparatus, storage medium, and program product for testing data processing system - Google Patents

Method, apparatus, storage medium, and program product for testing data processing system Download PDF

Info

Publication number
CN113326206A
CN113326206A CN202110725136.9A CN202110725136A CN113326206A CN 113326206 A CN113326206 A CN 113326206A CN 202110725136 A CN202110725136 A CN 202110725136A CN 113326206 A CN113326206 A CN 113326206A
Authority
CN
China
Prior art keywords
information
file
test
data processing
target table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110725136.9A
Other languages
Chinese (zh)
Other versions
CN113326206B (en
Inventor
李贝贝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202110725136.9A priority Critical patent/CN113326206B/en
Publication of CN113326206A publication Critical patent/CN113326206A/en
Application granted granted Critical
Publication of CN113326206B publication Critical patent/CN113326206B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present disclosure provides a test method, device, storage medium and program product for a data processing system, relating to a test technology, wherein the scheme includes: acquiring a data processing file of a data processing system, and acquiring basic information from the data processing file; acquiring first element information and second element information according to the basic information; generating a test case file according to the first element information and the second element information; and acquiring the information of the test environment, and executing the test case file according to the information of the test environment to obtain a test result. According to the scheme provided by the disclosure, the process from the generation of the test case to the execution of the test case is standardized, and on one hand, the problems that a plurality of data tables and a plurality of data fields exist, the efficiency of processing and processing results of the test data is low and errors are easy to occur due to manual inspection are solved. On the other hand, the problem that manual testing needs to be performed according to experience and skill is solved, the test items are selected by means of an automatic device, the randomness of manually selecting the test items is avoided, and the dependence on testing experience is reduced.

Description

Method, apparatus, storage medium, and program product for testing data processing system
Technical Field
The present disclosure relates to testing technologies, and in particular, to a method, an apparatus, a storage medium, and a program product for testing a data processing system.
Background
In processing the data, the data may be processed using data processing systems that are capable of processing the data in the source table to obtain a processed data table. In order to ensure that the data sheet output by the data processing system is correct, the data processing system needs to be tested.
The data processing system has a plurality of data tables, a plurality of fields and fixed processing logic, and the test of the data processing system is to inspect the result of a target table processed by data processing after the data processing program is run, so that the system defects and problems in the data processing process are found. The existing test method of the data processing system tests a target table in the data processing system by manually writing a database test SQL statement and checks the result of data processing, so that system defects and problems in the data processing process are found, and the test of the data processing system is further realized.
In the implementation mode, the technical requirements on testers are high, certain related testing experience is required to be sufficient, meanwhile, the workload of manually writing and running the database to test the SQL sentences is large, the efficiency is low due to manual testing, and the test points are difficult to grasp.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a storage medium, and a program product for testing a data processing system, so as to solve the problem of low efficiency in testing the data processing system in the prior art.
A first aspect of the present disclosure is to provide a method for testing a data processing system, including:
acquiring a data processing file of the data processing system, and acquiring basic information from the data processing file;
screening out first element information from the basic information, wherein the first element information comprises a target table type;
displaying an information input interface according to the type of the target table included in the first element information, and acquiring second element information input in the interface;
generating a test case file according to the first element information and the second element information;
and acquiring the information of the test environment, and executing the test case file according to the information of the test environment to obtain a test result.
Another aspect of the present disclosure is to provide a test apparatus of a data processing system, including:
a basic information acquisition unit, configured to acquire a data processing file of the data processing system, and acquire basic information from the data processing file;
the element information acquisition unit is used for screening out first element information from the basic information, and the first element information comprises a target table type;
the element information acquisition unit is further used for displaying an information input interface according to the target table type included in the first element information and acquiring second element information input in the interface;
the case generating unit is used for generating a test case file according to the first element information and the second element information;
and the case execution unit is used for acquiring the information of the test environment and executing the test case file according to the information of the test environment to obtain a test result.
Yet another aspect of the present disclosure is to provide an electronic device including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of testing a data processing system as described above in the first aspect.
Yet another aspect of the present disclosure is to provide a computer readable storage medium having stored thereon a computer program to be executed by a processor to implement the method of testing a data processing system as described in the first aspect above.
The technical effects of the test method, the test device, the storage medium and the program product of the data processing system provided by the disclosure are as follows:
the present disclosure provides a method, apparatus, storage medium and program product for testing a data processing system, comprising: acquiring a data processing file of a data processing system, and acquiring basic information from the data processing file; screening out first element information from the basic information, wherein the first element information comprises a target table type; displaying an information input interface according to the type of the target table included in the first element information, and acquiring second element information input in the interface; generating a test case file according to the first element information and the second element information; and acquiring the information of the test environment, and executing the test case file according to the information of the test environment to obtain a test result. According to the scheme provided by the disclosure, the process from the generation of the test case to the execution of the test case is standardized, and on one hand, the problems that a plurality of data tables and a plurality of data fields exist, the efficiency of processing and processing results of the test data is low and errors are easy to occur due to manual inspection are solved. On the other hand, the problem that manual testing needs to be performed according to experience and skill is solved, the test items are selected by means of an automatic device, the randomness of manually selecting the test items is avoided, the dependence on testing experience is reduced, and meanwhile, the insufficient testing caused by insufficient selection of the test items is avoided. When the tester tests, even if the experience of the tester is insufficient, the characteristics of various data processing target tables cannot be inaccurately grasped, and test points cannot be missed or redundant cases cannot be generated.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating a method of testing a data processing system according to an exemplary embodiment of the present disclosure;
FIG. 2 is a schematic flow chart diagram illustrating a method of testing a data processing system according to another exemplary embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating testing of a data processing system according to an exemplary embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a test setup of a data processing system according to an exemplary embodiment of the present disclosure;
FIG. 5 is a schematic block diagram of a test setup of a data processing system according to another exemplary embodiment of the present disclosure;
fig. 6 is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure.
Detailed Description
The data processing system can process the data in the source table based on a certain logic rule to obtain the target table. The specific logic rules may be stored in a data processing file, and the system processes the data in the source table according to the data processing file.
In the data processing system, because there are many source tables to be processed and there are many fields in each table, when a defect exists in the test processing system, the target table is generally checked to find the defect existing in the test processing system.
Specifically, a target table in the data processing system is tested by manually writing a database test SQL statement, and a data processing result is checked, so that system defects and problems in the data processing process are found, and the data processing system is tested. The testing process of the data processing system mainly depends on subjective judgment of testers, is lack of constraint and specification, and the sufficiency and reliability of the test excessively depend on the experience level of the testers. The method has the advantages that test points are easy to miss, the test quality is difficult to control, technical requirements on testers are high, certain related test experience is required to be met, meanwhile, the workload of manually compiling and running the database test SQL sentences is large, the efficiency is low due to manual test, and the test points are difficult to control.
In order to solve the technical problems, in the scheme provided by the disclosure, the fixed information in the data processing process is extracted from the data processing file of the data processing system, a test case is generated by combining a small amount of information filled by a user, and then the data processing system is automatically tested by the generated test case.
Fig. 1 is a schematic flow chart illustrating a method for testing a data processing system according to an exemplary embodiment of the present disclosure.
As shown in fig. 1, the method for testing a data processing system provided in this embodiment includes:
step 101, acquiring a data processing file of a data processing system, and acquiring basic information from the data processing file.
The method provided by the disclosure can be executed by an electronic device with computing capability, wherein the electronic device is provided with a data processing system, or can be connected with a device provided with the data processing system. The electronic device can directly or indirectly access the data processing system to further acquire the data processing file in the data processing system.
Specifically, the data processing file is also called a plant model file, and is a set of data processing logic files defined by the data processing system for facilitating development, maintenance and management, and mainly includes a data structure of a target table, a mapping relationship between fields of a source table and the target table, a data processing rule, and the like. The data processing system can process the source table according to the processing logic recorded in the data processing file to finally obtain the target table.
Further, the target table refers to a data result table which is generated by processing one or more source tables according to a certain data logic processing rule and is required by an end user. The target table may be classified into a summary table, a broad table, a splice table, an aggregate table, a detail table, a master document table, a dictionary table, etc. according to the type of processing.
In practical application, a folder for storing data processing files may be provided, and each data processing file may be stored in the folder. The electronic device can acquire each data processing file from the folder and acquire basic information in each data processing file.
In an alternative embodiment, the extracted basic information may be stored in a basic information write file.
The basic information refers to key elements for testing obtained from the data processing file, and may include, for example, english name in the target table, english name in the field, field type, field main key mark, time zipper type, and the like, and may further include english name in the source table, english name in the field, and the like.
Specifically, a test basic information obtaining module may be provided, and the test basic information obtaining module executes step 101.
And 102, screening first element information from the basic information, wherein the first element information comprises a target table type.
Further, element information may be generated according to the basic information, and specifically, first element information may be extracted according to the basic information. The first factor information may be used to generate a test case.
In practical application, the basic information may include field information, such as a field name and a field type, and various types of first element information may be specifically screened from the basic information according to each field information.
The electronic device can extract a date field, a numerical field and a dictionary field from the basic information according to the field information. Optionally, the electronic device may further write each type of the first element information into a corresponding file, for example, write a date field into a date element file, write a value field into a value element file, and write a dictionary field into a dictionary element file.
Specifically, the basic information may further include name information of the target table, such as a chinese name and/or an english name, and the electronic device may further screen out the name information of the target table and use the name information as the first element information, where the electronic device may further determine the type of the target table according to the name information of the target table.
Further, the electronic device may also write the name and the type of the target table into a corresponding file, for example, the name and the type of the target table may be written into the target table element file.
In actual application, the first element information used for generating the test case can be automatically extracted from the basic information in the mode.
And 103, displaying an information input interface according to the target table type included in the first element information, and acquiring second element information input in the interface.
After the electronic device extracts the target table type in the first element information, the information input interface can be displayed according to the target table type. Thereby enabling the user to input information for testing the second element.
Specifically, when the data processing system performs data processing, the related data fields and the specific processing logic are complex, so that the test case can be generated together with the screened first element information and the second element information input by the user.
Further, the target table is different in type, the test cases used for testing and generating the target table are different, and the information specifically used for generating the test cases is also different. Therefore, different information input interfaces can be displayed according to different target table types, so that a user can accurately determine second element information required to be filled in, and the workload of the user is further reduced.
In actual application, an input interface corresponding to each target table type can be preset. For example, the input interface corresponding to the summary table may include a location for inputting the source table name and may also include a location for inputting the summary field. For another example, the input interface of the mosaic table may include a location for inputting the name of the main table of the source table.
The user can input the second element information in the input interface, for example, input the name of the source table, further, for example, input the name of the field in the source table, and the like. After the user inputs the second factor information, the electronic device may acquire the second factor information.
Specifically, a factor information processing module may be provided for executing steps 102 and 103.
And 104, generating a test case file according to the first element information and the second element information.
Further, the electronic device may generate a test case file by combining the first factor information and the second factor information, and may specifically generate the execution step. For example, the step of processing each field may be generated based on field information of the first factor information and the second factor information.
In practical application, the electronic device may further determine an expected result of each test case according to the contents in the first element information and the second element information. For example, the expected result of the use case execution may be determined according to the value range of each field in the target table.
Wherein, a use case template can be preset. Each column of information, such as a number, name, step, expected result, etc., may be specified in the use case template.
Specifically, the execution step can be in the form of an SQL statement, so that a user does not need to write the SQL statement manually, and the testing efficiency is improved.
Further, a test case module may be further configured, and the test case module executes step 104.
And 105, acquiring the information of the test environment, and executing the test case file according to the information of the test environment to obtain a test result.
In practical application, the electronic device may further obtain information of a test environment for executing the test case, such as an address and a port of a database to be accessed, and may further include information of a user account and a password, so that the user account and the password may be used to log in the test environment during testing, and the test environment may be built.
The electronic equipment can log in the corresponding test environment according to the information of the test environment and extract the execution steps from the test case file, so that the corresponding steps are executed in the test environment to return the execution result.
In an optional implementation manner, an execution result may be set in the test case file, and after a step in the test case file is executed, the execution result of the step may be filled in a corresponding position of the test case file.
The electronic device can also compare the execution result with the expected result of the test case to obtain the test result.
In an optional implementation manner, an environment configuration module may be provided, where the environment configuration module may be configured to obtain information of a test environment, and a case execution module may be further provided, where the case execution module is configured to execute a test case file in the test environment established by the environment configuration module.
The method provided by the embodiment is used for testing a data processing system, and is executed by equipment provided with the method provided by the embodiment, and the equipment is generally realized in a hardware and/or software mode.
The test method of the data processing system provided by the disclosure comprises the following steps: acquiring a data processing file of a data processing system, and acquiring basic information from the data processing file; screening out first element information from the basic information, wherein the first element information comprises a target table type; displaying an information input interface according to the type of the target table included in the first element information, and acquiring second element information input in the interface; generating a test case file according to the first element information and the second element information; and acquiring the information of the test environment, and executing the test case file according to the information of the test environment to obtain a test result. The test method of the data processing system provided by the disclosure standardizes the process from the generation of the test case to the execution of the test case, and solves the problems that on one hand, the data tables are more, the data fields are more, the efficiency of processing and processing results of the test data is low by manually checking the test data, and errors are easy to occur. On the other hand, the problem that manual testing needs to be performed according to experience and skill is solved, the test items are selected by means of an automatic device, the randomness of manually selecting the test items is avoided, the dependence on testing experience is reduced, and meanwhile, the insufficient testing caused by insufficient selection of the test items is avoided. When the tester tests, even if the experience of the tester is insufficient, the characteristics of various data processing target tables cannot be inaccurately grasped, and test points cannot be missed or redundant cases cannot be generated.
Fig. 2 is a flowchart illustrating a method of testing a data processing system according to another exemplary embodiment of the present disclosure.
As shown in fig. 2, the method for testing a data processing system provided in this embodiment includes:
step 201, acquiring target table information and source table information from a data processing file; the target table information includes any one of the following information: name information of the target table, field name information in the target table, field type information in the target table, field primary key information in the target table and time information of data in the target table; the source table information includes any one of the following information: name information of the source table, field name information in the source table.
The basic information that the electronic device can obtain from the data processing file may include target table information and source table information.
For example, the data processing file includes processing logic for generating a target table C according to the source table a and the source table B, and the processing logic may include which fields in the source table a are processed and which fields in the source table B are processed to obtain a certain field in the target table C. For example, field a in the source table a and field B in the source table B are added to obtain field C in the target table C.
Thus, the electronic device can acquire the information of the target table C, as well as the information of the source table a and the source table B.
Specifically, the source table information includes any one of the following information: name information of the source table, field name information in the source table. For example, the name of the source table A, B may be obtained, and the fields a, b in the source table may also be obtained.
Further, the target table information may include any one of the following information: name information of the target table, field name information in the target table, field type information in the target table, field primary key information in the target table, and time information of data in the target table.
For example, the name of the target table C may be obtained, the field C may be further included, the type of the field C may be further included, and a primary key used for identifying each piece of data in the target table C may be further obtained.
Step 202A, recording the name information of the target table into a first information file, and recording the table type of the target table in the first information file in response to the table type marking operation.
In practical application, the electronic device may further process the extracted basic information, so as to extract multiple categories of first factor information.
In one embodiment, the name information of the target table may be obtained from the basic information, and recorded in the first information file.
And the table type labeling interface can be displayed, so that the user labels the types of the target tables. The electronic device may record the type of each target table in the first information file. For example, the first information file includes the name C of the target table and the type of the target table C.
Specifically, the name information of the target table may be a chinese name and/or an english name of the target table.
Step 202B, determining a date field in the basic information according to the name and the type of each field included in the basic information, and recording the date field and the value range thereof into the second information file.
Further, the electronic device can screen out the date field from the basic information, specifically screen out the date field according to the name and the type of the field, and record the date field and the value range thereof into the second information file.
The value range of the date field can be obtained from the basic information. The value range of each field in the basic information can be obtained from the data processing file.
For example, if a field name is a date of generation in the basic information, the field may be used as a date field. For another example, if a field is set in a date format, the field can be used as a date field.
Step 202C, determining a numerical field in the basic information according to the type of each field included in the basic information, and recording the numerical field and the value range thereof into a third information file.
Furthermore, the electronic device can screen out a numerical field from the basic information, specifically screen out the numerical field according to the type of the field, and record the numerical field and the value range thereof into a third information file.
The value range of the value field can be obtained from the basic information. The value range of each field in the basic information can be obtained from the data processing file.
For example, if there is a field whose type is a numeric value in the basic information, the field and its value range may be written in the third information file.
Step 202D, if the basic information includes a dictionary field, recording the dictionary field and a value range thereof into a fourth information file, where the dictionary field included in the basic information has preset labeling information.
In practical application, a user may label the dictionary field included in the basic information in advance, for example, after the basic information is extracted, the electronic device may display the basic information, so that the user may label the dictionary field in the basic information.
The value range of the date field can be obtained from the basic information. The value range of each field in the basic information can be obtained from the data processing file.
The electronic equipment can identify preset labeling information included in the basic information, so that dictionary fields are screened out. Thereafter, the electronic device may record the dictionary class field and its value range into a fourth information file.
Step 203, determining the information to be confirmed according to the type of the target table, and displaying an information input interface for inputting the information to be confirmed in the interface.
The electronic device may obtain the table types of the target tables recorded in step 202A, where the table types may specifically include a summary table, a broad table, a splicing table, an aggregation table, a detail table, a master document table, a dictionary table, and the like, and then determine corresponding information to be confirmed according to the table types.
Specifically, if the target table type is a summary table, the to-be-confirmed information includes a summary field, name information of the source table, and a summary rule.
And if the type of the target table is a wide table or an isomorphic aggregation table, the information to be confirmed comprises name information of the source table.
If the target table type is a splicing table, the information to be confirmed comprises the name information of the main table of the spliced source table;
and if the target table type is a master file table, a detailed table or a dictionary table, the information to be confirmed comprises the date of the data to be tested.
In practical application, the electronic device may display an information input interface according to each piece of information to be confirmed, for example, the information to be confirmed includes a summary field, name information of the source table, and a summary rule, and the displayed information input interface may include a location for inputting the summary field, a location for inputting the name information of the source table, and a location for inputting the summary rule, so that a user may input the second element information in the interface.
And step 204, responding to the input operation of the information input interface, and recording each input information into a fifth information file corresponding to the target table type.
The user can operate in the information input interface to input each piece of information to be confirmed. For example, if the table type of the target table is a splicing table, the to-be-confirmed information includes the main table name information of the spliced source table, the displayed information input interface may include a location for filling in the main table name, and the user may fill in the main table name at the corresponding location.
Specifically, the electronic device may acquire information input by the user and record the information in the fifth information file.
Further, each type of target table has a corresponding fifth information file, for example, information input by a user in the information input interface of the splicing table may be recorded in the fifth information file corresponding to the splicing table.
Step 205, performing any one of the following processes according to the preset case template, the first element information and the second element information to generate a test case file: combining, splicing, sequencing and adding.
In practical application, a preset use case template may be set in the electronic device. In an optional implementation manner, corresponding use case templates may be further set for each type of target table, so that when a test case is generated, the test case may be generated according to the use case template corresponding to the type of the target table.
The electronic device can perform operations such as combining, splicing, sequencing, adding and the like on the contents in the first element information and the second element information, and then fill the processed information into the template, so as to generate the test case file.
Specifically, the preset use case template may specify information to be filled in each column, for example, the information may be a use case name, a use case sequence number, a use case step, and a use case expected result.
Further, information such as a use case serial number and a use case name may be automatically generated according to a requirement, or generated by combining the first factor information and the second factor information. The content in the first element information and the content in the second element information can be combined, spliced, sorted, added and the like, so that a use case step is generated, and specifically, the field can be operated to obtain the use case step.
In actual application, the generated test case file comprises a case execution step, and the case execution step is in the form of an SQL statement.
Wherein the first element information is determined by any one of the steps 202A-202D, and the second element information is determined by the steps 203-204.
And step 206, acquiring the information of the test environment, extracting a case execution step from the test case file, and operating the case execution step in the test environment to obtain an execution result.
After the test case file is generated, the electronic device may obtain information of the test environment, specifically, the information may include an address, a port, a user, a password, and the like of the test environment database, and the electronic device may access the corresponding test environment according to the information of the test environment, and then perform a test.
Specifically, the electronic device may extract each case execution step from the generated test case file, and then execute the case execution steps in the test environment.
Furthermore, the test case file may include a plurality of execution steps of the use case, and each of the execution steps of the use case may be executed in the test environment, so as to obtain an execution result corresponding to each of the execution steps of the use case.
In actual application, the case execution result can be written back to the test case file. For example, for a first test case, the execution result of the case may be written to a position corresponding to the test case in the test case file.
Specifically, after the SQL execution statement is extracted and analyzed from the test case file, the information of the test environment is obtained, the test case is then executed in the test environment, and the test execution result is returned to the test case file.
And step 207, obtaining an expected result corresponding to the execution step from the test case file, and comparing the execution result with the expected result to obtain a test result.
The test case file can also include expected results of each test case, and the electronic device can compare the execution results and the expected results of the test cases to obtain the test results.
Specifically, the electronic device may screen out a test result indicating that the test fails, and feed back a corresponding test case to the user, thereby reporting the situation that the test fails to pass to the user.
FIG. 3 is a flow chart illustrating testing of a data processing system according to an exemplary embodiment of the present disclosure.
As shown in fig. 3, the electronic device may acquire each data processing file 31 of the data processing system, and then read the basic information in the data processing file 31 and write it into the basic information file 32. Thereafter, the electronic device may extract the first factor information from the basic information file 32, and write each type of the first factor information into each of the first factor information files 33. The electronic device may also display an information input interface according to the target form type, and further generate the second element information file 34 based on the input operation of the user. Thereafter, the electronic device may generate a test case 35 according to the files 33 and 34, and execute the test case 35 to obtain a test result 36.
Fig. 4 is a schematic structural diagram of a test apparatus of a data processing system according to an exemplary embodiment of the present disclosure.
As shown in fig. 4, the present disclosure provides a test apparatus 400 of a data processing system, including:
a basic information obtaining unit 410, configured to obtain a data processing file of the data processing system, and obtain basic information from the data processing file;
an element information obtaining unit 420, configured to screen out first element information from the basic information, where the first element information includes a target table type;
the element information obtaining unit 420 is further configured to display an information input interface according to a target table type included in the first element information, and obtain second element information input in the interface;
a use case generating unit 430, configured to generate a test case file according to the first element information and the second element information;
the case execution unit 440 is configured to obtain information of a test environment, and execute the test case file according to the information of the test environment to obtain a test result.
The specific principle and implementation of the testing device of the data processing system provided by the present disclosure are similar to those of the embodiment shown in fig. 1, and are not described again.
Fig. 5 is a schematic structural diagram of a test apparatus of a data processing system according to another exemplary embodiment of the present disclosure.
As shown in fig. 5, in an optional implementation manner, the basic information obtaining unit 410 of the testing apparatus 500 of the data processing system according to the present disclosure is specifically configured to:
and acquiring target table information and source table information from the data processing file.
In an optional embodiment, the target table information includes any one of the following information:
name information of the target table, field name information in the target table, field type information in the target table, field primary key information in the target table, and time information of data in the target table;
the source table information includes any one of the following information:
name information of the source table, and field name information in the source table.
In an optional implementation, the element information obtaining unit 420 includes:
a table information obtaining module 421, configured to record name information of a target table in a first information file, and respond to a table type tagging operation, and record a table type of the target table in the first information file;
and/or, the date information obtaining module 422 is configured to determine a date field in the basic information according to the name and the type of each field included in the basic information, and record the date field and a value range thereof in the second information file;
and/or the numerical information obtaining module 423 is configured to determine a numerical field in the basic information according to the type of each field included in the basic information, and record the numerical field and the value range thereof in a third information file;
and/or the dictionary information obtaining module 424 is configured to record the dictionary field and the value range thereof in a fourth information file if the basic information includes the dictionary field, where the dictionary field included in the basic information has preset labeling information.
In an optional implementation, the element information obtaining unit 420 includes:
a display module 425, configured to determine information to be confirmed according to the type of the target table, and display an information input interface for inputting the information to be confirmed in the interface;
and a second element obtaining module 426, configured to record, in response to an input operation on the information input interface, each piece of input information in a fifth information file corresponding to the target table type.
In an optional implementation manner, if the target table type is a summary table, the information to be confirmed includes a summary field, name information of a source table, and a summary rule;
if the target table type is a wide table or an isomorphic aggregation table, the information to be confirmed comprises name information of a source table;
if the target table type is a splicing table, the information to be confirmed comprises main table name information of the spliced source table;
and if the target table type is a master file table, a detailed table or a dictionary table, the information to be confirmed comprises the date of the data to be tested.
In an optional implementation manner, the use case generating unit 430 is specifically configured to:
performing any one of the following processes according to a preset case template, the first element information and the second element information to generate the test case file:
combining, splicing, sequencing and adding.
In an optional implementation manner, the generated test case file includes a use case execution step, and the use case execution step is in the form of an SQL statement.
In an optional implementation manner, the use case execution unit 440 includes:
the execution module 441 is configured to extract a case execution step from the test case file, and run the case execution step in the test environment to obtain an execution result;
a comparison module 442, configured to obtain an expected result corresponding to the execution step from the test case file, and compare the execution result with the expected result to obtain the test result.
The specific principle and implementation of the apparatus provided in this embodiment are similar to those of the embodiment shown in fig. 2, and are not described here again.
Fig. 6 is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure.
As shown in fig. 6, the electronic device provided in this embodiment includes:
a memory 61;
a processor 62; and
a computer program;
wherein the computer program is stored in the memory 61 and configured to be executed by the processor 62 to implement a method of testing any of the data processing systems described above.
The present embodiments also provide a computer-readable storage medium, having stored thereon a computer program,
the computer program is executed by a processor to implement a method of testing any of the data processing systems described above.
The present embodiment also provides a computer program comprising a program code for executing any one of the above-described methods of testing a data processing system when the computer program is run by a computer.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present disclosure, and not for limiting the same; while the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present disclosure.

Claims (13)

1. A method of testing a data processing system, comprising:
acquiring a data processing file of the data processing system, and acquiring basic information from the data processing file;
screening out first element information from the basic information, wherein the first element information comprises a target table type;
displaying an information input interface according to the type of the target table included in the first element information, and acquiring second element information input in the interface;
generating a test case file according to the first element information and the second element information;
and acquiring the information of the test environment, and executing the test case file according to the information of the test environment to obtain a test result.
2. The method of claim 1, wherein said obtaining base information from said data manipulation file comprises:
and acquiring target table information and source table information from the data processing file.
3. The method of claim 2,
the target table information includes any one of the following information:
name information of the target table, field name information in the target table, field type information in the target table, field primary key information in the target table, and time information of data in the target table;
the source table information includes any one of the following information:
name information of the source table, and field name information in the source table.
4. The method of claim 1, wherein the screening out the first factor information from the basic information comprises:
recording name information of a target table into a first information file, responding to table type marking operation, and recording the table type of the target table in the first information file;
and/or determining a date field in the basic information according to the name and the type of each field included in the basic information, and recording the date field and the value range thereof into a second information file;
and/or determining a numerical field in the basic information according to the type of each field included in the basic information, and recording the numerical field and the value range thereof into a third information file;
and/or if the basic information comprises a dictionary field, recording the dictionary field and a value range thereof into a fourth information file, wherein the dictionary field in the basic information has preset marking information.
5. The method according to claim 1, wherein the displaying an information input interface according to a target table type included in the first factor information and acquiring second factor information input in the interface includes:
determining information to be confirmed according to the type of the target table, and displaying an information input interface for inputting the information to be confirmed in the interface;
and responding to the input operation of the information input interface, and recording each input information into a fifth information file corresponding to the target table type.
6. The method of claim 5,
if the target table type is a summary table, the information to be confirmed comprises summary fields, name information of a source table and summary rules;
if the target table type is a wide table or an isomorphic aggregation table, the information to be confirmed comprises name information of a source table;
if the target table type is a splicing table, the information to be confirmed comprises main table name information of the spliced source table;
and if the target table type is a master file table, a detailed table or a dictionary table, the information to be confirmed comprises the date of the data to be tested.
7. The method according to claim 1, wherein the generating a test case file according to the first element information and the second element information comprises:
performing any one of the following processes according to a preset case template, the first element information and the second element information to generate the test case file:
combining, splicing, sequencing and adding.
8. The method of claim 7, wherein the generated test case file comprises a use case execution step, and the use case execution step is in a form of an SQL statement.
9. The method of claim 8, wherein executing the test case file according to the information of the test environment to obtain a test result comprises:
extracting a case execution step from the test case file, and operating the case execution step in the test environment to obtain an execution result;
and obtaining an expected result corresponding to the execution step from the test case file, and comparing the execution result with the expected result to obtain the test result.
10. A test apparatus for a data processing system, comprising:
a basic information acquisition unit, configured to acquire a data processing file of the data processing system, and acquire basic information from the data processing file;
the element information acquisition unit is used for screening out first element information from the basic information, and the first element information comprises a target table type;
the element information acquisition unit is further used for displaying an information input interface according to the target table type included in the first element information and acquiring second element information input in the interface;
the case generating unit is used for generating a test case file according to the first element information and the second element information;
and the case execution unit is used for acquiring the information of the test environment and executing the test case file according to the information of the test environment to obtain a test result.
11. An electronic device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any of claims 1-9.
12. A computer-readable storage medium, having stored thereon a computer program,
the computer program is executed by a processor to implement the method according to any one of claims 1-9.
13. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-9.
CN202110725136.9A 2021-06-29 2021-06-29 Test method, apparatus, storage medium and program product for data processing system Active CN113326206B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110725136.9A CN113326206B (en) 2021-06-29 2021-06-29 Test method, apparatus, storage medium and program product for data processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110725136.9A CN113326206B (en) 2021-06-29 2021-06-29 Test method, apparatus, storage medium and program product for data processing system

Publications (2)

Publication Number Publication Date
CN113326206A true CN113326206A (en) 2021-08-31
CN113326206B CN113326206B (en) 2023-11-21

Family

ID=77425102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110725136.9A Active CN113326206B (en) 2021-06-29 2021-06-29 Test method, apparatus, storage medium and program product for data processing system

Country Status (1)

Country Link
CN (1) CN113326206B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981946A (en) * 2011-09-07 2013-03-20 阿里巴巴集团控股有限公司 Extract Transform and Load (ETL) smoke test method
US20150254166A1 (en) * 2014-03-05 2015-09-10 International Business Machines Corporation Automatic test case generation
US20150278393A1 (en) * 2014-03-25 2015-10-01 Wipro Limited System and method for business intelligence data testing
CN110399294A (en) * 2019-06-26 2019-11-01 平安科技(深圳)有限公司 Method for generating test case, device, computer equipment and storage medium
CN110837471A (en) * 2019-11-06 2020-02-25 中国农业银行股份有限公司 Test method, test device, server and storage medium
CN110990274A (en) * 2019-11-29 2020-04-10 中国银行股份有限公司 Data processing method, device and system for generating test case
US10929281B1 (en) * 2016-05-20 2021-02-23 Jpmorgan Chase Bank, N.A. Systems and methods for testing of data transformations

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981946A (en) * 2011-09-07 2013-03-20 阿里巴巴集团控股有限公司 Extract Transform and Load (ETL) smoke test method
US20150254166A1 (en) * 2014-03-05 2015-09-10 International Business Machines Corporation Automatic test case generation
US20150278393A1 (en) * 2014-03-25 2015-10-01 Wipro Limited System and method for business intelligence data testing
US10929281B1 (en) * 2016-05-20 2021-02-23 Jpmorgan Chase Bank, N.A. Systems and methods for testing of data transformations
CN110399294A (en) * 2019-06-26 2019-11-01 平安科技(深圳)有限公司 Method for generating test case, device, computer equipment and storage medium
CN110837471A (en) * 2019-11-06 2020-02-25 中国农业银行股份有限公司 Test method, test device, server and storage medium
CN110990274A (en) * 2019-11-29 2020-04-10 中国银行股份有限公司 Data processing method, device and system for generating test case

Also Published As

Publication number Publication date
CN113326206B (en) 2023-11-21

Similar Documents

Publication Publication Date Title
CN107622014B (en) Test report generation method and device, readable storage medium and computer equipment
CN109086203B (en) Page detection method and device
US7895576B2 (en) Method for automating internationalization software testing
CN107665171B (en) Automatic regression testing method and device
US20130263092A1 (en) Method of converting source code and source code conversion program
WO2013122876A1 (en) Code coverage rate determination method and system
CN110908890A (en) Automatic test method and device for interface
CN113282498B (en) Method, device, equipment and storage medium for generating test cases
CN110727603A (en) Improved method for automatically testing positioning elements based on UI (user interface)
CN109918242A (en) A kind of method and system of automatic detection server product configuration information
JP2012150535A (en) Program verification method and program verification program
CN111522741A (en) Interface test code generation method and device, electronic equipment and readable storage medium
US8510714B2 (en) Implementing integrated documentation and application testing
CN104360946A (en) Defect-testing computer implementation method and computer
JP2013218492A (en) Software test automatic evaluation device and method
CN113326206B (en) Test method, apparatus, storage medium and program product for data processing system
CN101067562A (en) Method, code, and apparatus for logging test results
CN115828856A (en) Test paper generation method, device, equipment and storage medium
CN116258129A (en) Method and system for generating personalized test report
WO2023284108A1 (en) Demand conformity analysis method and system, and electronic device and storage medium
CN111679983B (en) JAVA interface static test method and device
Dautovic et al. Automated quality defect detection in software development documents
JP2012098870A (en) Test result collation system, method and program
Wang et al. Applications of cucumber on automated functional simulation testing
CN115134819B (en) Test method and device for train control wireless block system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant