CN110334019A - A kind of test method, device and readable storage medium storing program for executing - Google Patents
A kind of test method, device and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN110334019A CN110334019A CN201910530625.1A CN201910530625A CN110334019A CN 110334019 A CN110334019 A CN 110334019A CN 201910530625 A CN201910530625 A CN 201910530625A CN 110334019 A CN110334019 A CN 110334019A
- Authority
- CN
- China
- Prior art keywords
- parameter
- mentioned
- template
- input parameter
- application identities
- 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
Links
- 238000010998 test method Methods 0.000 title claims abstract description 15
- 238000012360 testing method Methods 0.000 claims abstract description 224
- 238000000034 method Methods 0.000 claims abstract description 48
- 238000013507 mapping Methods 0.000 claims description 32
- 230000015654 memory Effects 0.000 claims description 28
- 238000012549 training Methods 0.000 claims description 26
- 241000208340 Araliaceae Species 0.000 claims description 20
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 claims description 20
- 235000003140 Panax quinquefolius Nutrition 0.000 claims description 20
- 235000008434 ginseng Nutrition 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 7
- 238000011156 evaluation Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 4
- 238000011022 operating instruction Methods 0.000 description 4
- 238000009434 installation Methods 0.000 description 3
- 239000007787 solid Substances 0.000 description 3
- 238000012545 processing Methods 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 229910052799 carbon Inorganic materials 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application proposes a kind of test method and device, this method comprises: receiving setting instruction, setting instruction includes the path of the configuration file of software under testing;Configuration file is read from the path of configuration file, identifies the application identities for the software under testing for including in configuration file;Select the corresponding parameterized template of application identities as selected template from template set, selecting template includes parameter information, and parameter information includes parameter type and parameter section;Input parameter sets are obtained from storage device, input parameter sets include at least one input parameter, and the type of at least one input parameter is parameter type, at least one input parameter is in parameter section;Select to influence the maximum input parameter of coefficient from input parameter sets as test parameter;Test parameter is inputted in software under testing, the test result that software under testing returns is received.Implement the application, the error rate in test process can be reduced, saves the testing time.
Description
Technical field
The present invention relates to computer field more particularly to a kind of test methods, device and readable storage medium storing program for executing.
Background technique
With the popularity of the internet, the function of each software becomes increasingly complex.Before issuing new software, it usually needs
Interface testing is carried out to new software, there are problems in software to find, and are corrected.In software test procedure, due to
Parameter type, parameter section and the number of parameters of the interface of software under testing may change, the original test parameter of test lead
It may be inconsistent with the software under testing of new version.
Currently, during actual test, since test parameter and format required by software interface may be inconsistent, lead
It causes test software to report an error, and then leads to error rate height, wastes time.
Summary of the invention
The application proposes a kind of test method and device, can be to avoid the parameter format of test parameter and interface requirement to be measured
Inconsistent problem avoids test software in test process from reporting an error, and reduces the error rate in test process, saves the testing time.
In a first aspect, the application proposes a kind of test method, the above method includes:
Setting instruction is received by operation interface, above-mentioned setting instruction includes the path of the configuration file of software under testing;
Above-mentioned configuration file is read from the path of above-mentioned configuration file, identify include in above-mentioned configuration file it is above-mentioned to
Survey the application identities of software;
Select the corresponding parameterized template of above-mentioned application identities as selected template, above-mentioned selected template packet from template set
Containing parameter information, above-mentioned parameter packet containing parameter type and parameter section;
Input parameter sets are obtained from storage device, above-mentioned input parameter sets include at least one input parameter, on
The type for stating at least one input parameter is above-mentioned parameter type, and at least one of above-mentioned input parameter is in above-mentioned parameter section
In;
Select to influence the maximum input parameter of coefficient from above-mentioned input parameter sets as test parameter, above-mentioned influence system
Count the use value for evaluating above-mentioned input parameter;
Above-mentioned test parameter is inputted in above-mentioned software under testing, the test result that above-mentioned software under testing returns is received.
In one possible implementation, the corresponding parameter mould of above-mentioned application identities is selected from template set above-mentioned
Before plate is as selected template, further includes:
Above-mentioned template set is obtained, above-mentioned template set includes at least one parameterized template;And obtain application identities collection
It closes, above-mentioned application identities set includes at least one application identities;
Determine the mapping relations between at least one of above-mentioned parameterized template and at least one above-mentioned application identities;
It is above-mentioned to select the corresponding parameterized template of above-mentioned application identities as selected template from template set, comprising:
Determine above-mentioned application identities set whether include above-mentioned software under testing application identities;
If comprising relationship selects the corresponding parameter mould of above-mentioned application identities from above-mentioned template set according to above-mentioned mapping
Plate is as above-mentioned selected template.
In one possible implementation, at least one of above-mentioned parameterized template includes the first parameterized template, it is above-mentioned at least
One application identities includes the first application identities, at least one above-mentioned parameterized template of above-mentioned determination and at least one above-mentioned application are marked
Mapping relations between knowledge, comprising:
First interface document is obtained from corresponding first software of above-mentioned first application identities;
Identify that the first interface information for including in above-mentioned first interface document, above-mentioned first interface information include interface parameters
Type and interface parameters section;
If the parameter type match of above-mentioned interface parameters type and above-mentioned first parameterized template, and above-mentioned interface parameters section
It is matched with the parameter section of above-mentioned first parameterized template, then above-mentioned first parameterized template is mapped to above-mentioned first application identities,
Obtain above-mentioned mapping relations.
In one possible implementation, at least one of above-mentioned input parameter includes the first input parameter, above-mentioned from depositing
Input parameter sets are obtained in storage device, comprising:
Obtain the history input parameter in above-mentioned storage device;
If the type of above-mentioned history input parameter is above-mentioned parameter type, and above-mentioned history input parameter is in above-mentioned parameter
In section, then using above-mentioned history input parameter as above-mentioned first input parameter, above-mentioned parameter set is obtained.
In one possible implementation, after obtaining input parameter sets in storage device, from above-mentioned defeated
Before entering to select to influence in parameter sets the maximum input parameter of coefficient as test parameter, further includes:
Determine it is above-mentioned first input parameter quantitative proportion, using the corresponding scoring in section belonging to above-mentioned quantitative proportion as
The scoring of above-mentioned quantitative proportion, it is defeated in above-mentioned parameter set that above-mentioned quantitative proportion indicates that the quantity of above-mentioned first input parameter accounts for
Enter the ratio of parameter total amount;And
Determine the time point that above-mentioned first input parameter is created, section belonging to the above-mentioned time point being created is corresponding
Scoring of the scoring as the above-mentioned time point being created;
The scoring of above-mentioned quantitative proportion is defeated as above-mentioned first with the weighted sum of the scoring at the above-mentioned time point being created
Enter the influence coefficient of parameter;
It is above-mentioned to select to influence the maximum input parameter of coefficient from above-mentioned input parameter sets as test parameter, comprising:
In the case where the influence coefficient that above-mentioned first inputs parameter is maximum situation, using above-mentioned first input parameter as above-mentioned
Test parameter.
In one possible implementation, at least one of above-mentioned parameterized template includes the first parameterized template, it is above-mentioned at least
One application identities includes the first application identities, at least one above-mentioned parameterized template of above-mentioned determination and at least one above-mentioned application are marked
Mapping relations between knowledge, comprising:
Obtain the parameter generators for meeting above-mentioned first parameterized template;
The training parameter that above-mentioned parameter generator generates is read, the type of above-mentioned training parameter is above-mentioned parameter type, on
It states training parameter and is in above-mentioned parameter section;
Above-mentioned training parameter is inputted into corresponding first software of above-mentioned first application identities, above-mentioned first software is received and returns
Test result;
Under above-mentioned test result and the matched situation of expected results, above-mentioned first parameterized template is mapped to above-mentioned first
Application identities obtain above-mentioned mapping relations.
In one possible implementation, above-mentioned template set further includes the second parameterized template, the above-mentioned above-mentioned mould of acquisition
Plate set, comprising: the first history parameters and the second history parameters are obtained from database;By the type of above-mentioned first history parameters
As the parameter type of above-mentioned first parameterized template, and using section belonging to above-mentioned first history parameters as above-mentioned first ginseng
The parameter section of digital-to-analogue plate obtains above-mentioned first parameterized template;If the parameter section of above-mentioned second history parameters and above-mentioned first
The parameter section of history parameters is inconsistent or the ginseng of the parameter type of above-mentioned second history parameters and above-mentioned first history parameters
Number Type-Inconsistencies, then using the type of above-mentioned second history parameters as the parameter type of above-mentioned second parameterized template, and will
Parameter section of the section locating for above-mentioned second history parameters as above-mentioned second parameterized template, obtains above-mentioned second parameter mould
Plate.
In one possible implementation, above-mentioned storage device includes database associated with above-mentioned software under testing,
Above-mentioned configuration file also includes the address information of above-mentioned database, it is above-mentioned from storage device obtain input parameter sets it
Before, further includes: address above mentioned information is obtained from above-mentioned configuration file, is connected according to address above mentioned information and above-mentioned Database
It connects;It is above-mentioned that input parameter sets are obtained from storage device, comprising: Xiang Shangshu database sends the finger of request above-mentioned parameter set
It enables, above-metioned instruction includes above-mentioned parameter information;Receive the above-mentioned input parameter sets from above-mentioned database.
Implement the application, the application identities of available software under testing obtain parameter mould corresponding with above-mentioned application identities
Plate obtains the selection test from above-mentioned parameter set with the matched input parameter sets of software under testing according to above-mentioned parameter template
Parameter, it can be ensured that the format of test parameter is consistent with format required by software under testing when test, avoid in test process to
It surveys software to report an error, reduces the error rate in test process, save the testing time;Meanwhile the application can also be according to influence coefficient
Select the higher input parameter of use value as test parameter so that test parameter is more targeted, and then improve discovery to
Survey the efficiency of the loophole of software.
Second aspect, the application propose a kind of test device, comprising:
Receiving unit, for receiving setting instruction by operation interface, above-mentioned setting instruction includes the configuration of software under testing
The path of file;
First acquisition unit reads above-mentioned configuration file from the path of above-mentioned configuration file, identifies above-mentioned configuration file
In include above-mentioned software under testing application identities;
First selecting unit, for selecting the corresponding parameterized template of above-mentioned application identities as selected mould from template set
Plate, above-mentioned selected template include parameter information, above-mentioned parameter packet containing parameter type and parameter section;
Second acquisition unit, for obtaining input parameter sets from storage device, above-mentioned input parameter sets include extremely
One item missing inputs parameter, and the type of at least one of above-mentioned input parameter is above-mentioned parameter type, at least one of above-mentioned input parameter
In above-mentioned parameter section;
Second selecting unit, for selecting to influence the maximum input parameter of coefficient from above-mentioned input parameter sets as survey
Parameter is tried, above-mentioned influence coefficient is used to evaluate the use value of above-mentioned input parameter;
Input unit receives what above-mentioned software under testing returned for inputting above-mentioned test parameter in above-mentioned software under testing
Test result.
In one possible implementation, above-mentioned apparatus further include: third acquiring unit, for obtaining above-mentioned template set
It closes, above-mentioned template set includes at least one parameterized template;And obtain application identities set, above-mentioned application identities set packet
Include at least one application identities;
Determine the mapping relations between at least one of above-mentioned parameterized template and at least one above-mentioned application identities;
Whether above-mentioned first selecting unit includes answering for above-mentioned software under testing specifically for the above-mentioned application identities set of determination
With mark;If comprising relationship selects the corresponding parameter mould of above-mentioned application identities from above-mentioned template set according to above-mentioned mapping
Plate is as above-mentioned selected template.
In one possible implementation, at least one of above-mentioned parameterized template includes the first parameterized template, it is above-mentioned at least
One application identities includes the first application identities, and above-mentioned third acquiring unit is specifically used for corresponding from above-mentioned first application identities
The first software in obtain first interface document;Identify the first interface information for including in above-mentioned first interface document, above-mentioned
One interface message includes interface parameters type and interface parameters section;If above-mentioned interface parameters type and above-mentioned first parameterized template
Parameter type match, and above-mentioned interface parameters section is matched with the parameter section of above-mentioned first parameterized template, then by above-mentioned
One parameterized template is mapped to above-mentioned first application identities, obtains above-mentioned mapping relations.
In one possible implementation, at least one of above-mentioned input parameter includes the first input parameter, and above-mentioned second
Acquiring unit is specifically same as: obtaining the history input parameter in above-mentioned storage device;If the type of above-mentioned history input parameter is
Above-mentioned parameter type, and above-mentioned history input parameter is in above-mentioned parameter section, then using above-mentioned history input parameter as upper
The first input parameter is stated, above-mentioned parameter set is obtained.
In one possible implementation, above-mentioned apparatus further include: the 4th acquiring unit, for determining that above-mentioned first is defeated
The quantitative proportion for entering parameter, the scoring by the corresponding scoring in section belonging to above-mentioned quantitative proportion as above-mentioned quantitative proportion, on
Stating quantitative proportion indicates that the quantity of above-mentioned first input parameter accounts for the ratio of the input parameter total amount in above-mentioned parameter set;With
And determine above-mentioned first input time point for being created of parameter, it comments section is corresponding belonging to the above-mentioned time point being created
It is allocated as the scoring at the above-mentioned time point being created;By the scoring and the scoring at the above-mentioned time point being created of above-mentioned quantitative proportion
Weighted sum as it is above-mentioned first input parameter influence coefficient;Above-mentioned second selecting unit is specifically used for defeated above-mentioned first
The influence coefficient for entering parameter is in maximum situation, using above-mentioned first input parameter as above-mentioned test parameter.
In one possible implementation, at least one of above-mentioned parameterized template includes the first parameterized template, it is above-mentioned at least
One application identities includes the first application identities, and above-mentioned third acquiring unit is specifically used for: acquisition meets above-mentioned first parameter mould
The parameter generators of plate;The training parameter that above-mentioned parameter generator generates is read, the type of above-mentioned training parameter is above-mentioned parameter
Type, above-mentioned training parameter are in above-mentioned parameter section;Above-mentioned training parameter is inputted into above-mentioned first application identities corresponding the
One software receives the test result that above-mentioned first software returns;It, will under above-mentioned test result and the matched situation of expected results
Above-mentioned first parameterized template is mapped to above-mentioned first application identities, obtains above-mentioned mapping relations.
In one possible implementation, above-mentioned template set further includes the second parameterized template, and above-mentioned third obtains single
Member is specifically used for: the first history parameters and the second history parameters are obtained from database;By the type of above-mentioned first history parameters
As the parameter type of above-mentioned first parameterized template, and using section belonging to above-mentioned first history parameters as above-mentioned first ginseng
The parameter section of digital-to-analogue plate obtains above-mentioned first parameterized template;If the parameter section of above-mentioned second history parameters and above-mentioned first
The parameter section of history parameters is inconsistent or the ginseng of the parameter type of above-mentioned second history parameters and above-mentioned first history parameters
Number Type-Inconsistencies, then using the type of above-mentioned second history parameters as the parameter type of above-mentioned second parameterized template, and will
Parameter section of the section locating for above-mentioned second history parameters as above-mentioned second parameterized template, obtains above-mentioned second parameter mould
Plate.
Implement the device that the application proposes, the application identities of available software under testing obtain and above-mentioned application identities pair
The parameterized template answered, according to the acquisition of above-mentioned parameter template and the matched input parameter sets of software under testing, from above-mentioned parameter set
Middle selection test parameter, it can be ensured that the format of test parameter is consistent with format required by software under testing when test, avoids surveying
Software under testing reports an error during examination, reduces the error rate in test process, saves the testing time;Meanwhile the application can be with root
Select the higher input parameter of use value as test parameter according to coefficient is influenced, so that test parameter is more targeted, in turn
Improve the efficiency of the loophole of discovery software under testing.
The third aspect, the application propose a kind of data transmission device, including processor and memory;Above-mentioned processor and upper
Memory is stated to be connected with each other by bus;Wherein, for storing computer program, above-mentioned computer program includes above-mentioned memory
Program instruction, above-mentioned processor are configured for calling above procedure instruction, execute the method as shown in first aspect.
Fourth aspect, the application propose a kind of computer readable storage medium, above-mentioned computer-readable recording medium storage
There is computer program, above-mentioned computer program includes program instruction, and above procedure instructs when being executed by a processor, makes above-mentioned place
It manages device and executes the method as shown in first aspect.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application or in background technique below will be implemented the application
Attached drawing needed in example or background technique is illustrated.
Fig. 1 is a kind of flow chart for test method that the application proposes;
Fig. 2 is the flow chart for another test method that the application proposes;
Fig. 3 is a kind of flow chart for test method for concrete application scene that the application proposes;
Fig. 4 is a kind of structural schematic diagram for test device that the application proposes;
Fig. 5 is the structural schematic diagram for another test device that the application proposes.
Specific embodiment
The description and claims of this application and term " first " in above-mentioned attached drawing, " second " etc. are for distinguishing
Different objects, is not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, meaning
Figure, which is to cover, non-exclusive includes.Such as contain the process, method, system, product or equipment of a series of steps or units
It is not limited to listed step or unit, but optionally further comprising the step of not listing or unit, or optionally also
Including other step or units intrinsic for these process, methods or equipment.
The application proposes a kind of test method, can be inconsistent to avoid the parameter format of test parameter and interface requirement to be measured
The problem of, it avoids test software in test process from reporting an error, reduces the error rate in test process, save the testing time.
Fig. 1 is a kind of flow chart for test method that the application proposes, the above method is applied to test lead, above-mentioned test lead
It can be the terminal devices such as desktop computer, laptop, work station, tablet computer and mobile phone, it can be on above-mentioned terminal device
Loading operation system, can be with installation and operation test software;The above method includes:
101, setting instruction is received by operation interface, above-mentioned setting instruction includes the road of the configuration file of software under testing
Diameter.
Test lead after start-up, can export operation interface and reach front end, receive setting for user's input by touch screen
Set instruction, the path of above-mentioned configuration file of the setting instruction comprising software under testing.Above-mentioned configuration file includes matching for software under testing
Confidence breath, above-mentioned configuration information can be the application identities of software under testing and/or the interface document of software under testing.
Above-mentioned setting instruction can be the instruction of clicking selecting file path, so as to test lead obtain path information it
Afterwards, above-mentioned path is accessed, the configuration file being stored in above-mentioned path is read.
102, above-mentioned configuration file is read from the path of above-mentioned configuration file, identifies include in above-mentioned configuration file upper
State the application identities of software under testing.
Specifically, test lead can identify above-mentioned application identities by modes such as regular expression, Keywords matchings.
Above-mentioned application identities are the unique identification of above-mentioned software under testing, can be used for distinguishing the interface of above-mentioned software under testing
Parameter information.Above-mentioned interface parameters information can further include interface parameters type, interface parameters section and interface parameters number
Mesh etc..
For example, when above-mentioned application identities can be " CN20190414/int/10-20/3 ", above-mentioned application identities pair
A kind of interface parameters information answered is " int (numeric type): 10-20 (numerical intervals), value (character string type): 1-10 (character
String length section), bool (Boolean type): true/false ".
103, select the corresponding parameterized template of above-mentioned application identities as selected template, above-mentioned selected mould from template set
Plate includes parameter information, above-mentioned parameter packet containing parameter type and parameter section.
Above-mentioned template set includes at least one parameterized template, and above-mentioned parameter template can be used for the lattice of regulation test parameter
Formula.Above-mentioned parameter type may include character string type, numeric type and Boolean type etc., and above-mentioned parameter section may include character type ginseng
Section locating for the length of section belonging to several sizes and above-mentioned character string type parameter.
Specifically, from selected in template set the corresponding parameterized template of above-mentioned application identities as selected template before,
Further include: above-mentioned template set is obtained, above-mentioned template set includes at least one parameterized template;And obtain application identities collection
It closes, above-mentioned application identities set includes at least one application identities;Determine at least one of above-mentioned parameterized template and above-mentioned at least one
Mapping relations between item application identities;It is above-mentioned to select the corresponding parameterized template of above-mentioned application identities as choosing from template set
Solid plate, comprising: determine above-mentioned application identities set whether include above-mentioned software under testing application identities;If comprising foundation
Above-mentioned mapping relations select the corresponding parameterized template of above-mentioned application identities as above-mentioned selected template from above-mentioned template set.
104, input parameter sets are obtained from storage device, above-mentioned input parameter sets include at least one input ginseng
The type of number, at least one of above-mentioned input parameter is above-mentioned parameter type, and at least one of above-mentioned input parameter is in above-mentioned parameter
In section.
Specifically, above-mentioned storage device can be the memory of above-mentioned test lead local, such as mechanical hard disk, solid state hard disk
Memory, or remote storage, such as database, storage server.
Specifically, above-mentioned storage device may include database associated with above-mentioned software under testing, pointed by step 102
Configuration file also include above-mentioned database address information, it is above-mentioned from storage device obtain input parameter sets before,
Further include: address above mentioned information is obtained from above-mentioned configuration file, is connect according to address above mentioned information with above-mentioned Database;
It is above-mentioned that input parameter sets are obtained from storage device, comprising: Xiang Shangshu database sends the instruction of request above-mentioned parameter set,
Above-metioned instruction includes above-mentioned parameter information;Receive the above-mentioned input parameter sets from above-mentioned database.
Above-mentioned input parameter sets include multinomial input parameter, and above-mentioned multinomial input parameter meets above-mentioned selected template,
The type of every input parameter is the parameter type of above-mentioned selected template i.e. in above-mentioned parameter set, and items input parameter is in
In above-mentioned parameter section.
105, select to influence the maximum input parameter of coefficient from above-mentioned input parameter sets as test parameter, above-mentioned shadow
Ring the use value that coefficient is used to evaluate input parameter.
Specifically, above-mentioned influence coefficient is the overall target of the use value of evaluation input parameter, above-mentioned influence coefficient is got over
Greatly, indicate that the use value of above-mentioned input parameter is higher.
Specifically, above-mentioned obtain input parameter sets from storage device, comprising: obtain the history in above-mentioned storage device
Input parameter;If the type of above-mentioned history input parameter is above-mentioned parameter type, and above-mentioned history input parameter is in above-mentioned ginseng
In number interval, then using above-mentioned history input parameter as above-mentioned first input parameter, above-mentioned parameter set is obtained.It is filled from storage
Set acquisition input parameter sets after, select from above-mentioned input parameter sets influence the maximum input parameter of coefficient as
Before test parameter, further includes: the quantitative proportion for determining above-mentioned first input parameter, by section pair belonging to above-mentioned quantitative proportion
Scoring of the scoring answered as above-mentioned quantitative proportion, above-mentioned quantitative proportion indicate that the quantity of above-mentioned first input parameter accounts for above-mentioned ginseng
The ratio of input parameter total amount in manifold conjunction;And determine the time point that above-mentioned first input parameter is created, by above-mentioned quilt
Scoring of the corresponding scoring in section belonging to the time point of creation as the above-mentioned time point being created;By above-mentioned quantitative proportion
The influence coefficient that the weighted sum of scoring and the scoring at the above-mentioned time point being created inputs parameter as above-mentioned first;It is above-mentioned from upper
It states and selects to influence the maximum input parameter of coefficient in input parameter sets as test parameter, comprising: in above-mentioned first input ginseng
Several influence coefficients is in maximum situation, using above-mentioned first input parameter as above-mentioned test parameter.
More specifically, by the weighted sum of the scoring of above-mentioned quantitative proportion and the scoring at the above-mentioned time point being created it
Before, corresponding first weight of above-mentioned quantitative proportion and corresponding second weight of above-mentioned creation time point can also be obtained.Wherein, on
It is higher to state the first weight, indicates that this index of quantitative proportion is more important.
106, above-mentioned test parameter is inputted in above-mentioned software under testing, receives the test result that above-mentioned software under testing returns.
Specifically, above-mentioned test lead includes test script, above-mentioned test lead is run above-mentioned after obtaining input parameter value
Above-mentioned input parameter value is inputted software under testing, obtains test result by test script.
In one possible implementation, above-mentioned test lead by above-mentioned input parameter value input above-mentioned software under testing it
Before, operation interface can be exported, shows that the information of above-mentioned input parameter and prompt user are examined in aforesaid operations interface
The prompt information looked into.The operating instruction of user's input is received by operation interface;After receiving operating instruction, above-mentioned survey is run
Training sheet obtains above-mentioned test result.
Implement the application, the application identities of available software under testing obtain parameter mould corresponding with above-mentioned application identities
Plate obtains the selection test from above-mentioned parameter set with the matched input parameter sets of software under testing according to above-mentioned parameter template
Parameter, it can be ensured that the format of test parameter is consistent with format required by software under testing when test, avoid in test process to
It surveys software to report an error, reduces the error rate in test process, save the testing time;Meanwhile the application can also be according to influence coefficient
Select the higher input parameter of use value as test parameter so that test parameter is more targeted, and then improve discovery to
Survey the efficiency of the loophole of software.
Fig. 2 is the flow chart for another test method that the application proposes, the above method is applied to test lead, above-mentioned test
End can be the terminal devices such as desktop computer, laptop, work station, tablet computer and mobile phone, and above-mentioned terminal device can be with
Loading operation system, can be with installation and operation test software;The above method includes:
201, setting instruction is received by operation interface, above-mentioned setting instruction includes the road of the configuration file of software under testing
Diameter.
Specifically, test lead can identify above-mentioned application identities by modes such as regular expression, Keywords matchings.It is above-mentioned
Application identities are the unique identification of above-mentioned software under testing, can be used for distinguishing the interface parameters information of above-mentioned software under testing.On
Stating interface parameters information can further include interface parameters type, interface parameters section and interface parameters number etc..
202, above-mentioned configuration file is read from the path of above-mentioned configuration file, identifies include in above-mentioned configuration file upper
State the application identities of software under testing.
Above-mentioned application identities are the unique identification of above-mentioned software under testing, can be used for distinguishing the interface of above-mentioned software under testing
Parameter information.Above-mentioned interface parameters information can further include interface parameters type, interface parameters section and interface parameters number
Mesh etc..
203, template set is obtained, above-mentioned template set includes at least one parameterized template;And obtain application identities collection
It closes, above-mentioned application identities set includes at least one application identities;Determine at least one of above-mentioned parameterized template and above-mentioned at least one
Mapping relations between item application identities.
Above-mentioned parameter template is used to provide the format of test parameter, and above-mentioned parameter template includes parameter information, above-mentioned parameter
Packet containing parameter type and parameter section.More specifically, above-mentioned parameter type may include numeric type, character string type and boolean
Type etc., above-mentioned parameter section may include section belonging to the length of section belonging to numerical value shape parameter and character string etc..
Specifically, at least one of above-mentioned parameterized template may include the first parameterized template and the second parameterized template, it is above-mentioned to obtain
Modulus plate set may include: that the first history parameters and the second history parameters are obtained from database;Above-mentioned first history is joined
Parameter type of several types as above-mentioned first parameterized template, and using section belonging to above-mentioned first history parameters as upper
The parameter section for stating the first parameterized template obtains above-mentioned first parameterized template;If the parameter section of above-mentioned second history parameters with
The parameter section of above-mentioned first history parameters is inconsistent or parameter type and above-mentioned first history of above-mentioned second history parameters
The parameter type of parameter is inconsistent, then using the type of above-mentioned second history parameters as the parameter class of above-mentioned second parameterized template
Type, and using section locating for above-mentioned second history parameters as the parameter section of above-mentioned second parameterized template, obtain above-mentioned
Two parameterized templates.
At least one of above-mentioned parameterized template can also include third, the 4th parameterized template, wherein parameters template institute's generation
The parameter format of table is inconsistent.It also include third, the 4th history parameters, wherein history parameters of same format in above-mentioned database
For generating the same parameterized template.
More specifically, test lead can store preset parameter section, and test lead can be by above-mentioned first history parameters
Section of the affiliated preset parameter section as above-mentioned first parameterized template.For example, for character string type history parameters,
Above-mentioned preset parameter section may include: [1,10], [20,30], [30,50].[1,10] indicate character string length be 1~
10/ character.
More specifically, test lead can be with each history parameters in ergodic data library, according to the identical history of parameter format
Parameter generates the same template, generates the biggish multiple parameters template of coverage area with this.
Specifically, above-mentioned acquisition application identities set, may include: to download above-mentioned application identities set from cloud.Cloud
The application identities that each software can be acquired, be applied logo collection, then the application identities set is sent to test lead.This
Outside, above-mentioned cloud can also acquire the address of each software, and the address of above-mentioned each software is packaged into address set and is sent to
Test lead.Test section can establish the mapping relations between parameterized template and various types of softwares by above-mentioned application identities,
Connection is established by address above mentioned set and above-mentioned each software, to obtain required resource.
Specifically, at least one of above-mentioned parameterized template may include the first parameterized template, at least one of above-mentioned application identities
It may include the first application identities, between at least one above-mentioned parameterized template of above-mentioned determination and at least one above-mentioned application identities
Mapping relations may include: the acquisition first interface document from above-mentioned first application identities corresponding first software;It identifies above-mentioned
The first interface information for including in first interface document, above-mentioned first interface information include interface parameters type and interface parameters area
Between;If the parameter type match of above-mentioned interface parameters type and above-mentioned first parameterized template, and above-mentioned interface parameters section with it is upper
The parameter section matching for stating the first parameterized template, then be mapped to above-mentioned first application identities for above-mentioned first parameterized template, obtain
Above-mentioned mapping relations.
Above-mentioned application identities may include the address information of above-mentioned first software, and above-mentioned test lead can be according to address above mentioned
Above-mentioned first software of message reference obtains the first interface document of above-mentioned first software.
Above-mentioned test lead can be identified in above-mentioned first interface document by regular expression or Keywords matching algorithm
The first interface information for including.After obtaining above-mentioned interface message, if above-mentioned interface parameters type and above-mentioned first parameter mould
The parameter type match of plate, and above-mentioned interface parameters section is matched with the parameter section of above-mentioned first parameterized template, test lead can
Above-mentioned first application identities and above-mentioned parameter template to be added in array or same a line of table, obtain between the two
Mapping relations.
At least one of above-mentioned parameterized template can also be at least one of above-mentioned to answer comprising second, third and the 4th parameterized template
It can also include second, third and the 4th application identities with mark, the method for establishing mapping relations is consistent with the above method, this
Place does not repeat one by one.Table 1 is a kind of form of expression of mapping relations:
Table 1
First application identities | First parameterized template |
Second application identities | Second parameterized template |
...... | ...... |
In alternatively possible implementation, at least one of the above-mentioned parameterized template of above-mentioned determination and it is above-mentioned at least one answer
With the mapping relations between mark, comprising: obtain the parameter generators for meeting above-mentioned first parameterized template;It is raw to read above-mentioned parameter
It grows up to be a useful person the training parameter of generation, the type of above-mentioned training parameter is above-mentioned parameter type, and above-mentioned training parameter is in above-mentioned parameter
Section;Above-mentioned training parameter is inputted into corresponding first software of above-mentioned first application identities, receives what above-mentioned first software returned
Test result;In above-mentioned test result and the matched situation of expected results, above-mentioned first parameterized template is mapped to above-mentioned the
One application identities obtain above-mentioned mapping relations.
Above-mentioned parameter generator can automatically generate multiple training parameters for meeting above-mentioned first parameterized template.Citing comes
It says, the parameter type that above-mentioned parameter template is included is character string type, and parameter section is [5,10]/character string, then above-mentioned life
The character string that length is 5~10 can be generated as training parameter at random by growing up to be a useful person.
After test lead obtains training parameter, the first software corresponding with above-mentioned first application identities establishes connection, will be upper
It states training parameter and inputs above-mentioned first software, and receive the test result that above-mentioned first software returns.
If the test result that above-mentioned first software returns does not include error message, then it represents that above-mentioned training parameter meets
Format required by the first software is stated, there are matching relationships with above-mentioned first application identities for above-mentioned test template.
204, determine above-mentioned application identities set whether include above-mentioned software under testing application identities;If comprising foundation
Above-mentioned mapping relations select the corresponding parameterized template of above-mentioned application identities as above-mentioned selected template from above-mentioned template set.
Test lead can be searched the application with above-mentioned software under testing and be marked with application identities all in traversal applications logo collection
Sensible matched application identities;If finding above-mentioned application identities, the corresponding relationship that relationship is shown according to above-mentioned mapping,
It selects with the matched parameterized template of above-mentioned application identities as selected template.
205, the input parameter sets for meeting above-mentioned selected template, above-mentioned input parameter sets packet are obtained from storage device
Parameter is inputted containing at least one, at least one of above-mentioned input parameter includes the first input parameter.
It is above-mentioned that input parameter sets are obtained from storage device, it may include: that the history that obtains in above-mentioned storage device is defeated
Enter parameter;If the type of above-mentioned history input parameter is above-mentioned parameter type, and above-mentioned history input parameter is in above-mentioned parameter
In section, then using above-mentioned history input parameter as above-mentioned first input parameter, above-mentioned parameter set is obtained.
Test lead can traverse each history parameters in above-mentioned storage device, by above-mentioned each history parameters and above-mentioned input
Template is matched;If successful match, above-mentioned each history parameters are added in the same data acquisition system, obtain above-mentioned ginseng
Manifold is closed.
206, the quantitative proportion for determining above-mentioned first input parameter, by the corresponding scoring in section belonging to above-mentioned quantitative proportion
Scoring as above-mentioned quantitative proportion;And determine the time point that above-mentioned first input parameter is created, by above-mentioned time point institute
Scoring of the corresponding scoring in the section of category as above-mentioned time point;By the scoring and the scoring at above-mentioned time point of above-mentioned quantitative proportion
Weighted sum as it is above-mentioned first input parameter influence coefficient.
Above-mentioned quantitative proportion indicates that the quantity of above-mentioned first input parameter accounts for the input parameter total amount in above-mentioned parameter set
Ratio.It, may also in above-mentioned parameter set since in above-mentioned storage device parameter may be inputted comprising multiple identical history
Include multiple identical input parameters.Wherein, the quantity of above-mentioned first input parameter is more, then it represents that above-mentioned first input parameter
The number used is more, and the value of above-mentioned first input parameter is higher.
The time point that above-mentioned input is created indicates the time that the corresponding history parameters of above-mentioned input parameter are produced
Point, i.e., above-mentioned history parameters are stored in the time point in above-mentioned storage device.The time point that above-mentioned input parameter is created gets over
Close to current point in time, indicate that above-mentioned input parameter gets over the input habit that can react active user, use value is also higher.
The quantitative proportion in each section has corresponding scoring.For example, (5%, 10%] between ratio can be 1
Point, (10%, 20%] between ratio can be 2 points.And so on, quantitative proportion is higher, belonging to section it is higher, comment
Divide higher.Also there is corresponding scoring at the time point being created in each section.For example, the input ginseng being created within nearest one day
Number (being created history parameters within nearest one day in above-mentioned storage device) scoring is 10, the nearest history ginseng being created for one week
Its scoring of number is 8.And so on, the time point being created, corresponding scoring was lower further away from current point in time.
Before computationally stating weighted sum, the weight of available above-mentioned quantitative proportion and the above-mentioned time point being created
Weight.Preferably, above-mentioned quantitative proportion can more reflect the use value of input parameter than the above-mentioned time point being created, therefore above-mentioned
The weight at the weight ratio of the quantitative proportion above-mentioned time point being created is higher.
207, it is above-mentioned first input parameter influence coefficient be maximum situation under, will it is above-mentioned first input parameter as
Above-mentioned test parameter.
In above-mentioned parameter set is calculated after the influence coefficient of parameters, above-mentioned first input parameter is determined
Influence whether coefficient is the corresponding maximum value influenced in coefficient of each input parameter;If so, by above-mentioned first input parameter
As above-mentioned test parameter.
208, above-mentioned test parameter is inputted in above-mentioned software under testing, receives the test result that above-mentioned software under testing returns.
Specifically, above-mentioned test lead includes test script, above-mentioned test lead is run above-mentioned after obtaining input parameter value
Above-mentioned input parameter value is inputted software under testing, obtains test result by test script.
In one possible implementation, above-mentioned test lead by above-mentioned input parameter value input above-mentioned software under testing it
Before, operation interface can be exported, shows that the information of above-mentioned input parameter and prompt user are examined in aforesaid operations interface
The prompt information looked into.The operating instruction of user's input is received by operation interface;After receiving operating instruction, above-mentioned survey is run
Training sheet obtains above-mentioned test result.
Implement the application, the application identities of available software under testing obtain parameter mould corresponding with above-mentioned application identities
Plate obtains the selection test from above-mentioned parameter set with the matched input parameter sets of software under testing according to above-mentioned parameter template
Parameter, it can be ensured that the format of test parameter is consistent with format required by software under testing when test, avoid in test process to
It surveys software to report an error, reduces the error rate in test process, save the testing time;Meanwhile the application can also be according to influence coefficient
Select the higher input parameter of use value as test parameter so that test parameter is more targeted, and then improve discovery to
Survey the efficiency of the loophole of software.
Fig. 3 is a kind of flow chart for test method for concrete application scene that the application proposes, the above method is with electricity
The specific implementation step of method is described for quotient's query interface.The above method should not be taken as a kind of limitation to the application.
The above method includes:
301, test lead obtains the configuration file of above-mentioned software under testing;Above-mentioned configuration file is parsed, above-mentioned interface letter is obtained
Breath.
Specifically, test lead obtains the permission of access software under testing installation directory, receives and use after obtaining above-mentioned permission
The selection instruction of family input, above-mentioned selection instruction includes specified path;Above-mentioned selection instruction is executed, is read to above-mentioned specified path
Above-mentioned configuration file.
After obtaining above-mentioned configuration file, above-mentioned test lead uses Keywords matching or regular expression method, solution
Analysis obtains the interface message in configuration file.Above-mentioned interface message includes interface parameters type and interface parameters quantity.
Specifically, the interface message of electric business query interface may include " character string type product name;Character string type store name
Claim;Numeric type cargo price;Numeric type commodity amount ".
302, above-mentioned interface message is parsed, above-mentioned interface parameters type and above-mentioned interface parameters title are obtained;It is connect above-mentioned
Parameter type of the mouth parameter type as above-mentioned parameter template, and above-mentioned interface parameters name is referred to as above-mentioned parameter template
Parameter name obtains above-mentioned parameter template.
After above-mentioned interface message is assigned to parameterized template, above-mentioned parameter template is " character string type product name;Character string
Type shop title;Numeric type cargo price;Numeric type commodity amount ".Wherein, above-mentioned " character string type " and " numeric type " is parameter
The parameter type of template, above-mentioned " product name ", " shop title ", " cargo price " and " commodity amount " are the ginseng of parameterized template
Several titles.
303, the parameter generators for meeting above-mentioned parameter template are obtained;The parameter value that above-mentioned parameter generator generates is read,
Using above-mentioned parameter value as above-mentioned input parameter value.
Test lead can read the code block of above-mentioned parameter generator, obtain above-mentioned parameter according to above-mentioned code block and generate
Device.The corresponding input parameter value of above-mentioned parameter template can be generated in above-mentioned parameter generator.
Above-mentioned parameter template is " character string type product name;Character string type shop title;Numeric type cargo price;Numerical value
Type commodity amount ", then above-mentioned parameter generator can be from " Xujiahui shop;101 shop of city;Big world shop;Four, Yaohan shop " ginseng
Numerical value chooses value of the parameter value as " shop title " in choosing.Above-mentioned parameter generator can be from " nike-GF-
20001;nike-GF-20002;nike-GF-20003;A parameter is chosen in nike-GF-20004 " is used as " product name "
Value.Above-mentioned parameter generator can be set from increasing sequence, initial value 1000, will be every time from obtained numerical value is increased as upper
State the value of " commodity price ".Above-mentioned parameter generator can be set from increasing sequence, initial value 1, by what is obtained every time from increasing
Value of the numerical value as above-mentioned " commodity amount ".
304, above-mentioned input parameter value is inputted into above-mentioned software under testing, obtains test result.
Implement the application, implement the application, the application identities of available software under testing obtain and above-mentioned application identities pair
The parameterized template answered, according to the acquisition of above-mentioned parameter template and the matched input parameter sets of software under testing, from above-mentioned parameter set
Middle selection test parameter, it can be ensured that the format of test parameter is consistent with format required by software under testing when test, avoids surveying
Software under testing reports an error during examination, reduces the error rate in test process, saves the testing time.
Fig. 4 is a kind of structural schematic diagram for test device that the application proposes, which includes:
Receiving unit 401, for receiving setting instruction by operation interface, above-mentioned setting instruction includes matching for software under testing
Set the path of file;
First acquisition unit 402 reads above-mentioned configuration file from the path of above-mentioned configuration file, identifies above-mentioned configuration text
The application identities for the above-mentioned software under testing for including in part;
First selecting unit 403, for selecting the corresponding parameterized template of above-mentioned application identities as choosing from template set
Solid plate, above-mentioned selected template include parameter information, above-mentioned parameter packet containing parameter type and parameter section;
Second acquisition unit 404, for obtaining input parameter sets from storage device, above-mentioned input parameter sets include
Type of at least one input parameter, at least one of above-mentioned input parameter is above-mentioned parameter type, at least one above-mentioned input ginseng
Number is in above-mentioned parameter section;
Second selecting unit 405, for the maximum input parameter work of selection influence coefficient from above-mentioned input parameter sets
For test parameter, above-mentioned influence coefficient is used to evaluate the use value of above-mentioned input parameter;
Input unit 406 receives above-mentioned software under testing and returns for inputting above-mentioned test parameter in above-mentioned software under testing
Test result.
In one possible implementation, above-mentioned apparatus further include: third acquiring unit 406, for obtaining above-mentioned mould
Plate set, above-mentioned template set include at least one parameterized template;And obtain application identities set, above-mentioned application identities collection
Closing includes at least one application identities;Determine reflecting between at least one of above-mentioned parameterized template and at least one above-mentioned application identities
Penetrate relationship;
Whether above-mentioned first selecting unit 402 includes above-mentioned software under testing specifically for the above-mentioned application identities set of determination
Application identities;If comprising relationship selects the corresponding ginseng of above-mentioned application identities from above-mentioned template set according to above-mentioned mapping
Digital-to-analogue plate is as above-mentioned selected template.
In one possible implementation, at least one of above-mentioned parameterized template includes the first parameterized template, it is above-mentioned at least
One application identities includes the first application identities, and above-mentioned third acquiring unit 407 is specifically used for from above-mentioned first application identities pair
First interface document is obtained in the first software answered;Identify the first interface information for including in above-mentioned first interface document, it is above-mentioned
First interface information includes interface parameters type and interface parameters section;If above-mentioned interface parameters type and above-mentioned first parameter mould
The parameter type match of plate, and above-mentioned interface parameters section is matched with the parameter section of above-mentioned first parameterized template, then it will be above-mentioned
First parameterized template is mapped to above-mentioned first application identities, obtains above-mentioned mapping relations.
In one possible implementation, at least one of above-mentioned input parameter includes the first input parameter, and above-mentioned second
Acquiring unit 403, is specifically same as: obtaining the history input parameter in above-mentioned storage device;If the class of above-mentioned history input parameter
Type is above-mentioned parameter type, and above-mentioned history input parameter is in above-mentioned parameter section, then makees above-mentioned history input parameter
For above-mentioned first input parameter, above-mentioned parameter set is obtained.
In one possible implementation, above-mentioned apparatus further include: the 4th acquiring unit 408, for determining above-mentioned
The quantitative proportion of one input parameter, by corresponding scoring the commenting as above-mentioned quantitative proportion in section belonging to above-mentioned quantitative proportion
Point, above-mentioned quantitative proportion indicates that the quantity of above-mentioned first input parameter accounts for the ratio of the input parameter total amount in above-mentioned parameter set
Example;And determine the time point that above-mentioned first input parameter is created, section belonging to the above-mentioned time point being created is corresponding
Scoring of the scoring as the above-mentioned time point being created;By the scoring of above-mentioned quantitative proportion and the above-mentioned time point being created
Influence coefficient of the weighted sum of scoring as above-mentioned first input parameter;Above-mentioned second selecting unit is specifically used for above-mentioned the
The influence coefficient of one input parameter is in maximum situation, using above-mentioned first input parameter as above-mentioned test parameter.
In one possible implementation, at least one of above-mentioned parameterized template includes the first parameterized template, it is above-mentioned at least
One application identities includes the first application identities, and above-mentioned third acquiring unit 407 is specifically used for: acquisition meets above-mentioned first ginseng
The parameter generators of digital-to-analogue plate;The training parameter that above-mentioned parameter generator generates is read, the type of above-mentioned training parameter is above-mentioned
Parameter type, above-mentioned training parameter are in above-mentioned parameter section;It is corresponding that above-mentioned training parameter is inputted into above-mentioned first application identities
The first software, receive the test result that above-mentioned first software returns;The case where above-mentioned test result is matched with expected results
Under, above-mentioned first parameterized template is mapped to above-mentioned first application identities, obtains above-mentioned mapping relations.
In one possible implementation, above-mentioned template set further includes the second parameterized template, and above-mentioned third obtains single
Member 407, is specifically used for: obtaining the first history parameters and the second history parameters from database;By above-mentioned first history parameters
Parameter type of the type as above-mentioned first parameterized template, and using section belonging to above-mentioned first history parameters as above-mentioned
The parameter section of one parameterized template obtains above-mentioned first parameterized template;If the parameter section of above-mentioned second history parameters with it is above-mentioned
The parameter section of first history parameters is inconsistent or parameter type and above-mentioned first history parameters of above-mentioned second history parameters
Parameter type it is inconsistent, then using the type of above-mentioned second history parameters as the parameter type of above-mentioned second parameterized template, with
And using section locating for above-mentioned second history parameters as the parameter section of above-mentioned second parameterized template, obtain above-mentioned second parameter
Template.
Referring to Fig. 5, Fig. 5 is the structural schematic diagram of another test device provided by the embodiments of the present application.The device packet
It includes: at least one processor 501, such as central processing unit (central processing unit, CPU), at least one storage
Device 502 and at least one bus 503.Wherein, above-mentioned bus 503 can be one group of parallel data line, for realizing above-mentioned place
It manages device 501 and above-mentioned memory 502 is connected with each other;Above-mentioned memory 502 can be high-speed random access memory (random
Access memory, RAM), it is also possible to nonvolatile memory (non-volatile memory), for example, at least one is only
Read memory (read only memory, ROM) or at least one flash storage.
Specifically, can store program instruction in above-mentioned memory 502, above-mentioned processor 501 can be used for caller and refer to
It enables and executes Fig. 1, Fig. 2 and method shown in Fig. 3.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing relevant hardware by program, which can store in computer readable storage medium, and storage is situated between
Matter include read-only memory (read only memory, ROM), random access memory (random access memory, RAM),
Programmable read only memory (programmable read only memory, PROM), Erasable Programmable Read Only Memory EPROM
(erasable programmable read only memory, EPROM), disposable programmable read-only memory (one-time
Programmable read-only memory, OTPROM), the electronics formula of erasing can make carbon copies read-only memory
(electrically-erasable programmable read-only memory, EEPROM), CD-ROM (compact
Disc read-only memory, CD-ROM) or other disc memories, magnetic disk storage, magnetic tape storage or can
For carrying or any other computer-readable medium of storing data.
A kind of test method and device disclosed in the embodiment of the present application are described in detail above, it is used herein
The principle and implementation of this application are described for specific case, and the above embodiments are only used to help understand originally
The method and its core concept of application;At the same time, for those skilled in the art, according to the thought of the application, specific
There will be changes in embodiment and application range.To sum up above-mentioned, the content of the present specification should not be construed as to the application's
Limitation.
Claims (10)
1. a kind of test method characterized by comprising
Setting instruction is received by operation interface, the setting instruction includes the path of the configuration file of software under testing;
The configuration file is read from the path of the configuration file, identifies include in the configuration file described to be measured soft
The application identities of part;
Select the corresponding parameterized template of the application identities as selected template from template set, the selected template includes ginseng
Number information, the parameter information include parameter type and parameter section;
From storage device obtain input parameter sets, the input parameter sets include at least one of input parameter, it is described extremely
The type that one item missing inputs parameter is the parameter type, and at least one of described input parameter is in the parameter section;
Select to influence the maximum input parameter of coefficient from the input parameter sets as test parameter, the influence coefficient is used
In the use value of evaluation input parameter;
The test parameter is inputted in the software under testing and is tested, the test result that the software under testing returns is received.
2. method according to claim 1, which is characterized in that select the application identities corresponding from template set described
Parameterized template as selected template before, further includes:
The template set is obtained, the template set includes at least one parameterized template;And application identities set is obtained,
The application identities set includes at least one application identities;
Determine the mapping relations between the application identities in the parameterized template and the application identities set in the template set;
It is described to select the corresponding parameterized template of the application identities as selected template from template set, comprising:
Determine the application identities set whether include the software under testing application identities;
If comprising selecting the corresponding parameterized template of the application identities to make from the template set according to the mapping relations
For the selected template.
3. method according to claim 2, which is characterized in that at least one of described parameterized template includes the first parameterized template,
At least one of described application identities include the first application identities, parameterized template and described at least one at least one of described in the determination
Mapping relations between item application identities, comprising:
First interface document is obtained from corresponding first software of first application identities;
Identify that the first interface information for including in the first interface document, the first interface information include interface parameters type
With interface parameters section;
If the parameter type match of the interface parameters type and first parameterized template, and the interface parameters section and institute
The parameter section matching for stating the first parameterized template, then be mapped to first application identities for first parameterized template, obtain
The mapping relations.
4. method according to claim 1, which is characterized in that at least one of described input parameter includes the first input parameter,
It is described that input parameter sets are obtained from storage device, comprising:
Obtain the history input parameter in the storage device;
If the type of the history input parameter is the parameter type, and history input parameter is in the parameter section
In, then using history input parameter as the first input parameter, obtain the parameter sets.
5. method according to claim 4, which is characterized in that from storage device obtain input parameter sets after,
Before selecting to influence the maximum input parameter of coefficient in the input parameter sets as test parameter, further includes:
The quantitative proportion for determining the first input parameter, will be described in the corresponding scoring conduct in section belonging to the quantitative proportion
The scoring of quantitative proportion, the quantitative proportion indicate that the quantity of the first input parameter accounts for the input ginseng in the parameter sets
The ratio of number total amount;And
It determines the time point that the first input parameter is created, regard the corresponding scoring in section belonging to the time point as institute
State the scoring at time point;
The influence that the weighted sum of the scoring of the quantitative proportion and the scoring at the time point is inputted into parameter as described first
Coefficient;
It is described to select to influence the maximum input parameter of coefficient from the input parameter sets as test parameter, comprising:
It is described first input parameter influence coefficient be biggest impact coefficient in the case where, will it is described first input parameter as
The test parameter.
6. method according to claim 2, which is characterized in that at least one of described parameterized template includes the first parameterized template,
At least one of described application identities include the first application identities, parameterized template and described at least one at least one of described in the determination
Mapping relations between item application identities, comprising:
Obtain the parameter generators for meeting first parameterized template;
The training parameter that the parameter generators generate is read, the type of the training parameter is the parameter type, the instruction
Practice parameter to be in the parameter section;
The training parameter is inputted into corresponding first software of first application identities, receives the survey that first software returns
Test result;
Under the test result and the matched situation of expected results, first parameterized template is mapped to first application
Mark, obtains the mapping relations.
7. method according to claim 6, which is characterized in that the template set further includes the second parameterized template, described to obtain
Take the template set, comprising:
The first history parameters and the second history parameters are obtained from database;
Using the type of first history parameters as the parameter type of first parameterized template, and by first history
Parameter section of the section belonging to parameter as first parameterized template, obtains first parameterized template;
If the parameter section of section described in second history parameters and first history parameters is inconsistent or described
The Type-Inconsistencies of the type of two history parameters and first history parameters, then using the type of second history parameters as
The parameter type of second parameterized template, and using section locating for second history parameters as the second parameter mould
The parameter section of plate obtains second parameterized template.
8. a kind of test device characterized by comprising
Receiving unit, for receiving setting instruction by operation interface, the setting instruction includes the configuration file of software under testing
Path;
First acquisition unit reads the configuration file from the path of the configuration file, identifies and wraps in the configuration file
The application identities of the software under testing contained;
First selecting unit, for selecting the corresponding parameterized template of the application identities as selected template from template set,
The selected template includes parameter information, and the parameter information includes parameter type and parameter section;
Second acquisition unit, for obtaining input parameter sets from storage device, the input parameter sets include at least one
Type of item input parameter, at least one of described input parameter is the parameter type, at least one described input parameter is in
In the parameter section;
Second selecting unit, for selecting to influence the maximum input parameter of coefficient from the input parameter sets as test ginseng
Number, the use value for influencing coefficient and being used to evaluate input parameter;
Input unit is tested for inputting the test parameter in the software under testing, receives the software under testing and return
The test result returned.
9. a kind of test device, which is characterized in that including processor and memory;The processor and the memory pass through total
Line is connected with each other;Wherein, for the memory for storing computer program, the computer program includes program instruction, described
Processor is configured for calling described program instruction, executes method as described in any one of claim 1 to 7.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey
Sequence, the computer program include program instruction, and described program instructs when being executed by a processor, execute the processor such as
The described in any item methods of claim 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910530625.1A CN110334019B (en) | 2019-06-18 | 2019-06-18 | Test method, test device and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910530625.1A CN110334019B (en) | 2019-06-18 | 2019-06-18 | Test method, test device and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110334019A true CN110334019A (en) | 2019-10-15 |
CN110334019B CN110334019B (en) | 2024-01-05 |
Family
ID=68142543
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910530625.1A Active CN110334019B (en) | 2019-06-18 | 2019-06-18 | Test method, test device and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110334019B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111061523A (en) * | 2019-11-25 | 2020-04-24 | 北京奇艺世纪科技有限公司 | Software package calling management method, system, device and storage medium |
CN112506762A (en) * | 2020-11-27 | 2021-03-16 | 北京百度网讯科技有限公司 | Application program interface parameter screening method, device, equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030204784A1 (en) * | 2002-04-29 | 2003-10-30 | Jorapur Gopal P. | System and method for automatic test case generation |
US20060005138A1 (en) * | 2004-05-12 | 2006-01-05 | Oracle International Corporation, A Corporation Of The State Of California | Template driven type and mode conversion |
US20150227588A1 (en) * | 2014-02-07 | 2015-08-13 | Quixey, Inc. | Rules-Based Generation of Search Results |
CN106776307A (en) * | 2016-12-05 | 2017-05-31 | 广州唯品会信息科技有限公司 | Method for testing software and system |
US20180373551A1 (en) * | 2017-03-21 | 2018-12-27 | Aaron Christensen | Systems and methods for using dynamic templates to create application containers |
CN109240924A (en) * | 2018-09-03 | 2019-01-18 | 中国平安人寿保险股份有限公司 | A kind of test method and equipment of application program |
CN109446059A (en) * | 2018-09-12 | 2019-03-08 | 北京邮电大学 | The generation method and device of test template script |
-
2019
- 2019-06-18 CN CN201910530625.1A patent/CN110334019B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030204784A1 (en) * | 2002-04-29 | 2003-10-30 | Jorapur Gopal P. | System and method for automatic test case generation |
US20060005138A1 (en) * | 2004-05-12 | 2006-01-05 | Oracle International Corporation, A Corporation Of The State Of California | Template driven type and mode conversion |
US20150227588A1 (en) * | 2014-02-07 | 2015-08-13 | Quixey, Inc. | Rules-Based Generation of Search Results |
CN106776307A (en) * | 2016-12-05 | 2017-05-31 | 广州唯品会信息科技有限公司 | Method for testing software and system |
US20180373551A1 (en) * | 2017-03-21 | 2018-12-27 | Aaron Christensen | Systems and methods for using dynamic templates to create application containers |
CN109240924A (en) * | 2018-09-03 | 2019-01-18 | 中国平安人寿保险股份有限公司 | A kind of test method and equipment of application program |
CN109446059A (en) * | 2018-09-12 | 2019-03-08 | 北京邮电大学 | The generation method and device of test template script |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111061523A (en) * | 2019-11-25 | 2020-04-24 | 北京奇艺世纪科技有限公司 | Software package calling management method, system, device and storage medium |
CN111061523B (en) * | 2019-11-25 | 2023-12-15 | 北京奇艺世纪科技有限公司 | Software package calling management method, system, device and storage medium |
CN112506762A (en) * | 2020-11-27 | 2021-03-16 | 北京百度网讯科技有限公司 | Application program interface parameter screening method, device, equipment and storage medium |
CN112506762B (en) * | 2020-11-27 | 2022-03-15 | 北京百度网讯科技有限公司 | Application program interface parameter screening method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110334019B (en) | 2024-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109857667B (en) | Interface automation test method, test device, test equipment and storage medium | |
CN107861870A (en) | Interface testing and test data generating method, device, terminal and storage medium | |
CN106095673A (en) | Automated testing method based on WEB interface and system | |
CN108829597A (en) | Software crowd surveys method and device, computer installation and readable storage medium storing program for executing | |
CN109766263A (en) | Automatic test analysis and processing method, device, computer equipment and storage medium | |
CN108205493A (en) | A kind of code detection method, terminal, server and system | |
CN106294134A (en) | The collapse localization method of code and device | |
CN108459964A (en) | Test cases selection method, apparatus, equipment and computer readable storage medium | |
CN108255699A (en) | regression testing method and device | |
CN109885474A (en) | Test case edit methods and device, terminal and computer readable storage medium | |
CN109783543A (en) | Data query method, apparatus, equipment and storage medium | |
CN107276842A (en) | Interface test method and device and electronic equipment | |
CN110471585A (en) | Function of application icon methods of exhibiting, device and computer equipment | |
CN108959067A (en) | Test method, device and the computer readable storage medium of search engine | |
CN113268641B (en) | User data processing method based on big data and big data server | |
CN110334019A (en) | A kind of test method, device and readable storage medium storing program for executing | |
CN111881037A (en) | Test case management method and device and electronic equipment | |
CN110221967A (en) | Test data building method, device, computer equipment and storage medium | |
CN104462305A (en) | Data analyzing method and device | |
CN110442852B (en) | Target cost compiling method, storage medium and intelligent terminal thereof | |
CN106251114A (en) | The method and apparatus realizing examination & approval in application | |
CN113220597B (en) | Test method, test device, electronic equipment and storage medium | |
CN109684213A (en) | A kind of test method, device and storage medium | |
CN112965912B (en) | Interface test case generation method and device and electronic equipment | |
CN110134583A (en) | Software test and data processing method and device |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20231211 Address after: No. 301, Building 11, Phase II, Taicang University Science Park, No. 27 Zigang Road, Science and Education New City, Taicang City, Suzhou City, Jiangsu Province, 215000 Applicant after: Tianhang Changying (Jiangsu) Technology Co.,Ltd. Address before: 518000 Room 201, A building, 1 front Bay Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretarial Co., Ltd.) Applicant before: PING AN PUHUI ENTERPRISE MANAGEMENT Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |