CN117312359A - Batch data generation method, device, equipment and storage medium - Google Patents

Batch data generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN117312359A
CN117312359A CN202311197769.2A CN202311197769A CN117312359A CN 117312359 A CN117312359 A CN 117312359A CN 202311197769 A CN202311197769 A CN 202311197769A CN 117312359 A CN117312359 A CN 117312359A
Authority
CN
China
Prior art keywords
fields
batch data
indexes
document
document set
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.)
Pending
Application number
CN202311197769.2A
Other languages
Chinese (zh)
Inventor
张舒莹
韩一曼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202311197769.2A priority Critical patent/CN117312359A/en
Publication of CN117312359A publication Critical patent/CN117312359A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes

Abstract

The application can be applied to the financial field, and provides a batch data generation method, a device, computer equipment, a storage medium and a computer program product, which can not only reuse the resources prepared by the past test, but also avoid the situation that the same batch data repeatedly tests the same batch data processing program. In the application, a plurality of fields and formats corresponding to the fields required for forming single data are acquired; when the batch data processing program is tested for the first time, obtaining a plurality of indexes based on the single field and the indexes formed by the formats of the single field; determining documents matched with each index in the available document set based on a plurality of indexes to obtain a current used document set; and combining the contents of different documents in the currently used document set to obtain batch data for the first test.

Description

Batch data generation method, device, equipment and storage medium
Technical Field
The present invention relates to the field of program testing technologies, and in particular, to a method and apparatus for generating batch data, a computer device, a storage medium, and a computer program product.
Background
Batch data processing programs may be used to process batch data, such as batch transaction data in the financial domain. Testing is typically performed before the batch data processing program is formally brought online. During testing, batch data can be input into a batch data processing program, and whether the program is in error is determined according to the processing result of the batch data processing program.
The batch data processing program may have a plurality of batch data processing programs, and each batch data processing program may perform a plurality of tests, and if batch data are independently prepared for each test, the problem of resource waste exists. However, if the batch data prepared before is simply multiplexed and tested, the same batch data processing program may be repeatedly tested by using the same batch data, and it may be difficult to find out the problem of the program.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, a storage medium, and a computer program product for generating batch data.
The application provides a method for generating batch data, which comprises the following steps:
acquiring a plurality of fields and formats corresponding to the fields required for forming single data;
when the batch data processing program is tested for the first time, obtaining a plurality of indexes based on the single field and the indexes formed by the formats of the single field;
determining documents matched with the indexes in the available document set based on the indexes to obtain a current document set;
and combining the contents of different documents in the currently used document set to obtain batch data for the first test.
In one embodiment, the method further comprises:
when the batch data processing program is a non-first test, acquiring content generating units corresponding to the fields respectively;
taking the single field and the format of the single field as parameters and inputting the parameters into a corresponding content generating unit to generate a plurality of documents;
and combining the contents of the generated different documents to obtain batch test data for the non-first test.
In one embodiment, before combining the contents of different documents in the currently used document set, the method further comprises:
taking the index without the matching document as a target index in the indexes;
taking a single field and a single field format forming the target index as parameters and inputting the parameters into a corresponding content generation unit to generate a corresponding document;
and adding the generated document into the current document set.
In one embodiment, the method further comprises:
constructing a corresponding relation between the document and the fields and the formats of the fields used for generating the document;
and adding the documents carrying the corresponding relation into the available document set.
In one embodiment, obtaining a number of fields and formats for each of the fields required to form a single piece of data includes:
displaying a configuration page;
and based on triggering operation of the user on the fields and the formats on the configuration page, obtaining a plurality of fields and formats corresponding to the fields required by forming single data.
In one embodiment, the method further comprises:
acquiring the program name of the batch data processing program input by the user on the configuration page;
consistency comparison is carried out on the program name input by the user and the program name obtained in the history;
and determining whether the batch data processing program is tested for the first time according to the consistency comparison result.
The application provides a generation device of batch data, the device includes:
the field and format acquisition module is used for acquiring a plurality of fields and formats corresponding to the fields required by forming single data;
the index acquisition module is used for acquiring a plurality of indexes based on the indexes formed by the single field and the format of the single field when the batch data processing program is tested for the first time;
the document determining module is used for determining documents matched with all indexes in the available document set based on the indexes to obtain a current used document set;
and the content combination module is used for combining the contents of different documents in the current document set to obtain batch data for the first test.
In one embodiment, the apparatus further comprises:
the content generating unit is used for acquiring the content generating units corresponding to the fields respectively when the batch data processing program is not tested for the first time;
the document generation module is used for taking the single field and the format of the single field as parameters and inputting the parameters into the corresponding content generation unit to generate a plurality of documents;
and the content combination module is also used for combining the contents of the generated different documents to obtain batch test data for the non-first test.
In one embodiment, the apparatus further comprises:
the target index determining module is used for taking the index without the matching document as a target index in the plurality of indexes;
the document generation module is used for taking a single field and a single field format forming the target index as parameters and inputting the parameters into a corresponding content generation unit to generate a corresponding document;
and the document set processing module is used for adding the generated document into the currently used document set.
In one embodiment, the document set processing module is further configured to construct a correspondence between the document and the fields and formats of the fields used to generate the document; and adding the documents carrying the corresponding relation into the available document set.
In one embodiment, the field and format acquisition module is further configured to present a configuration page; and based on triggering operation of the user on the fields and the formats on the configuration page, obtaining a plurality of fields and formats corresponding to the fields required by forming single data.
In one embodiment, the device further comprises a first test judging module, configured to obtain a program name of the batch data processing program input by the user on the configuration page; consistency comparison is carried out on the program name input by the user and the program name obtained in the history; and determining whether the batch data processing program is tested for the first time according to the consistency comparison result.
The present application provides a computer device comprising a memory storing a computer program and a processor executing the above method.
The present application provides a computer readable storage medium having stored thereon a computer program for execution by a processor of the above method.
The present application provides a computer program product having a computer program stored thereon, the computer program being executed by a processor to perform the above method.
In the batch data generating method, the device, the computer equipment, the storage medium and the computer program product, after the formats corresponding to the fields required by forming single data are obtained, when the batch data processing program is the first test, the batch data used for the first test is obtained by combining according to the generated contents, the resources prepared by the previous test can be multiplexed, and when the batch data processing program is the first test, the multiplexing is carried out, the situation that the same batch data repeatedly test the same batch data processing program can be avoided, so that the situation that the problems of the program cannot be found out is avoided; when multiplexing resources prepared by conventional testing, the method specifically includes: and obtaining a plurality of indexes based on indexes formed by single fields and single field formats, determining documents matched with the indexes in the available document set based on the indexes to obtain a current document set, and combining the contents of different documents in the current document set to obtain batch data for the first test.
Drawings
FIG. 1 is an application environment diagram of a method of generating batch data in one embodiment;
FIG. 2 is a flow diagram of a method of generating batch data in one embodiment;
FIG. 3 is a schematic diagram of a configuration page in one embodiment;
FIG. 4 is a schematic diagram of querying matching documents based on an index in one embodiment;
FIG. 5 is a flow chart of a method of generating batch data according to another embodiment;
FIG. 6 is a block diagram of an apparatus for generating batch data in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments.
The batch data generation method can be applied to the financial field and used for generating batch transaction data. The application environment of the method is shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 may receive a plurality of fields and formats corresponding to the fields required for forming the single data configured by a user, and send the received data to the server 104, after the server 104 obtains the plurality of fields and formats corresponding to the fields required for forming the single data, when the batch data processing program is the first test, a plurality of indexes are obtained based on indexes formed by the single fields and the formats of the single fields, based on the plurality of indexes, documents matched with the indexes are determined in the available document set to obtain the current document set, and contents of different documents in the current document set are combined to obtain the batch data used for the first test.
The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, and tablet computers, and the server 104 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a method for generating batch data is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
step S201, a plurality of fields and formats corresponding to the fields required for forming single data are obtained;
one piece of data includes a plurality of contents, different contents correspond to different fields, and if a format is set for a field, the contents corresponding to the field are in the format. The names of the fields may be user-defined, such as transaction date, transaction amount, etc., and the formats corresponding to the fields may include, but are not limited to: date, regular, fixed value, enumerated value, random number, fixed length chinese character, and variable length chinese character. Still further, each format may have a more subdivided format, for example, the date may be subdivided into the following formats "yyyy/MM/dd", "yyyyy-MM-dd", "yyyyy/MM/dd HH: MM: ss", "yyyy-MM-ddHH: MM: ss", "yyyyyyMMdd HH: MM", "yyyyy-MM-dd HH: MM", "yyyMM"; here, "yyyy" means year, "MM" means month, "dd" means day, "HH" means minute, "ss" means second.
Further, acquiring a plurality of fields and formats corresponding to the fields required for forming a single piece of data, includes: displaying a configuration page; and based on triggering operation of the user on the fields and the formats on the configuration page, obtaining a plurality of fields and formats corresponding to the fields required by forming single data.
Specifically, the server 104 may trigger the terminal 102 to display a configuration page, where the configuration page may include fields and format configuration columns shown in fig. 3, and referring to fig. 3, in the field and format configuration columns, each row configures a name and a format of a field, where the name of the field may be input by a user, and the format may be selected in an optional format set by the user.
The fields and the formats thereof configured by the user in the fields and the format configuration column are required for generating single data, namely, the content included in the single data corresponds to each field configured by the user respectively, and the format of the content accords with the format of the corresponding field.
In the mode, the user is enabled to configure the fields and the formats required by generating the single data in a visual interface mode, codes are not required to be written by the user, and the user friendliness is improved.
In step S202, when the batch data processing program is the first test, a plurality of indexes are obtained based on the single field and the indexes formed by the format of the single field.
Illustratively, the fields and the formats respectively corresponding to the fields required to form a single piece of data are shown in Table 1 below:
fields Format of the form Index
Transaction date Date of day 1
Transaction amount Random number 2
Collecting account Regularization of 3
Each field and its format may form an index, e.g. "date of transaction" and "date" form index 1, "transaction amount" and "random value" form index 2, and "collection account" and "regular" form index 3.
And step S203, determining the documents matched with the indexes in the available document set based on the indexes, and obtaining the current document set.
The available document set comprises a plurality of available documents, wherein the content in each available document can be generated according to a single field and a format corresponding to the field, and a plurality of contents are generated according to transaction date and date, and the generated plurality of contents are placed in the document to obtain the available document. Each available document has a corresponding field and format, and a correspondence between the available document and "field+format" can be constructed.
After obtaining the index constructed based on the single field and format, the available documents matching the index can be queried in the available document set based on the index, and the queried available documents can be added into the current used document set.
Illustratively, referring to fig. 4, after obtaining index 1, determining that the available document matched with index 1 is document b according to the field+format of index 1 and the correspondence, and adding document b into the currently used document set; in addition, based on the 'field + format' of index 2 and the correspondence, it is determined that the available document matching index 2 is document a, and document a is added to the currently used document set.
In some scenarios, the set of available documents does not include available documents that match certain indexes, based on which the method provided herein further comprises: taking the index without the matching document as a target index in the indexes; taking a single field and a single field format forming the target index as parameters and inputting the parameters into a corresponding content generation unit to generate a corresponding document; and adding the generated document into the current document set.
Illustratively, based on the "field+format" of the index 3 and the correspondence relationship described above, after no matching available document is found in the available document set, the "field+format" of the index 3 may be input as a parameter to the content generating unit corresponding to the "field" of the index 3, to obtain a plurality of contents matching the "field+format" of the index 3, and the plurality of contents may be placed in the document and added to the currently used document set.
Further, after generating the document, the method provided by the present application further includes the following steps: constructing a corresponding relation between the document and the fields and the formats of the fields used for generating the document; and adding the documents carrying the corresponding relation into the available document set.
For example, a correspondence between the "field+format" of index 3 and the corresponding generated document may be constructed, and the document carrying the correspondence may be added to the available document set so as to be reusable in a subsequent test.
And step S204, combining the contents of different documents in the current document set to obtain batch data for the first test.
Illustratively, after obtaining the current document set, extracting the single content of each document, combining the single content of different documents to form a single piece of data, and since there are multiple contents in each document, several pieces of data can be combined from this, and batch data for the first test can be obtained. Further, the batch data may be placed in a file and uploaded to a user-specified server, such as an ftp server.
In the above embodiment, after the formats corresponding to the fields required for forming the single data are obtained, when the batch data processing program is the first test, the batch data used for the first test is obtained by combining according to the generated content in the past, the resources prepared by the past test can be reused, and when the batch data processing program is the first test, the situation that the same batch data repeatedly test the same batch data processing program can be avoided, so that the situation that the problem of the program cannot be found out is avoided; when multiplexing resources prepared by conventional testing, the method specifically includes: and obtaining a plurality of indexes based on indexes formed by single fields and single field formats, determining documents matched with the indexes in the available document set based on the indexes to obtain a current document set, and combining the contents of different documents in the current document set to obtain batch data for the first test.
In one embodiment, the method provided herein further comprises: when the batch data processing program is a non-first test, acquiring content generating units corresponding to the fields respectively; taking the single field and the format of the single field as parameters and inputting the parameters into a corresponding content generating unit to generate a plurality of documents; and combining the contents of the generated different documents to obtain batch test data for the non-first test.
In order to avoid the situation that the same batch data is repeatedly tested for the same program, when the batch data processing program is not tested for the first time, a content generating unit is utilized to randomly generate new content, specifically, a content generating unit corresponding to each field can be pre-constructed, after a plurality of fields and formats corresponding to each field are obtained, the format corresponding to each field can be used as a content generating unit corresponding to a parameter input field, therefore, the content output by the content generating unit accords with the fields and the formats serving as parameters, and the content conforming to the same fields and the formats is placed in the same document, so that a plurality of documents are obtained.
The single content of each document is extracted, the single content of different documents is combined to form single data, and a plurality of pieces of data can be combined by the single content of each document, so that batch data for non-first test can be obtained. Further, the batch data may be placed in a file and uploaded to a user-specified server, such as an ftp server.
Further, the method provided by the application further comprises the following steps: constructing a corresponding relation between the document and the fields and the formats of the fields used for generating the document; and adding the documents carrying the corresponding relation into the available document set.
For example, a correspondence between a "field+format" and a corresponding generated document may be constructed, and the document carrying the correspondence may be added to the available document set so as to be reusable in a subsequent test.
In one embodiment, the method provided herein further comprises: acquiring the program name of the batch data processing program input by the user on the configuration page; consistency comparison is carried out on the program name input by the user and the program name obtained in the history; and determining whether the batch data processing program is tested for the first time according to the consistency comparison result.
In this embodiment, a program name input field may be set on the configuration page, and the user may input the program name of the batch data processing program that is tested at this time in the program name input field, and after obtaining the program name input by the user, the server may perform consistency comparison with the program name obtained in the history, if the program name obtained in the history is identical to the program name input by the user, determine that the batch data processing program is not tested for the first time, and if the program name obtained in the history is not identical to the program name input by the user, determine that the batch data processing program is tested for the first time.
In the above embodiment, the processing efficiency is improved by comparing the program names input by the user for the first time, and the user can input the program names by configuring the page, thereby improving the operability.
In order to better understand the above method, an application example of the batch data generation method of the present application is described in detail below, and the application example provides a data generation platform, and the data generation platform may be constructed by a server. The data generation platform may comprise the following units:
1) An operation platform login unit: the user logs in the management end page.
2) A data generation unit: various fields and formats are provided to generate bulk data.
3) A data management unit: data generated during the past period is managed, and a user can view and download the data.
4) Environmental information unit: and maintaining the environment information such as the ftp server and the like input by the user.
5) File uploading unit: and uploading the generated file to a user-specified ftp server.
Specifically, referring to fig. 5, after a user logs in the data generating platform, the data generating platform may check the user identity, and when the user passes the check, the data generating platform may display a configuration page through the terminal to allow the user to select fields and formats required for forming the single piece of data, and after the user finishes selecting, the data generating platform obtains the fields and formats required for forming the single piece of data. In step S503, the data generating platform may generate batch data according to the fields and formats required for forming the single piece of data, to obtain the corresponding file.
In addition, if the user clicks the button of "generate data" of the configuration page, it is determined that the user has selected the fields and formats required for forming the single piece of data, and the selection button of "upload ftp, download directly" may be popped up on the configuration page. In step S504, the data generating platform determines whether to upload the ftp server according to the selection operation of the user on the "upload ftp, directly download" selection button.
If the user selects "direct download", the data generation platform may save the file to the local (step S505), and add a new data generation record through the data management unit (step S506).
If the user selects "upload ftp", the data generation platform may enter step S507 to determine whether to newly add ftp environmental information; if the ftp environment information is newly added, the data generating platform proceeds to step S508, maintains the newly added ftp environment information, proceeds to step S509, and uploads the generated file to the corresponding ftp server. If the ftp environment information is not added, the data generating platform proceeds to step S510, selects the existing ftp environment information, proceeds to step S509, and uploads the generated file to the corresponding ftp server.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
In one embodiment, as shown in fig. 6, there is provided a batch data generating apparatus, including:
a field and format obtaining module 601, configured to obtain a plurality of fields and formats corresponding to the fields required for forming a single piece of data;
the index obtaining module 602 is configured to obtain a plurality of indexes based on the single field and the indexes formed by the formats of the single field when the batch data processing program is tested for the first time;
a document determining module 603, configured to determine, based on the plurality of indexes, documents matching each index in the available document set, to obtain a currently used document set;
and the content combination module 604 is used for combining the contents of different documents in the currently used document set to obtain batch data for the first test.
In one embodiment, the apparatus further comprises:
the content generating unit is used for acquiring the content generating units corresponding to the fields respectively when the batch data processing program is not tested for the first time;
the document generation module is used for taking the single field and the format of the single field as parameters and inputting the parameters into the corresponding content generation unit to generate a plurality of documents;
the content combination module 604 is further configured to combine the contents of the generated different documents to obtain batch test data for the non-first test.
In one embodiment, the apparatus further comprises:
the target index determining module is used for taking the index without the matching document as a target index in the plurality of indexes;
the document generation module is used for taking a single field and a single field format forming the target index as parameters and inputting the parameters into a corresponding content generation unit to generate a corresponding document;
and the document set processing module is used for adding the generated document into the currently used document set.
In one embodiment, the document set processing module is further configured to construct a correspondence between the document and the fields and formats of the fields used to generate the document; and adding the documents carrying the corresponding relation into the available document set.
In one embodiment, the field and format acquisition module 601 is further configured to present a configuration page; and based on triggering operation of the user on the fields and the formats on the configuration page, obtaining a plurality of fields and formats corresponding to the fields required by forming single data.
In one embodiment, the device further comprises a first test judging module, configured to obtain a program name of the batch data processing program input by the user on the configuration page; consistency comparison is carried out on the program name input by the user and the program name obtained in the history; and determining whether the batch data processing program is tested for the first time according to the consistency comparison result.
For specific limitations on the apparatus for generating batch data, reference may be made to the above limitation on the method for generating batch data, and details thereof will not be repeated here. The above-described respective modules in the batch data generation apparatus may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing the generated data of the batch data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer equipment also comprises an input/output interface, wherein the input/output interface is a connecting circuit for exchanging information between the processor and the external equipment, and the input/output interface is connected with the processor through a bus and is called as an I/O interface for short. The computer program is executed by a processor to implement a method of generating batch data.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory storing a computer program and a processor implementing the steps of the method embodiments described above when the processor executes the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the respective method embodiments described above.
In one embodiment, a computer program product is provided, on which a computer program is stored, which computer program is executed by a processor for performing the steps of the various method embodiments described above.
It should be noted that, user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A method for generating batch data, the method comprising:
acquiring a plurality of fields and formats corresponding to the fields required for forming single data;
when the batch data processing program is tested for the first time, obtaining a plurality of indexes based on the single field and the indexes formed by the formats of the single field;
determining documents matched with the indexes in the available document set based on the indexes to obtain a current document set;
and combining the contents of different documents in the currently used document set to obtain batch data for the first test.
2. The method according to claim 1, wherein the method further comprises:
when the batch data processing program is a non-first test, acquiring content generating units corresponding to the fields respectively;
taking the single field and the format of the single field as parameters and inputting the parameters into a corresponding content generating unit to generate a plurality of documents;
and combining the contents of the generated different documents to obtain batch test data for the non-first test.
3. The method of claim 1, wherein prior to combining the contents of different documents in the currently used document set, the method further comprises:
taking the index without the matching document as a target index in the indexes;
taking a single field and a single field format forming the target index as parameters and inputting the parameters into a corresponding content generation unit to generate a corresponding document;
and adding the generated document into the current document set.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
constructing a corresponding relation between the document and the fields and the formats of the fields used for generating the document;
and adding the documents carrying the corresponding relation into the available document set.
5. The method of claim 1, wherein obtaining a number of fields and respective formats of fields required to form a single piece of data comprises:
displaying a configuration page;
and based on triggering operation of the user on the fields and the formats on the configuration page, obtaining a plurality of fields and formats corresponding to the fields required by forming single data.
6. The method of claim 5, wherein the method further comprises:
acquiring the program name of the batch data processing program input by the user on the configuration page;
consistency comparison is carried out on the program name input by the user and the program name obtained in the history;
and determining whether the batch data processing program is tested for the first time according to the consistency comparison result.
7. A batch data generation apparatus, the apparatus comprising:
the field and format acquisition module is used for acquiring a plurality of fields and formats corresponding to the fields required by forming single data;
the index acquisition module is used for acquiring a plurality of indexes based on the indexes formed by the single field and the format of the single field when the batch data processing program is tested for the first time;
the document determining module is used for determining documents matched with all indexes in the available document set based on the indexes to obtain a current used document set;
and the content combination module is used for combining the contents of different documents in the current document set to obtain batch data for the first test.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the method of any one of claims 1 to 6 when executing the computer program.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method of any one of claims 1 to 6.
CN202311197769.2A 2023-09-15 2023-09-15 Batch data generation method, device, equipment and storage medium Pending CN117312359A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311197769.2A CN117312359A (en) 2023-09-15 2023-09-15 Batch data generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311197769.2A CN117312359A (en) 2023-09-15 2023-09-15 Batch data generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117312359A true CN117312359A (en) 2023-12-29

Family

ID=89245461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311197769.2A Pending CN117312359A (en) 2023-09-15 2023-09-15 Batch data generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117312359A (en)

Similar Documents

Publication Publication Date Title
CN109062802B (en) Software testing method, computer readable storage medium and terminal equipment
CN108874926B (en) Mass data query method, device, computer equipment and storage medium
CN108804548B (en) Test data query method, device, computer equipment and storage medium
CN111090788B (en) json file comparison method and device, storage medium and computer equipment
CN110413512B (en) AB test method, AB test device, computer equipment and storage medium
CN110321284B (en) Test data entry method, device, computer equipment and storage medium
CN110019116B (en) Data tracing method, device, data processing equipment and computer storage medium
US20130346427A1 (en) Method and procedure for unassisted data collection, extraction and report generation and distribution
CN111026647B (en) Method and device for acquiring code coverage rate, computer equipment and storage medium
CN117312359A (en) Batch data generation method, device, equipment and storage medium
CN112417020B (en) Service expansion realization method, device, computer equipment and storage medium
CN114817152A (en) Method and system for querying slice file
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN110413279B (en) Data loading method and device
CN113722225A (en) Page testing method and device, computer equipment and storage medium
CN113806372B (en) New data information construction method, device, computer equipment and storage medium
CN116795723B (en) Chain unit test processing method and device and computer equipment
CN111309623B (en) Coordinate class data classification test method and device
CN115129355B (en) Page repair method, system and computer equipment thereof
CN111008131B (en) Automated testing method, apparatus, computer device and storage medium
CN111913993B (en) Table data generation method, apparatus, electronic device and computer readable storage medium
CN111738848B (en) Method, device, computer equipment and storage medium for generating characteristic data
CN117389605A (en) Service interface configuration method, device, equipment, storage medium and program product
CN117453561A (en) Test script calling method, device, computer equipment and storage medium
CN114996572A (en) Information recommendation method and device, computer equipment and storage medium

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