CN107678935A - Data creation method, terminal and computer-readable recording medium - Google Patents

Data creation method, terminal and computer-readable recording medium Download PDF

Info

Publication number
CN107678935A
CN107678935A CN201710327747.1A CN201710327747A CN107678935A CN 107678935 A CN107678935 A CN 107678935A CN 201710327747 A CN201710327747 A CN 201710327747A CN 107678935 A CN107678935 A CN 107678935A
Authority
CN
China
Prior art keywords
data
test
software
generation
tested
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
CN201710327747.1A
Other languages
Chinese (zh)
Other versions
CN107678935B (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.)
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 CN201710327747.1A priority Critical patent/CN107678935B/en
Priority to PCT/CN2017/111900 priority patent/WO2018205545A1/en
Publication of CN107678935A publication Critical patent/CN107678935A/en
Application granted granted Critical
Publication of CN107678935B publication Critical patent/CN107678935B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Abstract

The invention discloses a kind of method of data generation, applied to software test, data creation method comprises the following steps:When detecting software test request, the test information of software to be tested is determined according to the function of software to be tested and stored, according to test information generation test data, and verify whether the test data of generation meets testing requirement, it will meet in the test data input Excel forms of testing requirement, and apply to software test.The also corresponding terminal for disclosing data generation of the present invention, and a kind of computer-readable medium.The present invention is by the way that Excel is combined with program language, and program language is according to the data message in template data, and simulation generation software test data, manual without tester is inputted according to default form, improves the efficiency of software test.

Description

Data creation method, terminal and computer-readable recording medium
Technical field
The present invention relates to software test field, more particularly to data creation method, terminal and computer-readable recording medium.
Background technology
Heterogeneous networks topological structure is provided with the LAN of existing company or public institution, in topological structure center Server connects other node subsystems, carries out reception and the analyzing and processing of data, in fact it could happen that multiple subsystems press data Uploaded onto the server according to the template of setting, the data that server receiving subsystem is sent by setting template, and by template Data verified after input correspondence position, finally realize the Treatment Analysis of data.
But in system development early stage, run mid-term, safeguard that the later stage does not have real data by for template, with attached The form of part uploads onto the server, thus needs tester to be manually entered substantial amounts of data and tested, and is being manually entered number According to system testing is carried out, artificial data input workload is big, cumbersome, uninteresting, there may be data entry format mistake, The problems such as misinput, it is difficult to find in the inspection in later stage, and causes system testing to go wrong.
The above is only used for auxiliary and understands technical scheme, does not represent and recognizes that the above is existing skill Art.
The content of the invention
It is a primary object of the present invention to provide a kind of data creation method, terminal and computer-readable recording medium, purport Testing efficiency is improved reducing manual operation.
To achieve the above object, the present invention provides data creation method, and the method for data generation is applied to software test, wrapped Include following steps:
When detecting software test request, the test information of software to be tested is determined simultaneously according to the function of software to be tested Storage;
According to test information generation test data, and verify whether the test data of generation meets testing requirement;
It will meet in the test data input Excel forms of testing requirement, and apply to software test.
Alternatively, when detecting software test request, the survey of software to be tested is determined according to the function of software to be tested Try information and include the step of storage:
When detecting software test request, software to be tested and Excel forms are built according to the function of software to be tested Vertical incidence relation;
According to software to be tested and the incidence relation of Excel forms, determine the test information of software test and store.
Alternatively, test information includes Data Position and data length, character set, described to be surveyed according to test information generation The step of trying data includes:
By the ranks coordinate values in Excel forms, as the Data Position in test information;
According to the Data Position in test information, the data length and character set of correspondence position are determined, is tested with generating Data.
Alternatively, the Data Position in test information, the data length and character set of correspondence position are determined, with life Include into the step of test data:
According to the Data Position in test information, the data length and character set on correspondence position are identified;
When detecting data generation instruction, extract the character in character set and tested according to data length combination producing Data.
Alternatively, verify that the step of whether test data of generation meets testing requirement includes:
According to the software function of software to be tested, default verification condition is verified to the test data of generation, to judge Whether the test data of generation meets testing requirement.
Alternatively, judge that the step of whether test data of generation meets testing requirement includes:
If the test data of generation meets testing requirement, the test data software test of generation is utilized;
If the test data of generation does not meet testing requirement, mark does not meet the test data of testing requirement, and generates New test data.
Alternatively, by meeting in the test data input Excel forms of testing requirement, and applying to software test the step of Include afterwards:
Software test number is determined according to software test requirement, and the generation number of test data is set, it is multiple to carry out Software test.
Alternatively, software test number is determined according to software test requirement, and the generation number of test data is set, to enter Include after the step of row multiple software test:
Software test is carried out using the test data of generation, judges whether the test result that software test obtains is correct, if The test result that software test obtains is correct, then stops generation test data.
To achieve the above object, the present invention also provides a kind of data generation terminal, and data generation terminal includes:Memory, Processor and the data generator that can be run on the memory and on the processor is stored in, the data generate journey The step of above-mentioned data creation method is realized when sequence is by the computing device.
In addition, to achieve the above object, the present invention also provides a kind of computer-readable recording medium, computer-readable storage Data generator is stored with medium, the data generator realizes above-mentioned data creation method when being executed by processor The step of.
The present invention provides a kind of data creation method, and the method for data generation is applied to software test, when detecting software During test request, the test information of software to be tested is determined according to the function of software to be tested and stored, according to test information life Into test data, and verify whether the test data of generation meets testing requirement, the test data for meeting testing requirement is inputted In Excel forms, and apply to software test;Need user terminal being uploaded to service when specifically, in software running process The data information memory of device processing utilizes in the annex of Excel forms, therefore when the software on to server is tested The characteristics of upper support program language of Excel is run, develops program language, the data input at analog subscriber end is soft on Excel Part tester, need data to be processed to be arranged server, obtain all data positional informations that user may input, Data length, character set set program language to generate corresponding test data at random and carry out software test, keep away as test information Software test personnel are exempted from and have manually entered data, improved the speed of data input, further increasing Efficiency of Software Testing.
Brief description of the drawings
Fig. 1 is the terminal structure schematic diagram for the hardware running environment that scheme of the embodiment of the present invention is related to;
Fig. 2 is the scene signal of each embodiment of data creation method of the present invention;
Fig. 3 is schematic diagram of a scenario of the data creation method of the present invention in software test procedure;
Fig. 4 is the schematic flow sheet of the embodiment of data creation method one of the present invention;
Fig. 5 is the refinement schematic flow sheet of the step S10 of data creation method in Fig. 4;
Fig. 6 is the refinement schematic flow sheet of the step S20 of data creation method in Fig. 4;
Fig. 7 is the refinement schematic flow sheet of the step S22 of data creation method in Fig. 6;
Fig. 8 is the schematic flow sheet of another embodiment of data creation method of the present invention.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
As shown in figure 1, Fig. 1 is the terminal structure schematic diagram for the hardware running environment that scheme of the embodiment of the present invention is related to.
Corresponding program in data creation method of the present invention realizes that embodiment terminal can be PC by data generation terminal, Can also be that tablet personal computer, pocket computer etc. have the packaged type terminal device of display function, it is necessary to which supplementary notes are Terminal mentioned in the present invention and server can be replaced.
As shown in figure 1, the terminal can include:Processor 1001, such as CPU, network interface 1004, user interface 1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is used to realize the connection communication between these components. User interface 1003 can include display screen (Display), input block such as keyboard (Keyboard), in the present invention terminal (server) is communicatively coupled during running software with user terminal, and tester can profit during software test The input of data message is carried out with user interface, optional user interface 1003 can also include the wireline interface of standard, wirelessly connect Mouthful.Network interface 1004 can optionally include wireline interface, the wave point (such as WI-FI interfaces) of standard.Memory 1005 Can be high-speed RAM memory or stable memory (non-volatile memory), such as magnetic disk storage. Memory 1005 optionally can also be the storage device independently of aforementioned processor 1001.
Alternatively, terminal can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, audio Circuit, WiFi module etc..Wherein, sensor ratio such as optical sensor, motion sensor and other sensors.Specifically, light Sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can according to the light and shade of ambient light come The brightness of display screen is adjusted, proximity transducer can close display screen and/or backlight when mobile terminal is moved in one's ear.As One kind of motion sensor, gravity accelerometer can detect in all directions the size of (generally three axles) acceleration, quiet Size and the direction of gravity are can detect that when only, the application available for identification mobile terminal posture is (such as horizontal/vertical screen switching, related Game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Certainly, mobile terminal can also match somebody with somebody The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared ray sensor are put, will not be repeated here.
It will be understood by those skilled in the art that the restriction of the terminal structure shown in Fig. 1 not structure paired terminal, can be wrapped Include than illustrating more or less parts, either combine some parts or different parts arrangement.
The primary solutions of the embodiment of the present invention are:Number of the program language according to server process is developed on Excel According to, simulation generation test data, application and software test, specifically, and with reference to Fig. 3, the user terminal that is handled in software running process The data in Excel forms are inputted, the data of analog subscriber end input of the present invention, are generated using program language in Excel Data, and by the data application of generation in software test, it is necessary to supplementary notes, the present invention described in scheme software (be System) processing digital information in Excel, therefore, based on Excel can direct operation program the characteristics of, VB is utilized in Excel (or other program languages that can be run on Excel such as python) sets data generated statement, user terminal in the present invention The annex of upload is Excel, if simply being replaced on the basis of the present invention, i.e. generates other text informations, Huo Zhe The switching of other document modes is simply carried out on Excel, all should be calculated in the scope of protection of the invention.
It is existing soft because prior art does not have improved plan for being manually entered test data in software test Part is tested, no matter the type of data is all by manually carrying out data input, thus the number tested is less, and measuring accuracy is relatively low, The testing efficiency of software is relatively low simultaneously.
The present invention provides a solution, using program language, according to the Form generation test data of data processing.
As shown in figure 1, it can lead to as in a kind of memory 1005 of computer-readable storage medium including operating system, network Believe module, Subscriber Interface Module SIM and data generation application program, data generation application program carries out the number that data generate to obtain According to for software test.
In the terminal shown in Fig. 1, network interface 1004 is mainly used in connecting background server, is carried out with background server Data communicate;User interface 1003 is mainly used in connecting client (user terminal), enters row data communication with client;And processor 1001 can be used for calling the software test stored in memory 1005, and perform following operate:
When detecting software test request, the test information of software to be tested is determined simultaneously according to the function of software to be tested Storage;
According to test information generation test data, and verify whether the test data of generation meets testing requirement;
It will meet in the test data input Excel forms of testing requirement, and apply to software test.
Further, processor 1001 can call the data stored in memory 1005 to generate application program, also perform Operate below:
When detecting software test request, the test information of software to be tested is determined simultaneously according to the function of software to be tested The step of storage, includes:
When detecting software test request, software to be tested and Excel forms are built according to the function of software to be tested Vertical incidence relation;
According to software to be tested and the incidence relation of Excel forms, determine the test information of software test and store.
Further, processor 1001 can call the data stored in memory 1005 to generate application program, also perform Operate below:
Test information includes Data Position and data length, character set, described according to test information generation test data The step of include:
By the ranks coordinate values in Excel forms, as the Data Position in test information;
According to the Data Position in test information, the data length and character set of correspondence position are determined, is tested with generating Data.
Further, processor 1001 can call the data stored in memory 1005 to generate application program, also perform Operate below:
According to the Data Position in test information, the data length and character set of correspondence position are determined, is tested with generating The step of data, includes:
According to the Data Position in test information, the data length and character set on correspondence position are identified;
When detecting data generation instruction, extract the character in character set and tested according to data length combination producing Data.
Further, processor 1001 can call the data stored in memory 1005 to generate application program, also perform Operate below:
The step of whether test data of checking generation meets testing requirement includes:
According to the software function of software to be tested, default verification condition is verified to the test data of generation, to judge Whether the test data of generation meets testing requirement.
Further, processor 1001 can call the data stored in memory 1005 to generate application program, also perform Operate below:
Judge that the step of whether test data of generation meets testing requirement includes:
If the test data of generation meets testing requirement, the test data software test of generation is utilized;
If the test data of generation does not meet testing requirement, mark does not meet the test data of testing requirement, and generates New test data.
Further, processor 1001 can call the data stored in memory 1005 to generate application program, also perform Operate below:
It will be wrapped afterwards the step of meeting in the test data input Excel forms of testing requirement, and apply to software test Include:
Software test number is determined according to software test requirement, and the generation number of test data is set, it is multiple to carry out Software test.
Further, processor 1001 can call the data stored in memory 1005 to generate application program, also perform Operate below:
Software test number is determined according to software test requirement, and the generation number of test data is set, it is multiple to carry out Software test the step of after include:
Software test is carried out using the test data of generation, judges whether the test result that software test obtains is correct, if The test result that software test obtains is correct, then stops generation test data.
Reference picture 4, an embodiment of data creation method of the present invention provide data creation method and comprised the following steps:
Step S10, when detecting software test request, the survey of software to be tested is determined according to the function of software to be tested Examination information simultaneously stores.
, will be soft when carrying out software (software here can be regarded as software or data handling system) test on the server The information for the data that part is handled when running is as test information and stores in memory, according to test information, to determine software The test data for needing simulation to generate in test process, e.g., the software on server is financial wage settlement system, financial wage Settlement system is used to pay wages for the employee of other branch companies, and branch company uploads the essential information of company personnel as user terminal (employee name, job number, sex etc.), and wage essential information (the wage amount of money, bank's card number, needing amount deducted etc.) are sent out with wage Put the data of correlation, with this during the system testing of financial wage settlement system, it is necessary to tester input the wage amount of money, The data such as bank's card number, but do not have real wage settlement data during software test and be used to carry out software survey Examination, existing technology depend on being manually entered for tester, and the present invention is related by the data of system operation processing first Information carries out arranging test information (the financial wage settlement system test information as system testing:The wage amount of money, bank card Number, need the information related to wage calculation such as amount deducted), in Test data generation according to the test information of storage, simulation Related test data is to calculate wage, so as to realize the test of financial wage settlement system.
Step S20, according to test information generation test data, and verify whether the test data of generation meets test and need Ask.
Specifically, according to the data handled on server during running software, program function is set to generate test data, i.e. The type that data are likely to occur, is stored in the memory of server, develops program language on Excel, corresponding to selection Character combination carries out data test into test data, as shown in table 1, by the numeral occurred in bank's card number, other letters, symbol Number information preserves in memory as test information:
Table 1
(shown in table 1, it is Excel template, the operational data of wage intuitively can be interpreted as software test number According to), utilize program language, it is first determined the position of digital information is filled in Excel forms:Which row, which row, then enter one Step sets the data of generation test with program function, and the test data of generation is verified according to verification condition, judges to give birth to Into data whether meet testing requirement (verification condition:According to the concrete condition verification condition of the data of generation, data can be directed to Generating probability checking randomness or whether meet specific data boundary, the proof rule at end etc., the test to generation Data are verified that meet verification condition is to meet testing requirement).
It step S30, will meet in the test data input Excel forms of testing requirement, and apply to software test.
Server correspondingly inputs the test data for meeting testing requirement after checking in Excel forms, utilizes Excel tables The test data by program language generation in lattice carries out software test.
In the present embodiment, when detecting software test request, determined according to the function of software to be tested to be tested soft The test information of part simultaneously stores, and according to test information generation test data, and verifies whether the test data of generation meets test It demand, will meet in the test data input Excel forms of testing requirement, and apply to software test;User terminal is uploaded to The data information memory of server process is in the annex of Excel forms, when the software on to server is tested, utilizes The characteristics of upper support program language of Excel is run, program language, the data input at analog subscriber end, tool are developed on Excel Body, need data to be processed to be arranged server, all data messages that obtaining user may input are believed as test Breath, set program language to generate corresponding test data at random and carry out software test, avoid software test personnel and manually enter number According to improving the speed of data input, further increasing Efficiency of Software Testing.
Reference picture 5, in the present embodiment step S10 include:
Step S11, when detect software test request when, according to the function of software to be tested by software to be tested with Excel forms establish incidence relation.
When server software is tested, it is first determined the data handled in software running process, by software running process The total data of processing, input in Excel forms and be used as software test information, software to be tested and Excel forms are established Incidence relation, e.g., the financial wage settlement system of general headquarters, carry out paying out wages when, employee compensation as shown in table 1 is detailed Paying out wages related data is inputted in the template of Excel tables, then the data in Excel are uploaded to general headquarters as accessory information In financial wage settlement system, the incidence relation established between financial wage settlement system and Excel forms, financial wage clearing Data message in system alignment processing Excel.
It should be added that be in this method using user terminal input Excel in data as template data, if Data generation is carried out using extended formatting, uniformly considered in the range of this programme protection using the method with software test.
Step S12, according to software to be tested and the incidence relation of Excel forms, determine the test information of software test simultaneously Storage.
According to software to be tested and the incidence relation of Excel forms, it is complete in test Excel to determine that software to be tested needs Portion's test data, and think test data positional information in Excel, the length of test data, the type of test data is as survey Information is tried, and is stored in memory, i.e. is likely to occur numeric type data, data dictionary class data, text-type number in Excel According to etc. be unified in character set, it is therefore desirable to test information (Data Position and data length, the character that terminal will likely occur Set) all it is stored in the memory of terminal.
In the present embodiment when detect software test request when, according to the function of software to be tested by software to be tested with Excel forms establish incidence relation, according to software to be tested and the incidence relation of Excel forms, determine the test of software test Information simultaneously stores;Using in system operation, data message of user's input in Excel is as test information, so as to according to survey Test data corresponding to trying information generation carries out software test, and existing software test is according to software processing by tester Data message, data input manually carry out software test, and the software detection that such method inputs to mass data is come Say, testing efficiency can be caused relatively low, data are carried out using the data that user terminal may input as test information, generation test data Test can accelerate the efficiency that software test is.
Reference picture 6, in the present embodiment data message include Data Position, data type and data length, step S20 bags Include:
Step S21, by the ranks coordinate values in Excel forms, as the Data Position in test information.
Specifically, the present invention is in data generating procedure, the data message input at direct analog subscriber end, by the survey of generation Try the corresponding position in data input Excel, as shown in table 1, using template data in Excel corresponding ranks value as mould The Data Position of plate data, the position in software test in Excel are no test data, and this method utilizes props up in Excel The characteristics of holding agenda, in Excel on generate test data, i.e. first determine software test when test data exist Excel Data Position, Software tool language:The sheets () .select and cells () function that VBA language can be used are found Position in specific excel, fills data on this basis.
Step S22, according to the Data Position in test information, the data length and character set of correspondence position are determined, with Generate test data.
Specifically, it is determined that after the Data Position of template data, the data length sum of correspondence position is further determined that According to type, i.e. it is determined that after the Data Position of generation data in Excel, it is determined that data length and word to correspondence position Symbol set (character set:Different data type, symbol, letter etc.), different programs is set for different Data Positions Language generation test data.
In the present embodiment by the ranks coordinate values in Excel forms, as the Data Position in test information, according to The Data Position tested in information, the data length and character set of correspondence position are determined, to generate test data;Number will be tested According to ranks coordinate values are corresponded in Excel forms, as the Data Position of test data, according to the Data Position of template data The data length and character of correspondence position are determined, and sets program language to generate test data, prevents from being manually entered test data Cumbersome work, by determining to test information, then pre-set programs language generation test data accelerates Efficiency of Software Testing.
Reference picture 7, in the present embodiment step S22 include:
Step S221, according to the Data Position in test information, identify the data length and character set on correspondence position.
Specifically, after determining the position of test data according to position of the test data in Excel, what identification should generate The data length and character set of test data.
Step S222, when detect data generation instruction when, extract character set in character and according to data length group Symphysis is into test data.
In the test information for it is determined that after Data Position, data length, character set, setting program language to be prestored from terminal Character is randomly selected in middle character set, for the data of numeric type, is generated in the Data Position certain limit of template data The numerical value of each type, and the corresponding data that extract of filling are to correspondence position, i.e. can be according to VBA round, format function Random number is generated, if during filling data dictionary class data, data dictionary is maintained in a sheet, passes through sequential loop The value in the sheet is read, data field class data are filled into Excel template, combination producing test data,
Such as, the silver filled in is needed in the Excel form datas that employee fills in general headquarters' wage settlement system, during software test Row card number, then determine to need to fill in the position of bank's card number first, then to should determine that the length of bank card number, and length is corresponded to again Numeral is chosen, combination forms bank's card number and (pre-saves and form character set in memory all numerals, character, then Data are randomly selected using program language, combination forms test data), if desired same fills in other kinds of digital information Also generation is corresponded to.
It should be added that data here are not only to include numeral, also include letter, or other types Character information.
Data Position in the present embodiment in test information, identify data length and character set on correspondence position Close;When detecting data generation instruction, character in character set is extracted and according to data length combination producing test data, Character information is randomly selected from the test information character set prestored to combine to form test data, accelerates test data Formation efficiency.
With reference to Fig. 6, step S20 also includes in data creation method of the present invention:
Step S23, according to the software function of software to be tested, default verification condition is tested the test data of generation Card, to judge whether the test data of generation meets testing requirement.
Specifically, the test data of generation is verified according to the software function of software to be tested, default verification condition, With checking generation test data whether testing requirement, i.e. simply checking for generation data do randomness checking, or Data verification condition is set such as to the data of ad-hoc location, whether last position meets corresponding verification rule to bank's card number of generation Then, i.e. whether the test data of generation meets the different data verification rule such as randomness, uniqueness.
Step S24, if the test data of generation meets testing requirement, utilize the test data software test of generation.
Specifically, software test is carried out to the test data of generation with default verification condition, if the test data of generation expires Verification condition corresponding to foot, it is believed that test data meets testing requirement, carries out the Test data generation of next Data Position, and profit Software test is carried out with the data of generation, based on support program language in Excel, you can software survey is carried out directly in Excel Examination.
Step S25, if the test data of generation does not meet testing requirement, mark does not meet the test number of testing requirement According to, and generate new test data.
If being verified for the test data of generation, test data is unsatisfactory for randomness, and repetitive rate is higher or discontented Other verification conditions of foot, it is believed that the test data of generation does not meet testing requirement, and the test data for being unsatisfactory for testing requirement is entered Line flag, and the data generator of correspondence position is run again, to generate new test data.
The test data of generation is tested according to the software function of software to be tested, default verification condition in the present embodiment Card, to judge whether the test data of generation meets testing requirement, different data verification conditions is preset to the data of generation, with The test data of generation is verified, the test data of generation is more conformed to the requirement of software test, makes software test Accuracy is protected, and judges whether the test data of generation meets testing requirement, is needed if the test data of generation meets test Ask, then using the test data software test of generation, if the test data of generation does not meet testing requirement, mark does not meet survey The test data of examination demand, and new test data is generated, the test data of generation is more conformed to the requirement of software test, carry The high accuracy of software test, existing test data relies primarily on tester's manually input, if the manually input of test There is error, inquiry is difficult, it is also possible to causes software systems to go wrong.
Reference picture 8, also include after step S30 in another embodiment of notebook data generation method:
Step S40, software test number is determined according to software test requirement, and the generation number of test data is set, with Carry out multiple software test.
Specifically, the generation number of data is set according to software test requirement, using Do statement, in a software test After end, data generated statement again is set, the test data that a new round is generated in Excel template covers once Data, and carry out data verification, the software test repeatedly circulated for newly-generated test data.
Step S50, software test is carried out using the test data of generation, judge whether is test result that software test obtains Correctly, if the obtained test result of software test is correct, generation test data is stopped.
Specifically, software test is mainly around the different factor expansion such as soft stability, utilizes the survey of generation Try data and carry out software test, and judge whether the result of software test is correct, i.e. carry out software survey using the test value of generation During examination, whether the result for testing to obtain is identical with the value arrived of software normal operation, if repeatedly software test result is correct, stops Only generate software test data, Experience of Software Testing Work corresponding to completion, if conversely, the obtained test result of software test not just Really, then multiple generation test data, and find the factor of software anomaly.
Set data to generate number according to software test requirement in the present embodiment, generation test number is circulated using program language According to and verify generation test data to carry out software test, can avoid tester carry out repeating substantial amounts of data input it is real Existing software test, accelerate the efficiency of software test.Using into test data carry out software test, judge software test result Whether matched with setting value, if software test result matches with setting value, stop generation software test data, complete software and survey Try, indicate that test data stops the condition of generation in the present embodiment, being rapidly performed by software using the test data of generation surveys Examination, slow down the uninteresting of pure manual test;For large-scale attachment upload capability, the input for testing manpower is saved;At random The data of generation can more fully coverage test scene, be not easy to omit scene.
Further, the present invention also provides a kind of data generation terminal, and data generation terminal includes the memory, processing Device and the data generator that can be run on the memory and on the processor is stored in, the data generator quilt The data generation step of any one in embodiment in data creation method is realized during the computing device.
Wherein, the method realized when data generator is performed can refer to each reality of data creation method of the present invention Example is applied, here is omitted.
In addition, the embodiment of the present invention also proposes a kind of computer-readable recording medium, the computer-readable recording medium On be stored with data generator, when the data generator is executed by processor realize as data creation method the step of.
Wherein, the method realized when data generator is performed can refer to each reality of data creation method of the present invention Example is applied, here is omitted.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or system including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or system institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or system.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in one as described above In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone, Computer, server, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of data creation method, it is characterised in that the method for the data generation is applied to software test, the data life Comprise the following steps into method:
When detecting software test request, the test information of software to be tested is determined according to the function of software to be tested and deposited Storage;
According to test information generation test data, and verify whether the test data of generation meets testing requirement;
It will meet in the test data input Excel forms of testing requirement, and apply to software test.
2. data creation method as claimed in claim 1, it is characterised in that described when detecting software test request, root The test information of software to be tested is determined according to the function of software to be tested and is included the step of storage:
When detecting software test request, software to be tested and Excel forms are established according to the function of software to be tested and closed Connection relation;
According to software to be tested and the incidence relation of Excel forms, determine the test information of software test and store.
3. data creation method as claimed in claim 2, it is characterised in that the test information includes Data Position and data Length, character set, described the step of generating test data according to test information, include:
By the ranks coordinate values in Excel forms, as the Data Position in test information;
According to the Data Position in test information, the data length and character set of correspondence position are determined, to generate test data.
4. data creation method as claimed in claim 3, it is characterised in that the Data Position in the information according to test, The data length and character set of correspondence position are determined, is included the step of to generate test data:
According to the Data Position in test information, the data length and character set on correspondence position are identified;
When detecting data generation instruction, extract the character in character set and number is tested according to data length combination producing According to.
5. data creation method as claimed in claim 4, it is characterised in that whether the test data of the checking generation meets The step of testing requirement, includes:
According to the software function of software to be tested, default verification condition is verified to the test data of generation, to judge to generate Test data whether meet testing requirement.
6. data creation method as claimed in claim 5, it is characterised in that whether the test data for judging generation meets The step of testing requirement, includes:
If the test data of generation meets testing requirement, the test data software test of generation is utilized;
If the test data of generation does not meet testing requirement, mark does not meet the test data of testing requirement, and generates newly Test data.
7. the data creation method as described in claim 1 to 6 any one, it is characterised in that described to meet testing requirement Test data input Excel forms in, and the step of apply to software test after include:
Software test number is determined according to software test requirement, and the generation number of test data is set, to carry out repeatedly soft Part is tested.
8. data creation method as claimed in claim 7, it is characterised in that described to determine that software is surveyed according to software test requirement Try number, and the generation number of test data be set, the step of to carry out multiple software test after include:
Software test is carried out using the test data of generation, judges whether the test result that software test obtains is correct, if software It is correct to test obtained test result, then stops generation test data.
9. a kind of data generate terminal, it is characterised in that the data generation terminal includes:Memory, processor and it is stored in On the memory and the data generator that can run on the processor, the data generator is by the processor The step of data creation method as claimed in any of claims 1 to 8 in one of claims is realized during execution.
10. a kind of computer-readable recording medium, it is characterised in that data life is stored with the computer-readable recording medium The data generation as any one of claim 1 to 8 is realized into program, when the data generator is executed by processor The step of method.
CN201710327747.1A 2017-05-10 2017-05-10 Data generation method, terminal and computer readable storage medium Active CN107678935B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710327747.1A CN107678935B (en) 2017-05-10 2017-05-10 Data generation method, terminal and computer readable storage medium
PCT/CN2017/111900 WO2018205545A1 (en) 2017-05-10 2017-11-20 Data generation method, apparatus, terminal, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710327747.1A CN107678935B (en) 2017-05-10 2017-05-10 Data generation method, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107678935A true CN107678935A (en) 2018-02-09
CN107678935B CN107678935B (en) 2020-07-14

Family

ID=61134204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710327747.1A Active CN107678935B (en) 2017-05-10 2017-05-10 Data generation method, terminal and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN107678935B (en)
WO (1) WO2018205545A1 (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108563584A (en) * 2018-05-09 2018-09-21 平安普惠企业管理有限公司 Test data generating method, device, computer equipment and storage medium
CN110119353A (en) * 2019-04-18 2019-08-13 上海蔚来汽车有限公司 Test data generating method, device and controller and medium
CN110134928A (en) * 2019-03-08 2019-08-16 北京车和家信息技术有限公司 Form processing method and electronic equipment based on signal creation Signal Builder
CN110188030A (en) * 2019-04-08 2019-08-30 平安科技(深圳)有限公司 A kind of test data generating method, device and computer equipment, storage medium
CN110377526A (en) * 2019-07-31 2019-10-25 赛汇检测(广州)有限公司 A kind of test method of AI intelligence software
CN110457224A (en) * 2019-08-15 2019-11-15 中国银行股份有限公司 Generate the method and device of test data
CN110489332A (en) * 2019-07-19 2019-11-22 珠海金山网络游戏科技有限公司 A kind of filling test number method and system
CN110502425A (en) * 2019-06-28 2019-11-26 平安银行股份有限公司 Test data generating method, device, electronic equipment and storage medium
CN110825610A (en) * 2018-08-14 2020-02-21 北京京东尚科信息技术有限公司 Method and device for providing test data
CN110908891A (en) * 2019-09-18 2020-03-24 泰康保险集团股份有限公司 Test data generation method and device, electronic equipment and storage medium
CN111177005A (en) * 2019-12-31 2020-05-19 中国银行股份有限公司 Service application testing method, device, server and storage medium
CN111679979A (en) * 2020-06-03 2020-09-18 中国银行股份有限公司 Destructive testing method and device
CN112199302A (en) * 2020-12-07 2021-01-08 望海康信(北京)科技股份公司 Test data generation method and system, corresponding equipment and storage medium
CN113094290A (en) * 2021-05-21 2021-07-09 珠海金山网络游戏科技有限公司 Program test system and method
CN111177005B (en) * 2019-12-31 2024-04-16 中国银行股份有限公司 Service application testing method, device, server and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968514A (en) * 2019-12-02 2020-04-07 北京明略软件系统有限公司 Test method, test device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080195906A1 (en) * 2007-02-13 2008-08-14 Otaka Miho Test pattern generation apparatus and test pattern generation method
CN102622294A (en) * 2011-01-28 2012-08-01 国际商业机器公司 Method and method for generating test cases for different test types
CN104516814A (en) * 2013-09-29 2015-04-15 腾讯科技(深圳)有限公司 Automatic test method and device of terminal software

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102760096B (en) * 2011-04-27 2016-03-30 阿里巴巴集团控股有限公司 The generation method of test data, unit test method and unit test system
US9396094B2 (en) * 2011-07-21 2016-07-19 International Business Machines Corporation Software test automation systems and methods
CN104615667B (en) * 2015-01-13 2018-01-19 联动优势电子商务有限公司 A kind of basic data generation method, test data creation method and its device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080195906A1 (en) * 2007-02-13 2008-08-14 Otaka Miho Test pattern generation apparatus and test pattern generation method
CN102622294A (en) * 2011-01-28 2012-08-01 国际商业机器公司 Method and method for generating test cases for different test types
CN104516814A (en) * 2013-09-29 2015-04-15 腾讯科技(深圳)有限公司 Automatic test method and device of terminal software

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
I沙漠中的绿洲F: "请教对输入的身份证号校验的代码", 《EXCELHOME:HTTP://CLUB.EXCELHOME.NET/FORUM.PHP?MOD=VIEWTHREAD&TID=1326040》 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108563584A (en) * 2018-05-09 2018-09-21 平安普惠企业管理有限公司 Test data generating method, device, computer equipment and storage medium
CN110825610A (en) * 2018-08-14 2020-02-21 北京京东尚科信息技术有限公司 Method and device for providing test data
CN110134928A (en) * 2019-03-08 2019-08-16 北京车和家信息技术有限公司 Form processing method and electronic equipment based on signal creation Signal Builder
CN110188030A (en) * 2019-04-08 2019-08-30 平安科技(深圳)有限公司 A kind of test data generating method, device and computer equipment, storage medium
CN110119353A (en) * 2019-04-18 2019-08-13 上海蔚来汽车有限公司 Test data generating method, device and controller and medium
CN110119353B (en) * 2019-04-18 2023-10-10 上海蔚来汽车有限公司 Test data generation method and device, controller and medium
CN110502425A (en) * 2019-06-28 2019-11-26 平安银行股份有限公司 Test data generating method, device, electronic equipment and storage medium
CN110489332B (en) * 2019-07-19 2023-09-08 珠海金山数字网络科技有限公司 Method and system for filling test numerical value
CN110489332A (en) * 2019-07-19 2019-11-22 珠海金山网络游戏科技有限公司 A kind of filling test number method and system
CN110377526A (en) * 2019-07-31 2019-10-25 赛汇检测(广州)有限公司 A kind of test method of AI intelligence software
CN110457224A (en) * 2019-08-15 2019-11-15 中国银行股份有限公司 Generate the method and device of test data
CN110457224B (en) * 2019-08-15 2023-08-18 中国银行股份有限公司 Method and device for generating test data
CN110908891A (en) * 2019-09-18 2020-03-24 泰康保险集团股份有限公司 Test data generation method and device, electronic equipment and storage medium
CN111177005A (en) * 2019-12-31 2020-05-19 中国银行股份有限公司 Service application testing method, device, server and storage medium
CN111177005B (en) * 2019-12-31 2024-04-16 中国银行股份有限公司 Service application testing method, device, server and storage medium
CN111679979A (en) * 2020-06-03 2020-09-18 中国银行股份有限公司 Destructive testing method and device
CN111679979B (en) * 2020-06-03 2023-09-19 中国银行股份有限公司 Destructive testing method and device
CN112199302A (en) * 2020-12-07 2021-01-08 望海康信(北京)科技股份公司 Test data generation method and system, corresponding equipment and storage medium
CN113094290A (en) * 2021-05-21 2021-07-09 珠海金山网络游戏科技有限公司 Program test system and method
CN113094290B (en) * 2021-05-21 2024-02-23 珠海金山数字网络科技有限公司 Program testing system and method

Also Published As

Publication number Publication date
CN107678935B (en) 2020-07-14
WO2018205545A1 (en) 2018-11-15

Similar Documents

Publication Publication Date Title
CN107678935A (en) Data creation method, terminal and computer-readable recording medium
CN107545181A (en) Program operating method, terminal and computer-readable recording medium
WO2022100452A1 (en) Ocr system evaluation method, apparatus and device, and readable storage medium
CN108009087A (en) Data library test method, device and computer-readable recording medium
CN109726108B (en) Front-end code testing method, device, system and medium based on analog data
CN107656872A (en) Method for testing software, device, equipment and computer-readable storage medium
CN110503409B (en) Information processing method and related device
CN107807841B (en) Server simulation method, device, equipment and readable storage medium
CN110659206A (en) Simulation architecture establishing method, device, medium and electronic equipment based on microservice
CN107643984A (en) Method and apparatus for output information
CN113596844A (en) Early warning method, device, medium and electronic equipment based on data information
CN108255654A (en) Automatic testing method and device
CN112631884A (en) Pressure measurement method and device based on data synchronization, computer equipment and storage medium
CN112711640A (en) Method and device for configuring business handling process
CN108170600A (en) The coverage rate statistical method of front-end code test, apparatus and system
CN111352836A (en) Pressure testing method and related device
CN107656722A (en) Data manipulation method, device and computer-readable recording medium
CN110647523A (en) Data quality analysis method and device, storage medium and electronic equipment
CN110060071A (en) Information of real estate verification method, device, equipment and computer readable storage medium
CN112966308A (en) Software delivery method, processing device and storage medium
CN112433935A (en) Test method, test device, electronic equipment and storage medium
CN106845209A (en) Safe verification method and device
CN110717315A (en) System data batch modification method and device, storage medium and electronic equipment
CN109871294A (en) Method and apparatus for verifying data, processing request
CN115080418A (en) Automatic testing method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant