CN110188030A - A kind of test data generating method, device and computer equipment, storage medium - Google Patents

A kind of test data generating method, device and computer equipment, storage medium Download PDF

Info

Publication number
CN110188030A
CN110188030A CN201910275536.7A CN201910275536A CN110188030A CN 110188030 A CN110188030 A CN 110188030A CN 201910275536 A CN201910275536 A CN 201910275536A CN 110188030 A CN110188030 A CN 110188030A
Authority
CN
China
Prior art keywords
test data
data
field
file
configuration information
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
CN201910275536.7A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910275536.7A priority Critical patent/CN110188030A/en
Publication of CN110188030A publication Critical patent/CN110188030A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention belongs to big data technical field, it is related to a kind of test data generating method, device and computer equipment, storage medium, which comprises receive Test data generation request;According to the production quantity of the output format classification of the test data of Test data generation request confirmation generation and test data;The configuration information and custom field configuration information for generating each field of test data are obtained according to the output format classification, production quantity based on the configuration information, the custom field configuration information and the test data generates test data file, and the format of the test data file is corresponding with the output format classification.Scheme provided by the invention can automatically generate a large amount of test data, testing efficiency can be effectively improved, different types of test data can be generated for different test scenes or different software system, export the test data file of different-format, the testing requirement of different test scenes or different software system can be met, versatility is good.

Description

A kind of test data generating method, device and computer equipment, storage medium
Technical field
The embodiment of the present invention belongs to big data technical field more particularly to a kind of test data generating method, device and meter Calculate machine equipment, storage medium.
Background technique
Software performance test is very heavy for the response speed of guarantee software operation, reliability and stability etc. It wants, in software performance test, it is often necessary to upload tens of thousands of even hundreds of thousands test datas.
In the generating process of test data, data field there are relevance, input limitation etc. due to, generate tens Ten thousand test datas are the work of very complicated and time consumption, and test data has in different fields in different software platforms Hold, reusability is low, and tester will be when the process for writing test data for one or more software platform will spend a large amount of Between, influence testing efficiency.
In addition, existing Test data generation tool often can be only generated the test data file of single format, cause to lead to It is poor with property, it is not able to satisfy the testing requirement of different software system.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of test data generating method, device and computer equipment, storage is situated between Matter often can be only generated the test data file of single format to solve existing Test data generation tool, lead to versatility It is poor, the problem of not being able to satisfy the testing requirement of different software system.
In a first aspect, the embodiment of the present invention provides a kind of test data generating method, comprising:
Receive Test data generation request;
According to the output format classification and test data of the test data that the Test data generation request confirmation generates Production quantity;
Judge whether the output format classification is Form file format, and when judging result is Form file format When judge whether there is data generate template file;
When generating template file there are the data, the store path that the data generate template file is obtained, according to The store path obtains the data and generates template file;When generating template file there is no the data, obtain to be generated At the test data field information that is included, the data are generated according to the field information and generate template file;Wherein, institute The field information stated includes field name and order of the field;
It obtains the data and generates the configuration information of each field in template file, and judge that the data generate template file In whether include custom field, if including custom field, obtain and corresponding with the custom field make by oneself Adopted field configuration information;
According to the filling of the production quantity of the configuration information, the custom field configuration information and the test data Data generate template file, to generate the test data file;The wherein format of the test data file and the output Format classification is corresponding.
As the enforceable mode of the present invention, the test data generated according to the Test data generation request confirmation Output format classification and the production quantity of test data include:
Read test data are requested to generate mission bit stream table according to the Test data generation, from the Test data generation The information of the output format classification and the data production quantity is read in mission bit stream table.
As the enforceable mode of the present invention, after obtaining the data and generating template file, the method also includes:
Judge that the data generate in template file with the presence or absence of associate field, if it exists relevant field, then obtain with The corresponding associate field configuration information of the associate field is filled the data according to the associate field configuration information and is generated Template file.
As the enforceable mode of the present invention, the method also includes:
When the output format classification is non-Form file format, judge whether the output format classification is text Type file format;
If the output format classification is text-type file format, text formatting configuration information is obtained, directly according to institute The production quantity for stating text formatting configuration information and the test data generates the test data file.
Second aspect, the embodiment of the present invention provide a kind of Test data generation device, comprising:
Request receiving module, for receiving Test data generation request;
Confirmation module, according to the output format classification and survey of the test data that the Test data generation request confirmation generates Try the production quantity of data;
Judgment module, for judging whether the output format classification is Form file format, and when judging result is Data are judged whether there is when Form file format generates template file;
Template obtains module, generates template text for when generating template file there are the data, obtaining the data The store path of part obtains the data according to the store path and generates template file;When there is no the data to generate mould When plate file, the field information that test data to be generated is included is obtained, it is raw to generate the data according to the field information At template file;Wherein, the field information includes field name and order of the field;
Configuration information obtains module, generates the configuration information of each field in template file for obtaining the data, and sentence Whether it includes custom field that the data of breaking generate in template file, if including custom field, obtain with it is described The corresponding custom field configuration information of custom field;
Data generation module, for according to the configuration information, the custom field configuration information and the test number According to production quantity fill the data and generate template file, to generate the test data file;Wherein, the test data text The format of part is corresponding with the output format classification.
As the enforceable mode of the present invention, the confirmation module is specifically used for requesting to read according to the Test data generation Take Test data generation mission bit stream table, read from the Test data generation mission bit stream table output format classification and The information of the data production quantity.
As the enforceable mode of the present invention, the configuration information obtains module and is also used to judge that the data generate template It whether there is associate field in file, if it exists relevant field, then obtain associate field corresponding with the associate field Configuration information;
The data generation module is also used to further fill the data according to the associate field configuration information and generate Template file.
As the enforceable mode of the present invention, the judgment module, which is also used to work as, judges the output format classification for non-table When lattice file format, judge whether the output format classification is text-type file format;
The configuration information obtains module and is also used to obtain text when the output format classification is text-type file format This fonnat configuring information;
The data generation module is for the generation directly according to the text formatting configuration information and the test data Amount generates the test data file.
The third aspect, the embodiment of the present invention provide a kind of computer equipment, comprising:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one When a processor executes, so that at least one described processor is able to carry out the step of test data generating method as described above Suddenly.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, the computer-readable storage medium It is stored with computer-readable instruction in matter, is realized when the computer-readable instruction is executed by least one processor as described above Test data generating method the step of.
The test data generating method, device and the computer equipment that there is provided according to embodiments of the present invention, storage medium, can be with A large amount of test data is automatically generated during the performance test of software systems, the test effect of software systems can be effectively improved Rate, while different types of test data can be generated for different test scenes or different software system, export different-format Test data file, can meet the testing requirement of different test scenes or different software system, and versatility is good.
Detailed description of the invention
In order to illustrate more clearly of the solution of the present invention, one will be made to attached drawing needed in embodiment description below A simple introduction, it should be apparent that, drawings in the following description are some embodiments of the invention, for ordinary skill For personnel, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the flow chart of test data generating method provided in an embodiment of the present invention;
Fig. 2 is another flow chart of test data generating method provided in an embodiment of the present invention;
Fig. 3 is the structural block diagram of Test data generation device provided in an embodiment of the present invention;
Fig. 4 is the structural block diagram of data generation module provided in an embodiment of the present invention;
Fig. 5 is the structural block diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described.Unless otherwise defined, used herein All technical and scientific terms have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
" embodiment " phrase that each position in the description occurs might not each mean identical embodiment, It is not the independent or alternative embodiment with other embodiments mutual exclusion.What those skilled in the art explicitly and implicitly understood It is that embodiment described herein can be combined with other embodiments.
The embodiment of the present invention provides a kind of test data generating method, applied to the performance test of software systems, such as Fig. 1 institute Show, the test data generating method includes:
S11, Test data generation request is received;
The output format classification and test number of S12, the test data generated according to the Test data generation request confirmation According to production quantity;
S13, judge whether the output format classification is Form file format;When judging result is Form tray Step S14 is executed when formula, no person terminates or execute other operations in addition to S14 to S18;
S14, data generation template file is judged whether there is;When generating template file there are the data, execute S15 executes step S16 when generating template file there is no the data;
S15, the store path that the data generate template file is obtained, it is raw to obtain the data according to the store path At template file, step 17 is executed;
S16, the field information that test data to be generated is included is obtained, the data is generated according to the field information Template file is generated, step 17 is executed;Wherein, the field information includes field name and order of the field;
S17, the configuration information for obtaining each field in the data generation template file, and judge that the data generate template Whether include custom field in file, if including custom field, obtains corresponding with the custom field Custom field configuration information;
S18, it is filled according to the production quantity of the configuration information, the custom field configuration information and the test data The data generate template file, to generate the test data file;Wherein the format of the test data file with it is described Output format classification is corresponding.
In embodiments of the present invention, for step S11, the Test data generation request can be by testing tool according to current Test assignment automatically initiates, and is also possible to tester by interacting initiation with testing tool, is also possible to by be tested Software systems are initiated.In practical solution, test data can be by one independently of testing tool or software systems to be tested , the Test data generation module for being able to carry out the test data generating method generate, the Test data generation module Different testing tool or software systems can be docked, the Test data generation initiated according to testing tool requests to generate correspondence Test data, and fed back in testing tool or software systems to be tested in the form of test data file.Certainly, can In the scheme of implementation, the Test data generation module is also possible to be contained in testing tool;The test data file of generation It is also possible to be stored according to preset store path into local storage or cloud storage, for calling.In the present embodiment, The same Test data generation request can be correspondingly outputting to a few test data file, such as when the software being tested for the property When system has limitation to the file size of the test data file once exported, it is somebody's turn to do if total test data file size exceeds File size limitation, then produce multiple test data files, input the software systems being tested for the property in batches.
In the present embodiment, step S11 can receive multiple testing tools or multiple software systems to be tested simultaneously The Test data generation of initiation is requested, wherein each testing tool corresponds to different software systems, by multiple Test data generations Request forms processing queue, and the Test data generation module for executing test data generating method can successively be handled respectively by queue sequence A Test data generation request, to generate corresponding test data.In step s 11, it also can receive based on the same software The multiple Test data generation request that the performance test of system is initiated, for example a software systems include multiple functional units, The content of test data needed for each functional unit has differences, and needs the test that adaptation is generated for each functional unit at this time Data.
In embodiments of the present invention, step S12 is needed for the generation of the test data of matching different software system The output format for determining test data makes the output format of test data match with software systems to be tested, meanwhile, it is full Testing requirement under sufficient present test field scape, it is also necessary to match the software systems being tested for the property under present test field scape Required test data quantity (may need the same software systems software performance tested under different data amount, difference Data volume correspond to different test scenes), it is therefore desirable to obtain the corresponding test data of current Test data generation request Production quantity, specifically, in some embodiment of the invention, the survey generated according to the Test data generation request confirmation The production quantity of the output format classification and test data of trying data, which can be used such as under type, to be realized:
Read test data are requested to generate mission bit stream table according to the Test data generation, from the Test data generation The information of the output format classification and the data production quantity is read in mission bit stream table.
In embodiments of the present invention, the Test data generation mission bit stream table can be raw included in the test data At in request, be also possible to according to the Test data generation request pop-up information configuration window, interactively obtain from institute State the Test data generation mission bit stream table comprising output format classification and data production quantity of information configuration window configuration.
The form and content of the Test data generation mission bit stream table can according to need definition, with currently received survey It is based on the test number for financial statement data upload task generation financial statement test data, provided that examination data, which generate request, It can be as shown in following table one according to a kind of form for generating mission bit stream table:
Serial number Task names Output file format Data volume (row)
1 Financial statement data uploads XLSX 500000
Table one
In embodiments of the present invention, test data method provided in an embodiment of the present invention can support a plurality of types of trays The output of the test data of formula, such as the file format of this kind of storage list data of XLS format, XLSX format, TXT format are this kind of Store the file format of plain text data, this kind of file format etc. with plain text storage list data of CSV format.
Wherein, XLSX formatted file and CSV formatted file correspond to Form file format, and the data in file are table Data mode, still by taking financial statement data upload task as an example, following table two shows a kind of possible list data form:
Table two
And TXT file then corresponds to text-type document form, the data in file are form of textual data.
Correspondingly, different output format classifications is corresponding different in the generating process of test data of the embodiment of the present invention Generating mode, therefore, in an alternative embodiment of the invention, on the basis of above-mentioned steps S11 to S13, when sentencing for step S13 When disconnected result is non-Form file format, referring to Fig.2, the test data generating method is on the basis of the S13 of Fig. 1 into one Step includes:
S21, judge whether the output format classification is text-type file format, if the output format classification is text Type file format, thens follow the steps S22;
S22, text formatting configuration information is obtained, according to the generation of the text formatting configuration information and the test data Amount generates the test data file;Wherein, the text-type file format can be TXT format file, and the text formatting is matched Row regular expression of the confidence breath comprising limiting field range in each test data file.
It is mainly described in detail below using the output format classification of test data as the situation of Form file format, i.e., Expansion explanation is carried out to the process of step S14 to S18.In enforceable scheme, it is raw that data are judged whether there is in step S14 It can be raw by obtaining test data at the store path for obtaining data generation template file in template file and step S15 It is accordingly obtained at the mode of mission bit stream table, still by taking financial statement data upload task as an example, the embodiment of the present invention is provided such as The Test data generation mission bit stream table of alternatively possible form shown in following table three, comprising that can be confirmed whether that there are numbers in table Storage road according to the information for generating template file, and when generating template file there are data comprising data generation template file Diameter information.
Table three
When generating template file there are data, for step S17 and S18, still uploading task with financial statement data is Example, if it includes person number, name, personnel state, work number, home Tel, hand that data, which generate the field for including in template file, Six fields such as machine number, the then configuration information for obtaining field can be configured by obtaining field range data table and field range parameter Table accordingly obtains, and the embodiment of the present invention, which provides a kind of possible field range data table and field range parameter allocation list, to divide Not as shown in following table four and table five:
Table four
Serial number Field code name Field range
1 N Number
2 NW Number+big/lowercase
3 W Greatly/lowercase
4 S Character string
5 Z Regular expression
6 NAME - 4 word name of 2 word
7 CER Identification card number
8 Ph-M Cell-phone number
9 Ph-S Home Tel
10 D Date on date
11 DS Date on date Hour Minute Second
12 DIY It is customized
13 R Associate field
Table five
In table four, template file field range one column in comma separate " Z ", " NAME ", " S ", " N ", " Ph-S ", " Ph-M " respectively represents six person number, name, personnel state, work number, home Tel, cell-phone number fields, and the template of table four The column of field assignment one and table five collectively define the value type and value range of each field, thus random in value range It generates test data and carrys out the column in filling template file where each field, for example generate 50000 datas, every data packet Six person number, name, personnel state, work number, home Tel, cell-phone number fields are included, then for person number, name, personnel Six column where six state, work number, home Tel, cell-phone number fields, need to fill in total 3000000 data, Mei Yilie It is intended to generate 50000 data in the field value range defined by table four and table five at random and be filled, finally obtain institute State test data file.
In enforceable scheme, when the data of acquisition generate the file that template file is XLSX format, if institute Stating data and generating includes multiple lists in template file, and the process that test data file is generated in step S18 can be for wherein one A or multiple lists carry out test data filling.
In some embodiments, step S18 can also generate the specific field in template file for the data and be surveyed It tries data to generate, as described data, which generate mould template file, may include a plurality of types of fields, be directed to fc-specific test FC field In the generating process of the test data of scape or specific software system, only need to generate to specify in mould template file in the data is needed The field of configuration information is obtained, flexibility and versatility are higher.
As the enforceable mode of the present invention, when generating template file there is no the data, for step S16, respectively Putting in order for field can put in order allocation list by acquisition field to confirm, be also possible to by providing interactive interface, The mode of field arrangement information set by user is obtained from interactive interface to determine.
In embodiments of the present invention, the data generate field provided in template file and can be by executing test number According to the basic field that the Test data generation module of generation method provides in advance, such as above-mentioned phone number, name or identity Number, specified digit random number are demonstrate,proved, fields such as female+digital combination of bit digital etc. are specified;It is described in possible way of example Data, which generate template file, can also be provided custom field and associate field.
In some embodiments, after obtaining the data and generating template file, the test data generating method is also Include:
Whether judge that the data generate in template file includes custom field, if including custom field, Custom field configuration information corresponding with the custom field is obtained, is filled according to the custom field configuration information The data generate template file.
In further embodiments, after obtaining the data and generating template file, the test data generating method Further include:
Judge that the data generate in template file with the presence or absence of associate field, if it exists relevant field, then obtain with The corresponding associate field configuration information of the associate field is filled the data according to the associate field configuration information and is generated Template file.
In embodiments of the present invention, data described in above-described embodiment are generated with the configuration procedure of template file, For custom field, the process for obtaining the custom field configuration information can be the process of acquisition field range data table, And for associate field, the process for obtaining associate field can obtain the process of data information for connection database, or by depositing The process of corresponding associated document is read in storage path, and database information and store path information can be matched by obtaining associate field Information table is set to obtain.
In a possible embodiment, field range data table and associate field configuration information table can be used cooperatively, still with For financial statement data upload task, if the data generate template file provide basic field include person number, Six fields such as name, personnel state, work number, home Tel, cell-phone number, if the data generation template file also includes at this time Whether custom field " pays out wages ", while also including associate field " the registration time limit " and " area ", the then whole for including at this time Field will for person number, name, whether pay out wages, personnel state, work number, home Tel, cell-phone number, the registration time limit, area etc. nine A field, a kind of possible form of field range data table and associate field configuration information table can be respectively such as six He of following table at this time Shown in table seven:
Table six
Table seven
Wherein, it is had differences in the field range data table that table six provides with table four, it can be true on the basis of table four Recognize the value range of custom field, while also can determine that the data generate which field in template file is associate field; And the database or store path of connection needed for the value range for obtaining associate field will be confirmed in table seven, in we In case, the title of associate field that field in associated document can generate in template file with the data is identical, can also be with Field corresponding relationship one arranges " the affiliated area " and generates being associated in template file with the data in difference, such as table seven Field " area " is corresponding.
The test data generating method provided according to embodiments of the present invention, can be during the performance test of software systems Automatically generate a large amount of test data, can effectively improve the testing efficiency of software systems, at the same can for different test scenes or Different software system generates different types of test data, exports the test data file of different-format, can meet different tests The testing requirement of scene or different software system, versatility are good.
The embodiment of the present invention provides a kind of Test data generation device, as shown in figure 3, described device includes that request receives mould Block 10, confirmation module 20, judgment module 30, template obtain module 40, configuration information obtains module 50 and data generation module 60, Wherein:
The request receiving module 10 is for receiving Test data generation request;The confirmation module 20 is according to the test Data generate the output format classification for the test data that request confirmation generates and the production quantity of test data;The judgment module 30 Sentence for judging whether the output format classification is Form file format, and when judging result is Form file format It is disconnected to generate template file with the presence or absence of data;The template obtains module 40 and is used for when there are the data to generate template file When, the store path that the data generate template file is obtained, the data are obtained according to the store path and generate template text Part;When generating template file there is no the data, the field information that test data to be generated is included is obtained, according to institute It states field information and generates the data generation template file;Wherein, the field information includes field name and order of the field;Institute It states configuration information and obtains the configuration information that module 50 is used to obtain each field in the data generation template file, and described in judgement Data generate template file in whether include custom field, if including custom field, obtain with it is described customized The corresponding custom field configuration information of field;The data generation module 60 be used for according to the configuration information, it is described from The production quantity for defining field configuration information and the test data fills the data generation template file, to generate the test Data file;Wherein the format of the test data file is corresponding with the output format classification.
In embodiments of the present invention, the Test data generation request can be automatic according to current test assignment by testing tool It initiates, is also possible to tester by interact initiation with testing tool, is also possible to by software systems initiation to be tested. And the test data file generated can feed back to testing tool and perhaps software systems to be tested or store to specified position It sets.Related content about Test data generation request and the test data file is seen in above method embodiment Related content, do not make to be unfolded herein.
As the enforceable mode of the present invention, the confirmation module 20 is generated according to the Test data generation request confirmation Test data output format classification and test data production quantity when, be specifically used for according to the Test data generation request Read test data generate mission bit stream table, and the output format classification is read from the Test data generation mission bit stream table With the information of the data production quantity.In embodiments of the present invention, the Test data generation mission bit stream table, which can be, includes In Test data generation request, it is also possible to request pop-up information configuration window according to the Test data generation, with It is raw that interactive mode obtains the test data comprising output format classification and data production quantity configured from the information configuration window At mission bit stream table.Related content about the Test data generation mission bit stream table is seen in above method embodiment Related content is not made to be unfolded herein.
As the enforceable mode of the present invention, as shown in figure 4, the judgment module 30 includes the first judging unit 31 and the Two judging units 32, wherein first judging unit 31 is for judging whether the output format classification is Form tray Formula, the second judgment unit 32 are used to sentence when the judging result of first judging unit 31 is Form file format It is disconnected to generate template file with the presence or absence of data.In embodiments of the present invention, the second judgment unit 32 judges whether there is number According to the process for the store path for generating template file and the template acquisition acquisition data generation template file of module 40, can lead to It crosses and obtains the mode of Test data generation mission bit stream table and realize, specifically see phase in above method embodiment inside the Pass Hold, does not make to be unfolded herein.
And the configuration information that the template obtains the acquisition field of module 40 can be by obtaining field range data table and field Range parameter allocation list accordingly obtains, and specifically sees the related content in above method embodiment, does not make to be unfolded herein.
Further, in some embodiments, the template obtains module 40 and is also used in the second judgment unit 32 When determining to generate template file there is no the data, the field information that test data to be generated is included is obtained, according to institute It states field information and generates the data generation template file;Wherein, the field information includes field name and order of the field, respectively Putting in order for field can put in order allocation list by acquisition field to confirm, be also possible to by providing interactive interface, The mode of field arrangement information set by user is obtained from interactive interface to determine.
Further, as shown in figure 4, the judgment module 30 further includes third judging unit 33, the third judgement is single Member 33 is used for when first judging unit 31 determines that the output format classification is non-Form file format, described in judgement Whether output format classification is text-type file format.
The configuration information obtains module 50 and is also used to determine the output format classification in the third judging unit 33 To obtain text formatting configuration information when text-type file format.
The data generation module 60 is for the life directly according to the text formatting configuration information and the test data The test data file is generated at amount;Wherein, the text formatting configuration information includes to limit each test data file The row regular expression of middle field range.
Further, in some embodiments, after obtaining the data and generating template file, the judgment module 30 Whether be also used to judge that the data generate in template file includes custom field;It is described if including custom field Configuration information obtains module 50 and is also used to obtain custom field configuration information corresponding with the custom field;The number It is also used to fill the data according to the custom field configuration information according to generation module 60 and generates template file.
In further embodiments, after obtaining the data and generating template file, the judgment module 30 is also used to Judge that the data generate in template file with the presence or absence of associate field;Relevant field if it exists, the configuration information obtain Module 50 is also used to obtain associate field configuration information corresponding with the associate field;The data generation module 60 is also used Template file is generated in filling the data according to the associate field configuration information.
Related content about custom field and associate field sees the related content in above method embodiment, This does not make to be unfolded.
The Test data generation device provided according to embodiments of the present invention, can be during the performance test of software systems certainly It is dynamic to generate a large amount of test data, the testing efficiency of software systems can be effectively improved, while can for different test scenes or not Different types of test data is generated with software systems, the test data file of different-format is exported, different checkout areas can be met The testing requirement of scape or different software system, versatility are good.
The embodiment of the present invention also provides a kind of computer equipment, as shown in figure 5, the computer equipment includes at least one Processor 51, and the memory 52 with the communication connection of at least one described processor 51, show a processor 51 in Fig. 5, The memory 52 is stored with the instruction that can be executed by least one described processor 51, and described instruction is by described at least one It manages device 51 to execute, so that the step of at least one described processor 51 is able to carry out test data generating method as described above.
Specifically, the memory 52 in the embodiment of the present invention is non-volatile computer readable storage medium storing program for executing, can be used for depositing Non-volatile software program, non-volatile computer executable program and module are stored up, such as the survey in the above embodiments of the present application Try the corresponding program instruction/module of data creation method;The processor 51 is stored in non-easy in memory 52 by operation The property lost software program, instruction and module thereby executing various function application and carry out data processing, i.e. the realization above method Test data generating method as described in the examples.
In some embodiments, the memory 52 may include program storage area and data storage area, wherein program is deposited Storage area can application program required for storage program area, at least one function;Data storage area can store Test data generation The data etc. created in the treatment process of method.It, can be in addition, memory 52 may include high-speed random access memory Including nonvolatile memory, for example, at least a disk memory, flush memory device or other non-volatile solid state memories Part;
In some embodiments, it includes the remote memory remotely located relative to processor 51 that memory 52 is optional, this A little remote memories can be by being connected to the network to the computer equipment for executing domain filter processing, and the example of aforementioned network includes But be not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
In embodiments of the present invention, the computer equipment for executing test data generating method can also include input unit 53 With output device 54;Wherein, input unit 53 can obtain the operation information of user on a computing device, and output device 54 can wrap It includes display screen etc. and shows equipment.In embodiments of the present invention, the processor 51, memory 52, input unit 53 and output dress Setting 54 can be connected by bus or other modes, in Fig. 5 for being connected by bus.
The computer equipment provided according to embodiments of the present invention, energy when executing the code in memory 52 by processor 51 The step of enough executing test data generating method in above-described embodiment, and the technical effect with above method embodiment, do not exist The technical detail of detailed description in the present embodiment, reference can be made to technology contents provided in the application embodiment of the method.
The embodiment of the present invention also provides a kind of computer readable storage medium, stores on the computer readable storage medium There is computer-readable instruction, when the computer-readable instruction is executed by least one processor, can be realized as described above The step of test data generating method, when executing the step of the method, the technical effect with above method embodiment, not The technical detail of detailed description in the present embodiment, reference can be made to technology contents provided in the application embodiment of the method.
The embodiment of the present invention also provides a kind of computer program product, and the product can be performed in the application embodiment of the method Provided test data generating method has the corresponding functional module of execution method and beneficial effect.Not in the present embodiment The technical detail of detailed description, reference can be made to technology contents provided in the application embodiment of the method.
It should be noted that each functional module in the above embodiment of the present invention can integrate in a processing unit In, it is also possible to modules and physically exists alone, can also be integrated in one unit with two or more modules.It is above-mentioned Integrated unit both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer Device (can be personal computer, server or network equipment etc.) or intelligent terminal or processor (Processor) Execute the part steps of each embodiment the method for the present invention.And storage medium above-mentioned include: USB flash disk, it is mobile hard disk, read-only Memory (Read-On l y Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk Or the various media that can store program code such as CD.
In above-described embodiment provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the module, only Only a kind of logical function partition, there may be another division manner in actual implementation, for example, at least two module or components can To combine or be desirably integrated into another system, or some features can be ignored or not executed.
The module as illustrated by the separation member may or may not be physically separated, aobvious as module The component shown may or may not be physical module, it can and it is in one place, or may be distributed at least In two network units.Some or all of the modules therein can be selected to realize this embodiment scheme according to the actual needs Purpose.
Obviously, embodiments described above is only a part of the embodiment of the present invention, instead of all the embodiments, attached Presently preferred embodiments of the present invention is given in figure, but is not intended to limit the scope of the patents of the invention.The present invention can be with many differences Form realize, on the contrary, purpose of providing these embodiments is keeps the understanding to the disclosure more thorough Comprehensively.Although the present invention is described in detail referring to the foregoing embodiments, for coming for those skilled in the art, Can still modify to technical solution documented by aforementioned each specific embodiment, or to part of technical characteristic into Row equivalence replacement.All equivalent structures done using description of the invention and accompanying drawing content, are directly or indirectly used in other Relevant technical field, similarly within the invention patent protection scope.

Claims (10)

1. a kind of test data generating method characterized by comprising
Receive Test data generation request;
According to the generation of the output format classification and test data of the test data of Test data generation request confirmation generation Amount;
Judge whether the output format classification is Form file format, and sentences when judging result is Form file format It is disconnected to generate template file with the presence or absence of data;
When generating template file there are the data, the store path that the data generate template file is obtained, according to described Store path obtains the data and generates template file;When generating template file there is no the data, obtain to be generated The field information that test data is included generates the data according to the field information and generates template file;Wherein, described Field information includes field name and order of the field;
It obtains the data and generates the configuration information of each field in template file, and judge that the data generate in template file to be No includes custom field, if including custom field, obtains customized word corresponding with the custom field Section configuration information;
The data are filled according to the production quantity of the configuration information, the custom field configuration information and the test data Template file is generated, to generate the test data file;Wherein, the format of the test data file and the output format Classification is corresponding.
2. test data generating method according to claim 1, which is characterized in that described according to the Test data generation Request confirmation generate the output format classification of test data and the production quantity of test data include:
Read test data are requested to generate mission bit stream table according to the Test data generation, from the Test data generation task The information of the output format classification and the data production quantity is read in information table.
3. test data generating method according to claim 1 or 2, which is characterized in that generate mould obtaining the data After plate file, the method also includes:
Judge that the data generate in template file with the presence or absence of associate field, if it exists relevant field, then obtain with it is described The corresponding associate field configuration information of associate field fills the data according to the associate field configuration information and generates template File.
4. test data generating method according to claim 1 or 2, which is characterized in that the method also includes:
When the output format classification is non-Form file format, judge whether the output format classification is text-type text Part format;
If the output format classification is text-type file format, text formatting configuration information is obtained, directly according to the text The production quantity of this fonnat configuring information and the test data generates the test data file.
5. a kind of Test data generation device characterized by comprising
Request receiving module, for receiving Test data generation request;
Confirmation module, according to the output format classification and test number of the test data that the Test data generation request confirmation generates According to production quantity;
Judgment module, for judging whether the output format classification is Form file format, and when judging result is table Data are judged whether there is when type file format generates template file;
Template obtains module, for obtaining the data and generating template file when generating template file there are the data Store path obtains the data according to the store path and generates template file;When there is no the data to generate template text When part, the field information that test data to be generated is included is obtained, the data are generated according to the field information and generate mould Plate file;Wherein, the field information includes field name and order of the field;
Configuration information obtains module, generates the configuration information of each field in template file for obtaining the data, and judge institute Whether include custom field, if including custom field, acquisition is made by oneself with described if stating data and generating in template file The corresponding custom field configuration information of adopted field;
Data generation module, for according to the configuration information, the custom field configuration information and the test data Production quantity fills the data and generates template file, to generate the test data file;Wherein, the test data file Format is corresponding with the output format classification.
6. Test data generation device according to claim 1, which is characterized in that the confirmation module is specifically used for basis The Test data generation request read test data generate mission bit stream table, from the Test data generation mission bit stream table Read the information of the output format classification and the data production quantity.
7. Test data generation device according to claim 5 or 6, which is characterized in that the configuration information obtains module Being also used to judge that the data generate whether there is associate field in template file, if it exists relevant field, then acquisition and institute State the corresponding associate field configuration information of associate field;
The data generation module, which is also used to further fill the data according to the associate field configuration information, generates template File.
8. Test data generation device according to claim 5 or 6, which is characterized in that the judgment module is also used to work as When judging the output format classification for non-Form file format, judge whether the output format classification is text-type file Format;
The configuration information obtains module and is also used to obtain text lattice when the output format classification is text-type file format Formula configuration information;
The data generation module is for directly according to the life of the production quantity of the text formatting configuration information and the test data At the test data file.
9. a kind of computer equipment characterized by comprising
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one When managing device execution, so that at least one described processor executes Test data generation according to any one of claims 1 to 4 The step of method.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Readable instruction realizes that any one of claims 1 to 4 such as is weighed when the computer-readable instruction is executed by least one processor Benefit requires the step of test data generating method.
CN201910275536.7A 2019-04-08 2019-04-08 A kind of test data generating method, device and computer equipment, storage medium Pending CN110188030A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910275536.7A CN110188030A (en) 2019-04-08 2019-04-08 A kind of test data generating method, device and computer equipment, storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910275536.7A CN110188030A (en) 2019-04-08 2019-04-08 A kind of test data generating method, device and computer equipment, storage medium

Publications (1)

Publication Number Publication Date
CN110188030A true CN110188030A (en) 2019-08-30

Family

ID=67714043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910275536.7A Pending CN110188030A (en) 2019-04-08 2019-04-08 A kind of test data generating method, device and computer equipment, storage medium

Country Status (1)

Country Link
CN (1) CN110188030A (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597728A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Method, device and system for constructing test data
CN110888797A (en) * 2019-10-11 2020-03-17 平安信托有限责任公司 Test data generation method and device, computer equipment and storage medium
CN110990280A (en) * 2019-12-03 2020-04-10 中国工商银行股份有限公司 Automatic test data generation system and method
CN111143221A (en) * 2019-12-28 2020-05-12 中国银行股份有限公司 Test method and device
CN111159040A (en) * 2019-12-31 2020-05-15 中国银行股份有限公司 Test data generation method, device, equipment and storage medium
CN111816284A (en) * 2020-09-04 2020-10-23 平安国际智慧城市科技股份有限公司 Batch generation method, device, equipment and storage medium of medical test data
CN111966760A (en) * 2020-08-18 2020-11-20 中国银行股份有限公司 Hive data warehouse-based test data generation method and device
CN112631884A (en) * 2020-12-18 2021-04-09 平安普惠企业管理有限公司 Pressure measurement method and device based on data synchronization, computer equipment and storage medium
CN112737875A (en) * 2020-12-24 2021-04-30 中国银联股份有限公司 Method and device for generating test message
CN112783770A (en) * 2021-01-21 2021-05-11 深圳市杉川机器人有限公司 Software testing method, device, equipment and computer readable storage medium
CN112835809A (en) * 2021-03-22 2021-05-25 亿企赢网络科技有限公司 Test data setting method, device, equipment and medium based on browser
CN113094279A (en) * 2021-04-25 2021-07-09 深圳前海微众银行股份有限公司 Test data construction method, device and system and computer readable storage medium
CN113220591A (en) * 2021-06-04 2021-08-06 中国银行股份有限公司 Method and device for generating test data
CN113342668A (en) * 2021-06-22 2021-09-03 中诚信征信有限公司 Test data generation method and device
CN113641583A (en) * 2021-08-16 2021-11-12 拉扎斯网络科技(上海)有限公司 Data processing method, data processing apparatus, electronic device, storage medium, and program product
CN113742225A (en) * 2021-08-31 2021-12-03 上海浦东发展银行股份有限公司 Test data generation method, device, equipment and storage medium
CN113836038A (en) * 2021-10-21 2021-12-24 中国平安人寿保险股份有限公司 Test data construction method, device, equipment and storage medium
CN113986747A (en) * 2021-11-05 2022-01-28 京东科技信息技术有限公司 Data generation method and device, electronic equipment and storage medium
CN117408231A (en) * 2023-12-14 2024-01-16 上海孤波科技有限公司 Method and device for converting format of chip test result and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030014557A1 (en) * 2001-06-29 2003-01-16 Joubert Berger System and method for transforming operating system audit data to a desired format
CN105488210A (en) * 2015-12-11 2016-04-13 金蝶软件(中国)有限公司 Batch data matching method and device
CN106649108A (en) * 2016-12-13 2017-05-10 北京锐安科技有限公司 Generation method and device of test data
CN107436917A (en) * 2017-06-16 2017-12-05 浙江百世技术有限公司 One kind imports template configuration method, batch data introduction method and system
CN107678935A (en) * 2017-05-10 2018-02-09 平安科技(深圳)有限公司 Data creation method, terminal and computer-readable recording medium
CN108804336A (en) * 2018-06-15 2018-11-13 深圳壹账通智能科技有限公司 Interactive system test method, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030014557A1 (en) * 2001-06-29 2003-01-16 Joubert Berger System and method for transforming operating system audit data to a desired format
CN105488210A (en) * 2015-12-11 2016-04-13 金蝶软件(中国)有限公司 Batch data matching method and device
CN106649108A (en) * 2016-12-13 2017-05-10 北京锐安科技有限公司 Generation method and device of test data
CN107678935A (en) * 2017-05-10 2018-02-09 平安科技(深圳)有限公司 Data creation method, terminal and computer-readable recording medium
CN107436917A (en) * 2017-06-16 2017-12-05 浙江百世技术有限公司 One kind imports template configuration method, batch data introduction method and system
CN108804336A (en) * 2018-06-15 2018-11-13 深圳壹账通智能科技有限公司 Interactive system test method, device, computer equipment and storage medium

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597728A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Method, device and system for constructing test data
CN110888797A (en) * 2019-10-11 2020-03-17 平安信托有限责任公司 Test data generation method and device, computer equipment and storage medium
CN110990280A (en) * 2019-12-03 2020-04-10 中国工商银行股份有限公司 Automatic test data generation system and method
CN110990280B (en) * 2019-12-03 2023-09-12 中国工商银行股份有限公司 Automatic test data generation system and method
CN111143221A (en) * 2019-12-28 2020-05-12 中国银行股份有限公司 Test method and device
CN111143221B (en) * 2019-12-28 2024-01-30 中国银行股份有限公司 Test method and device
CN111159040A (en) * 2019-12-31 2020-05-15 中国银行股份有限公司 Test data generation method, device, equipment and storage medium
CN111966760A (en) * 2020-08-18 2020-11-20 中国银行股份有限公司 Hive data warehouse-based test data generation method and device
CN111966760B (en) * 2020-08-18 2024-04-16 中国银行股份有限公司 Test data generation method and device based on Hive data warehouse
CN111816284A (en) * 2020-09-04 2020-10-23 平安国际智慧城市科技股份有限公司 Batch generation method, device, equipment and storage medium of medical test data
CN112631884A (en) * 2020-12-18 2021-04-09 平安普惠企业管理有限公司 Pressure measurement method and device based on data synchronization, computer equipment and storage medium
CN112737875B (en) * 2020-12-24 2022-03-18 中国银联股份有限公司 Method and device for generating test message
CN112737875A (en) * 2020-12-24 2021-04-30 中国银联股份有限公司 Method and device for generating test message
CN112783770A (en) * 2021-01-21 2021-05-11 深圳市杉川机器人有限公司 Software testing method, device, equipment and computer readable storage medium
CN112835809A (en) * 2021-03-22 2021-05-25 亿企赢网络科技有限公司 Test data setting method, device, equipment and medium based on browser
CN113094279A (en) * 2021-04-25 2021-07-09 深圳前海微众银行股份有限公司 Test data construction method, device and system and computer readable storage medium
CN113220591A (en) * 2021-06-04 2021-08-06 中国银行股份有限公司 Method and device for generating test data
CN113342668A (en) * 2021-06-22 2021-09-03 中诚信征信有限公司 Test data generation method and device
CN113641583A (en) * 2021-08-16 2021-11-12 拉扎斯网络科技(上海)有限公司 Data processing method, data processing apparatus, electronic device, storage medium, and program product
CN113742225A (en) * 2021-08-31 2021-12-03 上海浦东发展银行股份有限公司 Test data generation method, device, equipment and storage medium
CN113742225B (en) * 2021-08-31 2024-04-26 上海浦东发展银行股份有限公司 Test data generation method, device, equipment and storage medium
CN113836038A (en) * 2021-10-21 2021-12-24 中国平安人寿保险股份有限公司 Test data construction method, device, equipment and storage medium
CN113986747A (en) * 2021-11-05 2022-01-28 京东科技信息技术有限公司 Data generation method and device, electronic equipment and storage medium
CN117408231A (en) * 2023-12-14 2024-01-16 上海孤波科技有限公司 Method and device for converting format of chip test result and electronic equipment
CN117408231B (en) * 2023-12-14 2024-04-19 上海孤波科技有限公司 Method and device for converting format of chip test result and electronic equipment

Similar Documents

Publication Publication Date Title
CN110188030A (en) A kind of test data generating method, device and computer equipment, storage medium
CN109446072A (en) The generation method and device of test script
US20180365136A1 (en) System and method for automatically categorizing test cases for model based testing
CN109697153A (en) Monitoring method, monitoring system and computer readable storage medium
JP7358003B2 (en) Facet-based query refinement based on multiple query interpretations
CN107644286A (en) Workflow processing method and device
CN105849725A (en) Constructing queries for execution over multi-dimensional data structures
US20230021259A1 (en) Methods and systems for building search service application
CN110275861A (en) Date storage method and device, storage medium, electronic device
CN109992508A (en) Test exemple automation generation method, device and electronic equipment
CN109165377A (en) Generate the method and tabulating equipment of form data
CN110022315A (en) Weight management method, device and equipment in a kind of piece of chain type account book
CN108959515A (en) Original data guard method, medium, device and calculating equipment
CN109885474A (en) Test case edit methods and device, terminal and computer readable storage medium
CN107480205A (en) A kind of method and apparatus for carrying out data partition
CN110532180A (en) A kind of generation method and device of test data
CN110619115A (en) Template creating method and device, electronic equipment and storage medium
CN113791765A (en) Resource arranging method, device and equipment of cloud service and storage medium
CN103631844A (en) File search apparatus, file search method, image search apparatus, and non-transitory computer readable storage medium
CN110825395A (en) Multi-plug-in layered deployment system, device and medium
CN109213565A (en) Management method, relevant device and the storage medium of isomery virtual computing resource
US20140324918A1 (en) Database Generation System, Method For Generating A Database, Product Line Management System And Non-Transitory Data Carrier
US9400825B2 (en) Pivot analysis method using condition group
US8055733B2 (en) Method, apparatus, and computer program product for implementing importation and converging system definitions during planning phase for logical partition (LPAR) systems
CN113506099A (en) Configuration system, method, computer device and storage medium for reporting service

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