A test data processing method and apparatus

By analyzing test data from different dimensions to form a chain of responsibility, the problem of low efficiency in test data acquisition in existing technologies is solved, achieving efficient test data acquisition and simplified code structure.

CN122132284APending Publication Date: 2026-06-02NETSUNION CLEARING CORP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NETSUNION CLEARING CORP
Filing Date
2024-11-25
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies are inefficient in acquiring test data, involve a large number of judgment processes, and require extensive code adjustments when adding new data dimensions, resulting in high code coupling and difficulty in decoupling.

Method used

By analyzing test data across different data dimensions, a chain of responsibility is formed, decoupling the dependencies between different data dimensions. Test data with identical analysis results across all data dimensions are pre-classified into one category, improving the efficiency of test data acquisition.

Benefits of technology

It achieves high efficiency in acquiring test data, simplifies the code structure, reduces the implementation cost when adding new data dimensions, and reduces code coupling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122132284A_ABST
    Figure CN122132284A_ABST
Patent Text Reader

Abstract

A test data processing method and device, a test data set and data dimension analysis information are obtained, wherein the data dimension analysis information comprises at least one data analysis dimension; each test data in the test data set is analyzed according to the data dimension analysis information, and a test data category is obtained according to an analysis result; wherein the analysis result of each test data in each test data category on each data analysis dimension is the same. The embodiment of the present disclosure can facilitate the subsequent acquisition of test data and improve the acquisition efficiency of test data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This article relates to data testing technology, and more particularly to a test data processing method and apparatus. Background Technology

[0002] When a financial system is put into production, its operational performance is often expected to be verified through reliability testing. This necessitates conducting integration testing on the financial system before production, especially when no other participants are involved. The integration testing process requires acquiring mock test data according to different dimensions and mocking return messages based on the acquired test data. Therefore, the acquisition of test data is particularly critical in this process.

[0003] In related technologies, obtaining test data requires judging one by one whether the pre-mocked test data meets the requirements of each dimension, until test data that meets the requirements of all dimensions is found.

[0004] However, this method involves a large number of judgment processes, resulting in very low efficiency. Summary of the Invention

[0005] This application provides a test data processing method and apparatus, which can facilitate the acquisition of subsequent test data and improve the efficiency of test data acquisition.

[0006] This application provides a test data processing method, including: Obtain a pre-set test data set and data dimension parsing information; wherein, the data dimension parsing information includes: at least one data parsing dimension; Each test data in the test data set is parsed according to the data dimension parsing information, and the test data is classified according to the parsing results; wherein, the parsing results of the test data in each test data category are the same on each data parsing dimension.

[0007] On the other hand, this application provides a test data processing apparatus, including: a memory and a processor, wherein the memory is used to store an executable program; The processor is used to read and execute the executable program to implement the above-described test data processing method.

[0008] Compared with related technologies, this application includes pre-analyzing all test data from different data dimensions to obtain the analysis results of all test data in all data dimensions, and grouping test data with completely identical analysis results in all data dimensions into one category, thereby facilitating the acquisition of subsequent test data and improving the efficiency of test data acquisition.

[0009] Other features and advantages of this application will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the application. Other advantages of this application can be realized and obtained by means of the solutions described in the description and the accompanying drawings. Attached Figure Description

[0010] The accompanying drawings are used to provide an understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0011] Figure 1 A flowchart illustrating a test data processing method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a test data processing system provided in an embodiment of this application; Figure 3 This application provides a schematic diagram of the structure of a parsing dimension. Figure 4 This is a schematic diagram of the structure of a test data processing device provided in an embodiment of this application. Detailed Implementation

[0012] This application describes several embodiments, but these descriptions are exemplary and not restrictive, and it will be apparent to those skilled in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with, or may replace, any feature or element of any other embodiment.

[0013] This application includes and contemplates combinations of features and elements known to those skilled in the art. The embodiments, features, and elements disclosed in this application may also be combined with any conventional features or elements to form a unique inventive scheme as defined by the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive schemes to form another unique inventive scheme as defined by the claims. Therefore, it should be understood that any feature shown and / or discussed in this application may be implemented individually or in any suitable combination. Therefore, the embodiments are not limited except by the limitations imposed by the appended claims and their equivalents. Furthermore, various modifications and changes may be made within the scope of the appended claims.

[0014] Furthermore, in describing representative embodiments, the specification may have presented methods and / or processes as a specific sequence of steps. However, the method or process should not be limited to the specific order of steps described herein, to the extent that it does not depend on such a specific order. As will be understood by those skilled in the art, other sequences of steps are also possible. Therefore, the specific order of steps set forth in the specification should not be construed as a limitation of the claims. Moreover, the claims concerning the method and / or process should not be limited to the steps performed in the written order, and those skilled in the art will readily understand that these orders can be varied and still remain within the spirit and scope of the embodiments of this application.

[0015] This application provides a test data processing method, such as... Figure 1 As shown, it includes: Step 101: Obtain a pre-set test data set and data dimension parsing information; wherein, the data dimension parsing information includes: at least one data parsing dimension; Step 102: Analyze each test data in the test data set according to the data dimension parsing information, and obtain the test data classification based on the parsing results; wherein, the parsing results of the test data in each test data classification are the same on each data parsing dimension.

[0016] The test data processing method provided in this application pre-analyzes all test data from different data dimensions to obtain the analysis results of all test data in all data dimensions, and groups test data with completely identical analysis results in all data dimensions into one category, thereby facilitating the acquisition of subsequent test data and improving the efficiency of test data acquisition.

[0017] In related technologies, because test data construction needs to consider the order of dependencies, returning data in the traditional way results in a large number of judgment conditions, i.e., too many if-else conditions, leading to bloated code and difficulty in decoupling. If a new data dimension is added, corresponding judgment conditions and else-if conditions are added, which requires adjusting the highly coupled data construction dependency order, requiring the modification of a large amount of code, resulting in high design and implementation costs. Furthermore, if the test data construction dependency order is adjusted incorrectly, the expected test data cannot be obtained. In contrast, the test data processing method provided in this application processes test data for different data dimensions. The processing methods for different data dimensions form a "chain of responsibility." The chain of responsibility decouples the dependencies between different data dimensions, solving the problem of bloated code caused by a large number of judgment conditions, and resolving the highly complex problem of high coupling, such as the need to add judgment bars when adding new data dimensions.

[0018] In one exemplary instance, the at least one data parsing dimension includes at least one of the following: transaction type dimension, transaction involved entity dimension, and transaction status dimension.

[0019] In one exemplary instance, when the data parsing dimension is the transaction type dimension, the parsing result includes: quick payment, refund; When the data parsing dimension is the dimension of the subject involved in the transaction, the parsing result includes: the payee and the payer; When the data parsing dimension is the transaction status dimension, the parsing result includes: transaction successful, transaction failed, and transaction in progress.

[0020] In one exemplary instance, the data dimension parsing information further includes: the parsing order of at least one data parsing dimension.

[0021] In one exemplary instance, the step of parsing each test data in the test data set according to the data dimension parsing information, and obtaining a test data classification based on the parsing results, includes: First, each data parsing dimension is obtained sequentially according to the parsing order of the at least one data parsing dimension. Whenever a data parsing dimension is obtained, each test data is parsed according to the obtained data parsing dimension to obtain the parsing result of each test data in the obtained data parsing dimension, until there are no more unobtained data parsing dimensions, and the parsing result of each test data in all data parsing dimensions is obtained. Secondly, each test data point is categorized based on the parsing results across all data parsing dimensions.

[0022] In one exemplary instance, classifying each test data point based on the parsing results of each test data point across all data parsing dimensions includes: The classification strategy is to group the corresponding test data into one category if the parsing results are the same across all data parsing dimensions. Each test data is classified according to the parsing results of each test data across all data parsing dimensions. The number of test data categories is equal to the product of the number of parsing results of all test data across all data parsing dimensions.

[0023] For example, suppose the data parsing dimensions include: parsing dimension 1, parsing dimension 2, and parsing dimension 3. All test data have 2 parsing results in parsing dimension 1, 4 parsing results in parsing dimension 2, and 2 parsing results in parsing dimension 3. Then the number of test data categories is 2*4*2, or 16.

[0024] In one exemplary instance, after obtaining the test data classification, the method further includes: First, a test data acquisition request is obtained from the test data requester; wherein, the test data acquisition request carries target test data information; Secondly, obtain the parsing results of the target test data information in at least one data parsing dimension; Furthermore, obtain test data categories from the test data categories in which the parsing results in all data parsing dimensions are identical to the parsing results in all data parsing dimensions of the target test data information; Finally, the test data is retrieved from the obtained test data categories and returned to the test data requester.

[0025] For example, if the target test data information is such as test data of a successful refund transaction, then it is necessary to obtain the parsing results of the target test data information in terms of transaction type, transaction party, and transaction status, that is, refund transaction, recipient, and success status. With such parsing results, we can find the test data category of refund transaction, recipient, and success status in the test data category, and then randomly select a test data from it and return it.

[0026] In one exemplary instance, when the at least one data parsing dimension includes: the transaction subject dimension and the transaction status dimension, the parsing order of the at least one data parsing dimension includes: first parsing the transaction subject dimension, and then parsing the transaction status dimension.

[0027] For example, the data parsing dimensions include both the transaction subject dimension and the transaction status dimension, and there is a parsing dependency between the two. That is, the transaction subject dimension needs to be parsed first, and then the transaction status dimension needs to be parsed.

[0028] In one exemplary instance, after obtaining the test data classification, the method further includes: First, obtain the updated data dimension parsing information; Secondly, each test data in the test data set is parsed according to the updated data dimension parsing information, and the updated test data classification is obtained based on the parsing results.

[0029] For example, the data dimension parsing information is configurable. When the data dimension parsing information is updated, updated test data classifications can be generated based on the updated data dimension parsing information.

[0030] In one exemplary instance, after obtaining the test data classification, the method further includes: First, obtain the updated test data set; Secondly, each test data in the updated test data set is parsed according to the data dimension parsing information, and the updated test data classification is obtained based on the parsing results.

[0031] For example, the test dataset is configurable, and when the test dataset is updated, updated test data categories can be generated based on the updated test dataset.

[0032] This application also provides a test data processing system, such as... Figure 2 As shown, in this system, 1. Define an abstract class for dimensions to abstractly handle dimension request data; concrete dimension implementation methods inherit from this class. 2. Define a Filter TrxCtgy class to return mock test data according to the transaction type dimension (dimension key: 0110, etc.). 3. Define a Filter From class to return mock test data based on the dimensions of the parties involved in the transaction, i.e., the payer and payee (dimension key: payer, etc.). 4. Define a Filter Status class to return mock test data based on transaction status (dimension key: payer_fail, etc.). 5. Filter Status constructs data based on the status class, while Filter From constructs data based on the payer / payee dimension class; 6. Define a Processor class to construct a responsible Filter TrxCtgy->Filter From->Filter Status based on different dimensions, and hand the request over to the head of the chain for processing. If it cannot be processed, it is handed over to the next node for processing, until the end; 7. Request mock data according to different dimensions, and obtain the response mock data after the chain of responsibility. It can output data with 0110 as the key, or data with payer_fail_0110 as the dimension, etc.

[0033] The analytical dimensions involved in the test data processing in this system are as follows: Figure 3 As shown, the dimensions include: transaction type, payer / payee, and transaction status.

[0034] The test data processing provided in this application embodiment forms a chain of responsibility by obtaining mock test data processing methods through different parsing dimensions. After processing layer by layer through the chain of responsibility, the expected test data is obtained, which makes it easy to obtain mock test data through different parsing dimensions and with a dependent order.

[0035] This application also provides a test data processing device, such as... Figure 4As shown, it includes: a memory 21 and a processor 22, wherein the memory 21 is used to store executable programs; The processor 22 is used to read and execute the executable program to perform the following steps: Obtain a pre-set test data set and data dimension parsing information; wherein, the data dimension parsing information includes: at least one data parsing dimension; Each test data in the test data set is parsed according to the data dimension parsing information, and the test data is classified according to the parsing results; wherein, the parsing results of the test data in each test data category are the same on each data parsing dimension.

[0036] In one exemplary instance, the data dimension parsing information further includes: the parsing order of at least one data parsing dimension, and the processor 22 is further configured to read and execute the executable program to implement the following steps: Each data parsing dimension is obtained sequentially according to the parsing order of the at least one data parsing dimension. Whenever a data parsing dimension is obtained, each test data is parsed according to the obtained data parsing dimension to obtain the parsing result of each test data in the obtained data parsing dimension, until there are no more unobtained data parsing dimensions, and the parsing result of each test data in all data parsing dimensions is obtained. Each test data point is categorized based on the parsing results across all data parsing dimensions.

[0037] In one exemplary instance, the processor 22 is further configured to read and execute the executable program to perform the following steps: The classification strategy is to group the corresponding test data into one category if the parsing results are the same across all data parsing dimensions. Each test data is classified according to the parsing results of each test data across all data parsing dimensions. The number of test data categories is equal to the product of the number of parsing results of all test data across all data parsing dimensions.

[0038] In one exemplary instance, the processor 22 is further configured to read and execute the executable program to perform the following steps: Obtain a test data acquisition request from the test data requester; wherein the test data acquisition request carries target test data information; Obtain the parsing results of the target test data information in at least one data parsing dimension; The test data category obtained from the test data category is the same as the target test data information in all data parsing dimensions in all data parsing dimensions. The test data is retrieved from the obtained test data categories and returned to the test data requester.

[0039] In one exemplary instance, when the data parsing dimension is the transaction type dimension, the parsing result includes: quick payment, refund; When the data parsing dimension is the dimension of the subject involved in the transaction, the parsing result includes: the payee and the payer; When the data parsing dimension is the transaction status dimension, the parsing result includes: transaction successful, transaction failed, and transaction in progress.

[0040] The at least one data parsing dimension includes at least one of the following: transaction type dimension, transaction involved entity dimension, and transaction status dimension.

[0041] In one exemplary instance, the at least one data parsing dimension includes: the transaction subject dimension and the transaction status dimension, and the parsing order of the at least one data parsing dimension includes: first parsing the transaction subject dimension, and then parsing the transaction status dimension.

[0042] In one exemplary instance, the processor 22 is further configured to read and execute the executable program to perform the following steps: Get updated data dimension parsing information; Each test data in the test data set is parsed based on the updated data dimension parsing information, and the updated test data classification is obtained based on the parsing results.

[0043] In one exemplary instance, the processor 22 is further configured to read and execute the executable program to perform the following steps: Get the updated test data set; The updated test data set is parsed based on the data dimension parsing information, and the updated test data classification is obtained based on the parsing results.

[0044] The test data processing apparatus provided in this application pre-analyzes all test data from different data dimensions to obtain the analysis results of all test data in all data dimensions, and groups test data with completely identical analysis results in all data dimensions into one category, thereby facilitating the acquisition of subsequent test data and improving the efficiency of test data acquisition.

[0045] This application also provides a computer storage medium storing a computer program, wherein the computer program, when executed by a processor, can implement the test data processing method as described in any of the above embodiments.

[0046] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

Claims

1. A test data processing method, characterized in that, include: Obtain a pre-set test data set and data dimension parsing information; wherein, the data dimension parsing information includes: at least one data parsing dimension; Each test data in the test data set is parsed according to the data dimension parsing information, and the test data is classified according to the parsing results; wherein, the parsing results of the test data in each test data category are the same on each data parsing dimension.

2. The method according to claim 1, characterized in that, The data dimension parsing information also includes: the parsing order of at least one data parsing dimension. The step of parsing each test data in the test data set according to the data dimension parsing information, and obtaining test data classification based on the parsing results, includes: Each data parsing dimension is obtained sequentially according to the parsing order of the at least one data parsing dimension. Whenever a data parsing dimension is obtained, each test data is parsed according to the obtained data parsing dimension to obtain the parsing result of each test data in the obtained data parsing dimension, until there are no more unobtained data parsing dimensions, and the parsing result of each test data in all data parsing dimensions is obtained. Each test data point is categorized based on the parsing results across all data parsing dimensions.

3. The method according to claim 2, characterized in that, The classification of each test data point based on the parsing results across all data parsing dimensions includes: The classification strategy is to group the corresponding test data into one category if the parsing results are the same across all data parsing dimensions. Each test data is classified according to the parsing results of each test data across all data parsing dimensions. The number of test data categories is equal to the product of the number of parsing results of all test data across all data parsing dimensions.

4. The method according to claim 1, characterized in that, After obtaining the test data classification, the process also includes: Obtain a test data acquisition request from the test data requester; wherein the test data acquisition request carries target test data information; Obtain the parsing results of the target test data information in at least one data parsing dimension; The test data category obtained from the test data category is the same as the target test data information in all data parsing dimensions in all data parsing dimensions. The test data is retrieved from the obtained test data categories and returned to the test data requester.

5. The method according to any one of claims 1-4, characterized in that, The at least one data parsing dimension includes at least one of the following: transaction type dimension, transaction involved entity dimension, and transaction status dimension.

6. The method according to claim 5, characterized in that, When the data parsing dimension is the transaction type dimension, the parsing result includes: quick payment, refund; When the data parsing dimension is the dimension of the subject involved in the transaction, the parsing result includes: the payee and the payer; When the data parsing dimension is the transaction status dimension, the parsing result includes: transaction successful, transaction failed, and transaction in progress.

7. The method according to claim 5, characterized in that, When the at least one data parsing dimension includes the transaction subject dimension and the transaction status dimension, the parsing order of the at least one data parsing dimension includes: first parsing the transaction subject dimension, and then parsing the transaction status dimension.

8. The method according to claim 1, characterized in that, After obtaining the test data classification, the process also includes: Get updated data dimension parsing information; Each test data in the test data set is parsed based on the updated data dimension parsing information, and the updated test data classification is obtained based on the parsing results.

9. The method according to claim 1, characterized in that, After obtaining the test data classification, the process also includes: Get the updated test data set; The updated test data set is parsed based on the data dimension parsing information, and the updated test data classification is obtained based on the parsing results.

10. A test data processing device, characterized in that, include: A memory and a processor, wherein the memory is used to store an executable program; The processor is used to read and execute the executable program to implement the test data processing method as described in any one of claims 1-9.