Test Data Management Method, Device, Equipment and Computer Readable Storage Medium

By crawling and saving the test data of the business system and associating it with test cases, the cost of reconstructing data in version iterative tests is solved, and automatic data reuse and cost reduction are achieved.

CN110262975BActive Publication Date: 2025-05-27WEBANK (CHINA)
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201910541964.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-20
Publication Date
2025-05-27
Estimated Expiration
2039-06-20

AI Technical Summary

Technical Problem

In the version iteration or regression test of the financial field, the existing technology needs to be reconstructed, resulting in high time and labor costs.

Method used

A test data management method is proposed, by grabbing the test data of the current batch in the database of the business system, and correlating it with the batch identification, data slices are generated, and then the data slices are associated with the preset test cases and saved.

Benefits of technology

Automatic crawling and saving of test data is realized, avoiding the need to reconstruct data, and reducing time and labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110262975B_ABST
    Figure CN110262975B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of fintech, and discloses a test data management method, which includes: when it is detected that the batch task of the current batch of the business system is completed, grabbing the test data of the current batch from the database of the business system, and obtaining the batch identifier of the current batch; associating the test data with the batch identifier to generate a data slice of the current batch; and saving the data slice after associating it with a preset test case. The present invention also discloses a test data management device, equipment and a computer-readable storage medium. The present invention solves the technical problem of high time cost and labor cost caused by the need to recreate data in existing version iteration tests or regression tests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of financial technology (Fintech), and particularly to a test data management method, device, equipment, and computer-readable storage medium. Background Art

[0002] With the development of computer technology, more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) are applied in the financial field. The traditional financial industry is gradually transforming into financial technology (Fintech). However, due to the security and real-time requirements of the financial industry, higher requirements are also imposed on technologies.

[0003] In the current financial field, the update and iteration of business systems require automated testing. Automated testing is to automatically execute the procedures described in test cases step by step and compare the actual results obtained from the execution with the expected results to determine whether the update and iteration of the business system meet the expectations. The existing automated testing process is as follows: First, prepare test cases and formulate an executable batch plan according to the test cases. Then, execute the daily batch according to the batch plan to obtain data in a certain data form. After that, verify the test cases according to the data in this data form.

[0004] However, in the financial scenario, business data has the characteristics of complex life cycles and different data forms in each life cycle. After the verification of the previous batch of test cases is completed, the batch automatically rolls backward, and the data form will change accordingly, resulting in the automatic abandonment of the current test data and it cannot be used anymore. When subsequent version iteration testing or regression testing is carried out, the data to be tested can only be re-constructed, and re-creating data will consume more time and labor costs. Summary of the Invention

[0005] The main purpose of the present invention is to propose a test data management method, device, equipment, and computer-readable storage medium, aiming to solve the technical problem of excessive time and labor costs caused by the need to re-create data in existing version iteration testing or regression testing.

[0006] To achieve the above object, the present invention provides a test data management method, and the test data management method includes the following steps:

[0007] When it is detected that the batch task of the current batch of the business system is completed, grab the test data of the current batch from the database of the business system, and obtain the batch identifier of the current batch;

[0008] Associate the test data with the batch identifier to generate a data slice of the current batch;

[0009] Save the data slice after associating it with a preset test case.

[0010] Preferably, the step of scraping the test data of the current batch from the database of the business system includes:

[0011] Scrape the test data of the current batch from the database of the business system according to a preset data form and / or data type, where the data form is used to represent the stage at which the data is located in a preset full life cycle.

[0012] Preferably, the step of saving the data slice after associating it with a preset test case includes:

[0013] Obtain the required test data noted in the preset test case;

[0014] Take the data slice containing the required test data as the target data slice, and associate the target data slice with the test case;

[0015] Save the association relationship between the target data slice and the test case.

[0016] Preferably, after the step of saving the association relationship between the target data slice and the test case, it further includes:

[0017] When receiving a modification instruction based on the association relationship, modify the association relationship according to the modification instruction.

[0018] Preferably, the test data management method further includes:

[0019] When receiving a data restoration instruction, write the data slice into the database of the business system.

[0020] Preferably, the batch identifier includes a batch date, and the test data management method further includes:

[0021] When receiving a data slice query instruction, arrange and display the saved data slices according to the batch dates in the saved data slices;

[0022] When receiving a detailed view instruction triggered by the displayed data slice, display the test data in the data slice.

[0023] In addition, to achieve the above object, the present invention further provides a test data management device, and the test data management device includes:

[0024] A scraping module, configured to scrape the test data of the current batch from the database of the business system and obtain the batch identifier of the current batch when it is detected that the batch tasks of the current batch in the business system are completed;

[0025] A generation module, configured to associate the test data with the batch identifier to generate a data slice of the current batch;

[0026] An association module, configured to save the data slice after associating it with a preset test case.

[0027] Preferably, the scraping module is further configured to:

[0028] Scrape the test data of the current batch from the database of the business system according to a preset data form and / or data type, where the data form is used to represent the stage at which the data is located in a preset full life cycle.

[0029] Preferably, the association module is further configured to:

[0030] Obtain the required test data specified in the preset test case;

[0031] Use the data slice containing the required test data as the target data slice, and associate the target data slice with the test case;

[0032] Save the association relationship between the target data slice and the test case.

[0033] Preferably, the test data management device further includes:

[0034] A modification module, configured to modify the association relationship according to the modification instruction when a modification instruction based on the association relationship is received.

[0035] Preferably, the test data management device further includes:

[0036] A restoration module, configured to write the data slice into the database of the business system when a data restoration instruction is received.

[0037] Preferably, the batch identifier includes a batch date, and the test data management device further includes:

[0038] A display module, configured to arrange and display the saved data slices according to the batch dates in the saved data slices when a data slice query instruction is received; and display the test data in the data slice when a detail view instruction triggered by the displayed data slice is received.

[0039] In addition, to achieve the above object, the present invention further provides a test data management device, which includes: a memory, a processor, and a test data management program stored on the memory and executable on the processor. When the test data management program is executed by the processor, the steps of the above-described test data management method are implemented.

[0040] In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, on which a test data management program is stored. When the test data management program is executed by a processor, the steps of the above-described test data management method are implemented.

[0041] When the present invention detects that the batch task of the current batch in the business system is completed, it grabs the test data of the current batch from the database of the business system and obtains the batch identifier of the current batch; associates the test data with the batch identifier to generate a data slice of the current batch; and saves the data slice after associating it with a preset test case. In this way, the automatic grabbing and saving of the test data of the current batch are realized. When performing version iteration testing or regression testing later, the saved test data can be reused without having to recreate the data, thus avoiding the consumption of time cost and labor cost caused by recreating the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment solution of the present invention;

[0043] Figure 2 is a schematic flowchart of the first embodiment of the test data management method of the present invention.

[0044] The implementation, functional features, and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0045] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0046] As Figure 1 shown, Figure 1 is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment solution of the present invention.

[0047] The test data management device in the embodiment of the present invention can be a device such as a PC or a server.

[0048] As Figure 1As shown in the figure, the test data management device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0049] Those skilled in the art can understand that Figure 1 the device structure shown in the figure does not constitute a limitation on the device, and it may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements.

[0050] As Figure 1 shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a test data management program.

[0051] In Figure 1 the device shown in the figure, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client (user side) and communicate data with the client; and the processor 1001 may be used to call the test data management program stored in the memory 1005 and execute the operations in the following embodiments of the test data management method.

[0052] Based on the above hardware structure, embodiments of the test data management method of the present invention are proposed.

[0053] Referring to Figure 2 , Figure 2 is a schematic flowchart of the first embodiment of the test data management method of the present invention. The test data management method includes:

[0054] Step S10, when it is detected that the batch task of the current batch in the business system is completed, grab the test data of the current batch from the database of the business system and obtain the batch identifier of the current batch;

[0055] In this embodiment, the business system can be the business system of financial institutions such as banks, securities companies, insurance companies, etc. The business system is used to process various financial operations of users, such as savings, transfers, loans, investments, etc., and generate corresponding business data and save it in the background database of the business system.

[0056] To ensure the normal operation of the business system, automated testing is required every time the business system is updated or iterated. The existing automated testing process is as follows: First, prepare test cases. A test case refers to a set of test inputs, execution conditions, and expected results descriptions prepared for a specific goal to test a certain program path or verify whether a specific requirement is met. Then, based on the test cases, formulate an executable batch plan. A batch plan refers to a set of batch tasks that need to be executed to meet the execution conditions in the test cases. The batch plan can include multiple batches, and each batch contains several batch tasks. The batch execution of the business system is pulled by the scheduling system to start the tasks of the corresponding batch. Before the batch execution starts, an online transaction request can be sent to the business system through an automated testing platform to prepare the transactions for this batch, and then start the batch tasks to be executed later to generate the test data required by the test cases, and execute the automated cases to complete the verification of the data.

[0057] In the financial scenario, business data has the characteristics of complex life cycles and different data forms under each life cycle. To enable various forms of data generated by the business system when executing the batch plan to be reused in subsequent automated testing, this embodiment proposes a test data management method. The test data management method of this embodiment is applied to a test data management device, which is docked with the business system in the test environment and is used to capture and save the test data generated by the business system when executing the batch plan. Here, the test environment refers to the general term of computer hardware, software, network devices, and historical data necessary to complete software testing work.

[0058] During the process of executing automated testing in the test environment, the test data management device can start a detection program to detect the execution status of the batch plan of the business system in real time. Among them, the batch plan can be in units of days. After the business system performs a daily cut-off every day, it schedules the execution of the batch tasks for the current day. The way to detect the completion of the batch tasks of the current batch of the business system can be: determine whether the business system generates a daily cut-off. A daily cut-off means switching the system date to the next day. If a daily cut-off occurs, it is determined that the batch tasks of the current batch have been executed.

[0059] When it is detected that the batch tasks of the current batch of the business system have been executed, according to the predetermined rules, capture the test data of the current batch from the database of the business system, and obtain the batch identifier of the current batch. The batch identifier can be a combination of one or more of the batch date, number, and name.

[0060] In one embodiment, the step of fetching the test data of the current batch from the database of the service system may include: fetching the test data of the current batch from the database of the service system according to a preset data form and / or data type, where the data form is used to represent the stage at which the data is located in a preset full life cycle.

[0061] In this embodiment, the test data is taken as loan data for illustration. The full life cycle of loan data refers to the entire process from loan disbursement to loan repayment. This process includes several stages, such as normal repayment, 1-month overdue, 3-month overdue, etc. And the data form is used to represent the stage at which the data is located in a preset full life cycle. For example, the data form may include data in the normal repayment stage, data overdue for 1 month, data overdue for 3 months, etc.; and the data type may include outstanding debt to be repaid, debt already repaid, interest, etc. In specific implementation, for example, if the preset data form is data overdue for 1 month, then fetch the loan data overdue for 1 month in the current batch from the database of the service system. Another example, if the preset data type is interest data, then fetch all the interest data in the current batch from the database of the service system.

[0062] Step S20: Associate the test data with the batch identifier to generate a data slice of the current batch;

[0063] In this step, the fetched test data is associated with the batch identifier, thereby generating a data slice of the current batch. This data slice can be regarded as a static set of executable data containing various data forms indexed by the batch identifier.

[0064] Step S30: After associating the data slice with a preset test case, save it.

[0065] In this embodiment, after generating the data slice, associate the data slice with a preset test case and then save it. Specifically, each test case can be set with a unique number or name. When associating the data slice with the test case, only the number or name of the test case needs to be associated.

[0066] Further, this step S30 may include: obtaining the required test data noted in the preset test case; using the data slice containing the required test data as the target data slice, associating the target data slice with the test case; saving the association relationship between the target data slice and the test case.

[0067] Since each test case indicates the test data required for that test case, it is possible to obtain the required test data indicated in the preset test case, and then use the data slice containing the required test data as the target data slice and associate the target data slice with the test case. It should be noted that in actual testing, a data slice can be used by multiple test cases. For example, if there are currently three test cases 1, 2, and 3, and the test data they require is the loan data overdue for 1 month as of June 30th, then the data slice generated based on the loan data overdue for 1 month on June 30th can be associated with the test cases 1, 2, and 3 respectively. After the data slice is associated with the preset test case, the association relationship between the two is saved.

[0068] When performing version iteration testing or regression testing subsequently, the data to be tested in the test case can be directly obtained according to the above association relationship, thus realizing the reuse of test data.

[0069] Further, after the step of saving the association relationship between the target data slice and the test case, it may further include: when receiving a modification instruction based on the association relationship, modifying the association relationship according to the modification instruction.

[0070] In this embodiment, the test data management device can visually display the association relationship between the data slice and the test case for the convenience of management personnel to view. At the same time, the test data management device can receive a modification instruction based on the association relationship triggered by the management personnel to modify the association relationship. The modification includes, but is not limited to, adding or deleting the data slice associated with the test case.

[0071] By providing manual maintenance of the association relationship between the data slice and the test case, the association relationship between the data slice and the test case can be made more accurate and meet the actual test requirements.

[0072] In this embodiment, when it is detected that the batch task of the current batch of the business system has been completed, the test data of the current batch is captured from the database of the business system, and the batch identifier of the current batch is obtained; the test data is associated with the batch identifier to generate the data slice of the current batch; after the data slice is associated with the preset test case, it is saved. In this way, the automatic capture and saving of the test data of the current batch are realized. When performing version iteration testing or regression testing subsequently, the saved test data can be reused without having to recreate the data, thus avoiding the consumption of time cost and labor cost caused by recreating the data.

[0073] Further, based on the first embodiment of the test data management method of the present invention, a second embodiment of the test data management method of the present invention is proposed.

[0074] In this embodiment, the test data management method may further include: when a data restoration instruction is received, writing the data slice into the database of the service system.

[0075] Specifically, the data restoration instruction may be automatically triggered after the data slice is associated with a preset test case and saved, or may be manually triggered, or may be triggered when a data acquisition request of the service system is received. When the data restoration instruction is received, the test data management device writes the captured data slice of the current batch into the database of the service system to implement the restoration of test data. When performing version iteration testing or regression testing later, the service system can directly read the data in the saved data slice in the database according to the execution plan to perform the test, thereby realizing the reuse of test data.

[0076] Further, the batch identifier includes a batch date, and the test data management method may further include: when a data slice query instruction is received, arranging and displaying the saved data slices according to the batch date in the saved data slices; when a detailed view instruction triggered by the displayed data slice is received, displaying the test data in the data slice.

[0077] In this embodiment, when the test data management device receives a data slice query instruction, it can arrange and display the saved data slices according to the batch date in the data slice, from far to near or from near to far, for the convenience of management personnel to view. At the same time, the test data management device can receive the detailed view instruction triggered by the management personnel to display the test data in each data slice in detail.

[0078] By providing a data slice visualization display function, the management and maintenance of data slices are made clearer and more intuitive, meeting the viewing and maintenance requirements of data slices.

[0079] The present invention also provides a test data management device. The test data management device includes:

[0080] A capture module, configured to capture the test data of the current batch from the database of the service system and obtain the batch identifier of the current batch when it is detected that the batch task of the current batch of the service system is completed;

[0081] A generation module, configured to associate the test data with the batch identifier to generate a data slice of the current batch;

[0082] An association module, configured to associate the data slice with a preset test case and then save it.

[0083] Further, the capture module is further configured to:

[0084] Fetch the test data of the current batch from the database of the business system according to a preset data form and / or data type, where the data form is used to represent the stage at which the data is located in a preset full life cycle.

[0085] Furthermore, the association module is further configured to:

[0086] Obtain the required test data specified in a preset test case;

[0087] Use the data slice containing the required test data as the target data slice, and associate the target data slice with the test case;

[0088] Save the association relationship between the target data slice and the test case.

[0089] Furthermore, the test data management device further includes:

[0090] A modification module, configured to modify the association relationship according to the modification instruction when receiving a modification instruction based on the association relationship.

[0091] Furthermore, the test data management device further includes:

[0092] A restoration module, configured to write the data slice into the database of the business system when receiving a data restoration instruction.

[0093] Furthermore, the batch identifier includes a batch date, and the test data management device further includes:

[0094] A display module, configured to, when receiving a data slice query instruction, arrange and display the saved data slices according to the batch dates in the saved data slices; and when receiving a detail view instruction triggered by the displayed data slice, display the test data in the data slice.

[0095] The methods executed by the above program modules can refer to the various embodiments of the test data management method of the present invention, which will not be elaborated here.

[0096] The present invention also provides a computer-readable storage medium.

[0097] The computer-readable storage medium of the present invention stores a test data management program, and when the test data management program is executed by a processor, the steps of the test data management method as described above are implemented.

[0098] Wherein, the method implemented when the test data management program running on the processor is executed can refer to the various embodiments of the test data management method of the present invention, which will not be elaborated here.

[0099] It should be noted that, in this document, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or system comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, article or system comprising such element.

[0100] The serial numbers of the above-described embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.

[0101] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disc) and includes several instructions for causing a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0102] The above are only the preferred embodiments of the present invention and do not limit the patent scope of the present invention accordingly. Any equivalent structural or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A test data management method, characterized in that, the method comprises the following steps: When it is detected that the batch task of the current batch in the business system is completed, according to the preset data form and / or data type, grab the test data of the current batch from the database of the business system, and obtain the batch identifier of the current batch, wherein the data form is used to represent the stage where the data is located in the preset full life cycle; Associate the test data with the batch identifier to generate a data slice of the current batch, where the data slice is a static set of executable data containing various data forms indexed by the batch identifier; Obtain the required test data specified in the preset test case; Use the data slice containing the required test data as the target data slice, and associate the target data slice with the test case; Save the association relationship between the target data slice and the test case.

2. The test data management method according to claim 1, characterized in that, after the step of saving the association relationship between the target data slice and the test case, it further comprises: When a modification instruction based on the association relationship is received, modify the association relationship according to the modification instruction.

3. The test data management method according to any one of claims 1 to 2, characterized in that, the test data management method further comprises: When a data restoration instruction is received, write the data slice into the database of the business system.

4. The test data management method according to any one of claims 1 to 2, characterized in that, the batch identifier includes a batch date, and the test data management method further comprises: When a data slice query instruction is received, arrange and display the saved data slices according to the batch dates in the saved data slices; When a detailed view instruction triggered by the displayed data slice is received, display the test data in the data slice.

5. A test data management device, characterized in that, the test data management device comprises: A grabbing module, configured to, when it is detected that the batch task of the current batch in the business system is completed, according to the preset data form and / or data type, grab the test data of the current batch from the database of the business system, and obtain the batch identifier of the current batch, wherein the data form is used to represent the stage where the data is located in the preset full life cycle; A generating module, configured to associate the test data with the batch identifier to generate a data slice of the current batch, where the data slice is a static set of executable data containing various data forms indexed by the batch identifier; An associating module, configured to obtain the required test data specified in the preset test case; use the data slice containing the required test data as the target data slice, associate the target data slice with the test case; save the association relationship between the target data slice and the test case.

6. The test data management device according to claim 5, characterized in that, the test data management device further comprises: A modification module, configured to modify the association relationship according to the modification instruction when receiving the modification instruction based on the association relationship.

7. The test data management device according to any one of claims 5 to 6, wherein, the test data management device further includes: A restoration module, configured to write the data slice into the database of the service system when receiving a data restoration instruction.

8. The test data management device according to any one of claims 5 to 6, wherein, the batch identifier includes a batch date, and the test data management device further includes: A display module, configured to arrange and display the saved data slices according to the batch dates in the saved data slices when receiving a data slice query instruction; and display the test data in the data slices when receiving a detailed view instruction triggered by the displayed data slices.

9. A test data management device, wherein, the test data management device includes: a memory, a processor, and a test data management program stored on the memory and executable on the processor, and when the test data management program is executed by the processor, the steps of the test data management method according to any one of claims 1 to 4 are implemented.

10. A computer-readable storage medium, wherein, a test data management program is stored on the computer-readable storage medium, and when the test data management program is executed by a processor, the steps of the test data management method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Orchestrating and providing a regression test

    CA2947893A1

  • Test data generation method and device

    CN107943694A

  • Method and apparatus for obtaining test data

    CN109308301A