A test data processing method and system for a host system
By automating test data processing based on interfaces in the host system and utilizing the JCL template library and cloud platform, the problem of time-consuming, labor-intensive, and error-prone manual test data processing has been solved, achieving efficient and accurate data preparation.
Patent Information
- Application Number
- CN202211156265.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-09-22
AI Technical Summary
In existing technologies, manual processing of test data is time-consuming, labor-intensive, and prone to errors when dealing with millions of data points, making it impossible to efficiently complete data preparation.
By obtaining test requirements based on interfaces, the data extraction and filtering process is triggered. The JCL template library and cloud platform are used to automate the data processing, including data extraction, processing, filtering and loading, and finally generate parameterized files.
It enables efficient and accurate data preparation, and can handle various testing scenarios and different testing needs, reducing the time and errors of manual operations.
Smart Images

Figure CN115495356B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of financial data processing, and in particular to a test data processing method and system for a host system. BACKGROUND
[0002] In the financial field, in order to ensure that a business system can support sufficient pressure, performance testing is usually performed on the system before it is put into production. For a core business system deployed on an IBM mainframe, high-pressure testing is also required before it is put online.
[0003] In the prior art, in order to ensure the dispersion of data and a high test success rate, a test personnel needs to perform a large amount of data preparation work before testing, specifically by manually extracting and screening data, but when facing several million data quantities, manual methods are time-consuming and laborious, and are also prone to errors. SUMMARY
[0004] Therefore, embodiments of the present application provide a test data processing method and system for a host system to solve the problem that existing manual methods for processing test data are time-consuming and laborious, and are prone to errors.
[0005] To solve the above problems, embodiments of the present application provide the following technical solutions:
[0006] A first aspect of embodiments of the present application discloses a test data processing method for a host system, the method comprising:
[0007] obtaining a test requirement based on a set interface, and triggering execution of a data extraction process or a data screening process according to the test requirement, the interface being set based on different business rules of a test requirement party;
[0008] The data extraction process comprises:
[0009] extracting SQL data of a system under test that meets the test requirement from a pre-established job control language (JCL) template library as first test data, the JCL template library storing SQL data of the system under test that is pre-configured according to a configuration template;
[0010] processing the first test data to obtain second test data that can be recognized by the test requirement party;
[0011] The data screening process comprises:
[0012] loading the second test data to a screening script;
[0013] All transactions are initiated by using the cloud platform, and the screening script is executed to screen and process the transactions, to obtain final test data in the form of a parameterized file.
[0014] The final test data is loaded into the test script.
[0015] Preferably, the JCL database is pre-established, including:
[0016] SQL data of the system under test is obtained;
[0017] The SQL data is configured in lines based on the JCL job template, and a configuration template is generated;
[0018] The JCL database is established based on the configuration module.
[0019] Preferably, the method further includes:
[0020] New instructions or deletion instructions for the system under test are obtained, the new instructions containing SQL data newly added in the system under test, and the deletion instructions containing SQL data requested to be deleted in the system under test;
[0021] The configuration template is modified based on the new instructions or the deletion instructions, and the JCL database is updated.
[0022] Preferably, the first test data is processed to obtain second test data recognizable by the test demand side, including:
[0023] The first test data is subjected to data disordering and format processing to obtain the second test data recognizable by the test demand side.
[0024] Preferably, the second test data is loaded into the screening script, including:
[0025] The second test data is directly loaded into the screening script; or the second test data is subjected to XML configuration, and the configured second test data is loaded into the screening script.
[0026] Preferably, all transactions are initiated by using the cloud platform, and the screening script is executed to screen and process the transactions, to obtain final test data, including:
[0027] All transaction data are initiated by using the cloud platform, and the transactions are stressed by using Loadrunner or Jmeter, to obtain transactions with adjusted VU and data volume;
[0028] The screening script is executed to screen the adjusted transactions, to obtain screening data.
[0029] The screening data is collected and merged, deduplicated and disordered, and final test data in the form of parameterized files is generated.
[0030] The second aspect of the embodiments of the present application discloses a test data processing system for a host system, which comprises:
[0031] A triggering device is configured to obtain test requirements based on a set interface and trigger the execution of the automated data extraction device or the automated data screening device according to the test requirements, wherein the interface is set based on different business rules of the test requirement party;
[0032] The automated data extraction device is configured to extract SQL data of the tested system that meets the test requirements as first test data from a pre-established job control language (JCL) template library, process the first test data, and obtain second test data that can be recognized by the test requirement party, wherein the JCL template library stores SQL data of the tested system that is pre-configured according to a configuration template;
[0033] The automated data screening device is configured to load the second test data to a screening script, use a cloud platform to start all transactions, execute the screening script to screen and process the transactions, obtain final test data in the form of parameterized files, and load the final test data to a test script.
[0034] Preferably, the system further comprises:
[0035] A JCL database establishment device is configured to obtain SQL data of the tested system, configure the SQL data based on a JCL job template, generate a configuration template, and establish a JCL database based on the configuration template.
[0036] Preferably, the JCL database establishment device is further configured to:
[0037] Obtain an addition instruction or a deletion instruction for the tested system, wherein the addition instruction contains newly added SQL data in the tested system, and the deletion instruction contains SQL data that is requested to be deleted in the tested system; modify the configuration template based on the addition instruction or the deletion instruction, and update the JCL database.
[0038] Preferably, the automated data screening device that uses the cloud platform to start all transactions, executes the screening script to screen and process the transactions, and obtains final test data is specifically configured to:
[0039] The starting module is configured to start all transaction data by using a cloud platform, and to use Loadrunner or Jmeter to press the transaction to obtain an adjusted number of concurrent users VU and a transaction of data volume;
[0040] The screening module is configured to perform screening on the adjusted transaction by using the screening script to obtain screening data.
[0041] The processing module is configured to collect the screening data, and to perform merging, deduplication and disordering processing, and to generate final test data in the form of a parameterized file.
[0042] The method provided in the embodiment of the application disclosed above is a test data processing method for a host system, and the method is configured to obtain test requirements based on a set interface, and to trigger a data extraction process or a data screening process according to the test requirements, the interface being set based on different business rules of a test requirement party; the data extraction process includes: extracting SQL data of a system under test that meets the test requirements as first test data from a pre-established job control language (JCL) template library, the JCL template library storing SQL data of the system under test that is pre-configured according to a configuration template; processing the first test data to obtain second test data that can be recognized by the test requirement party; the data screening process includes: loading the second test data to a screening script; starting all transactions by using a cloud platform, and performing screening and processing on the transactions by using the screening script to obtain final test data, the final test data being in the form of a parameterized file; and loading the final test data to a test script. In the embodiment of the application, the data extraction process or the data screening process is triggered to be automatically executed according to the test requirements, which can solve the problems of time-consuming, labor-intensive and easy-to-make mistakes caused by manual data extraction or data screening, and can achieve the purpose of efficiently and accurately completing data preparation when facing various test scenarios and different test requirements. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, hereinafter, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only embodiments of the application, and for those skilled in the art, other drawings can be obtained without creative labor based on the provided drawings.
[0044] Figure 1 The flowchart of the test data processing method for a host system disclosed in the embodiment of the application;
[0045] Figure 2 The structural diagram of the test data processing system for a host system disclosed in the embodiment of the application. Detailed Implementation
[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0048] The following are definitions of abbreviations and technical terms used in the embodiments of this invention:
[0049] LoadRunner is a load testing tool that predicts system behavior and performance, and runs on Windows or Unix operating systems.
[0050] Z / OS: An operating system for mainframes that uses new CMOS technology.
[0051] JCL: Job Control Language.
[0052] VU: Number of concurrent users.
[0053] Performance testing: Performance testing uses testing tools to simulate various normal, peak, and abnormal load conditions to test various performance indicators of the system.
[0054] like Figure 1 The diagram shown is a flowchart illustrating a test data processing method for host systems disclosed in an embodiment of the present invention. The test data processing method for host systems disclosed in this embodiment of the present invention is universal and can be used for all application systems under the host, including but not limited to various data storage formats such as DB2 and VSAM.
[0055] The test data processing method for host-oriented systems mainly includes the following steps:
[0056] S101: Obtain test requirements based on the configured interface, and trigger the execution of a data extraction process or a data filtering process according to the test requirements.
[0057] In S101, the interface is set based on different business rules of the test demand side. The interface realizes the interface for different businesses by integrating the function of the pre-established JCL template library.
[0058] The information to be configured by the different business rules of the test demand side includes but is not limited to a public account number, a private account number, a customer number, a certificate number, and the like.
[0059] In the process of specifically executing S101, if the test demand obtained is a trigger execution data extraction process, S102 to S103 are executed; if the test demand obtained is a data screening process, S104 to S106 are executed.
[0060] It should be noted that even without the execution of the data extraction, the data screening can be directly performed on the existing data, and is not limited to new data. That is, the test data processing method disclosed in the embodiment of the present application can also realize breakpoint restart.
[0061] The data extraction process is as follows:
[0062] S102: extracting SQL data of a measured system that meets the test demand as first test data from a pre-established JCL template library.
[0063] In S102, the measured system refers to a host system, which is preferably a host Z / OS system. The measured system is used to store data and provide SQL statements of the data, i.e., SQL data.
[0064] The JCL template library stores the SQL data of the measured system configured in advance according to a configuration template.
[0065] In an embodiment of the present application, the process of pre-establishing the JCL template library is as follows:
[0066] First, the SQL data of the measured system is obtained. Second, the SQL data is configured line by line based on a JCL job template, and a configuration template is generated.
[0067] Finally, the JCL database is established based on the configuration module.
[0068] In the embodiment of the present application, by establishing a standardized JCL database, the JCL is configured line by line based on the configuration module, and only one JCL database can achieve the convenience of data extraction.
[0069] In an embodiment of the present application, the test data processing method further includes:
[0070] Obtaining an adding instruction or a deleting instruction for the system under test, modifying the configuration template based on the adding instruction or the deleting instruction, and updating the JCL database.
[0071] The adding instruction includes SQL data added in the system under test, and the deleting instruction includes SQL data requested to be deleted in the system under test.
[0072] In the embodiment of the application, based on the pre-established JCL database, the configuration template only needs to be modified according to the adding instruction or the deleting instruction, and the JCL does not need to be modified, so that the number of JCLs can be reduced, and the change frequency of different test requirements of different applications can be reduced.
[0073] S103: Processing the first test data to obtain second test data recognizable by the test requirement party.
[0074] In the process of specifically implementing S103, the first test data is subjected to data disordering and format processing to obtain the second test data recognizable by the test requirement party.
[0075] It should be noted that in the embodiment of the application, the processing is not limited to data disordering and format processing, and the specific operation of the processing can be set by a technician according to the requirement of subsequent data screening.
[0076] The data screening process is as follows:
[0077] S104: Loading the second test data to a screening script.
[0078] In the process of specifically implementing S104, the second test data can be directly loaded to the screening script.
[0079] The second test data can also be subjected to XML configuration, and the second test data after the configuration is loaded to the screening script.
[0080] S105: Starting all transactions by using a cloud platform, and executing the screening script to screen and process the transactions to obtain final test data.
[0081] In S105, the final test data exists in the form of a parameterized file.
[0082] In the process of specifically implementing S105, the final test data can be obtained in the following manner.
[0083] First, all transaction data are started by using the cloud platform, and the transactions are pressed by using Loadrunner or Jmeter to obtain transactions with adjusted VU and data volume.
[0084] In a specific application, since each transaction usually has a data volume of hundreds of thousands, if it is executed by 1 concurrent user VU, a large amount of time will be consumed, therefore, by using Loadrunner or Jmeter to press the transaction, the VU and the data volume distribution are automatically adjusted, so as to automatically execute and distribute, and the screening time is greatly shortened.
[0085] Secondly, the screening script is executed to screen the adjusted transaction, and screening data is obtained.
[0086] Finally, the screening data is collected and is subjected to merging, deduplication and disorder processing, and final test data in the form of a parameterized file is generated.
[0087] S106: loading the final test data to a test script.
[0088] After S106 is executed, data testing is completed according to the obtained test script, so that data preparation is efficiently and accurately completed.
[0089] According to the test data processing method for a host system provided in the embodiment of the present application, the test requirement is obtained based on a set interface, and a data extraction process or a data screening process is triggered according to the test requirement, the interface is set based on different business rules of a test requirement party; wherein the data extraction process comprises: extracting SQL data of a system under test that meets the test requirement as first test data from a pre-established job control language (JCL) template library, the JCL template library stores SQL data of the system under test that is pre-configured according to a configuration template; processing the first test data to obtain second test data that can be recognized by the test requirement party; the data screening process comprises: loading the second test data to a screening script; starting all transactions by using a cloud platform, and executing the screening script to screen and process the transactions to obtain final test data, the final test data exists in the form of a parameterized file; and loading the final test data to a test script. In the embodiment of the present application, the data extraction process or the data screening process is automatically executed according to the test requirement, which can solve the problems of time-consuming, laborious and easy-to-error caused by manual data extraction or data screening, and can realize the purpose of efficiently and accurately completing data preparation when facing various test scenarios and different test requirements.
[0090] Based on the test data processing method for a host system disclosed in the above embodiment of the present application, the embodiment of the present application further discloses a test data processing system for a host system, as shown in Figure 2 The test data processing system for a host system comprises: a triggering device 201, an automatic data extraction device 202 and an automatic data screening device 203.
[0091] Triggering device 201, configured to acquire a test requirement based on a set interface, and trigger execution of an automated data extraction device or an automated data screening device according to the test requirement, wherein the interface is set based on different business rules of a test requirement party.
[0092] The automated data extraction device 202 is configured to extract SQL data of a to-be-tested system that meets the test requirement as first test data from a pre-established job control language (JCL) template library, process the first test data, and obtain second test data recognizable by the test requirement party; and the JCL template library stores SQL data of the to-be-tested system preconfigured according to a configuration template.
[0093] In an embodiment of the present application, the automated data extraction device 202 that processes the first test data and obtains the second test data recognizable by the test requirement party is specifically configured to:
[0094] perform data disordering and format processing on the first test data to obtain the second test data recognizable by the test requirement party.
[0095] The automated data screening device 203 is configured to load the second test data into a screening script, use a cloud platform to start all transactions, execute the screening script to screen and process the transactions, obtain final test data in the form of a parameterized file, and load the final test data into a test script.
[0096] In an embodiment of the present application, the automated data screening device 203 that loads the second test data into a screening script is specifically configured to:
[0097] directly load the second test data into a screening script, or perform XML configuration on the second test data and load the configured second test data into a screening script.
[0098] In an embodiment of the present application, the automated data screening device 203 that uses a cloud platform to start all transactions and execute the screening script to screen and process the transactions to obtain final test data includes:
[0099] a starting module configured to use a cloud platform to start all transaction data, use Loadrunner or Jmeter to press the transactions, and obtain transactions with adjusted VU (virtual user) and data volume.
[0100] a screening module configured to execute the screening script to screen the adjusted transactions and obtain screening data.
[0101] The processing module is configured to collect the screening data, and perform merging, deduplication and disordering processing, and generate final test data in the form of a parameterized file.
[0102] In an embodiment of the present application, the test data processing system for the host system further comprises a JCL database establishing device.
[0103] The JCL database establishing device is configured to obtain SQL data of the system under test; configure the SQL data based on a JCL job template, and generate a configuration template; and establish a JCL database based on the configuration template.
[0104] In an embodiment of the present application, the JCL database establishing device is further configured to:
[0105] obtain an adding instruction or a deleting instruction for the system under test, the adding instruction containing SQL data added in the system under test, and the deleting instruction containing SQL data requested to be deleted in the system under test; modify the configuration template based on the adding instruction or the deleting instruction, and update the JCL database.
[0106] The test data processing system for the host system provided by the embodiment of the present application can trigger the execution of the automatic data extraction device or the automatic data screening device according to test requirements, and can solve the problems of time-consuming, laborious and easy-to-make mistakes caused by manual data extraction or data screening, and can achieve the purpose of efficient and high-accuracy data preparation in the face of various test scenarios and different test requirements.
[0107] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts of each of the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the system or system embodiments, since it is basically similar to the method embodiments, it is described more simply, and the relevant parts can be referred to the part of the method embodiments. The system and system embodiments described above are only illustrative, and the units described as separate components can be or can not be physically separated, and the components displayed as units can be or can not be physical units, that is, they can be located in one place or distributed on multiple network units. According to actual needs, part or all of the modules can be selected to achieve the purpose of the embodiment scheme. Those skilled in the art can understand and implement it without creative labor.
[0108] Those skilled in the art will further realize that the mechanisms of the various examples described herein are capable of being implemented using any number of combinations of the described features. Accordingly, these examples are not limited to the mechanisms described herein, but rather, the intent is to cover all modifications and alternatives equivalent thereto. The preceding description of the examples is illustrative, and not restrictive. Many other examples will be apparent to those of skill in the art upon reviewing the above description. The scope of the examples should, therefore, be determined not with reference to the above description, but instead should be given to the appended claims, along with their full scope of equivalents.
[0109] The above description of disclosed examples allows one of ordinary skill in the art to make and use the application. Modifications of those examples will be obvious to those of ordinary skill in the art, and the generic principles defined herein can be applied to other examples without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the examples shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A test data processing method for a host system, characterized by, The method comprises: obtaining a test requirement based on a set interface, and triggering an execution data extraction process or a data screening process according to the test requirement, wherein the interface is set based on different business rules of a test requirement party; the data extraction process comprises: extracting SQL data of a system under test that meets the test requirement as first test data from a pre-established job control language (JCL) template library, wherein the JCL template library stores SQL data of the system under test that is pre-configured according to a configuration template; processing the first test data to obtain second test data that can be recognized by the test requirement party; the data screening process comprises: loading the second test data to a screening script; starting all transactions by using a cloud platform, and executing the screening script to screen and process the transactions to obtain final test data, wherein the final test data exists in the form of a parameterized file; loading the final test data to a test script; wherein starting all transactions by using the cloud platform, and executing the screening script to screen and process the transactions to obtain the final test data comprises: starting all transaction data by using the cloud platform, and adjusting the transactions by using Loadrunner or Jmeter to obtain transactions with adjusted VU (virtual user) and data volume; screening the adjusted transactions by using the screening script to obtain screening data; collecting the screening data, and performing merging, deduplication and disordering processing, and generating final test data that exists in the form of a parameterized file.
2. The method of claim 1, wherein, The pre-established JCL template library comprises: obtaining SQL data of the system under test; configuring the SQL data row by row based on a JCL job template, and generating a configuration template; establishing a JCL template library based on the configuration template.
3. The method of claim 2, wherein, Further comprising: obtaining an added instruction or a deleted instruction for the system under test, wherein the added instruction contains added SQL data in the system under test, and the deleted instruction contains SQL data that is requested to be deleted in the system under test; modifying the configuration template based on the added instruction or the deleted instruction, and updating the JCL template library.
4. The method according to any one of claims 1 to 3, characterized in that, The processing of the first test data to obtain the second test data that can be recognized by the test requirement party comprises: performing data disordering and format processing on the first test data to obtain the second test data that can be recognized by the test requirement party.
5. The method according to any one of claims 1 to 3, characterized in that, The loading of the second test data to the screening script comprises: directly loading the second test data to the screening script; or performing XML configuration on the second test data, and loading the configured second test data to the screening script.
6. A test data processing system oriented to a host system, characterized by The system comprises: a triggering device configured to obtain a test requirement based on a set interface, and trigger an execution of an automatic data extraction device or an automatic data screening device according to the test requirement, wherein the interface is set based on different business rules of a test requirement party. An automatic data extraction device is used to extract SQL data of a system under test conforming to the test requirements as first test data from a pre-established job control language (JCL) template library, process the first test data, and obtain second test data recognizable by the party requiring the test; the JCL template library stores SQL data of the system under test pre-configured according to a configuration template; An automatic data screening device is used to load the second test data into a screening script, use a cloud platform to start all transactions, execute the screening script to screen and process the transactions, obtain final test data, and load the final test data into a test script; the final test data exists in the form of a parameterized file. The automatic data screening device that uses the cloud platform to start all transactions, execute the screening script to screen and process the transactions, and obtain the final test data is specifically used to: A starting module is used to use the cloud platform to start all transaction data, use Loadrunner or Jmeter to press the transactions, and obtain transactions with adjusted VU and data volume; A screening module is used to execute the screening script to screen the adjusted transactions, and obtain screening data; A processing module is used to collect the screening data, perform merging, deduplication, and disorder processing, and generate final test data existing in the form of a parameterized file.
7. The system of claim 6, wherein, Further comprising: A JCL template library establishing device is used to obtain SQL data of the system under test; Based on a JCL job template, the SQL data is configured line by line, and a configuration template is generated; and a JCL template library is established based on the configuration template.
8. The system of claim 7, wherein, The JCL template library establishing device is further used to: Obtain an added instruction or a deleted instruction for the system under test; the added instruction contains added SQL data in the system under test, and the deleted instruction contains SQL data requested to be deleted in the system under test; modify the configuration template based on the added instruction or the deleted instruction, and update the JCL template library.
Citation Information
Patent Citations
Automatic test method and system
CN108763093A
Environment building method and device supporting cross-system platforms
CN112463212A