CN110457224A - Generate the method and device of test data - Google Patents

Generate the method and device of test data Download PDF

Info

Publication number
CN110457224A
CN110457224A CN201910752248.6A CN201910752248A CN110457224A CN 110457224 A CN110457224 A CN 110457224A CN 201910752248 A CN201910752248 A CN 201910752248A CN 110457224 A CN110457224 A CN 110457224A
Authority
CN
China
Prior art keywords
test data
data
constraint condition
type
testing requirement
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
CN201910752248.6A
Other languages
Chinese (zh)
Other versions
CN110457224B (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.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201910752248.6A priority Critical patent/CN110457224B/en
Publication of CN110457224A publication Critical patent/CN110457224A/en
Application granted granted Critical
Publication of CN110457224B publication Critical patent/CN110457224B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/10Requirements analysis; Specification techniques
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of method and devices for generating test data, this method comprises: determining the data type of test data according to testing requirement;The constraint condition of test data is determined according to testing requirement;The constraint condition of test data includes the customized constraint condition of user;According to the data type of test data and the constraint condition of test data, test data corresponding with testing requirement is generated.The present invention is based on data types and constraint condition that testing requirement determines test data respectively, and then according to the data type and constraint condition of test data, automatically generate test data corresponding with testing requirement, can be improved the efficiency for generating test data;In addition, the constraint condition of test data includes the customized constraint condition of user, the flexibility for generating test data can be improved.

Description

Generate the method and device of test data
Technical field
The present invention relates to software testing technology fields, more particularly to generate the method and device of test data.
Background technique
This part intends to provides background or context for the embodiment of the present invention stated in claims.Description herein Recognize it is the prior art not because not being included in this section.
Currently, generally by manually generating test data in carrying out software test procedure.Such as manually generated survey Document belongs to traditional test approach.Traditional manual testing is simple and easy with people, but increases greatly for tester Operating point amount, the efficiency for generating test data is extremely low, causes the efficiency of software test unsatisfactory.
In order to solve the problems, such as it is above-mentioned manually generate test data caused by low efficiency, automatic test technology meet the tendency of and It is raw.Automatic test technology is by testing tool automatic Data Generation Test, its advantage is that can be individually present, according to testing requirement It calls in test file or automatically saves test result file after the completion of test.However although automatic test improves software The efficiency of test, but there is biggish limitation when generating test data, so that it is inflexible to generate test data.
Therefore, it is existing generate test data method there is a problem of low efficiency, flexibility difference.
Summary of the invention
The embodiment of the present invention provides a kind of method for generating test data, to improve the efficiency for generating test data, together Shi Tigao generates the flexibility of test data, this method comprises:
The data type of test data is determined according to testing requirement;
The constraint condition of test data is determined according to testing requirement;The constraint condition of test data includes that user is customized Constraint condition;
According to the data type of test data and the constraint condition of test data, test number corresponding with testing requirement is generated According to.
The embodiment of the present invention also provides a kind of device, to improve the efficiency for generating test data, while improving generation and surveying The flexibility of data is tried, which includes:
Data type determining module, for determining the data type of test data according to testing requirement;
Constraint condition determining module, for determining the constraint condition of test data according to testing requirement;The pact of test data Beam condition includes the customized constraint condition of user;
Generation module, for according to the data type of test data and the constraint condition of test data, generating to be needed with test Seek corresponding test data.
The embodiment of the present invention also provides a kind of computer equipment, including memory, processor and storage are on a memory simultaneously The computer program that can be run on a processor, the processor realize above-mentioned generation test number when executing the computer program According to method.
The embodiment of the present invention also provides a kind of computer readable storage medium, and the computer-readable recording medium storage has Execute the computer program of the method for above-mentioned generation test data.
In the embodiment of the present invention, the data type and constraint condition of test data are determined respectively based on testing requirement, in turn According to the data type and constraint condition of test data, test data corresponding with testing requirement is automatically generated, can be improved life At the efficiency of test data;In addition, the constraint condition of test data includes the customized constraint condition of user, generation can be improved The flexibility of test data.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.In the accompanying drawings:
Fig. 1 is the implementation flow chart of the method provided in an embodiment of the present invention for generating test data;
Fig. 2 is another implementation flow chart of the method provided in an embodiment of the present invention for generating test data;
Fig. 3 is the another implementation flow chart of the method provided in an embodiment of the present invention for generating test data;
Fig. 4 is the implementation flow chart of step 305 in the method provided in an embodiment of the present invention for generating test data;
Fig. 5 is the functional block diagram of the device provided in an embodiment of the present invention for generating test data;
Fig. 6 is another functional block diagram of the device provided in an embodiment of the present invention for generating test data;
Fig. 7 is the another functional block diagram of the device provided in an embodiment of the present invention for generating test data;
Fig. 8 is the structural block diagram of generation unit 705 in the device provided in an embodiment of the present invention for generating test data.
Specific embodiment
Understand in order to make the object, technical scheme and advantages of the embodiment of the invention clearer, with reference to the accompanying drawing to this hair Bright embodiment is described in further details.Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but simultaneously It is not as a limitation of the invention.
Fig. 1 shows the implementation process of the method provided in an embodiment of the present invention for generating test data, for ease of description, only Part related to the embodiment of the present invention is shown, details are as follows:
As shown in Figure 1, the method for generating test data comprising:
Step 101, the data type of test data is determined according to testing requirement;
Step 102, the constraint condition of test data is determined according to testing requirement;The constraint condition of test data includes user Customized constraint condition;
Step 103, it according to the data type of test data and the constraint condition of test data, generates corresponding with testing requirement Test data.
It needs in advance to arrange test item or test content in software test procedure, such as based on writing Testing scheme determines testing requirement etc., and containing in testing scheme needs many aspects to be tested.Such as it is stability test, soft Part functional test etc..It determines that testing requirement can targetedly test software, has to generate with testing requirement Targeted test data, and then software is tested using the test data of generation, to meet testing requirement.
Wherein, in one embodiment of this invention, the data type of test data includes numeric type, Boolean type, character string The data types such as type, it will be appreciated by persons skilled in the art that the data type of test data can also include removing above-mentioned number Other data types, such as text-type, picture type and file type except value type, Boolean type, character string type etc., the present invention are implemented Example does not limit this particularly.
Wherein, in one embodiment of this invention, the constraint condition of test data includes the data length of test data.This Field technical staff is it is understood that the constraint condition of test data can also include other in addition to above-mentioned data length Constraint condition, such as the language form of test data etc., the embodiment of the present invention does not limit this particularly.
In addition, in order to improve the flexibility for generating test data, the constraint condition packet of test data in the embodiment of the present invention Include the customized constraint condition of user.I.e. user can carry out the constraint condition of test data when generating test data It is customized, to improve the flexibility for generating test data.
It, can be directly automatically according to test after the data type and constraint condition for determining test data based on testing requirement The data type and constraint condition of data generate test data corresponding with testing requirement, therefore can be improved generation test number According to efficiency.
In embodiments of the present invention, the data type and constraint condition for determining test data respectively based on testing requirement, into And according to the data type and constraint condition of test data, test data corresponding with testing requirement is automatically generated, can be improved Generate the efficiency of test data.In addition, the constraint condition of test data includes the customized constraint condition of user, life can be improved At the flexibility of test data.
Fig. 2 shows another implementation processes of the method provided in an embodiment of the present invention for generating test data, for convenient for retouching It states, only parts related to embodiments of the present invention are shown, and details are as follows:
In one embodiment of this invention, as shown in Fig. 2, on the basis of the method and step shown in above-mentioned Fig. 1, test is generated The method of data, further includes:
Step 201, according to the data type of the data type modification instruction modification test data received.
In order to further increase the flexibility for generating test data, user can permit to the number of fixed test data It modifies according to type.Instruction can be modified by receiving the data type of user, and then according to the number of the user received It modifies according to type modification instruction to the data type of test data, to further increase the flexibility for generating test data.
In embodiments of the present invention, the data type of instruction modification test data is modified according to the data type received, It can be further improved the flexibility for generating test data.
In one embodiment of this invention, as shown in Fig. 2, generating test data on the basis of above method step Method, further includes:
Step 202, according to the constraint condition of the constraint condition modification instruction modification test data received.
Likewise, can permit user to fixed test to further increase the flexibility for generating test data The constraint condition of data is modified.Instruction can be modified by receiving the constraint condition of user, and then according to receiving The constraint condition modification instruction of user modifies to the constraint condition of test data, generates test data to further increase Flexibility.
In embodiments of the present invention, the constraint condition of instruction modification test data is modified according to the constraint condition received, It can be further improved the flexibility for generating test data.
Fig. 3 shows the another implementation process of the method provided in an embodiment of the present invention for generating test data, for convenient for retouching It states, only parts related to embodiments of the present invention are shown, and details are as follows:
In one embodiment of this invention, test data includes the first test data and the second test data.Such as Fig. 3 institute Show, generate step 101 in the method for test data, the data type of test data is determined according to testing requirement, comprising:
Step 301, the data type of the first test data and the number of the second test data are determined respectively according to testing requirement According to type;
Step 102, the constraint condition of test data is determined according to testing requirement, comprising:
Step 302, the constraint condition of the first test data and the pact of the second test data are determined respectively according to testing requirement Beam condition;
Step 103, it according to the data type of test data and the constraint condition of test data, generates corresponding with testing requirement Test data, comprising:
Step 303, it according to the data type of the first test data and the constraint condition of the first test data, determines and tests Corresponding first test data of demand;
Step 304, it according to the data type of the second test data and the constraint condition of the second test data, determines and tests Corresponding second test data of demand;
Step 305, according to the first test data and the second Test data generation test data corresponding with testing requirement.
Applicant has found under study for action, and during sometimes testing software, the test data for needing to generate can The survey that energy more than one data type or the possible difference of its constraint condition, i.e. test data may include more than one type Try data.
Therefore, in order to further increase the flexibility for generating test data, the test data in the embodiment of the present invention includes First test data and the second test data.It will be appreciated by persons skilled in the art that test data can also include except upper State third test data and the 4th test data etc. except the first test data and the second test data, and third test data And the 4th test data data type and constraint condition, with the data type of the first test data or the second test data and about Beam condition can be identical, can not also be identical, and the embodiment of the present invention does not limit this particularly.
Therefore, on the basis of above-mentioned, in the data type for determining test data, the is determined respectively based on testing requirement The data type of the data type of one test data and the second test data.
Likewise, determining the first test data respectively based on testing requirement in the constraint condition for determining test data The constraint condition of constraint condition and the second test data.
In turn, when generating test data, data type and constraint condition based on the first test data generate first and survey Data are tried, and the data type based on the second test data and constraint condition generate the second test data.
Wherein, step 303 and step 304 execute sequence without successive, can first carry out step 303 and execute step 304 again, i.e., It first generates the first test data and regenerates the second test data;Step 304 can also be first carried out and execute step 303, i.e. Mr. again The first test data is regenerated at the second test data, or is performed simultaneously step 303 and 304, i.e., generates the first test simultaneously Data and the second test data.
After determining the first test data and the second test data, the first test data and the second test data can be based on Test data is generated, i.e., is combined the first test data and the second test data, test corresponding with testing requirement is formed Data, to further increase the flexibility for generating test data.
In one embodiment of this invention, the data type of the data type of the first test data and the second test data can , can not also be identical with identical, the flexibility for generating test data can be further increased.
In one embodiment of this invention, the constraint condition of the constraint condition of the first test data and the second test data can , can not also be identical with identical, the flexibility for generating test data can be further increased.
In embodiments of the present invention, the data type and constraint item of the first test data are determined respectively based on testing requirement The data type and constraint condition of part and the second test data generate the first test data and the second test data respectively accordingly, And then final test data is formed according to the first test data and the second test data of generation, generation can be further increased The flexibility of test data.
Fig. 4 shows the implementation process of step 305 in the method provided in an embodiment of the present invention for generating test data, for just In description, only parts related to embodiments of the present invention are shown, and details are as follows:
In one embodiment of this invention, it as shown in figure 4, generating step 305 in the method for test data, is surveyed according to first Try data and the second Test data generation test data, comprising:
Step 401, the weight of the first test data and the second test data is determined respectively according to testing requirement;
Step 402, according to the weight and the second test data of the first test data and the first test data and the second test The weight of data generates test data corresponding with testing requirement.
When forming test data based on the first test data and the second test data, different testing requirements need the The weight (the first test data accounting in test data, such as quantity accounting etc.) of one test data or the second test number According to weight may be not identical.In order to enable the test number generated has more specific aim and adaptability, test number is first determined respectively The weight of the first test data and the second test data in, and then determine final test data.
Wherein, when determining the weight of the first test data and the second test data, the weight of reception user can be passed through Instruct the weight for determining the first test data.Likewise, can also determine the second test number by receiving the weight instruction of user According to weight.
It, specifically can be true by following formula after the weight of the weight and the second test data that determine the first test data Surely the test data ultimately generated:
W=w1α+w2β;
Wherein, w indicates the test data ultimately generated, w1Indicate the first test data, α indicates the power of the first test data Weight, w2Indicate the second test data, β indicates the weight of the second test data.
In embodiments of the present invention, the weight of the first test data and the weight of the second test data are determined respectively, in turn According to the first test data and its weight, the second test data and its weight generate final test data, can further mention Height generates the flexibility of test data.
A kind of device for generating test data is additionally provided in the embodiment of the present invention, as described in the following examples.Due to The principle that these devices solve the problems, such as is similar to the method for test data is generated, therefore the implementation of these devices may refer to method Implementation, overlaps will not be repeated.
Fig. 5 shows the functional module of the device provided in an embodiment of the present invention for generating test data, for purposes of illustration only, only Part related to the embodiment of the present invention is shown, details are as follows:
With reference to Fig. 5, the modules that the device for generating test data is included are for executing in Fig. 1 corresponding embodiment Each step, referring specifically to the associated description in Fig. 1 and Fig. 1 corresponding embodiment, details are not described herein again.The present invention is implemented In example, the device for generating test data includes data type determining module 501, constraint condition determining module 502 and generates Module 503.
Data type determining module 501, for determining the data type of test data according to testing requirement;
Constraint condition determining module 502, for determining the constraint condition of test data according to testing requirement;Test data Constraint condition includes the customized constraint condition of user;
Generation module 503, for generating and testing according to the data type of test data and the constraint condition of test data The corresponding test data of demand.
In embodiments of the present invention, data type determining module 501 determines the number of test data based on testing requirement respectively It determines the constraint condition of test data respectively based on testing requirement according to type and constraint condition determining module 502, and then generates mould Block 503 automatically generates test data corresponding with testing requirement, Neng Gouti according to the data type and constraint condition of test data Height generates the efficiency of test data.In addition, the constraint condition of test data includes the customized constraint condition of user, can be improved Generate the flexibility of test data.
In one embodiment of this invention, the data type of test data includes one or more of:
Numeric type, Boolean type, character string type, text-type, picture type and file type.
In one embodiment of this invention, the constraint condition of test data includes one or more of:
The data length of test data and the language form of test data.
Fig. 6 shows another modular structure of the device provided in an embodiment of the present invention for generating test data, for convenient for saying Bright, only parts related to embodiments of the present invention are shown, and details are as follows:
In one embodiment of this invention, with reference to Fig. 6, the modules that the device for generating test data is included are used In executing each step in Fig. 2 corresponding embodiment, referring specifically to the associated description in Fig. 2 and Fig. 2 corresponding embodiment, this Place repeats no more.In the embodiment of the present invention, on the basis of the modular structure shown in above-mentioned Fig. 5, the dress for generating test data It sets, further includes data type modified module 601.
Data type modified module 601, for the number according to the data type modification instruction modification test data received According to type.
In embodiments of the present invention, data type modified module 601 modifies instruction modification according to the data type received The data type of test data can further increase the flexibility for generating test data.
In one embodiment of this invention, with reference to Fig. 6, on the basis of above-mentioned modular structure, the generation test data Device, further include constraint condition modified module 602.
Constraint condition modified module 602, for the pact according to the constraint condition modification instruction modification test data received Beam condition.
In embodiments of the present invention, constraint condition modified module 602 modifies instruction modification according to the constraint condition received The constraint condition of test data can further increase the flexibility for generating test data.
Fig. 7 shows the another modular structure of the device provided in an embodiment of the present invention for generating test data, for convenient for saying Bright, only parts related to embodiments of the present invention are shown, and details are as follows:
In one embodiment of this invention, with reference to Fig. 7, each unit that the device for generating test data is included is used In executing each step in Fig. 3 corresponding embodiment, referring specifically to the associated description in Fig. 3 and Fig. 3 corresponding embodiment, this Place repeats no more.In the embodiment of the present invention, data type determining module 501 includes data in the device for generating test data Type determining units 701, constraint condition determining module 502 include constraint condition determination unit 702, and generation module 503 includes the One generation unit 703, the second generation unit 704 and generation unit 705.
Data type determination unit 701, for according to testing requirement respectively determine the first test data data type and The data type of second test data;
Constraint condition determination unit 702, for according to testing requirement respectively determine the first test data constraint condition and The constraint condition of second test data;
First generation unit 703, according to the data type of the first test data and the constraint condition of the first test data, really Fixed the first test data corresponding with testing requirement;
Second generation unit 704, according to the data type of the second test data and the constraint condition of the second test data, really Fixed the second test data corresponding with testing requirement;
Generation unit 705, according to the first test data and the second Test data generation test number corresponding with testing requirement According to.
In embodiments of the present invention, data type determination unit 701 determines the first test data based on testing requirement respectively And second test data data type, constraint condition determination unit 702 based on testing requirement respectively determine the first test data And second test data constraint condition, accordingly the first generation unit 703 and the second generation unit 704 generate respectively first test Data and the second test data, and then generation unit 705 is formed most according to the first test data of generation and the second test data Whole test data can further increase the flexibility for generating test data.
Fig. 8 shows the structural representation of generation unit 705 in the device provided in an embodiment of the present invention for generating test data, For purposes of illustration only, only parts related to embodiments of the present invention are shown, details are as follows:
In one embodiment of this invention, with reference to Fig. 8, each subelement that the generation unit 705 is included is for holding Each step in row Fig. 4 corresponding embodiment, referring specifically to the associated description in Fig. 4 and Fig. 4 corresponding embodiment, herein not It repeats again.In the embodiment of the present invention, the generation unit 705 includes weight subelement 801 and generation subelement 802
Weight subelement 801, for determining the power of the first test data and the second test data respectively according to testing requirement Weight.
Subelement 802 is generated, for the weight and the second test data according to the first test data and the first test data With the weight of the second test data, test data corresponding with testing requirement is generated.
In embodiments of the present invention, weight subelement 801 determines the first test data and second according to testing requirement respectively The weight of test data generates subelement 802 according to the weight and the second test number of the first test data and the first test data According to the weight with the second test data, test data corresponding with testing requirement is generated, generation test number can be further increased According to survey flexibility.
The embodiment of the present invention also provides a kind of computer equipment, including memory, processor and storage are on a memory simultaneously The computer program that can be run on a processor, the processor realize above-mentioned generation test number when executing the computer program According to method.
The embodiment of the present invention also provides a kind of computer readable storage medium, and the computer-readable recording medium storage has Execute the computer program of the method for above-mentioned generation test data.
In conclusion the embodiment of the present invention determines the data type and constraint item of test data based on testing requirement respectively Part, so according to the data type and constraint condition of test data, test data corresponding with testing requirement is automatically generated, it can Improve the efficiency for generating test data;In addition, the constraint condition of test data includes the customized constraint condition of user, Neng Gouti Height generates the flexibility of test data.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Particular embodiments described above has carried out further in detail the purpose of the present invention, technical scheme and beneficial effects Describe in detail it is bright, it should be understood that the above is only a specific embodiment of the present invention, the guarantor being not intended to limit the present invention Range is protected, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should be included in this Within the protection scope of invention.

Claims (10)

1. a kind of method for generating test data characterized by comprising
The data type of test data is determined according to testing requirement;
The constraint condition of test data is determined according to testing requirement;The constraint condition of test data includes the customized constraint of user Condition;
According to the data type of test data and the constraint condition of test data, test data corresponding with testing requirement is generated.
2. the method as described in claim 1, which is characterized in that further include:
According to the data type of the data type modification instruction modification test data received.
3. the method as described in claim 1, which is characterized in that further include:
According to the constraint condition of the constraint condition modification instruction modification test data received.
4. the method as described in claim 1, which is characterized in that test data includes the first test data and the second test number According to determining the data type of test data according to testing requirement, comprising:
Determine the data type of the first test data and the data type of the second test data respectively according to testing requirement;
The constraint condition of test data is determined according to testing requirement, comprising:
Determine the constraint condition of the first test data and the constraint condition of the second test data respectively according to testing requirement;
According to the data type of test data and the constraint condition of test data, test data corresponding with testing requirement is generated, Include:
According to the data type of the first test data and the constraint condition of the first test data, corresponding with testing requirement the is determined One test data;
According to the data type of the second test data and the constraint condition of the second test data, corresponding with testing requirement the is determined Two test datas;
According to the first test data and the second Test data generation test data corresponding with testing requirement.
5. the method as described in claim 1, which is characterized in that tested according to the first test data and the second Test data generation Data, comprising:
Determine the weight of the first test data and the second test data respectively according to testing requirement;
According to the first test data and the weight of the first test data and the weight of the second test data and the second test data, Generate test data corresponding with testing requirement.
6. the method as described in claim 1, which is characterized in that the data type of test data includes one or more of:
Numeric type, Boolean type, character string type, text-type, picture type and file type.
7. the method as described in claim 1, which is characterized in that the constraint condition of test data includes one or more of:
The data length of test data and the language form of test data.
8. a kind of device for generating test data characterized by comprising
Data type determining module, for determining the data type of test data according to testing requirement;
Constraint condition determining module, for determining the constraint condition of test data according to testing requirement;The constraint item of test data Part includes the customized constraint condition of user;
Generation module, for generating and testing requirement pair according to the data type of test data and the constraint condition of test data The test data answered.
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 any side of claim 1 to 7 when executing the computer program Method.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has perform claim It is required that the computer program of 1 to 7 any the method.
CN201910752248.6A 2019-08-15 2019-08-15 Method and device for generating test data Active CN110457224B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910752248.6A CN110457224B (en) 2019-08-15 2019-08-15 Method and device for generating test data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910752248.6A CN110457224B (en) 2019-08-15 2019-08-15 Method and device for generating test data

Publications (2)

Publication Number Publication Date
CN110457224A true CN110457224A (en) 2019-11-15
CN110457224B CN110457224B (en) 2023-08-18

Family

ID=68486694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910752248.6A Active CN110457224B (en) 2019-08-15 2019-08-15 Method and device for generating test data

Country Status (1)

Country Link
CN (1) CN110457224B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111737125A (en) * 2020-06-19 2020-10-02 中国工商银行股份有限公司 Method and device for generating market data of quantitative transaction and server
CN112199302A (en) * 2020-12-07 2021-01-08 望海康信(北京)科技股份公司 Test data generation method and system, corresponding equipment and storage medium
CN112965909A (en) * 2021-03-19 2021-06-15 湖南大学 Test data, test case generation method and system, and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567204A (en) * 2011-12-28 2012-07-11 云海创想信息技术(无锡)有限公司 Method for managing automatic testing data
US20140026125A1 (en) * 2012-07-23 2014-01-23 Infosys Llimited Methods for generating software test input data and devices thereof
CN103838672A (en) * 2014-03-04 2014-06-04 中国工商银行股份有限公司 Automated testing method and device for all-purpose financial statements
US20140365830A1 (en) * 2013-06-11 2014-12-11 Wipro Limited System and method for test data generation and optimization for data driven testing
CN106294150A (en) * 2016-08-09 2017-01-04 北京神州绿盟信息安全科技股份有限公司 A kind of test loading method and device
CN107678935A (en) * 2017-05-10 2018-02-09 平安科技(深圳)有限公司 Data creation method, terminal and computer-readable recording medium
CN107894953A (en) * 2017-11-21 2018-04-10 中国银行股份有限公司 A kind of generation method and device of Bank application test data
CN109101432A (en) * 2018-10-24 2018-12-28 中国银行股份有限公司 Method for generating test case and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567204A (en) * 2011-12-28 2012-07-11 云海创想信息技术(无锡)有限公司 Method for managing automatic testing data
US20140026125A1 (en) * 2012-07-23 2014-01-23 Infosys Llimited Methods for generating software test input data and devices thereof
US20140365830A1 (en) * 2013-06-11 2014-12-11 Wipro Limited System and method for test data generation and optimization for data driven testing
CN103838672A (en) * 2014-03-04 2014-06-04 中国工商银行股份有限公司 Automated testing method and device for all-purpose financial statements
CN106294150A (en) * 2016-08-09 2017-01-04 北京神州绿盟信息安全科技股份有限公司 A kind of test loading method and device
CN107678935A (en) * 2017-05-10 2018-02-09 平安科技(深圳)有限公司 Data creation method, terminal and computer-readable recording medium
CN107894953A (en) * 2017-11-21 2018-04-10 中国银行股份有限公司 A kind of generation method and device of Bank application test data
CN109101432A (en) * 2018-10-24 2018-12-28 中国银行股份有限公司 Method for generating test case and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111737125A (en) * 2020-06-19 2020-10-02 中国工商银行股份有限公司 Method and device for generating market data of quantitative transaction and server
CN111737125B (en) * 2020-06-19 2024-01-30 中国工商银行股份有限公司 Method, device and server for generating quotation data of quantized transaction
CN112199302A (en) * 2020-12-07 2021-01-08 望海康信(北京)科技股份公司 Test data generation method and system, corresponding equipment and storage medium
CN112965909A (en) * 2021-03-19 2021-06-15 湖南大学 Test data, test case generation method and system, and storage medium
CN112965909B (en) * 2021-03-19 2024-04-09 湖南大学 Test data, test case generation method and system and storage medium

Also Published As

Publication number Publication date
CN110457224B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
CN110457224A (en) Generate the method and device of test data
CN103455396B (en) The method of testing of electronic equipment hardware performance and device
CN106528424B (en) Test method and test platform based on background system service or interface
CN103136094A (en) Page testing method and device
CN104461846B (en) The method and apparatus for detecting application program power consumption
CN108021509B (en) Test case dynamic sequencing method based on program behavior network aggregation
CN107315889A (en) The performance test methods and storage medium of simulation engine
US8276122B2 (en) Method to speed up creation of JUnit test cases
CN103713992B (en) A kind of automated testing method judged based on gps system alert and system
CN106484503B (en) A kind of calculation method and network processing unit verifying sum
CN109947642A (en) Automated hierarchical test method based on case classification, apparatus and system
CN106168924A (en) Software testing method and device and electronic equipment
CN103309807B (en) program testing method and platform
CN106874639B (en) Permanent luffing loads the fatigue life reliability appraisal procedure and device of lower mechanical structure
CN109101432A (en) Method for generating test case and device
CN107992149B (en) Trimming method and trimming device of voltage band gap circuit
CN109144840A (en) A kind of test method, device and its equipment
CN110399284A (en) A kind of test case writes and executes method and device
CN105447003A (en) Parameter set generation method and device
CN107622013B (en) Distributed system testing method and device
CN109460236A (en) Program version building and inspection method and system
CN110376644A (en) Earthquake data before superposition joining method and device
CN108804307A (en) process automation test method and device
CN109522234A (en) Show method, system and the automated testing method of test case implementation progress
CN109101424A (en) A kind of method and device for realizing data stimuli

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