CN109558525A - A kind of generation method of test data set, device, equipment and storage medium - Google Patents

A kind of generation method of test data set, device, equipment and storage medium Download PDF

Info

Publication number
CN109558525A
CN109558525A CN201811517643.8A CN201811517643A CN109558525A CN 109558525 A CN109558525 A CN 109558525A CN 201811517643 A CN201811517643 A CN 201811517643A CN 109558525 A CN109558525 A CN 109558525A
Authority
CN
China
Prior art keywords
data
file
target
test
configuration file
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
Application number
CN201811517643.8A
Other languages
Chinese (zh)
Other versions
CN109558525B (en
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.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian Technology Co 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 Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN201811517643.8A priority Critical patent/CN109558525B/en
Publication of CN109558525A publication Critical patent/CN109558525A/en
Application granted granted Critical
Publication of CN109558525B publication Critical patent/CN109558525B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of generation method of test data set, device, equipment and storage medium, this method comprises: obtain with the matched configuration file collection of test data set to be generated, and concentrate each configuration file for including to be read out the configuration file;The Data Identification read is filled at the corresponding data position in target matrix;Operation data generating function generates test data and fills in the target matrix in target data column corresponding with the Data Identification;BCP file, and the test data set according to the BCP file generated are generated according to the data in the target data of target matrix column.The technical solution of the embodiment of the present invention, the Data Identification concentrated according to configuration file and the test data by the generation of corresponding data generating function generate data test collection jointly.It solves the complicated processes of manual compiling test data, realizes automatic Data Generation Test collection, save a large amount of manpowers, improve testing efficiency.

Description

A kind of generation method of test data set, device, equipment and storage medium
Technical field
The present embodiments relate to data communication field more particularly to a kind of generation method of test data set, device, set Standby and storage medium.
Background technique
With the fast development of science and technology, popularizing for Internet technology provides more application scenarios for big data product, And the generation of test data is the key that then to determine big data properties of product quality.
For big data because it contains much information and diversified feature, test data protocol type is numerous, and guarantees as far as possible Every kind of protocol fields difference constructs a large amount of, different types of data input, reaches test when generating test data to reach Purpose, while meeting certain verification rule, verifying generates the accuracy of data, to meet the functional requirement covering surface of product more It is wide more accurately to require.
In the implementation of the present invention, the discovery prior art has following defect to inventor: in the prior art, testing every time Manual compiling test data is required, and test data protocol type is various, guarantees that field is different in every kind of agreement again, and Meet certain verification rule, construction data very labor intensive.
Summary of the invention
The embodiment of the present invention provides generation method, device, equipment and the storage medium of a kind of test data set, to realize certainly It is dynamic to generate test data set, meet the needs of test big data product.
In a first aspect, the embodiment of the invention provides a kind of generation methods of test data set, comprising:
Obtain with the matched configuration file collection of test data set to be generated, and include every is concentrated to the configuration file A configuration file is read out;
When reading the Data Identification for including into the configuration file, the Data Identification is filled in target matrix In corresponding data position at;
Each matched data life of Data Identification searched and include in target matrix is concentrated in the configuration file At function, and run the data generating function generate test data fill in the target matrix with the Data Identification In corresponding target data column;
BCP file is generated according to the data in the target data of target matrix column, and according to the BCP text Part generates the test data set.
Second aspect, the embodiment of the invention also provides a kind of generating means of test data set, which includes:
Configuration file read module, for obtain with the matched configuration file collection of test data set to be generated, and to institute Stating configuration file concentrates each configuration file for including to be read out;
Data Identification fills in module, for read include into the configuration file Data Identification when, by the number It is filled at the corresponding data position in target matrix according to mark;
Test data generation module, it is each described for include in the lookup of configuration file concentration and target matrix The matched data generating function of Data Identification, and run the data generating function generation test data and fill in the number of targets According in target data corresponding with the Data Identification in table column;
Test data set generation module, for being generated according to the data in the target data of target matrix column BCP file, and the test data set according to the BCP file generated.
The third aspect the embodiment of the invention also provides a kind of computer equipment, including memory, processor and is stored in On memory and the computer program that can run on a processor, which is characterized in that the processor executes real when described program The generation method of test data set described in existing any embodiment of that present invention.
Fourth aspect, the embodiment of the invention provides a kind of storage medium comprising computer executable instructions, the meters Calculation machine executable instruction as computer processor when being executed for executing test data set described in any embodiment of that present invention Generation method.
The present invention, according to Data Identification and data generating function, fills in target by being read out to configuration file collection Tables of data, and BCP file is generated according to the data in target matrix, ultimately generate data test collection.Solves manual compiling The complicated processes of test data realize automatically generating for test data set, improve testing efficiency, save a large amount of manpowers.
Detailed description of the invention
Fig. 1 is the flow chart of the generation method of one of the embodiment of the present invention one test data set;
Fig. 2 is the flow chart of the generation method of one of the embodiment of the present invention one test data set;
Fig. 3 is the flow chart of the generation method of one of the embodiment of the present invention two test data set;
Fig. 4 is the structural block diagram of the generating means of one of the embodiment of the present invention four test data set;
Fig. 5 is the structural block diagram of the generating device of one of the embodiment of the present invention five test data set.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is the flow chart of the generation method for the test data set that the embodiment of the present invention one provides, and the present embodiment is applicable In the automatic Data Generation Test collection the case where, this method can be executed by the generating means of test data set, which can be with By software and or hardware realization, and generally can integrate in the generation to the test data set in one or more equipment In equipment, this method specifically comprises the following steps:
S110, acquisition and the matched configuration file collection of test data set to be generated, and the configuration file is concentrated and is wrapped The each configuration file included is read out.
Configuration file is the information for needing to configure program when software starting or operation, for different software, especially It is big data product, different running environment and different testing requirements, needs to be arranged different operating parameters, and these Operating parameter is in the form of configuration file in write storage device.There are many formats of configuration file, such as: binary file, Text file and database etc..In embodiments of the present invention, the format of configuration file is not especially limited.
For the test data of software, the especially test data set of big data product, because it includes a large amount of, not of the same race Often there are one or more configuration files in the input information of class, and the one or more configuration file is introduced into a text In part, the integrated of configuration file is carried out, that is, constitutes a configuration file collection.
In embodiments of the present invention, optionally, user is obtained for test data set to be generated in whole configuration files Middle at least one configuration file selected as the configuration file collection, such as: include 10 configuration files in total in the software, 3 therein are selected as configuration file collection 1, in addition 7 are used as configuration file collection 2.It is matched with test data set to be generated Be configuration file collection 1, after getting configuration file collection 1, to include in the configuration file collection 1 each configuration file carry out It reads.
S120, read include into the configuration file Data Identification when, the Data Identification is filled in target At corresponding data position in tables of data.
Optionally, Data Identification can be by letter, at least two character strings formed in numbers and symbols, can also be with It is other forms of expression, such as: operational formula;In embodiments of the present invention, the format of Data Identification is not especially limited.
Optionally, target matrix can be the script file write by Python and read what configuration file was concentrated It is generated after configuration file, particularly, target matrix can be excel table.
S130, each matched number of Data Identification searched and include in target matrix is concentrated in the configuration file According to generating function, and run the data generating function generate test data fill in the target matrix with the data It identifies in corresponding target data column.
According to Data Identification, runs matched data generating function and generate test data, be then filled out in the mesh It marks in tables of data in target data column corresponding with the Data Identification.Wherein, Data Identification and matched data generate Function can be located in the same configuration file of the same configuration file collection, can also be located at the same configuration file collection In different configuration files.
In embodiments of the present invention, optionally, the data generating function may include: random data generating function;With Machine data generating function is a kind of function for generating random digit or random letters, such as: int (rand () %10) is indicated The integer of random generation 0 to 9, CHAR (INT (RAND () * 26)+65) indicate random and generate capitalization, CHAR (INT (RAND () * 26)+97) indicate random generation lowercase.
S140, BCP file is generated according to the data in the target data of target matrix column, and according to described Test data set described in BCP file generated.
BCP is a kind of command-line tool for efficiently importing or exporting in a parallel fashion high-volume data, can be direct Tables of data or view are exported, can also be by directive statement to being exported after tables of data or View Filter, when exporting data, it can be with The data in file are exported in file using default value or using a specific formatted file.
In embodiments of the present invention, optionally, standard BCP file is created, and the data in target data column are write Enter in the standard BCP file, generate test b CP file, and contains the test data of needs in test b CP file;It generates Index file corresponding with the configuration file collection leads the data in target matrix as above-mentioned specific formatted file It, particularly, can be according to configuration when target matrix is excel table to generate test b CP file out into standard BCP file File set generates the file of index.xml format as above-mentioned specific formatted file;By the test b CP file and described Test index file is stored in destination folder, and the destination folder is packaged and generates the test data set.
The present invention by being read out to configuration file collection, get the Data Identification for including in all configuration files and The test data generated by corresponding data generating function, is filled up to the corresponding position of target matrix, and according to number of targets BCP file is generated according to the data in table, ultimately generates data test collection.Solve the complicated processes of manual compiling test data, Automatic construction test data is realized, automatic Data Generation Test collection saves a large amount of manpowers, improves testing efficiency.
Embodiment two
Fig. 2 is the flow chart of the generation method of test data set provided by Embodiment 2 of the present invention, and the present embodiment is with above-mentioned Embodied based on embodiment, in the present embodiment, will read include into the configuration file Data Identification when, The operation that the Data Identification is filled at the corresponding data position in target matrix is further refined.Correspondingly, The method of the present embodiment specifically includes following operation:
S210, acquisition and the matched configuration file collection of test data set to be generated, and the configuration file is concentrated and is wrapped The each configuration file included is read out.
S220, according to configuration information start-stop identifier, a configuration information is read in the configuration file as current Operation information, wherein include at least two key-value pairs in the configuration information.
Configuration information in configuration file can there are many start-stop identifiers, such as: it take " < " as the starting mark of configuration information Know and accords with, "/> " for the stopping identifier of configuration information, the content that origin identification is accorded with and is stopped between identifier is grasped as current Make information.Key-value pair storage is a kind of data model storage comprising key name and key assignments, key name are equivalent to the volume of storage value Number, key assignments is the data of storage, and is connected with equal sign, such as: there are two key-value pairs in start-stop identifier, and < CHName=is " for the first time Acquisition time " SeqNumber=" 1 "/>, wherein CHName and SeqNumber is that key name, for the first time acquisition time and 1 are Key assignments.It in the present embodiment, include at least two key-value pairs in the configuration information.
S230, each key-value pair for including in the current operating information is obtained.
A configuration information as defined by configuration information start-stop identifier is obtained as current operating information, and reading should In configuration information include all key-value pairs.
S240, judge in the current operating information whether to include that key name and preset mark data identification information are matched Target key value pair;S250 is executed if so, returning;S220 is executed if it is not, returning.
Typically, the key name in each key-value pair that can be will acquire respectively with preset mark data identification information collection Conjunction is matched, and is judged whether there is key name and is hit a mark data identification information in the mark data identification information set Key-value pair, if so, then using the key-value pair of hit as target key value pair.
Optionally, at least one mark data identification information is established in the target matrix in advance and corresponding data arranges Between corresponding relationship, for example, it is corresponding with the 5th column in target matrix to establish CHName in target matrix.
It S250, is the current operation data distribution new data row in the target matrix.
If key name and preset mark data identification information successful match in each key-value pair got, in institute It states in target matrix, distributes new data row for current operation data.
S260, it will fill in the target key value in the matched target complete key-value pair of the current operating information in described new In data line.
Particularly, if establishing at least one mark data identification information and corresponding data in the target matrix in advance Corresponding relationship between column, then according to the mark data identification information that key name corresponding with each target key value matches, Each target key value is filled in the new data row in data column corresponding with mark data identification information.On for example, It is corresponding with the 5th column in target matrix to state " CHName " pre-established, then getting key-value pair CHName=" for the first time When acquisition time ", key assignments name " acquisition time for the first time " is filled in the 5th column with new data row.
S270, judge whether to complete the processing to configuration informations whole in configuration file;If so, S280 is executed, if it is not, returning Receipt row S220 returns and executes according to configuration information start-stop identifier, a configuration information is obtained in the configuration file As the operation of current operating information, until completing the processing to configuration informations whole in configuration file.
In the present embodiment, it needs to realize and the content in configuration information start-stop identifiers all in configuration file is all carried out It reads.
S280, each matched number of Data Identification searched and include in target matrix is concentrated in the configuration file According to generating function, and run the data generating function generate test data fill in the target matrix with the data It identifies in corresponding target data column.
S290, BCP file is generated according to the data in the target data of target matrix column, and according to described Test data set described in BCP file generated.
The technical solution of the embodiment of the present invention is by being read out each key-value pair that configuration file is concentrated, and by each key assignments Pair key name matched with preset mark data identification information, corresponding key assignments is filled in into target matrix, and data survey is ultimately generated Examination collection.The storing data by the way of key-value pair, search efficiency is high, while key assignments can be any type, and allow Multilayer nest increases the amount of storage of data.
Embodiment three
Fig. 3 is the flow chart of the generation method of test data set provided by Embodiment 2 of the present invention, and the present embodiment is with above-mentioned It is embodied based on embodiment, in the present embodiment, according in the target data column in the target matrix Data generate BCP file before, the target matrix is provided to test data adjustment platform, and according to the test number The target data column of the target matrix are adjusted according to the result of adjustment platform feedback.Correspondingly, the present embodiment Method specifically include following operation:
S310, acquisition and the matched configuration file collection of test data set to be generated, and the configuration file is concentrated and is wrapped The each configuration file included is read out.
S320, read include into the configuration file Data Identification when, the Data Identification is filled in target At corresponding data position in tables of data.
S330, each matched number of Data Identification searched and include in target matrix is concentrated in the configuration file According to generating function, and run the data generating function generate test data fill in the target matrix with the data It identifies in corresponding target data column.
S340, the target matrix is provided to test data adjustment platform, and is adjusted and is put down according to the test data The result of platform feedback is adjusted the target data column of the target matrix.
In the present embodiment, the target matrix that can have been will fill in is provided to test data adjustment platform.The test Data point reuse platform can be located in the generating means of the test data, can also be located at individual test data and adjust device In, the generating means of multiple test datas can share a test data adjustment device.Test data adjust platform for pair Target matrix such as is increased, is modified, being deleted, being verified at the operation, such as: other tables of data are merged into target matrix, Increase the data volume in target matrix;The pre-defined rule that platform is adjusted according to test data, to the items in target matrix Content is verified, and according to verification result, modifies wrong data, or delete hash.
Receive test data adjustment platform feedback result after, to target data corresponding in target matrix arrange into Row adjustment, to obtain the target matrix needed.
S350, BCP file is generated according to the data in the target data of target matrix column, and according to described Test data set described in BCP file generated.
The Data Identification and test data that the technical solution of the embodiment of the present invention is obtained according to configuration file collection fill in mesh Tables of data is marked, and various data manipulations are carried out to target matrix using test data adjustment platform, constructs required target Tables of data realizes the adjust automatically of target matrix, improves the accuracy of data test.
Example IV
Fig. 4 is a kind of structural schematic diagram of the generating means for test data set that the embodiment of the present invention four provides.This implementation The applicable automatic Data Generation Test collection of example, the mode which can be used software and/or hardware realize that the device can be integrated in In the equipment of any systematic function for providing test data set, as shown in figure 4, the generating means of test data set specifically include: Configuration file read module 410, Data Identification fill in module 420, Test data generation module 430 and test data set and generate mould Block 440.
Configuration file read module 410, for obtain with the matched configuration file collection of test data set to be generated, and it is right The configuration file concentrates each configuration file for including to be read out;
Data Identification fills in module 420, will be described for when reading the Data Identification for including into the configuration file Data Identification is filled at the corresponding data position in target matrix;
Test data generation module 430, for the configuration file concentrate search with include in target matrix it is each The matched data generating function of Data Identification, and run the data generating function generation test data and fill in the mesh It marks in tables of data in target data column corresponding with the Data Identification;
Test data set generation module 440, for according to the data in the target data of target matrix column Generate BCP file, and the test data set according to the BCP file generated.
The technical solution of the embodiment of the present invention gets in all configuration files and wraps by being read out to configuration file collection The Data Identification contained and the test data generated by corresponding data generating function, are filled up to the correspondence position of target matrix It sets, and generates BCP file according to the data in target matrix, ultimately generate data test collection.Solves manual compiling test The complicated processes of data, realize automatic construction test data, and automatic Data Generation Test collection saves a large amount of manpowers, improves Testing efficiency.
On the basis of the various embodiments described above, Data Identification fills in module 420, specifically includes:
Current operating information reading unit, for being read in the configuration file according to configuration information start-stop identifier One configuration information is as current operating information, wherein includes at least two key-value pairs in the configuration information;
Key-value pair acquiring unit, for obtaining each key-value pair for including in the current operating information;
Data line allocation unit, if for including that key name and preset mark data identify in the current operating information The target key value pair of information matches is then the current operation data distribution new data row in the target matrix;
Key assignments fills in unit, for by with the target key value in the matched target complete key-value pair of the current operating information It fills in the new data row;
Return unit executes according to configuration information start-stop identifier for returning, one is obtained in the configuration file Operation of the configuration information as current operating information, until completing the processing to configuration informations whole in configuration file.
On the basis of the various embodiments described above, the generating means of test data set, further includes:
Data column adjustment module, for the target matrix to be provided to test data adjustment platform, and according to described The result of test data adjustment platform feedback is adjusted the target data column of the target matrix.
On the basis of the various embodiments described above, test data set generation module 440 is specifically included:
BCP file generating unit creates standard BCP file, and the mark is written in the data in target data column In quasi- BCP file, for generating test b CP file;
Index file generating unit, for generating test index file corresponding with the configuration file collection;
Test data set generation unit, for the test b CP file and the test index file to be stored in mesh It marks in file, and the destination folder is packaged and generates the test data set.
On the basis of the various embodiments described above, configuration file read module 410 is specifically used for:
It obtains user and is directed at least one configuration file that test data set to be generated selects in whole configuration files As the configuration file collection.
On the basis of the various embodiments described above, Test data generation module 430 is specifically used for:
Test data generation module 430, for the configuration file concentrate search with include in target matrix it is each The matched random data generating function of Data Identification, and run the random data generating function generation test data and fill in In the target matrix in target data column corresponding with the Data Identification.
On the basis of the various embodiments described above, the generating means of test data set, further includes:
Corresponding relation building module, for establishing at least one mark data identification letter in the target matrix in advance Corresponding relationship between breath and corresponding data column.
On the basis of the various embodiments described above, key assignments fills in unit, is specifically used for:
According to the mark data identification information that key name corresponding with each target key value matches, by each object key Value is filled in the new data row in data column corresponding with mark data identification information.
Method provided by any embodiment of the invention can be performed in above-mentioned apparatus, has the corresponding functional module of execution method And beneficial effect.The not technical detail of detailed description in the present embodiment, reference can be made to the method that any embodiment of that present invention provides.
Embodiment five
Fig. 5 is a kind of structural schematic diagram for equipment that the embodiment of the present invention five provides.Fig. 5, which is shown, to be suitable for being used to realizing this The block diagram of the example devices 12 of invention embodiment.The equipment 12 that Fig. 5 is shown is only an example, should not be to of the invention real The function and use scope for applying example bring any restrictions.
As shown in figure 5, equipment 12 is showed in the form of universal computing device.The component of equipment 12 may include but unlimited In one or more processor or processing unit 16, system storage 28, connecting different system components, (including system is deposited Reservoir 28 and processing unit 16) bus 18.
Bus 18 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC) Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Equipment 12 typically comprises a variety of computer system readable media.These media can be it is any can be by equipment 12 The usable medium of access, including volatile and non-volatile media, moveable and immovable medium.
System storage 28 may include the computer system readable media of form of volatile memory, such as arbitrary access Memory (RAM) 30 and/or cache memory 32.Equipment 12 may further include it is other it is removable/nonremovable, Volatile/non-volatile computer system storage medium.Only as an example, storage system 34 can be used for reading and writing irremovable , non-volatile magnetic media (Fig. 5 do not show, commonly referred to as " hard disk drive ").Although being not shown in Fig. 5, use can be provided In the disc driver read and write to removable non-volatile magnetic disk (such as " floppy disk "), and to removable anonvolatile optical disk The CD drive of (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driver can To be connected by one or more data media interfaces with bus 18.Memory 28 may include at least one program product, The program product has one group of (for example, at least one) program module, these program modules are configured to perform each implementation of the invention The function of example.
Program/utility 40 with one group of (at least one) program module 42 can store in such as memory 28 In, such program module 42 include but is not limited to operating system, one or more application program, other program modules and It may include the realization of network environment in program data, each of these examples or certain combination.Program module 42 is usual Execute the function and/or method in embodiment described in the invention.
Equipment 12 can also be communicated with one or more external equipments 14 (such as keyboard, sensing equipment, display 24 etc.), Can also be enabled a user to one or more equipment interacted with the equipment 12 communication, and/or with enable the equipment 12 with One or more of the other any equipment (such as network interface card, modem etc.) communication for calculating equipment and being communicated.It is this logical Letter can be carried out by input/output (I/O) interface 22.Also, equipment 12 can also by network adapter 20 and one or The multiple networks of person (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet) communication.As shown, Network adapter 20 is communicated by bus 18 with other modules of equipment 12.It should be understood that although not shown in the drawings, can combine Equipment 12 use other hardware and/or software module, including but not limited to: microcode, device driver, redundant processing unit, External disk drive array, RAID system, tape drive and data backup storage system etc..
Processing unit 16 by the program that is stored in system storage 28 of operation, thereby executing various function application and Data processing, such as realize the generation method of test data set provided by the embodiment of the present invention: it obtains and test to be generated The matched configuration file collection of data set, and concentrate each configuration file for including to be read out the configuration file;It reads extremely When the Data Identification for including in the configuration file, the Data Identification is filled in the corresponding data position in target matrix Place;It concentrates to search in the configuration file and generates letter with each matched data of Data Identification for including in target matrix Number, and run the data generating function generate test data fill in it is corresponding with the Data Identification in the target matrix Target data column in;BCP file is generated according to the data in the target data of target matrix column, and according to institute State test data set described in BCP file generated.
Embodiment six
The embodiment of the present invention six additionally provides a kind of storage medium comprising computer executable instructions, is stored thereon with meter Calculation machine program realizes the generation of the test data set provided such as all inventive embodiments of the application when the program is executed by processor Method:
Obtain with the matched configuration file collection of test data set to be generated, and include every is concentrated to the configuration file A configuration file is read out;
When reading the Data Identification for including into the configuration file, the Data Identification is filled in target matrix In corresponding data position at;
Each matched data life of Data Identification searched and include in target matrix is concentrated in the configuration file At function, and run the data generating function generate test data fill in the target matrix with the Data Identification In corresponding target data column;
BCP file is generated according to the data in the target data of target matrix column, and according to the BCP text Part generates the test data set.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, It further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.? Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service It is connected for quotient by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of generation method of test data set characterized by comprising
Obtain with the matched configuration file collection of test data set to be generated, and each of include matching to configuration file concentration File is set to be read out;
When reading the Data Identification for including into the configuration file, the Data Identification is filled in target matrix At corresponding data position;
It concentrates to search in the configuration file and generates letter with each matched data of Data Identification for including in target matrix Number, and run the data generating function generate test data fill in it is corresponding with the Data Identification in the target matrix Target data column in;
BCP file is generated according to the data in the target data of target matrix column, and raw according to the BCP file At the test data set.
2. the method according to claim 1, wherein the Data Identification for including into the configuration file in reading When, the Data Identification is filled at the corresponding data position in target matrix, comprising:
According to configuration information start-stop identifier, a configuration information is read in the configuration file as current operating information, It wherein, include at least two key-value pairs in the configuration information;
Obtain each key-value pair for including in the current operating information;
If in the current operating information including key name and the preset matched target key value pair of mark data identification information, It is the current operation data distribution new data row in the target matrix;
It will be filled in the new data row with the target key value in the matched target complete key-value pair of the current operating information;
It returns and executes according to configuration information start-stop identifier, a configuration information is obtained in the configuration file as current behaviour Make the operation of information, until completing the processing to configuration informations whole in configuration file.
3. the method according to claim 1, wherein according to the target data in the target matrix Data in column generate before BCP file, further includes:
The target matrix is provided to test data adjustment platform, and adjusts the knot of platform feedback according to the test data Fruit is adjusted the target data column of the target matrix.
4. method according to claim 1-3, which is characterized in that according to the mesh in the target matrix It marks the data in data column and generates BCP file, and the test data set according to the BCP file generated, comprising:
Creation standard BCP file, and the data in target data column are written in the standard BCP file, generate test BCP file;
Generate test index file corresponding with the configuration file collection;
The test b CP file and the test index file are stored in destination folder, and by the file destination Folder, which is packaged, generates the test data set.
5. the method according to claim 1, wherein obtaining and the matched configuration text of test data set to be generated Part collection, comprising:
Obtain at least one configuration file that user is selected in whole configuration files for test data set to be generated as The configuration file collection.
6. the method according to claim 1, wherein the data generating function includes: that random data generates letter Number.
7. according to the method described in claim 2, it is characterized in that, the Data Identification for including into the configuration file in reading When, before the Data Identification is filled at the corresponding data position in target matrix, further includes:
In advance established in the target matrix at least one mark data identification information and corresponding data column between it is corresponding Relationship;
It will be filled in the new data row with the target key value in the matched target complete key-value pair of the current operating information, Include:
According to the mark data identification information that key name corresponding with each target key value matches, each target key value is filled out It is written in the new data row in data column corresponding with mark data identification information.
8. a kind of generating means of test data set characterized by comprising
Configuration file read module, for obtain with the matched configuration file collection of test data set to be generated, and match to described The each configuration file for including in file set is set to be read out;
Data Identification fills in module, for read include into the configuration file Data Identification when, by the data mark Know at the corresponding data position filled in target matrix;
Test data generation module, for concentrating each data searched and include in target matrix in the configuration file Matched data generating function is identified, and runs the data generating function generation test data and fills in the target matrix In in corresponding with Data Identification target data column;
Test data set generation module, for generating BCP according to the data in the target data of target matrix column File, and the test data set according to the BCP file generated.
9. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that the processor realizes the test as described in any in claim 1-7 when executing described program The generation method of data set.
10. a kind of storage medium comprising computer executable instructions, the computer executable instructions are by computer disposal For executing the generation method of the test data set as described in any in claim 1-7 when device executes.
CN201811517643.8A 2018-12-12 2018-12-12 Test data set generation method, device, equipment and storage medium Active CN109558525B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811517643.8A CN109558525B (en) 2018-12-12 2018-12-12 Test data set generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811517643.8A CN109558525B (en) 2018-12-12 2018-12-12 Test data set generation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109558525A true CN109558525A (en) 2019-04-02
CN109558525B CN109558525B (en) 2020-11-06

Family

ID=65869574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811517643.8A Active CN109558525B (en) 2018-12-12 2018-12-12 Test data set generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109558525B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287148A (en) * 2019-07-01 2019-09-27 中原银行股份有限公司 A kind of data interactive method and device
CN110597728A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Method, device and system for constructing test data
CN110688530A (en) * 2019-08-19 2020-01-14 天津开心生活科技有限公司 Json data processing method and device
CN111190802A (en) * 2019-12-22 2020-05-22 卡斯柯信号有限公司 Method for automatically generating performance test configuration
CN111625455A (en) * 2020-05-26 2020-09-04 中国建设银行股份有限公司 Program testing method, device, equipment and medium
CN113282499A (en) * 2021-05-31 2021-08-20 长沙市到家悠享家政服务有限公司 Method, system, device and medium for creating test data
CN113641585A (en) * 2021-08-20 2021-11-12 成方金融科技有限公司 Test data generation method, device, equipment and storage medium
CN113821451A (en) * 2021-11-24 2021-12-21 北京交研智慧科技有限公司 Test method, test device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793318A (en) * 2012-10-29 2014-05-14 百度在线网络技术(北京)有限公司 Method and device for distributed testing of module stability
CN104133772A (en) * 2014-08-13 2014-11-05 广东电网公司信息中心 Automatic test data generation method
CN107665171A (en) * 2017-10-11 2018-02-06 中国民生银行股份有限公司 Automatic regression test method and device
EP3378054A1 (en) * 2015-11-20 2018-09-26 Intrinsic ID B.V. Puf identifier assignment and testing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793318A (en) * 2012-10-29 2014-05-14 百度在线网络技术(北京)有限公司 Method and device for distributed testing of module stability
CN104133772A (en) * 2014-08-13 2014-11-05 广东电网公司信息中心 Automatic test data generation method
EP3378054A1 (en) * 2015-11-20 2018-09-26 Intrinsic ID B.V. Puf identifier assignment and testing method and device
CN107665171A (en) * 2017-10-11 2018-02-06 中国民生银行股份有限公司 Automatic regression test method and device

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287148B (en) * 2019-07-01 2021-10-29 中原银行股份有限公司 Data interaction method and device
CN110287148A (en) * 2019-07-01 2019-09-27 中原银行股份有限公司 A kind of data interactive method and device
CN110688530A (en) * 2019-08-19 2020-01-14 天津开心生活科技有限公司 Json data processing method and device
CN110688530B (en) * 2019-08-19 2022-04-26 天津开心生活科技有限公司 Json data processing method and device
CN110597728A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Method, device and system for constructing test data
CN111190802A (en) * 2019-12-22 2020-05-22 卡斯柯信号有限公司 Method for automatically generating performance test configuration
CN111190802B (en) * 2019-12-22 2022-09-30 卡斯柯信号有限公司 Method for automatically generating performance test configuration
CN111625455A (en) * 2020-05-26 2020-09-04 中国建设银行股份有限公司 Program testing method, device, equipment and medium
CN113282499A (en) * 2021-05-31 2021-08-20 长沙市到家悠享家政服务有限公司 Method, system, device and medium for creating test data
CN113282499B (en) * 2021-05-31 2024-02-09 长沙市到家悠享家政服务有限公司 Method, system, equipment and medium for creating test data
CN113641585A (en) * 2021-08-20 2021-11-12 成方金融科技有限公司 Test data generation method, device, equipment and storage medium
CN113641585B (en) * 2021-08-20 2023-04-07 成方金融科技有限公司 Test data generation method, device, equipment and storage medium
CN113821451A (en) * 2021-11-24 2021-12-21 北京交研智慧科技有限公司 Test method, test device, electronic equipment and readable storage medium
CN113821451B (en) * 2021-11-24 2022-03-22 北京交研智慧科技有限公司 Test method, test device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN109558525B (en) 2020-11-06

Similar Documents

Publication Publication Date Title
CN109558525A (en) A kind of generation method of test data set, device, equipment and storage medium
CN108519967A (en) Chart method for visualizing, device, terminal and storage medium
CN109101812A (en) A kind of parameter verification method, apparatus, computing device and storage medium
CN104346146B (en) A kind of method of cross-platform transformation applications code and device
CN110276074B (en) Distributed training method, device, equipment and storage medium for natural language processing
CN107145784B (en) Vulnerability scanning method and device and computer readable medium
CN108696381A (en) A kind of protocol configuration method and device
CN113238740B (en) Code generation method, code generation device, storage medium and electronic device
CN109800258A (en) Data file dispositions method, device, computer equipment and storage medium
CN107741935A (en) Data lead-in method and data importing device
CN108268368A (en) A kind of method and apparatus for generating test case script
CN104572072A (en) MVC (model view controller) mode-based language transformation method and equipment for program
CN110020358A (en) Method and apparatus for generating dynamic page
CN110287696A (en) A kind of detection method, device and the equipment of the shell process that rebounds
US20240103928A1 (en) Information processing method and apparatus for animation resource, device, medium and product
CN105302556B (en) Realize the method and system and server unit calculated
CN115599359A (en) Code generation method, device, equipment and medium
CN114168149A (en) Data conversion method and device
CN113434542B (en) Data relationship identification method and device, electronic equipment and storage medium
CN106933744A (en) Node revision status indication method and device, electronic equipment and storage medium
CN110334103A (en) The update method of recommendation service provides device, access mechanism and recommender system
CN111488286B (en) Method and device for independently developing Android modules
CN110851343A (en) Test method and device based on decision tree
CN113268232A (en) Page skin generation method and device and computer readable storage medium
CN110275735A (en) A kind of interface configuration method, device, terminal 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
GR01 Patent grant
GR01 Patent grant