CN110262975A - Test data management method, device, equipment and computer readable storage medium - Google Patents
Test data management method, device, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN110262975A CN110262975A CN201910541964.XA CN201910541964A CN110262975A CN 110262975 A CN110262975 A CN 110262975A CN 201910541964 A CN201910541964 A CN 201910541964A CN 110262975 A CN110262975 A CN 110262975A
- Authority
- CN
- China
- Prior art keywords
- data
- test
- test data
- batch
- data management
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明涉及金融科技领域,并公开了一种测试数据管理方法,该方法包括:当检测到业务系统当前批次的批次任务执行完成时,从所述业务系统的数据库中抓取所述当前批次的测试数据,并获取所述当前批次的批次标识;将所述测试数据与所述批次标识相关联,以生成所述当前批次的数据切片;将所述数据切片与预设的测试用例相关联后保存。本发明还公开了一种测试数据管理装置、设备和一种计算机可读存储介质。本发明解决了现有的版本迭代测试或回归测试需要重新造数而导致的时间成本和人力成本耗费较多的技术问题。
The present invention relates to the field of financial science and technology, and discloses a method for managing test data. The method includes: when it is detected that the execution of the batch task of the current batch of the business system is completed, the current batch is fetched from the database of the business system. test data of a batch, and obtain the batch identification of the current batch; associate the test data with the batch identification to generate a data slice of the current batch; combine the data slice with the pre-set Save after associating with the set test cases. The invention also discloses a test data management device, equipment and a computer-readable storage medium. The invention solves the technical problem that the existing version iterative test or regression test needs to recreate numbers, which results in high time cost and labor cost.
Description
技术领域technical field
本发明涉及金融科技(Fintech)技术领域,尤其涉及测试数据管理方法、装置、设备及计算机可读存储介质。The present invention relates to the technical field of financial technology (Fintech), in particular to a test data management method, device, equipment and computer-readable storage medium.
背景技术Background technique
随着计算机技术的发展,越来越多的技术(大数据、分布式、区块链Blockchain、人工智能等)应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变,但由于金融行业的安全性、实时性要求,也对技术提出了更高的要求。With the development of computer technology, more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) The industry's security and real-time requirements also put forward higher requirements for technology.
在目前的金融领域,业务系统的更新、迭代都需要进行自动化测试,所谓自动化测试,是将测试用例中描述的规程一步步自动执行,并将执行得到的实际结果与期望结果进行比较,从而确定业务系统的更新、迭代是否达到预期的过程。现有的自动化测试流程为:首先准备测试用例,并根据测试用例制定可执行的批次计划,然后根据批次计划执行当日批次,得到某一数据形态的数据,之后,根据该数据形态下的数据对测试用例进行验证。In the current financial field, automated testing is required for the update and iteration of business systems. The so-called automated testing is to automatically execute the procedures described in the test cases step by step, and compare the actual results obtained by the execution with the expected results to determine The process of whether the update and iteration of the business system meet 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 batch of the day according to the batch plan to obtain data in a certain data form, and then, according to the data form The data to verify the test case.
然而金融场景下,业务数据具有生命周期复杂、且每个生命周期下的数据形态都不一样的特点,当上一批次的测试用例验证完成后,批次自动往后滚动,数据形态将随之改变,导致当前测试数据自动废弃,不可再用,当后续进行版本迭代测试或回归测试时,所要测试的数据只能重新构造,而重新造数会耗费较多的时间成本和人力成本。However, in financial scenarios, business data has a complex life cycle and different data forms in each life cycle. After the verification of the previous batch of test cases is completed, the batch will automatically roll back, and the data form will follow. The change will cause the current test data to be automatically discarded and cannot be reused. When subsequent version iteration testing or regression testing is performed, the data to be tested can only be reconstructed, and recreating numbers will consume more time and labor costs.
发明内容Contents of the invention
本发明的主要目的在于提出一种测试数据管理方法、装置、设备及计算机可读存储介质,旨在解决现有的版本迭代测试或回归测试需要重新造数而导致的时间成本和人力成本耗费较多的技术问题。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 time cost and labor cost caused by the need to recreate the existing version iterative test or regression test. Many technical issues.
为实现上述目的,本发明提供一种测试数据管理方法,所述测试数据管理方法包括如下步骤:In order to achieve the above object, the present invention provides a test data management method, the test data management method includes the following steps:
当检测到业务系统当前批次的批次任务执行完成时,从所述业务系统的数据库中抓取所述当前批次的测试数据,并获取所述当前批次的批次标识;When it is detected that the execution of the batch task of the current batch of the business system is completed, the test data of the current batch is fetched from the database of the business system, and the batch identifier of the current batch is obtained;
将所述测试数据与所述批次标识相关联,以生成所述当前批次的数据切片;Associating the test data with the batch identifier to generate a data slice of the current batch;
将所述数据切片与预设的测试用例相关联后保存。After associating the data slice with a preset test case, save it.
优选地,所述从所述业务系统的数据库中抓取所述当前批次的测试数据的步骤包括:Preferably, the step of fetching the current batch of test data from the database of the business system includes:
根据预设的数据形态和/或数据类型,从所述业务系统的数据库中抓取所述当前批次的测试数据,其中,所述数据形态用于表示数据在预设的全生命周期中所处的阶段。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, wherein the data form is used to represent the data in the preset full life cycle at the stage.
优选地,所述将所述数据切片与预设的测试用例相关联后保存的步骤包括:Preferably, the step of associating the data slice with a preset test case and storing it comprises:
获取预设的测试用例中注明的所需测试数据;Obtain the required test data indicated in the preset test cases;
将包含所述所需测试数据的数据切片作为目标数据切片,将所述目标数据切片与所述测试用例相关联;Using the data slice containing the required test data as a target data slice, associating the target data slice with the test case;
保存所述目标数据切片与所述测试用例之间的关联关系。The association relationship between the target data slice and the test case is saved.
优选地,所述保存所述目标数据切片与所述测试用例之间的关联关系的步骤之后,还包括:Preferably, after the step of saving the association relationship between the target data slice and the test case, it further includes:
当接收到基于所述关联关系的修改指令时,根据所述修改指令对所述关联关系进行修改。When a modification instruction based on the association relationship is received, the association relationship is modified according to the modification instruction.
优选地,所述测试数据管理方法还包括:Preferably, the test data management method also includes:
当接收到数据还原指令时,将所述数据切片写入至所述业务系统的数据库中。When receiving a data restoration instruction, write the data slice into the database of the service system.
优选地,所述批次标识包括批次日期,所述测试数据管理方法还包括:Preferably, the batch identification includes a batch date, and the test data management method also includes:
当接收到数据切片查询指令时,根据保存的所述数据切片中的批次日期,将保存的所述数据切片进行排列显示;When a data slice query instruction is received, the stored data slices are arranged and displayed according to the batch dates in the stored data slices;
当接收到基于显示的所述数据切片触发的详情查看指令时,显示所述数据切片中的测试数据。When receiving a detailed viewing instruction triggered based on the displayed data slice, display the test data in the data slice.
此外,为实现上述目的,本发明还提供一种测试数据管理装置,所述测试数据管理装置包括:In addition, in order to achieve the above purpose, the present invention also provides a test data management device, the test data management device includes:
抓取模块,用于当检测到业务系统当前批次的批次任务执行完成时,从所述业务系统的数据库中抓取所述当前批次的测试数据,并获取所述当前批次的批次标识;The capture module is used to capture the test data of the current batch from the database of the business system when it is detected that the execution of the batch tasks of the current batch of the business system is completed, and obtain the batch tasks of the current batch. Secondary ID;
生成模块,用于将所述测试数据与所述批次标识相关联,以生成所述当前批次的数据切片;A generating module, configured to associate the test data with the batch identifier, so as to generate a data slice of the current batch;
关联模块,用于将所述数据切片与预设的测试用例相关联后保存。The associating module is used for associating the data slice with a preset test case and saving it.
优选地,所述抓取模块还用于:Preferably, the grabbing module is also used for:
根据预设的数据形态和/或数据类型,从所述业务系统的数据库中抓取所述当前批次的测试数据,其中,所述数据形态用于表示数据在预设的全生命周期中所处的阶段。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, wherein the data form is used to represent the data in the preset full life cycle at the stage.
优选地,所述关联模块还用于:Preferably, the association module is also used for:
获取预设的测试用例中注明的所需测试数据;Obtain the required test data indicated in the preset test cases;
将包含所述所需测试数据的数据切片作为目标数据切片,将所述目标数据切片与所述测试用例相关联;Using the data slice containing the required test data as a target data slice, associating the target data slice with the test case;
保存所述目标数据切片与所述测试用例之间的关联关系。The association relationship between the target data slice and the test case is saved.
优选地,所述测试数据管理装置还包括:Preferably, the test data management device further includes:
修改模块,用于当接收到基于所述关联关系的修改指令时,根据所述修改指令对所述关联关系进行修改。A modification module, configured to modify the association relationship according to the modification instruction when the modification instruction based on the association relationship is received.
优选地,所述测试数据管理装置还包括:Preferably, the test data management device further includes:
还原模块,用于当接收到数据还原指令时,将所述数据切片写入至所述业务系统的数据库中。The restore module is configured to write the data slice into the database of the business system when receiving a data restore instruction.
优选地,所述批次标识包括批次日期,所述测试数据管理装置还包括:Preferably, the batch identification includes a batch date, and the test data management device also includes:
显示模块,用于当接收到数据切片查询指令时,根据保存的所述数据切片中的批次日期,将保存的所述数据切片进行排列显示;当接收到基于显示的所述数据切片触发的详情查看指令时,显示所述数据切片中的测试数据。The display module is configured to arrange and display the stored data slices according to the batch dates in the stored data slices when receiving the data slice query instruction; When viewing the command in detail, display the test data in the data slice.
此外,为实现上述目的,本发明还提供一种测试数据管理设备,所述测试数据管理设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的测试数据管理程序,所述测试数据管理程序被所述处理器执行时实现如上所述的测试数据管理方法的步骤。In addition, in order to achieve the above object, the present invention also provides a test data management device, which includes: a memory, a processor, and a test data management system stored in the memory and operable on the processor. A program, when the test data management program is executed by the processor, implements the steps of the above-mentioned test data management method.
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有测试数据管理程序,所述测试数据管理程序被处理器执行时实现如上所述的测试数据管理方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium, on which a test data management program is stored, and when the test data management program is executed by a processor, the above-mentioned Steps to test the data management method.
本发明当检测到业务系统当前批次的批次任务执行完成时,从所述业务系统的数据库中抓取所述当前批次的测试数据,并获取所述当前批次的批次标识;将所述测试数据与所述批次标识相关联,以生成所述当前批次的数据切片;将所述数据切片与预设的测试用例相关联后保存。通过这种方式,实现了将当前批次的测试数据进行自动抓取和保存,当后续进行版本迭代测试或回归测试时,可以复用该保存的测试数据而不必重新造数,从而避免了重新造数导致的时间成本和人力成本消耗。When the present invention detects that the execution of the batch task of the current batch of the business system is completed, the test data of the current batch is grabbed 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 a data slice of the current batch; the data slice is associated with a preset test case and saved. In this way, the current batch of test data is automatically captured and saved. When the subsequent version iteration test or regression test is performed, the saved test data can be reused without having to recreate the number, thus avoiding the need to recreate The time cost and labor cost consumption caused by number creation.
附图说明Description of drawings
图1是本发明实施例方案涉及的硬件运行环境的设备结构示意图;Fig. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present invention;
图2为本发明测试数据管理方法第一实施例的流程示意图。Fig. 2 is a schematic flowchart of the first embodiment of the test data management method of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
如图1所示,图1是本发明实施例方案涉及的硬件运行环境的设备结构示意图。As shown in FIG. 1 , FIG. 1 is a schematic diagram of the equipment structure of the hardware operating environment involved in the solution of the embodiment of the present invention.
本发明实施例测试数据管理设备可以是PC机、服务器等设备。The test data management device in the embodiment of the present invention may be a PC, a server, and other devices.
如图1所示,该测试数据管理设备可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1 , 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 . Wherein, the communication bus 1002 is used to realize connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. Optionally, the network interface 1004 may include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 can 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 .
本领域技术人员可以理解,图1中示出的设备结构并不构成对设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the device structure shown in FIG. 1 does not constitute a limitation to the device, and may include more or less components than shown in the figure, or combine some components, or arrange different components.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及测试数据管理程序。As shown in FIG. 1 , 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.
在图1所示的设备中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的测试数据管理程序,并执行下述测试数据管理方法实施例中的操作。In the equipment shown in Fig. 1, the network interface 1004 is mainly used to connect the background server and carry out data communication with the background server; the user interface 1003 is mainly used to connect the client (client) and carry out data communication with the client; and the processor 1001 can 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.
基于上述硬件结构,提出本发明测试数据管理方法实施例。Based on the above hardware structure, an embodiment of the test data management method of the present invention is proposed.
参照图2,图2为本发明测试数据管理方法第一实施例的流程示意图,所述测试数据管理方法包括:Referring to FIG. 2, FIG. 2 is a schematic flow chart of the first embodiment of the test data management method of the present invention, and the test data management method includes:
步骤S10,当检测到业务系统当前批次的批次任务执行完成时,从所述业务系统的数据库中抓取所述当前批次的测试数据,并获取所述当前批次的批次标识;Step S10, when it is detected that the execution of 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;
在本实施例中,业务系统可以为银行、证券公司、保险公司等金融机构的业务系统,业务系统用于处理用户的储蓄、转账、贷款、投资等各种金融业务,并生成对应的业务数据保存在业务系统的后台数据库中。In this embodiment, the business system can be a business system of a financial institution such as a bank, a securities company, an insurance company, etc. The business system is used to process various financial businesses such as savings, transfers, loans, and investments of users, and generate corresponding business data Stored in the background database of the business system.
为保证业务系统正常运行,业务系统每次进行更新、迭代都需要进行自动化测试。现有的自动化测试流程为:首先准备测试用例,测试用例指的是为某个特殊目标而编制的一组测试输入、执行条件以及预期结果的说明,以便测试某个程序路径或核实是否满足某个特定需求;然后,根据测试用例制定可执行的批次计划,批次计划指的是为了达到测试用例中的执行条件所需要执行的批次任务的集合,批次计划中可以包含多个批次,每个批次中包含若干个批次任务;业务系统批次执行由调度系统拉起对应批次的任务,在批次执行起来前,可以通过一个自动化测试平台向业务系统发起联机交易请求,准备该批次交易,然后启动批量后执行批次任务,从而生成测试用例所需要的测试数据,执行自动化案例完成对数据的验证。In order to ensure the normal operation of the business system, automated testing is required every time the business system is updated and iterated. The existing automated testing process is: first prepare the test case, the test case refers to a set of test input, execution conditions and expected results prepared for a special purpose, in order to test a program path or verify whether a certain A specific requirement; then, develop an executable batch plan according to the test case. The batch plan refers to the set of batch tasks that need to be executed in order to meet the execution conditions in the test case. The batch plan can contain multiple batches. times, each batch contains several batch tasks; the business system executes batches and the scheduling system pulls up the corresponding batch tasks. Before the batches are executed, an online transaction request can be initiated to the business system through an automated test platform , prepare the batch transaction, and then execute the batch task after starting the batch, so as to generate the test data required by the test case, and execute the automation case to complete the verification of the data.
金融场景下,业务数据具有生命周期复杂、且每个生命周期下的数据形态都不一样的特点,为使业务系统在执行批次计划时生成的各种形态的数据能够复用到后续的自动化测试中,本实施例提出一种测试数据管理方法。本实施例测试数据管理方法应用于测试数据管理设备,该测试数据管理设备与测试环境中的业务系统对接,用于对业务系统在执行批次计划时生成的测试数据进行抓取和保存,其中,测试环境是指为了完成软件测试工作所必需的计算机硬件、软件、网络设备、历史数据的总称。In financial scenarios, business data has complex life cycles and different data forms under each life cycle. In order to enable the business system to generate various forms of data when executing batch planning, it can be reused in subsequent automation In the test, this embodiment proposes a test data management method. The test data management method of this embodiment is applied to a test data management device, and the test data management device is connected to 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, wherein , The test environment refers to the general term for computer hardware, software, network equipment, and historical data necessary to complete software testing.
在测试环境执行自动化测试的过程中,测试数据管理设备可以启动一个检测程序,以对业务系统的批次计划执行情况进行实时检测。其中,批次计划可以以日为单位,业务系统每天日切后调度起当日批次任务执行跑批,检测业务系统当前批次的批次任务执行完成的方式可以为:判断业务系统是否产生日切,日切即切换系统日期至下一日,若产生日切,则判定当前批次的批次任务执行完成。During the process of executing the automated test in the test environment, the test data management device can start a detection program to perform real-time detection of the execution status of the batch plan of the business system. Among them, the batch plan can be in units of days, and the business system schedules the batch tasks of the day to execute batches after daily cuts. Cut, the day cut is to switch the system date to the next day, if a day cut occurs, it is judged that the batch task execution of the current batch is completed.
当检测到业务系统当前批次的批次任务执行完成时,按照预定规则,从业务系统的数据库中抓取当前批次的测试数据,并获取当前批次的批次标识,其中,批次标识可以是批次日期、编号、名称中的一种或多种的组合。When it is detected that the execution of the batch task of the current batch of the business system is completed, according to the predetermined rules, the test data of the current batch is grabbed from the database of the business system, and the batch ID of the current batch is obtained, where the batch ID It can be one or a combination of batch date, number, and name.
在一实施方式中,从所述业务系统的数据库中抓取所述当前批次的测试数据的步骤可以包括:根据预设的数据形态和/或数据类型,从所述业务系统的数据库中抓取所述当前批次的测试数据,其中,所述数据形态用于表示数据在预设的全生命周期中所处的阶段。In one embodiment, the step of grabbing the current batch of test data from the database of the business system may include: grabbing from the database of the business system according to a preset data form and/or data type The test data of the current batch is obtained, wherein the data form is used to indicate the stage of the data in the preset full life cycle.
在本实施例中,以测试数据为贷款数据进行说明,贷款数据的全生命周期指的是贷款从放款到贷款还清的整个过程,该过程包括若干阶段,比如正常还款、逾期1个月、逾期3个月等,而数据形态就用于表示数据在预设的全生命周期中所处的阶段,比如数据形态可以包括正常还款阶段的数据、逾期1个月的数据、逾期3个月的数据等;而数据类型可以包括应还欠款、已还欠款、利息等。具体实施时,比如预设的数据形态是逾期1个月的数据,则从业务系统的数据库中抓取当前批次逾期1个月的贷款数据,又如,预设的数据类型是利息数据,则从业务系统的数据库中抓取当前批次中的所有利息数据。In this embodiment, the test data is used as loan data for illustration. The full life cycle of loan data refers to the entire process of a loan from loan disbursement to loan repayment. This process includes several stages, such as normal repayment, one month overdue , 3 months overdue, etc., and the data form is used to indicate the stage of the data in the preset full life cycle. Monthly data, etc.; and data types can include arrears due, arrears paid, interest, etc. During specific implementation, for example, if the preset data form is data overdue for one month, the current batch of loan data overdue for one month will be fetched from the database of the business system. For another example, the default data type is interest data. Then grab all interest data in the current batch from the database of the business system.
步骤S20,将所述测试数据与所述批次标识相关联,以生成所述当前批次的数据切片;Step S20, associating the test data with the batch identifier to generate a data slice of the current batch;
该步骤中,将上述抓取到的测试数据与批次标识相关联,从而生成当前批次的数据切片,该数据切片可以看做是以批次标识为索引的一个包含各种数据形态的可执行数据的静态集合。In this step, the above-mentioned captured test data is associated with the batch ID to generate a data slice of the current batch, which can be regarded as an indexed batch ID that contains various data forms A static collection of execution data.
步骤S30,将所述数据切片与预设的测试用例相关联后保存。Step S30, associating the data slice with a preset test case and saving it.
在本实施例中,当生成数据切片后,将该数据切片与预设的测试用例相关联后保存。具体地,每个测试用例可以设置一个唯一的编号或名称,在将数据切片与测试用例关联时,只需关联测试用例的编号或名称即可。In this embodiment, after the data slice is generated, the data slice is associated with a preset test case and saved. Specifically, a unique number or name can be set for each test case, and when associating a data slice with a test case, only the number or name of the test case needs to be associated.
进一步地,该步骤S30可以包括:获取预设的测试用例中注明的所需测试数据;将包含所述所需测试数据的数据切片作为目标数据切片,将所述目标数据切片与所述测试用例相关联;保存所述目标数据切片与所述测试用例之间的关联关系。Further, this step S30 may include: obtaining the required test data indicated in the preset test case; taking the data slice containing the required test data as the target data slice, combining the target data slice with the test The use case is associated; the association relationship between the target data slice and the test case is saved.
由于每个测试用例,其中都会注明该测试用例所需的测试数据,因此,可以获取预设的测试用例中注明的所需测试数据,然后将包含所需测试数据的数据切片作为目标数据切片,将该目标数据切片与该测试用例相关联。需要说明的是,实际测试中,一个数据切片可以被多个测试用例使用,比如当前有三个测试用例1、2、3,它们所需的测试数据均为截止6月30号逾期1个月的贷款数据,则可以将6月30号根据逾期1个月的贷款数据生成的数据切片与该测试用例1、2、3分别关联。当数据切片与预设的测试用例相关联后,将两者之间的关联关系进行保存。Since each test case will indicate the test data required by the test case, the required test data indicated in the preset test case can be obtained, and then the data slice containing the required test data can be used as the target data slice, associate the target data slice with the test case. It should be noted that in actual testing, one data slice can be used by multiple test cases. For example, there are currently three test cases 1, 2, and 3, and the test data required by them are all overdue for one month as of June 30. For loan data, the data slices generated on June 30 based on the one-month overdue loan data can be associated with 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.
当后续进行版本迭代测试或回归测试时,测试用例中所要测试的数据,可以直接根据上述关联关系获取,从而实现了测试数据的复用。When the version iteration test or regression test is subsequently performed, the data to be tested in the test case can be directly obtained according to the above-mentioned association relationship, thereby realizing the reuse of test data.
进一步地,所述保存所述目标数据切片与所述测试用例之间的关联关系的步骤之后,还可以包括:当接收到基于所述关联关系的修改指令时,根据所述修改指令对所述关联关系进行修改。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 The association relationship is modified.
在本实施例中,测试数据管理设备可以将数据切片与测试用例之间的关联关系进行可视化展示,以便于管理人员查看,同时,测试数据管理设备可以接收管理人员触发的基于关联关系的修改指令,以对该关联关系进行修改,该修改包括但不限于增加、删除与测试用例关联的数据切片。In this embodiment, the test data management device can visually display the association relationship between the data slice and the test case, so that the management personnel can view it. At the same time, the test data management device can receive the modification instruction based on the association relationship triggered by the management personnel. , to modify the association relationship, the modification includes but not limited to adding and deleting data slices associated with the test case.
通过提供对数据切片与测试用例之间的关联关系的手动维护,能够使数据切片与测试用例之间的关联关系更加准确且符合实际测试需求。By providing manual maintenance of the association relationship between data slices and test cases, the association relationship between data slices and test cases can be more accurate and meet actual testing requirements.
在本实施例中,当检测到业务系统当前批次的批次任务执行完成时,从所述业务系统的数据库中抓取所述当前批次的测试数据,并获取所述当前批次的批次标识;将所述测试数据与所述批次标识相关联,以生成所述当前批次的数据切片;将所述数据切片与预设的测试用例相关联后保存。通过这种方式,实现了将当前批次的测试数据进行自动抓取和保存,当后续进行版本迭代测试或回归测试时,可以复用该保存的测试数据而不必重新造数,从而避免了重新造数导致的时间成本和人力成本消耗。In this embodiment, when it is detected that the execution of the batch tasks of the current batch in the business system is completed, the test data of the current batch is fetched from the database of the business system, and the batch tasks of the current batch are obtained. associate the test data with the batch identifier to generate a data slice of the current batch; associate the data slice with a preset test case and save it. In this way, the current batch of test data is automatically captured and saved. When the subsequent version iteration test or regression test is performed, the saved test data can be reused without having to recreate the number, thus avoiding the need to recreate The time cost and labor cost consumption caused by number creation.
进一步地,基于本发明测试数据管理方法第一实施例,提出本发明测试数据管理方法第二实施例。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.
在本实施例中,所述测试数据管理方法还可以包括:当接收到数据还原指令时,将所述数据切片写入至所述业务系统的数据库中。In this embodiment, the test data management method may further include: when receiving a data restoration instruction, writing the data slice into the database of the business system.
具体地,数据还原指令可以是在将数据切片与预设的测试用例相关联并保存之后自动触发,也可以是人为触发,或者是在接收到业务系统的数据获取请求时触发,当接收到数据还原指令时,测试数据管理设备将抓取到的当前批次的数据切片写入至业务系统的数据库中,以实现测试数据的还原,后续进行版本迭代测试或回归测试时,业务系统可以根据执行计划,直接读取数据库中保存的数据切片中的数据执行测试,由此实现了测试数据的复用。Specifically, the data restoration instruction can be automatically triggered after associating and saving the data slice with the preset test case, or it can be triggered manually, or it can be triggered when a data acquisition request from the business system is received. When restoring instructions, the test data management device writes the captured data slices of the current batch into the database of the business system to restore the test data. When subsequent version iteration testing or regression testing is performed, the business system can execute Plan, directly read the data in the data slice saved in the database to execute the test, thus realizing the reuse of test data.
进一步地,批次标识包括批次日期,所述测试数据管理方法还可以包括:当接收到数据切片查询指令时,根据保存的所述数据切片中的批次日期,将保存的所述数据切片进行排列显示;当接收到基于显示的所述数据切片触发的详情查看指令时,显示所述数据切片中的测试数据。Further, the batch identification includes a batch date, and the test data management method may further include: when receiving a data slice query instruction, according to the saved batch date in the data slice, the stored data slice Arranging and displaying; when receiving a detailed viewing instruction triggered based on the displayed data slices, displaying the test data in the data slices.
在本实施例中,测试数据管理设备可以在接收到数据切片查询指令时,根据数据切片中的批次日期,按照日期由远及近或由近及远,将保存的数据切片进行排列显示,以便于管理人员查看,同时,测试数据管理设备可以接收管理人员触发的详情查看指令,以详细显示每个数据切片中的测试数据。In this embodiment, when the test data management device receives the data slice query instruction, it can arrange and display the saved data slices according to the batch dates in the data slices according to the dates from far to near or from near to far, In order to facilitate the management personnel to view, at the same time, the test data management device can receive a detailed viewing instruction triggered by the management personnel to display the test data in each data slice in detail.
通过提供数据切片可视化展示功能,使得数据切片的管理维护更加清晰、直观,满足了对数据切片的查看、维护需求。By providing the visual display function of data slices, the management and maintenance of data slices are made clearer and more intuitive, which meets the requirements for viewing and maintaining data slices.
本发明还提供一种测试数据管理装置。所述测试数据管理装置包括:The invention also provides a test data management device. The test data management device includes:
抓取模块,用于当检测到业务系统当前批次的批次任务执行完成时,从所述业务系统的数据库中抓取所述当前批次的测试数据,并获取所述当前批次的批次标识;The capture module is used to capture the test data of the current batch from the database of the business system when it is detected that the execution of the batch tasks of the current batch of the business system is completed, and obtain the batch tasks of the current batch. Secondary ID;
生成模块,用于将所述测试数据与所述批次标识相关联,以生成所述当前批次的数据切片;A generating module, configured to associate the test data with the batch identifier, so as to generate a data slice of the current batch;
关联模块,用于将所述数据切片与预设的测试用例相关联后保存。The associating module is used for associating the data slice with a preset test case and saving it.
进一步地,所述抓取模块还用于:Further, the grabbing module is also used for:
根据预设的数据形态和/或数据类型,从所述业务系统的数据库中抓取所述当前批次的测试数据,其中,所述数据形态用于表示数据在预设的全生命周期中所处的阶段。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, wherein the data form is used to represent the data in the preset full life cycle at the stage.
进一步地,所述关联模块还用于:Further, the association module is also used for:
获取预设的测试用例中注明的所需测试数据;Obtain the required test data indicated in the preset test cases;
将包含所述所需测试数据的数据切片作为目标数据切片,将所述目标数据切片与所述测试用例相关联;Using the data slice containing the required test data as a target data slice, associating the target data slice with the test case;
保存所述目标数据切片与所述测试用例之间的关联关系。The association relationship between the target data slice and the test case is saved.
进一步地,所述测试数据管理装置还包括:Further, the test data management device also includes:
修改模块,用于当接收到基于所述关联关系的修改指令时,根据所述修改指令对所述关联关系进行修改。A modification module, configured to modify the association relationship according to the modification instruction when the modification instruction based on the association relationship is received.
进一步地,所述测试数据管理装置还包括:Further, the test data management device also includes:
还原模块,用于当接收到数据还原指令时,将所述数据切片写入至所述业务系统的数据库中。The restore module is configured to write the data slice into the database of the business system when receiving a data restore instruction.
进一步地,所述批次标识包括批次日期,所述测试数据管理装置还包括:Further, the batch identification includes a batch date, and the test data management device also includes:
显示模块,用于当接收到数据切片查询指令时,根据保存的所述数据切片中的批次日期,将保存的所述数据切片进行排列显示;当接收到基于显示的所述数据切片触发的详情查看指令时,显示所述数据切片中的测试数据。The display module is configured to arrange and display the stored data slices according to the batch dates in the stored data slices when receiving the data slice query instruction; When viewing the command in detail, display the test data in the data slice.
上述各程序模块所执行的方法可参照本发明测试数据管理方法各个实施例,此处不再赘述。For the methods executed by the above program modules, reference may be made to the various embodiments of the test data management method of the present invention, which will not be repeated here.
本发明还提供一种计算机可读存储介质。The present invention also provides a computer-readable storage medium.
本发明计算机可读存储介质上存储有测试数据管理程序,所述测试数据管理程序被处理器执行时实现如上所述的测试数据管理方法的步骤。A test data management program is stored on the computer-readable storage medium of the present invention, and when the test data management program is executed by a processor, the steps of the above-mentioned test data management method are realized.
其中,在所述处理器上运行的测试数据管理程序被执行时所实现的方法可参照本发明测试数据管理方法各个实施例,此处不再赘述。Wherein, for the method implemented when the test data management program running on the processor is executed, reference may be made to various embodiments of the test data management method of the present invention, which will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, as used herein, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or system comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or system. Without further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or system comprising that element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present invention can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM) , magnetic disk, optical disk), including several instructions to make a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the method described in each embodiment of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process conversion made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910541964.XA CN110262975B (en) | 2019-06-20 | 2019-06-20 | Test data management method, device, equipment and computer readable storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910541964.XA CN110262975B (en) | 2019-06-20 | 2019-06-20 | Test data management method, device, equipment and computer readable storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110262975A true CN110262975A (en) | 2019-09-20 |
| CN110262975B CN110262975B (en) | 2025-05-27 |
Family
ID=67920208
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910541964.XA Active CN110262975B (en) | 2019-06-20 | 2019-06-20 | Test data management method, device, equipment and computer readable storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110262975B (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111078545A (en) * | 2019-12-05 | 2020-04-28 | 贝壳技术有限公司 | Method and system for automatically generating test data |
| CN111143396A (en) * | 2019-12-04 | 2020-05-12 | 深圳市智微智能软件开发有限公司 | High-voltage test data management method and system |
| CN112527909A (en) * | 2020-12-24 | 2021-03-19 | 东软睿驰汽车技术(沈阳)有限公司 | Data slice processing method and device and related products |
| CN112650688A (en) * | 2020-12-30 | 2021-04-13 | 深圳前海微众银行股份有限公司 | Automated regression testing method, associated device and computer program product |
| CN113220579A (en) * | 2021-05-18 | 2021-08-06 | 京东科技控股股份有限公司 | Method, device, equipment and storage medium for processing stock test data |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CA2947893A1 (en) * | 2016-01-28 | 2017-07-28 | Accenture Global Solutions Limited | Orchestrating and providing a regression test |
| CN107832230A (en) * | 2017-12-04 | 2018-03-23 | 中国工商银行股份有限公司 | Method of testing, equipment and system based on data tuning |
| CN107943694A (en) * | 2017-11-21 | 2018-04-20 | 中国农业银行股份有限公司 | A kind of test data generating method and device |
| CN109308301A (en) * | 2018-09-28 | 2019-02-05 | 中国银行股份有限公司 | The preparation method and device of test data |
| CN109800144A (en) * | 2018-12-12 | 2019-05-24 | 北京京东尚科信息技术有限公司 | Test method, system and the device of application program |
-
2019
- 2019-06-20 CN CN201910541964.XA patent/CN110262975B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CA2947893A1 (en) * | 2016-01-28 | 2017-07-28 | Accenture Global Solutions Limited | Orchestrating and providing a regression test |
| CN107943694A (en) * | 2017-11-21 | 2018-04-20 | 中国农业银行股份有限公司 | A kind of test data generating method and device |
| CN107832230A (en) * | 2017-12-04 | 2018-03-23 | 中国工商银行股份有限公司 | Method of testing, equipment and system based on data tuning |
| CN109308301A (en) * | 2018-09-28 | 2019-02-05 | 中国银行股份有限公司 | The preparation method and device of test data |
| CN109800144A (en) * | 2018-12-12 | 2019-05-24 | 北京京东尚科信息技术有限公司 | Test method, system and the device of application program |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111143396A (en) * | 2019-12-04 | 2020-05-12 | 深圳市智微智能软件开发有限公司 | High-voltage test data management method and system |
| CN111078545A (en) * | 2019-12-05 | 2020-04-28 | 贝壳技术有限公司 | Method and system for automatically generating test data |
| CN112527909A (en) * | 2020-12-24 | 2021-03-19 | 东软睿驰汽车技术(沈阳)有限公司 | Data slice processing method and device and related products |
| CN112650688A (en) * | 2020-12-30 | 2021-04-13 | 深圳前海微众银行股份有限公司 | Automated regression testing method, associated device and computer program product |
| CN112650688B (en) * | 2020-12-30 | 2024-06-14 | 深圳前海微众银行股份有限公司 | Automated regression testing method, associated device and computer program product |
| CN113220579A (en) * | 2021-05-18 | 2021-08-06 | 京东科技控股股份有限公司 | Method, device, equipment and storage medium for processing stock test data |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110262975B (en) | 2025-05-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110262975A (en) | Test data management method, device, equipment and computer readable storage medium | |
| US10725965B1 (en) | Systems and methods for managing copy creation and deletion | |
| CN112488652B (en) | Work order auditing method, system, terminal and storage medium | |
| US9400728B2 (en) | Cross platform workflow management | |
| US8639555B1 (en) | Workflow discovery through user action monitoring | |
| CN110309975A (en) | Project R&D process management method, device, equipment and computer storage medium | |
| US9607432B2 (en) | Systems and methods for hybrid process mining and manual modeling with integrated continuous monitoring | |
| CN114462969A (en) | Project progress real-time monitoring method and device, electronic equipment and storage medium | |
| CN107908550A (en) | A kind of software defect statistical processing methods and device | |
| CN110135815A (en) | Travel order monitoring method, device, computer equipment and storage medium | |
| CN111984882A (en) | Data processing method, system and equipment | |
| CN111190817B (en) | Method and device for processing software defects | |
| CN115016321A (en) | A hardware-in-the-loop automated testing method, device and system | |
| CN115147088A (en) | A business management method, device, electronic device and storage medium | |
| US9530112B2 (en) | Common conditions for past projects as evidence for success causes | |
| US9959329B2 (en) | Unified master report generator | |
| US20110265190A1 (en) | System and method for processing signature-verification operation | |
| CN114037304A (en) | A data collection method, equipment and medium for cost data | |
| US20240320648A1 (en) | Creation and maintenance of hierarchical data objects | |
| US11010817B2 (en) | Systems and method for coordinating trend data via a hub | |
| CN110750558A (en) | Financial data management method, device, computer equipment and storage medium | |
| CN116166912A (en) | Information processing method, information processing device, storage medium and electronic equipment | |
| US20200097870A1 (en) | Work task commitment manager | |
| CN112184173A (en) | Data processing method, device and electronic device | |
| US12093587B1 (en) | System, method, and computer program for unified management of multiple master-agent job execution environments |
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 |