Summary of the invention
Fundamental purpose of the present invention is to provide a kind of querying method of test case and device, the method for building up of test case and device, needs artificial input inquiry title to cause inquiring correct result set problem to solve in prior art.
According to an aspect of the present invention, a kind of querying method of test case is provided.
According to the querying method of test case of the present invention be included in the first test case be opened time, read the parameter comprised in the title of described first test case, described parameter is the parameter for inquiring about second test case with described first test case with incidence relation; Add described parameter to initial query condition, generate the first querying condition; And there is according to described first querying condition inquiry and described first test case the second test case of incidence relation, obtain the first result set.
Further, before the parameter comprised in the title of reading first test case, described querying method also comprises: set up test set, wherein, described test set has multiple test layer; And in built-in vertical described first test case of described test set, wherein, described first test case belongs to one or more test layers of described test set.
Further, described parameter comprises the first parameter and the second parameter, wherein: before foundation test set, described querying method also comprises: receive and preset object; After built-in vertical described first test case of described test set, and before the parameter comprised in the title of reading first test case, described querying method also comprises: inquiry packet, containing the described test set of described first test case, obtains the first test set; Determine that the name of described first test set is called described first parameter in the title of described first test case, wherein, described first parameter is dominant parameter; And one or more object is selected from described default object, obtain described second parameter, wherein, described second parameter is recessive parameter or described dominant parameter.
Further, described first parameter comprises one or more first subparameter, described second parameter comprises one or more second subparameter, add described parameter to initial query condition, generate the first querying condition to comprise: add one or more described first subparameter to described initial query condition, and add one or more described second subparameter to described initial query condition, generate described first querying condition, wherein, logical relation in described first querying condition between adjacent subparameter is logical and or logical OR, the logical relation of described dominant parameter is logical and, logical relation between described recessive parameter is logical OR.
Further, have the second test case of incidence relation according to described first querying condition inquiry and described first test case, after obtaining the first result set, described querying method also comprises: receive modify instruction; According to described modify instruction, described first querying condition is modified, obtain the second querying condition; There is from described first result Integrated query and described first test case according to described second querying condition described second test case of incidence relation, obtain the second result set.
Further, have the second test case of incidence relation according to described first querying condition inquiry and described first test case, after obtaining the first result set, described querying method also comprises: receive the 3rd querying condition; There is from described first result Integrated query and described first test case according to described 3rd querying condition described second test case of incidence relation, obtain the 3rd result set.
According to an aspect of the present invention, a kind of method for building up of test case is provided.
Method for building up according to test case of the present invention comprises: receive parameter preset; The parameter comprised in the title of described test case using described parameter preset is inquired about, and obtains result set, and wherein, the querying method of any one test case adopting foregoing of the present invention to provide is inquired about described test case; Judge whether described result set is empty set; And when judging that described result set is empty set, set up described test case.
According to a further aspect in the invention, a kind of inquiry unit of test case is provided.
Inquiry unit according to test case of the present invention comprises: reading unit, when the first test case is opened, for reading the parameter comprised in the title of the first test case, described parameter is the parameter for inquiring about second test case with described first test case with incidence relation; Adding device, for adding described parameter to initial query condition, generates the first querying condition; And first query unit, for having the second test case of incidence relation according to described first querying condition inquiry and described first test case, obtain the first result set.
Further, described inquiry unit also comprises: first sets up unit, and for setting up test set before the parameter that comprises in the title of reading first test case, wherein, described test set has multiple test layer; And second sets up unit, for gathering built-in vertical described first test case in described test, wherein, described first test case belongs to one or more test layers of described test set.
Further, described parameter comprises the first parameter and the second parameter, and described inquiry unit also comprises: the first receiving element, before foundation test set, for receiving default object; Second query unit, for after built-in vertical described first test case of described test set, and before the parameter comprised in the title of reading first test case, inquiry packet, containing the described test set of described first test case, obtains the first test set; Determining unit, for determining that the name of described first test set is called described first parameter in the title of described first test case, wherein, described first parameter is dominant parameter; Selection unit, for selecting one or more object from described default object, obtains described second parameter, and wherein, described second parameter is described recessive parameter or dominant parameter.
Further, described first parameter comprises one or more first subparameter, described second parameter comprises one or more second subparameter, described adding device also comprises: first adds module, for adding one or more described first subparameter to described initial query condition, and add one or more described second subparameter to described initial query condition, generate described first querying condition, wherein, logical relation in described first querying condition between adjacent subparameter is logical and or logical OR, the logical relation of described dominant parameter is logical and, logical relation between described recessive parameter is logical OR.
Further, described inquiry unit also comprises: the second receiving element, in second test case according to described first querying condition inquiry and described first test case with incidence relation, receives modify instruction after obtaining the first result set; First amendment unit, for modifying to described first querying condition according to described modify instruction, obtains the second querying condition; 3rd query unit, for having described second test case of incidence relation from described first result Integrated query and described first test case according to described second querying condition, obtains the second result set.
Further, described inquiry unit also comprises: the 3rd receiving element, in second test case according to described first querying condition inquiry and described first test case with incidence relation, receives the 3rd querying condition after obtaining the first result set; 4th query unit, for having described second test case of incidence relation from described first result Integrated query and described first test case according to described 3rd querying condition, obtains the 3rd result set.
According to a further aspect in the invention, a kind of apparatus for establishing of test case is provided.
Apparatus for establishing according to test case of the present invention comprises: receiving element, for receiving parameter preset; Query unit, parameter for comprising in the title of described test case using described parameter preset is inquired about described test case, obtain result set, wherein, the inquiry unit of any one test case adopting foregoing of the present invention to provide is inquired about described test case; Judging unit, for judging whether described result set is empty set; And confirmation unit, for when judging that described result set is empty set, set up described test case.
In the present invention, when the first test case is opened, adopt the parameter comprised in the title of reading first test case, wherein, parameter is the parameter for inquiring about the test case with the first test case with incidence relation; The content of the parameter read as inquiry is added in initial query condition, generates the first querying condition; There is according to the first querying condition inquiry and the first test case the second test case of incidence relation, obtain the first result set.By reading the parameter comprised in the title of the first test case, then utilizing the parameter read to generate the first querying condition, finally there is according to the first querying condition inquiry and the first test case the second test case of incidence relation, obtain the first result set; In the process, do not need the title content manually inputting needs search just can reach the object of search, but also can directly the result set obtained be presented in current page, solve artificial input inquiry title in prior art and cause inquiring the problem of correct result set, and then reach the effect improving inquiry accuracy.
Embodiment
The present invention program is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, should belong to the scope of protection of the invention.
It should be noted that, term " first ", " second " etc. in instructions of the present invention and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged in the appropriate case, so as embodiments of the invention described herein can with except here diagram or describe those except order implement.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
When not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.Below with reference to the accompanying drawings and describe the present invention in detail in conjunction with the embodiments.
Embodiment 1
According to the embodiment of the present invention, provide a kind of embodiment of the method that may be used for implementing the application's device embodiment, it should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the process flow diagram of accompanying drawing, and, although show logical order in flow charts, in some cases, can be different from the step shown or described by order execution herein.
According to the embodiment of the present invention, provide a kind of querying method of test case, Fig. 1 is the process flow diagram of the querying method of test case according to the embodiment of the present invention, and as shown in Figure 1, the method mainly comprises following step S102 to step S106:
S102: when the first test case is opened, read the parameter comprised in the title of the first test case, wherein, the first test case can be any one test case.The parameter comprised in the title of this test case is the parameter for inquiring about the test case with the first test case with incidence relation; Particularly, the title of this first test case comprises parameter for describing the purposes of the first test case, this parameter can for delete, newly-built, search.
S104: add parameter to initial query condition, generate the first querying condition.Particularly, using the parameter read as the content needing to inquire about, the theme added in initial query condition comprises in condition, and then generate the first querying condition, wherein, the querying condition that initial query condition is blank also can be have the querying condition that tester arranges the non-blank-white such as date, time.
S106: second test case according to the first querying condition inquiry and the first test case with incidence relation, obtain and show the first result set, particularly, after utilizing parameter to generate the first querying condition, inquire about, second test case with the first test case with incidence relation can be found out, obtain the set of the result of the second test case, i.e. the first result set, in embodiments of the present invention, can also this first result set be presented in the results list at default query interface, wherein, the quantity of the second test case can be one, also can be multiple.
In embodiments of the present invention, when the first test case is opened, adopt the parameter comprised in the title of reading first test case, wherein, parameter is the parameter for inquiring about the test case with the first test case with incidence relation; The content of the parameter read as inquiry is added in initial query condition, generates the first querying condition; There is according to the first querying condition inquiry and the first test case the second test case of incidence relation, obtain the first result set.By reading the parameter comprised in the title of the first test case, then utilizing the parameter read to generate the first querying condition, finally there is according to the first querying condition inquiry and the first test case the second test case of incidence relation, obtain the first result set; In the process, do not need the title content manually inputting needs search just can reach the object of search, but also can directly the result set obtained be presented in current page, solve the problem that artificial input inquiry title causes inquiring correct result set, and then reach the effect improving inquiry accuracy.
The querying method of process flow diagram to the test case that the preferred embodiment of the present invention provides below in conjunction with the querying method of the test case shown in Fig. 2 illustrates, as shown in Figure 2, the querying method of the test case that the preferred embodiment provides is compared with the querying method of the test case shown in Fig. 1: before the parameter comprised in the title of reading first test case, and the querying method of the preferred embodiment also comprises following step S202 to step S204:
S202: set up test set, wherein, test set has multiple test layer; Particularly, create this test set in test and management instrument, this test set has many levels.As set up set of transferring accounts, can comprise below transferring accounts and transferring accounts on the net, transferring accounts on the net and can comprise bank's internal account transfer.
S204: in built-in vertical first test case of test set, wherein, the first test case belongs to one or more test layers of test set.Particularly, such as: transfer accounts, to transfer accounts on the net and bank's internal account transfer three parts all comprise the test case that the name with same use is called " newly-built ", now, " newly-built " can belong to and transfer accounts, also can belong to and transfer accounts on the net, bank's internal account transfer can also be belonged to.
In a preferred embodiment of the invention, by setting up test set, and this test set has multiple test layer, namely this test set has different levels, then in built-in vertical first test case of this test set, wherein, the first test case belongs to one or more test layer of above-mentioned test set, and namely the use of the first test case is not limited in certain test layer of certain test set concrete.In prior art, according to different paths or region, test case is classified by functional module or test-types, and adopt tree structure to manage.The shortcoming of this tree structure way to manage is adopted to be: when the functional module belonging to different " path " or " region " comprises identical function, the test case with identical function cannot realize reusing, and must re-create a set of general test case more just passable.Such as, comprise deletion test case in modules A, also need to use deletion test case in module B, module B is identical with the kinetic energy of the deletion test case comprised in modules A, now must re-create in module B and delete this test case, just can use.And in a preferred embodiment of the invention, first test case can be present in the one or more test layers in test set simultaneously, no longer be fixedly installed in the tree structure of certain functional module, reach the reusable effect of identical function test case, decrease the cost of maintenance test use-case.
Particularly, after built-in vertical first test case of test set, and before the parameter comprised in the title of reading first test case, the querying method of the test case of the embodiment of the present invention also comprises the test set of searching and comprising the first test case, obtain the set comprising all first test cases, i.e. the first test set, the name of this test set is called the summation of the title of the set comprising the first test case, and title forms from high to low according to the level of test set.The name of the first test set is referred to as the first parameter in the title of the first test case, this first parameter can be edited, and user can delete these parameters or edit.Wherein, this first parameter is dominant parameter, and can directly be presented in the title of the first test case, user can see intuitively.In the title of test case, the position of multiple dominant parameter can be had, but each dominant parameter bit is equipped with and only has a parameter.
Before foundation test set, the querying method of the test case of the embodiment of the present invention also comprises receiving presets object, for generating data source; This preset to as if according to testing requirement definition, can be control, operation and result, as deleted, newly-built etc., above-mentioned test set also can for the default object defined.The library of object be made up of default object forms data source.User can adopt the mode of drop-down selection, selects one or more default object, joins in title, form the second parameter in data source.Wherein, when the one or more default object of selection, can select the attribute arranging above-mentioned default object, namely arranging the second parameter is dominant parameter or recessive parameter.If it is dominant parameter that user arranges the second parameter, then the same with the first parameter, can directly be presented in title; If it is recessive parameter that user arranges the second parameter, recessive parameter does not show in the title of test case, only when opening test case, the position of a recessive parameter is taken at the title division of test case, the position of each recessive parameter can comprise multiple recessive parameter simultaneously, and multiple recessive parameters are present in the position of recessive parameter side by side.Although recessive parameter can not intuitively be presented in the title of test case, can as search condition, searchedly to arrive.Such as: project scheduling functional module and project unit functional module all contain the test case of delete function, when search, concerning the test case of delete function, the project scheduling and project unit just as two recessive parameters, can take a recessive parameter position simultaneously.
In embodiments of the present invention, by parameter being divided into dominant parameter or recessive parameter, facilitating user to inquire the information of needs from various dimensions, reducing the under-enumeration phenomenon of information.
Particularly, the first parameter comprises one or more first subparameter, and wherein one or more first subparameters are dominant parameter.Such as: transferring accounts in transferring accounts, transfer accounts on the net and going all comprises the name with identical function and be called newly-built test case, now the first parameter comprises three the first subparameters, be transfer accounts in transferring accounts, transfer accounts on the net and going respectively, then above-mentioned three the first subparameters directly can be presented at name and are called in the title of newly-built test case.Second parameter comprises one or more second subparameter, first the one or more subparameters in the first parameter are added into initial query condition, then one or more second subparameters in the second parameter are added into initial query condition, logical relation in first querying condition between adjacent subparameter is logical and or logical OR, the logical relation of dominant parameter is logical and, and the logical relation between recessive parameter is logical OR.Such as: it is a, b and c respectively that the first parameter comprises three the first subparameters, then the relation of these three the first subparameters is a and b and c; It is d and e respectively that second parameter comprises two the second subparameters, then the relation of these two the second subparameters is d or e.
In embodiments of the present invention, in initial query condition, other querying conditions can also be comprised, as date, time etc., by between the first parameter and the second parameter logically Conjunction and disjunction logic functions or relation carry out query composition, thus improve the accuracy of Query Result.
Preferably, there is according to the first querying condition inquiry and the first test case the second test case of incidence relation, obtain on the basis of the first result set, the querying method of the test case of the embodiment of the present invention can also receive the modify instruction of user, this modify instruction can by equipment inputs such as keyboards, instruction can for delete as querying condition certain first subparameter etc. or change the second subparameter in the second parameter into recessive parameter by dominant parameter, or change recessive parameter into dominant parameter etc., then according to instruction, the first querying condition is modified, thus obtain new querying condition, i.e. the second querying condition, according to new querying condition in the first structure Integrated query second test case relevant with the first test case, obtain the second result set.Wherein, the second test case can be one, also can be multiple.
In embodiments of the present invention, by the amendment to the first querying condition, meet the further query demand of user, improve the accuracy of data query.
Preferably, have the second test case of incidence relation according to the first querying condition inquiry and the first test case, obtain on the basis of the first result set, the querying method of the test case of the embodiment of the present invention can also receive the 3rd querying condition; Particularly, this Article 3 part for user is according to the self-defining that needs of oneself, can add new querying condition under existing querying condition; Have the second test case of incidence relation according to the 3rd querying condition from the first result Integrated query and the first test case, obtain the 3rd result set, wherein, the second test case can be one, also can be multiple.
In embodiments of the present invention, by the basis of the first querying condition, querying condition can be added further, meet the further query demand of user, more improve the accuracy of data query.
The querying method of the test case mentioned in the present invention is equally also applicable to leak (bug), because of the step of the querying method of leak and the querying method of test case and process consistent, just do not repeated one by one at this.It should be noted that, after test case and leak all use above-mentioned querying method, at a known test case or bug, want inquire about and this test case or bug inquire about corresponding bug or test case the situation that associates and at a known test case or bug, need to search in a database when whether having identical test case bug and all can apply above-mentioned querying method, and do not need user to carry out any input can to reach inquiry object.Again because this title is formed with parametric form, not carry out manual typing by different testers, so title describes aspect reach unification.
Embodiment 2
According to the embodiment of the present invention, provide a kind of embodiment of the method that may be used for implementing the application's device embodiment, it should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the process flow diagram of accompanying drawing, and, although show logical order in flow charts, in some cases, can be different from the step shown or described by order execution herein.
According to the embodiment of the present invention, provide a kind of method for building up of test case, Fig. 3 is the process flow diagram of the method for building up of test case according to the embodiment of the present invention, and as shown in Figure 3, the method mainly comprises following step S302 to step S308:
S302: receive parameter preset; Particularly, this parameter preset can be the default object that defines in the querying method of test case (hereinafter referred to as the first test case), as newly-built, deletion etc., and also can for the title etc. of test set set up in the querying method of test case.
S304: the parameter comprised in the title of the first test case using parameter preset is to inquiring about, obtain result set, wherein, the querying method of the test case of above-mentioned introduction is adopted to inquire about, the querying method of the test case of query script and step and above-mentioned introduction is identical, just no longer describes herein.
S306: whether judged result integrates as empty set, namely judges whether the second test case that parameter preset is relevant therewith.
S308: when judging that result set is empty set, sets up the first test case; When judging the result of the second test case not having parameter preset to be therewith correlated with, user needs to set up the test case about this parameter preset.
In an embodiment of the present invention, first receive the parameter preset of user's input, inquire about as the parameter in the first test case using this parameter preset, obtain the first result set.The result of result set is judged, when result set is empty set, then needs tester to add test case about this parameter preset.If result set is not empty set, tester is not needed to add test case about this parameter preset.The method for building up of the test case mentioned in embodiments of the invention, can be applied to the method for testing that exploratory testing mixes with traditional test, and wherein, heuristic test is a kind of test mode of testing design and carrying out with test execution simultaneously.When tester needs just to test a certain parameter preset, first can inquire by the querying method of test case the test case whether having and be correlated with this parameter preset, namely whether judged result integrates as empty set; If not empty set, then tester is not needed to set up test case about this parameter preset; If empty set, then tester is needed to set up test case about this parameter preset.Can be drawn by foregoing description, this determination methods decreases the number of times that tester repeats to set up same test case, improves the work efficiency of tester.
The method for building up of the test case mentioned in the present invention is equally also applicable to leak (bug), because of the step of the method for building up of leak and the method for building up of test case and process consistent, just do not repeated one by one at this.
It should be noted that, for aforesaid each embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and involved action and module might not be that the present invention is necessary.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that can add required general hardware platform by software according to the method for above-described embodiment and realize, hardware can certainly be passed through, but in a lot of situation, the former is better embodiment.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium (as ROM/RAM, magnetic disc, CD), comprising some instructions in order to make a station terminal equipment (can be mobile phone, computing machine, server, or the network equipment etc.) perform the method for each embodiment of the present invention.
Embodiment 3
According to the embodiment of the present invention, additionally provide a kind of inquiry unit of the querying method for implementing above-mentioned test case, this inquiry unit is mainly used in the querying method that execution embodiment of the present invention foregoing provides, and does concrete introduction below to the inquiry unit of the test case that the embodiment of the present invention provides:
According to embodiments of the invention, provide a kind of inquiry unit of test case, Fig. 4 is the schematic diagram of the inquiry unit of test case according to the embodiment of the present invention, as shown in Figure 4, this inquiry unit mainly comprises reading unit 10, adding device 20 and the first query unit 30, wherein:
Reading unit 10, for when the first test case is opened, reads the parameter comprised in the title of the first test case, and wherein, the first test case can be any one test case.The parameter comprised in the title of this test case is the parameter for inquiring about the test case with the first test case with incidence relation; Particularly, the title of this first test case comprises parameter for describing the purposes of the first test case, this parameter can for delete, newly-built, search.
Adding device 20, for adding parameter to initial query condition, generates the first querying condition.Particularly, using the parameter read as the content needing to inquire about, the theme added in initial query condition comprises in condition, and then generate the first querying condition, wherein, starting condition can be blank querying condition, also can be have the querying condition that tester arranges the non-blank-white such as date, time.
First query unit 30 is for having the second test case of incidence relation according to the first querying condition inquiry and the first test case, obtain and show the first result set, particularly, after utilizing parameter to generate the first querying condition, inquire about, second test case with the first test case with incidence relation can be found out, obtain the set of the result of the second test case, i.e. the first result set, in embodiments of the present invention, can also this first result set be presented in the results list at default query interface, the quantity of the second test case can be one, also can be multiple.
In embodiments of the present invention, by reading the parameter comprised in the title of the first test case, then utilize the parameter read to generate the first querying condition, finally there is according to the first querying condition inquiry and the first test case the second test case of incidence relation, obtain the first result set; In the process, do not need the title content manually inputting needs search just can reach the object of search, but also can directly the result set obtained be presented in current page, solve the problem that artificial input inquiry title causes inquiring correct result set, and then reach the effect improving inquiry accuracy.
Fig. 5 is the schematic diagram of the inquiry unit of test case according to the preferred embodiment of the invention, as shown in Figure 5, compared with the inquiry unit of the test case shown in Fig. 4, the inquiry unit of the test case of the preferred embodiment also comprises first and sets up unit 40 and second and set up unit 50, wherein:
First sets up unit 40 set up test set for read the parameter that comprises in the title of the first test case at reading unit 10 before, and wherein, test set has multiple test layer; Particularly, create this test set in test and management instrument, this test set has many levels.As set up set of transferring accounts, can comprise below transferring accounts and transferring accounts on the net, transferring accounts on the net and can comprise bank's internal account transfer.
Second sets up unit 50 for gathering built-in vertical first test case in test, wherein, first test case belongs to one or more test layers of test set, particularly, such as: transfer accounts, to transfer accounts on the net and bank's internal account transfer three parts all comprise the test case that the name with same use is called " newly-built ", now, " newly-built " can belong to and transfer accounts, also can belong to and transfer accounts on the net, bank's internal account transfer can also be belonged to.
In a preferred embodiment of the invention, test set is set up by setting up unit, and this test set has multiple test layer, namely this test set has different levels, then by setting up subelement in the built-in vertical test case of this first test set, wherein, the first test case belongs to one or more test layer of above-mentioned test set, and namely the use of the first test case is not limited in certain test layer of certain test set concrete.In prior art, according to different paths or region, test case is classified by functional module or test-types, and adopt tree structure to manage.The shortcoming of this tree structure way to manage is adopted to be: when the functional module belonging to different " path " or " region " comprises identical function, the test case with identical function cannot realize reusing, and must re-create a set of general test case more just passable.Such as, comprise deletion test case in modules A, also need to use deletion test case in module B, module B is identical with the kinetic energy of the deletion test case comprised in modules A, now must re-create in module B and delete this test case, just can use.And in a preferred embodiment of the invention, first test case can be present in the one or more test layers in test set simultaneously, no longer be fixedly installed in the tree structure of certain functional module, reach the reusable effect of identical function test case, decrease the cost of maintenance test use-case.
Preferably, parameter comprises the first parameter and the second parameter, the inquiry unit of the test case of the embodiment of the present invention also comprises the first receiving element, the second query unit, determining unit and selection unit, and wherein the first receiving element is before foundation test set, for receiving default object; Particularly, this preset to as if according to testing requirement definition, can be control, operation and result, as deleted, newly-built etc., above-mentioned test set also can for the default object defined.
Selection unit is used for from data source, select one or more object, and obtain the second parameter, wherein, the second parameter is recessive parameter or dominant parameter.User can adopt the mode of drop-down selection, selects one or more default object, joins in title, form the second parameter in the data source that default object is formed.Wherein, when the one or more default object of selection, can select the attribute arranging above-mentioned default object, namely arranging the second parameter is dominant parameter or recessive parameter.If it is dominant parameter that user arranges the second parameter, then this second parameter can directly be presented in title; If it is recessive parameter that user arranges the second parameter, recessive parameter does not show in the title of test case, only when opening test case, the position of a recessive parameter is taken at the title division of test case, the position of each recessive parameter can comprise multiple recessive parameter simultaneously, and multiple recessive parameters are present in the position of recessive parameter side by side.Although recessive parameter can not intuitively be presented in the title of test case, can as search condition, searchedly to arrive.Such as: project scheduling functional module and project unit functional module all contain the test case of delete function, when search, concerning the test case of delete function, the project scheduling and project unit just as two recessive parameters, can take a recessive parameter position simultaneously.
Second query unit is used for after built-in vertical first test case of test set, and before the parameter comprised in the title of reading first test case, inquiry packet is containing the test set of the first test case, obtain the first test set, the name of this test set is called the summation of the title of the set comprising the first test case, and title forms from high to low according to the level of test set.
Determining unit is for determining that the name of the first test set is called the first parameter in the title of the first test case, and wherein, the first parameter is dominant parameter; The name of the first test set is referred to as the first parameter in the title of the first test case, this first parameter can be edited, and user can delete these parameters or edit.Wherein, this first parameter is dominant parameter, and can directly be presented in the title of the first test case, user can see intuitively.In the title of test case, the position of multiple dominant parameter can be had, but each dominant parameter bit is equipped with and only has a parameter.
In embodiments of the present invention, by parameter being divided into dominant parameter or recessive parameter, facilitating user to inquire the information of needs from various dimensions, reducing the under-enumeration phenomenon of information.
Particularly, the first parameter comprises one or more first subparameter, and wherein one or more first subparameters are dominant parameter.Such as: transferring accounts in transferring accounts, transfer accounts on the net and going all comprises the name with identical function and be called newly-built test case, now the first parameter comprises three the first subparameters, be transfer accounts in transferring accounts, transfer accounts on the net and going respectively, then above-mentioned three the first subparameters directly can be presented at name and are called in the title of newly-built test case.Second parameter comprises one or more second subparameter.Adding device also comprises the first interpolation module, first one or more first subparameter is added to initial query condition, secondly one or more second subparameter is added to initial query condition, generate the first querying condition, wherein, logical relation in first querying condition between adjacent subparameter is logical and or logical OR, and the logical relation of dominant parameter is logical and, and the logical relation between recessive parameter is logical OR.Such as: it is a, b and c respectively that the first parameter comprises three the first subparameters, then the relation of these three the first subparameters is a and b and c; It is d and e respectively that second parameter comprises two the second subparameters, then the relation of these two the second subparameters is d or e.
In embodiments of the present invention, in initial query condition, other querying conditions can also be comprised, as date, time etc., by between the first parameter and the second parameter logically Conjunction and disjunction logic functions or relation carry out query composition, thus improve the accuracy of Query Result.
Preferably, the inquiry unit of the test case of the embodiment of the present invention also comprises the second receiving element, first amendment unit and the 3rd query unit, wherein, second receiving element, for inquiring about second test case with the first test case with incidence relation according to the first querying condition, modify instruction is received after obtaining the first result set, particularly, this modify instruction can by equipment inputs such as keyboards, instruction can for delete as querying condition certain first subparameter etc. or change the second subparameter in the second parameter into recessive parameter by dominant parameter, or change recessive parameter into dominant parameter etc.
First amendment unit is used for modifying to the first querying condition according to modify instruction, obtains the second querying condition.
3rd query unit is used for second test case from the first result Integrated query and the first test case according to the second querying condition with incidence relation, obtains the second result set.Wherein, the second test case can be one, also can be multiple.
In embodiments of the present invention, by the amendment to the first querying condition, meet the further query demand of user, improve the accuracy of data query.
Preferably, the inquiry unit of the test case of the embodiment of the present invention also comprises the 3rd receiving element and the 4th query unit, wherein,
3rd receiving element is used in second test case according to the first querying condition inquiry and the first test case with incidence relation, the 3rd querying condition is received after obtaining the first result set, particularly, 3rd querying condition for user is according to the self-defining that needs of oneself, can add new querying condition under existing querying condition.
4th query unit is used for second test case from the first result Integrated query and the first test case according to the 3rd querying condition with incidence relation, and obtain the 3rd result set, wherein, the second test case can be one, also can be multiple.
In embodiments of the present invention, by the basis of the first querying condition, querying condition can be added further, meet the further query demand of user, more improve the accuracy of data query.
The inquiry unit of the test case mentioned in the present invention is equally also applicable to leak (bug), because of the step of the inquiry unit of bug and the inquiry unit of test case and process same consistent, just do not repeated one by one at this.
Embodiment 4
According to the embodiment of the present invention, additionally provide a kind of apparatus for establishing of the method for building up for implementing above-mentioned test case, this apparatus for establishing is mainly used in the method for building up performing the test case that embodiment of the present invention foregoing provides, and does concrete introduction below to the apparatus for establishing of the test case that the embodiment of the present invention provides:
Fig. 6 is the schematic diagram of the apparatus for establishing of test case according to the embodiment of the present invention, and as shown in Figure 6, the apparatus for establishing of the test case of this embodiment mainly comprises receiving element 60, query unit 70, judging unit 80 and confirmation unit 90, wherein:
Receiving element 60 is for receiving parameter preset; Particularly, this parameter preset can be the default object that defines in the querying method of test case (hereinafter referred to as the first test case), as newly-built, deletion etc., and also can for the title etc. of test set set up in the querying method of test case.
The parameter that query unit 70 comprises in the title of the first test case for the parameter preset received using receiving element 60 is inquired about the first test case, obtain result set, wherein, the querying method of the test case of above-mentioned introduction is adopted to inquire about, the querying method of the test case of query script and step and above-mentioned introduction is identical, just no longer describes herein.
Whether judging unit 80 integrates as empty set for judged result; Namely the second test case that parameter preset is relevant is therewith judged whether.
Confirmation unit 90, for when judging that result set is empty set, sets up the first test case; When judging the result of the second test case not having parameter preset to be therewith correlated with, user needs to set up the test case about this parameter preset.
In an embodiment of the present invention, first receive the parameter preset of user's input, inquire about as the parameter in the first test case using this parameter preset, obtain result set.The result of result set is judged, when result set is empty set, then needs tester to add test case about this parameter preset.If result set is not empty set, tester is not needed to add test case about this parameter preset.The method for building up of the test case mentioned in embodiments of the invention, can be applied to the method for testing that exploratory testing mixes with traditional test, and wherein, heuristic test is that a kind of test design carries out test mode with test execution simultaneously.When tester needs just to test a certain parameter preset, first can inquire by the querying method of test case the test case whether having and be correlated with this parameter preset, namely whether judged result integrates as empty set; If not empty set, then tester is not needed to set up test case about this parameter preset; If empty set, then tester is needed to set up test case about this parameter preset.Can be drawn by foregoing description, this determination methods decreases the number of times that tester repeats to set up same test case, improves the work efficiency of tester.
The apparatus for establishing of the test case mentioned in the present invention is equally also applicable to leak (bug), because of the step of the apparatus for establishing of the apparatus for establishing with test case of setting up leak and process consistent, just do not repeated one by one at this.
From the above description, can find out, the present invention does not need the title content manually inputting needs search just can reach the object of search, but also can directly the result set obtained be presented in current page, solve the problem that artificial input inquiry title causes inquiring correct result set, and then reach the effect improving inquiry accuracy.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.