CN108255698A - Test cases generation method and device based on visualization interface - Google Patents

Test cases generation method and device based on visualization interface Download PDF

Info

Publication number
CN108255698A
CN108255698A CN201710087565.1A CN201710087565A CN108255698A CN 108255698 A CN108255698 A CN 108255698A CN 201710087565 A CN201710087565 A CN 201710087565A CN 108255698 A CN108255698 A CN 108255698A
Authority
CN
China
Prior art keywords
test
combination
qualifications
key factor
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710087565.1A
Other languages
Chinese (zh)
Inventor
邓智
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201710087565.1A priority Critical patent/CN108255698A/en
Publication of CN108255698A publication Critical patent/CN108255698A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

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)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The present invention relates to a kind of test cases generation methods based on visualization interface and device, this method to include:The Multiple factors for obtaining the factor field input in Excel plug-in units and the test value corresponding with each factor in the input of value field;The key factor with key factor label is chosen from factor, key factor is multiple, complete combination will be carried out between test value corresponding with each key factor, a pair test value corresponding with the non-key factor in factor carries out random value, obtains the first test combination;Obtain the qualifications of input;Whether detection the first test combination meets qualifications;When the first test combination is unsatisfactory for qualifications, then the first test combination is modified to obtain the second test combination according to qualifications, according to the second test combination producing test cases.Under the premise of testing requirement is met, reduce the quantity of test combination.

Description

Test cases generation method and device based on visualization interface
Technical field
The present invention relates to field of computer technology, more particularly to a kind of test cases generation side based on visualization interface Method and device.
Background technology
Software test refers to before software program is reached the standard grade, to software program whether meet demand carry out various tests and Verification to find program error, weighs software quality, and whether can meet the process that design requirement is assessed to it.Usually Corresponding test cases is designed to carry out software test.
When for a software program design test cases, it will usually multifactor situation is encountered, in order to ensure to cover To all situations to achieve the effect that test, generally these factor complete combinations can so be led in conventional method Cause test cases quantity very huge, for example some test object, there are 10 kinds of factors, the value classification of each factor there are 3 kinds, The test cases number then all combined is exactly 310=59049 kinds.
Obviously, it is tested according to the test cases of complete combination generation is carried out according to all factors in conventional method, It can cause that test assignment amount is heavy, testing efficiency is than relatively low since test cases quantity is very huge.
Invention content
Based on this, it is necessary to provide one kind can reach test effect while, improve testing efficiency based on visual Change the test cases generation method and device at interface.
A kind of test cases generation method based on visualization interface, the described method comprises the following steps:
Obtain in Excel plug-in units factor field input Multiple factors and value field input with it is each The corresponding test value of the factor;
The key factor with key factor label is chosen from the factor, the key factor to be multiple, will with it is each Complete combination is carried out between the corresponding test value of a key factor, pair survey corresponding with the non-key factor in the factor Examination value carries out random value, obtains the first test combination;
Obtain the qualifications of input;
Detect whether the first test combination meets the qualifications;
When the described first test combination is unsatisfactory for the qualifications, then surveyed according to the qualifications to described first Examination combination modifies to obtain the second test combination, according to the described second test combination producing test cases.
The qualifications include the essential combination specified in one of the embodiments,;
Described the step of modifying to obtain the second test combination to the described first test combination according to the qualifications, Including:
It detects in the first test combination with the presence or absence of the essential combination;
When there is no the essential combination, the then upper essential combinations of addition, according to described in the described first test combination Essential combination and the described first test combination obtain the second test combination.
The qualifications include the restriction to the value of the non-key factor in one of the embodiments,;
Described the step of modifying to obtain the second test combination to the described first test combination according to the qualifications, Including:
Whether the value for detecting the non-key factor in each first test combination meets the qualifications;
The value for the non-key factor being unsatisfactory in the first test combination of the qualifications is revised as described in satisfaction The test value of qualifications obtains modified second test combination.
In one of the embodiments, it is described will carry out between test value corresponding with each key factor it is complete Before the step of combination, further include:
Obtain the item number inputted in complete combination field;
The quantity of the item number and key factor label of the input is compared, when item number and the key of the input When the quantity of factor label is consistent, then perform again described will carry out complete combination between test value corresponding with each key factor The step of.
The method further includes in one of the embodiments,:
Obtain the separator inputted in multivalue separator field;
The test cases of generation is exported to obtain test cases file according to the separator.
The qualifications include the instruction of case-insensitive in one of the embodiments,;
Described the step of modifying to obtain the second test combination to the described first test combination according to the qualifications, Including:
Whether have that there is only capital and small letter areas in the first test combination according to the command detection of the case-insensitive The test combination divided;
When having in the described first test combination there is only during the test of size discrimination combination, then there is only capital and small letters from described Determine that one retains test combination, and the guarantor is removed in the test combination distinguished there is only capital and small letter in the test combination of differentiation It is non-reserved test combination to stay the combination other than test combination;
The non-reserved test combination is deleted from the described first test combination, to obtain the second test combination.
A kind of test cases generating means based on visualization interface, described device include:
Acquisition module, for the Multiple factors for obtaining the factor field input in Excel plug-in units and in value field The test value corresponding with each factor of input;
First test combination producing module, for choosing the key factor with key factor label from the factor, The key factor will carry out complete combination to be multiple between test value corresponding with each key factor, pair with it is described The corresponding test value of non-key factor in factor carries out random value, obtains the first test combination;
The acquisition module is additionally operable to obtain the qualifications of input;
Detection module, for detecting whether the first test combination meets the qualifications;
Second test combination producing module, for when the described first test combination is unsatisfactory for the qualifications, then root The described first test combination is modified to obtain the second test combination according to the qualifications;
Test cases generation module, for according to the described second test combination producing test cases.
The qualifications include the essential combination specified in one of the embodiments,;The second test group symphysis It is additionally operable to detect in the first test combination with the presence or absence of the essential combination into module;In the described first test is combined not There are the essential combinations, then add the upper essential combination, are obtained according to the essential combination and the described first test combination Second test combination.
The qualifications include the restriction to the value of the non-key factor in one of the embodiments,;It is described Whether the value that the second test combination producing module is additionally operable to detect the non-key factor in each first test combination is full The foot qualifications;The value for the non-key factor being unsatisfactory in the first test combination of the qualifications is revised as full The test value of the foot qualifications obtains modified second test combination.
The acquisition module is additionally operable to obtain the item number inputted in complete combination field in one of the embodiments,;
Described device further includes:
Comparing module, for comparing the quantity of the item number of the input and key factor label, when the input When item number is consistent with the quantity that the key factor marks, then reinforms the first test combination producing module and perform described incite somebody to action The step of complete combination is carried out between test value corresponding with each key factor.
The acquisition module is additionally operable to obtain the separation inputted in multivalue separator field in one of the embodiments, Symbol;
Described device further includes:
The test cases of generation is exported to obtain test case by test cases output module, user according to the separator Example text part.
The qualifications include the instruction of case-insensitive in one of the embodiments,;
The second test combination producing module is additionally operable to first according to the command detection of the case-insensitive Whether there is the test distinguished there is only capital and small letter to combine in test combination;When having in the described first test combination, there is only big cells During the test combination divided, then a reservation test combination is determined from the test combination distinguished there is only capital and small letter, it is described Except the combination retained in addition to testing combination is non-reserved test combination in the test combination distinguished there is only capital and small letter;From The non-reserved test combination is deleted in the first test combination, to obtain the second test combination.
Above-mentioned test cases generation method and device based on visualization interface, by obtain in Excel plug-in units because Multiple factors of plain field input and in value field input test value corresponding with each factor;From it is described because The key factor with key factor label is chosen in element, the key factor, will be with each key factor pair to be multiple Complete combination is carried out between the test value answered, a pair test value corresponding with the non-key factor in the factor is taken at random Value obtains the first test combination.The first test of generation based on complete combination is carried out with the test value of key factor to combine, it can be with Under the premise of testing requirement is met, the quantity of test combination can be greatly reduced.Further, the restriction item of input is obtained Part;Detect whether the first test combination meets the qualifications;When the described first test combination is unsatisfactory for the restriction During condition, then the described first test combination is modified to obtain the second test combination according to the qualifications, according to described Second test combination producing test cases.It can be modified according to qualifications to the first test combination, make the of generation Two test combinations are more in line with testing requirement, further improve test accuracy rate.
Description of the drawings
Fig. 1 is the internal structure chart of terminal in one embodiment;
Fig. 2 is the flow diagram of the test cases generation method based on visualization interface in one embodiment;
Fig. 3 is the flow diagram of the second test combination producing step in one embodiment;
Fig. 4 is the structure diagram of the test cases generating means based on visualization interface in one embodiment;
Fig. 5 is the structure diagram of the test cases generating means based on visualization interface in another embodiment;
Fig. 6 is the structure diagram of the test cases generating means based on visualization interface in another embodiment.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
In one embodiment, a kind of terminal is provided, the internal structure of the terminal is as shown in Figure 1, including passing through system Processor, built-in storage, non-volatile memory medium, network interface, display screen and the input unit of bus connection.Wherein, should The non-volatile memory medium of terminal is stored with operating system, further includes a kind of test cases generation dress based on visualization interface It puts, is somebody's turn to do the test cases generating means based on visualization interface and is used to implement a kind of test cases generation based on visualization interface Method.The processor supports the operation of entire terminal for providing calculating and control ability.Built-in storage in terminal is non-easy The operation of the test cases generating means based on visualization interface in the property lost storage medium provides environment, is deposited in the built-in storage There is computer-readable instruction, when which is executed by processor, it is a kind of based on visual to may be such that processor performs Change the test cases generation method at interface.Network interface communicates for being connected to network.The display screen of terminal can be liquid Crystal display screen or electric ink display screen etc., input unit can be the touch layers or electronics covered on display screen Button, trace ball or the Trackpad or the external keyboard that are set on device housings, Trackpad or mouse etc..The terminal Can be mobile phone, tablet computer, laptop, desktop computer etc..It will be understood by those skilled in the art that it is shown in Fig. 1 Structure, only with the block diagram of the relevant part-structure of application scheme, do not form and it be applied to application scheme On terminal restriction, specific terminal can include than components more or fewer shown in figure or the certain components of combination, Or it is arranged with different components.
As shown in Fig. 2, in one embodiment, a kind of test cases generation method based on visualization interface is provided, Now it is applied to be illustrated for terminal shown in FIG. 1 in this way, this method specifically includes following steps:
Step 202, the Multiple factors of the factor field input in Excel plug-in units are obtained and are inputted in value field Test value corresponding with each factor.
In the present embodiment, Excel plug-in units are embedded in the test cases generating means run in terminal, in Excel plug-in units Interface in there are some fields, these fields are inputted for user with designing some relevant parameters of test cases or parameter value Or conditional relationship etc..
Wherein, the interface of Excel plug-in units includes on " factor column " and " value column ".User is shown by terminal Excel plug-in interfaces, the factor column shown in Excel plug-in units input the factor for generating test cases, and on value column It is middle to input test value corresponding with each factor.Wherein, the corresponding test value of each factor is at least one.
Terminal-pair should obtain the Multiple factors of the factor field input in Excel plug-in units and be inputted in value field Test value corresponding with each factor.
Step 204, the key factor with key factor label is chosen from factor, key factor to be multiple, will with it is each Complete combination is carried out between the corresponding test value of a key factor, a pair test value corresponding with the non-key factor in factor carries out Random value obtains the first test combination.
Specifically, the interface that user can be shown by terminal carries out key factor to the factor inputted in factor column Specified operation input key factor specifies operational order, and terminal specifies operational order in response to this, and specified key factor is added Key factor is added to mark.It is appreciated that the factor for not having to add key factor label in factor is then non-key factor.
Further, terminal can choose the key factor marked with key factor, wherein, key factor is multiple.Eventually End can obtain test value corresponding with key factor in value column, then will be carried out between the corresponding test value of each key factor Complete combination obtains sub-portfolio, it will be understood that sub-portfolio here refers to form a part for test combination.
Then for each sub-portfolio to there is no the test value corresponding to the non-key factor of key factor label in factor Random value is carried out, the test value that non-key factor takes at random will be merged with corresponding sub-portfolio, the first test of generation Combination.
It now illustrates and the generation step of the first test combination is explained.
For example, obtain the factor of input as A, B, C and D, the wherein test value of factor A is a1, a2 and a3, the test value of B For b1, b2 and b3, the test value of C is c1 and the test value of c2, D are d1, d2 and d3.User is by factor A and factor C flag to close Key factor, then terminal can be by test value a1, a2 and a3 of key factor A, and test value c1 and the c2 progress with key factor C are completely Combination obtains the combination of 3 × 2=6 seeds, as a1c1, a1c2, a2c1, a2c2, a3c1 and a3c2.Because generate test case The test combination of example is to be collectively constituted by the sub-portfolio and the value of the non-key factor of input generated, so terminal can needle 6 sub-portfolios random value and survey from D from test value b1, b2 and b3 of non-key factor B respectively to above-mentioned generation Examination value d1, d2 and d3 random value, and by the value taken at random it is corresponding with 6 sub-portfolio merging of above-mentioned generation generation 6 first Test combination.For example, can obtain the first test be combined as a1b1c1d3, a1b3c2d1, a2b1c1d3, a2b3c2d2, A3b2c1d3 and a3b1c2d3.
Step 206, the qualifications of input are obtained.
Specifically, user can input qualifications in the Excel plug-in interfaces that terminal is shown.Wherein, qualifications Refer to the condition being defined to the test combination of generation test cases, i.e. the test eventually for generation test cases is combined and needed Meet the qualifications.
Wherein, qualifications include the essential combination specified and/or to the restriction of the value of non-key factor or distinguish big Restriction whether small letter etc..Further, the restriction of the value of non-key factor is included individually to the value of non-key factor Restriction or according between key factor and non-key factor value incidence relation carry out restriction.
It should be noted that there is no the restriction of sequencing between step 206 and step 204.Can be, according to step After 204 obtain the first test combination, user inputs qualifications then at interface, and terminal obtains the qualifications of input.It can also It is that before step 204 is performed, user inputs qualifications in interface, and terminal obtains the qualifications of input.
Step 208, whether the first test of detection combination meets qualifications.
In the present embodiment, terminal can detect the qualifications whether the first test combination meets the acquisition.
Specifically, whether terminal can detect the first test of the essential combination specified and/or detection in the first test combination Whether the value of the non-key factor in combination, which meets key factor in qualifications and/or detection the first test combination, takes Whether the incidence relation between the value of value and non-key factor meets qualifications.
For example, first test be combined as a1b1c1d3, a1b3c2d1, a2b1c1d3, a2b3c2d2, a3b2c1d3 and A3b1c2d3, it is assumed that qualifications are:IF [A]=" a1 " THEN [B]=" b1 " is then detected to exist in the first test combination and is discontented with The combination of the foot qualifications.Assume that qualifications are IF [C]=" c1 " THEN [D]=" d3 ", then detect the first test group again Conjunction meets the qualifications.Qualifications are assumed again that as B=" b1 " or " b2 ", then are detected in the first test combination in the presence of discontented The combination of the foot qualifications.
Step 210, when first test combination be unsatisfactory for qualifications when, then according to qualifications to first test combine into Row modification obtains the second test combination, according to the second test combination producing test cases.
It is appreciated that when testing result meets qualifications for the first test combination, then it can be directly by the first test It combines and is combined as the test eventually for generation test cases, i.e., according to the first test combination producing test cases.
When the first test combination is unsatisfactory for qualifications, terminal then repaiies the first test combination according to qualifications Change to obtain the second test combination.It is appreciated that modification can be with test be combined as unit be added or delete or It modifies to the test value corresponding with each factor in the first test combination.
Specifically, will first test combination in be unsatisfactory for qualifications non-key factor value according to qualifications into Row modification obtains modified second test combination.Or the newly-increased test combination for meeting qualifications, newly-increased test is combined The first test is supplemented to combine to obtain the second test combination.Or the repeated combination deleted in the first test combination obtains the second test Combination.
Further, terminal is according to the second test combination producing test cases.Specifically, test cases generation mould is obtained Second test combination is substituted into progress test cases generation in test cases generation template and handles to obtain test cases by plate.
In the present embodiment, user input test factor and corresponding test value in visualization interface are equivalent to, is marked Crucial Testing factors, then terminal can according to the test value of key factor carry out complete combination, to non-key factor carry out with Machine value obtains the first test combination, i.e., the first test of generation is combined based on the progress complete combination of the test value of key factor, It under the premise of testing requirement is met, can greatly reduce the quantity of test combination.It is defeated to be based further on visualization interface The qualifications entered test first to combine to modify or supplement obtaining the second test combination, according to the second test group symphysis Into test cases.It can be modified according to qualifications to the first test combination, make the second of generation to test combination more Meet testing requirement, further improve test accuracy rate.
In one embodiment, qualifications include the essential combination specified.As shown in figure 3, in the present embodiment, according to limit The step of fixed condition modifies to obtain the second test combination to the first test combination (referred to as second tests combination producing step), Specifically include following steps:
Step 302, it whether there is essential combination in the first test of detection combination.
In the present embodiment, qualifications include the essential combination specified.It is appreciated that essential combination, refers to generate The test combination that must have of test cases.User can input that specifying, must have test group in terminal interface It closes, that is, inputs the essential combination specified.
Terminal can be detected in the first test combination with the presence or absence of the essential combination specified.
Step 304, when there is no essential combination, the then upper essential combinations of addition, according to essential combination in the first test combination The second test combination is obtained with the first test combination.
If it is appreciated that there are the essential combination specified in the first test combination, directly this first can be tested It combines and is combined as the test eventually for generation test cases.
When essential combination is not present in the first test combination, then the upper essential combination is added, according to essential combination and the One test combination obtains the second test combination, i.e., closes essential combination and the first test group and tested together as eventually for generation Second test combination of case.
For example, the first test combination has 6, respectively a1b1c1d3, a1b3c2d1, a2b1c1d3, a2b3c2d2, A3b2c1d3 and a3b1c2d3, it is assumed that specifies essential is combined as:A1b1c1d1 is then detected and is not present in the first test combination This specifies essential combination, then essential combination and the first test group is specified to close together as eventually for generation test cases this Second test combination, i.e., the second test combination have 7, respectively a1b1c1d1, a1b1c1d3, a1b3c2d1, a2b1c1d3, A2b3c2d2, a3b2c1d3 and a3b1c2d3.
In the present embodiment, to the first test combination addition test combination by way of specifying essential combination, it can improve Test accuracy rate.In addition, being the addition of essential combination carried out on the basis of the first test combination, useless survey can be avoided Excessive situation is combined in test caused by examination combination, ensure that testing efficiency.
In one embodiment, qualifications include the restriction to the value of non-key factor.In the present embodiment, according to limit The step of fixed condition modifies to obtain the second test combination to the first test combination, including:Detect each first test combination In the value of non-key factor whether meet qualifications;It will be unsatisfactory for non-key in the first test combination of qualifications The value of factor is revised as the test value for meeting qualifications, obtains the step of modified second test is combined.
In the present embodiment, the restriction to the value of non-key factor, including individually limiting the value of the non-key factor Restriction that is fixed or being carried out according to the incidence relation between key factor and non-key factor value.
Can limit the value of non-key factor to fix it is appreciated that individually limiting the value of non-key factor One or more test values or fixed interval, there is no any incidence relation between other factors.With reference to step 204 Example, for example can directly limit the value of non-key factor B as b1.According between key factor and non-key factor value Incidence relation carry out restriction, that is, refer between the value of key factor and the value of non-key factor have conditions relevant relationship Restriction.For example, can be IF [A]=" a1 " THEN [B]=" b1 ", this qualifications be according to key factor and non-pass The restriction that incidence relation between key factor value carries out.
In the present embodiment, whether the value that terminal can detect the non-key factor in each first test combination meets the limit Fixed condition.Then the value for the non-key factor being unsatisfactory in the first test combination of qualifications is revised as meeting and limits item The test value of part obtains modified second test combination.
Similarly, with reference to the example of step 204, if the value for directly limiting non-key factor B can be determined as b1 There are groups in first test combination a1b1c1d3, a1b3c2d1, a2b1c1d3, a2b3c2d2, a3b2c1d3 and a3b1c2d3 The value for closing factor B in a1b3c2d1, a2b3c2d2 and a3b2c1d3 is unsatisfactory for the qualifications, then will combination The value of factor B in a1b3c2d1, a2b3c2d2 and a3b2c1d3 is revised as b1 and is combined as to get to the second test A1b1c1d3, a1b1c2d1, a2b1c1d3, a2b1c2d2, a3b1c1d3 and a3b1c2d3.For another example, if limited crucial Conditions relevant relationship between the value of factor A and the value of non-key factor B is IF [A]=" a1 " THEN [B]=" b1 ", then It can determine that there is combination a1b3c2d1 in the first test combination is unsatisfactory for qualifications, then B pairs of factor during this can be combined The value b3 answered is revised as b1, you can with obtain the second test be combined as a1b1c1d3, a1b1c2d1, a2b1c1d3, A2b3c2d2, a3b2c1d3 and a3b1c2d3.
In the present embodiment, to the value of non-key factor limit by way of to first test combination carry out it is non-key because The modification of element value makes modified test combination be more in line with demand, can improve test accuracy rate.And test group will not be caused That closes increases, and ensure that testing efficiency.
In one embodiment, will carry out complete combination between test value corresponding with each key factor the step of it Before, it further includes:Obtain the item number inputted in complete combination field;The quantity of the item number and key factor label of input is compared, when When the item number of input is consistent with the quantity that key factor marks, then performing again will be between test value corresponding with each key factor The step of carrying out complete combination.
In the present embodiment, complete combination field is provided in terminal interface, user can input in complete combination field The item number of the factor of progress complete combination is needed, terminal-pair should obtain the item number inputted in complete combination field.
Further, terminal can compare the quantity of the item number and key factor label of input, and whether comparison the two is consistent, when When the item number of input is consistent with the quantity that key factor marks, then performing again will be between test value corresponding with each key factor The step of carrying out complete combination.It is appreciated that when the quantity of the item number and key factor label of input is inconsistent, then can carry Show mistake and prompting error checking guidance information, it is that key factor label is wrong that guiding user, which checks whether,.
In one embodiment, this method further includes:The separator inputted in multivalue separator field is obtained, according to separation The step of test cases of generation is exported to obtain test cases file by symbol.
In the present embodiment, multivalue separator field is provided in terminal interface, user can be in multivalue separator field Input is used for the separator for being separated different test cases in test cases file.It is appreciated that test cases output During into test cases file, need to distinguish the separation of each test cases by separator.
Terminal-pair should obtain the separator inputted in multivalue separator field, then according to separator by the test case of generation Example is separated mark processing output and obtains test cases file.
Traditional test cases generating means often can be only generated a kind of test cases file of fixed separator, and different Test system has restriction to the identification of separator, fixation separator generation in the conventional way test cases file Use circumscribed, it may be necessary to which separator meets the identification requirement of test system to manual modification one by one.And in the present embodiment, lead to Setting multivalue separator field is crossed, the separator inputted in multivalue separator field is obtained, test cases is exported and is surveyed Try case file.The test cases file of arbitrary separator format can be automatically generated, substantially increases generation test cases The flexibility of file and availability eliminate the operation of manual modification separator, save cost of labor and time cost.
In one embodiment, qualifications include the instruction of case-insensitive.In the present embodiment, according to qualifications The step of modifying to obtain the second test combination to the first test combination, including:According to the command detection of case-insensitive Whether have in first test combination there is only the test combination that capital and small letter is distinguished, if so, then from there is only the surveys that capital and small letter is distinguished Determine that retains a test combination in examination combination, in the test combination distinguished there is only capital and small letter in addition to test combination is retained Combination is non-reserved test combination, and non-reserved test combination is deleted from the first test combination, to obtain the second test combination The step of.
In the present embodiment, user can input the instruction of case-insensitive by terminal interface.Specifically, terminal interface In be provided with case sensitive button, user can close case sensitive button, and terminal obtains input in response to the operation Case-insensitive instruction.In addition it is also possible to be user qualifications input in field by input limit sentence come Input the instruction of case-insensitive.The specific implementation of instruction to obtaining case-insensitive does not limit.
Further, terminal can whether according to having in the test combination of the command detection first of case-insensitive there is only big The test combination that small letter is distinguished.When thering is the test distinguished there is only capital and small letter to combine in the first test combination, then from there is only big Determine that retains a test combination in the test combination that small letter is distinguished, wherein, it is removed in the test combination distinguished there is only capital and small letter It is non-reserved test combination to retain the combination other than test combination.
Further, terminal can delete non-reserved test combination from the first test combination, to obtain the second test combination.
In the present embodiment, when not having influence to test result whether the differentiation of capital and small letter, it can not be differentiated between by input Size write command reduces the quantity of test combination, so as to reduce the generation quantity of test cases, and then improves testing efficiency.
As shown in figure 4, providing a kind of test cases generating means 400 based on visualization interface, which includes obtaining Modulus block 402, first tests combination producing module 404, detection module 406, second tests combination producing module 408 and test Case generation module 410, wherein:
Acquisition module 402, for the Multiple factors for obtaining the factor field input in Excel plug-in units and in value The test value corresponding with each factor of field input.
First test combination producing module 404, for choosing the key factor with key factor label from factor, is closed Key factor will carry out complete combination to be multiple between test value corresponding with each key factor, pair with it is non-key in factor The corresponding test value of factor carries out random value, obtains the first test combination.
Acquisition module 402 is additionally operable to obtain the qualifications of input.
Detection module 406, for detecting whether the first test combination meets qualifications.
Second test combination producing module 408, for when the first test combination is unsatisfactory for qualifications, then according to restriction Condition modifies to obtain the second test combination to the first test combination.
Test cases generation module 410, for according to the second test combination producing test cases.
In one embodiment, qualifications include the essential combination specified;In the present embodiment, the second test combination producing Module 408 is additionally operable in detection the first test combination with the presence or absence of essential combination;When there is no essential group in the first test combination It closes, then adds upper essential combination, the second test combination is obtained according to essential combination and the first test combination.
In one embodiment, qualifications include the restriction to the value of non-key factor;In the present embodiment, second surveys Whether the value that examination combination producing module 408 is additionally operable to detect the non-key factor in each first test combination meets restriction item Part;The value for the non-key factor being unsatisfactory in the first test combination of qualifications is revised as the test for meeting qualifications Value obtains modified second test combination.
In one embodiment, acquisition module 402 is additionally operable to obtain the item number inputted in complete combination field.Such as Fig. 5 institutes Show, in the present embodiment, which further includes:
Comparing module 403, for the quantity of the item number and key factor label of comparison input, when item number and the key of input When the quantity of factor label is consistent, then reinforming the execution of the first test combination producing module 404 will be corresponding with each key factor Test value between carry out complete combination the step of.
In one embodiment, acquisition module 402 is additionally operable to obtain the separator inputted in multivalue separator field.Such as figure Shown in 6, which further includes:
Test cases output module 412, user export the test cases of generation according to separator to obtain test cases text Part.
In one embodiment, qualifications include the instruction of case-insensitive.In the present embodiment, the second test combination Generation module 408 is additionally operable to there is only capital and small letter areas according to whether having in the test combination of the command detection first of case-insensitive The test combination divided;When first test combination in have there is only size discrimination test combination when, then from there is only capital and small letter areas It determines that a reservation test is combined in the test combination divided, removes to retain in the test combination distinguished there is only capital and small letter and test combination Combination in addition is non-reserved test combination;Non-reserved test combination is deleted from the first test combination, to obtain the second survey Examination combination.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, which can be stored in a computer-readable storage and be situated between In matter, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, aforementioned storage medium can be The non-volatile memory mediums such as magnetic disc, CD, read-only memory (Read-Only Memory, ROM) or random storage note Recall body (Random Access Memory, RAM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, to make description succinct, not to above-mentioned reality It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, it is all considered to be the range of this specification record.
Embodiment described above only expresses the several embodiments of the present invention, and description is more specific and detailed, but simultaneously Cannot the restriction to patent of invention range therefore be interpreted as.It should be pointed out that those of ordinary skill in the art are come It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention Range.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (10)

1. a kind of test cases generation method based on visualization interface, the described method comprises the following steps:
Obtain in Excel plug-in units factor field input Multiple factors and value field input with it is each described The corresponding test value of factor;
The key factor with key factor label is chosen from the factor, the key factor, will be with each institute to be multiple It states and carries out complete combination between the corresponding test value of key factor, pair test value corresponding with the non-key factor in the factor Random value is carried out, obtains the first test combination;
Obtain the qualifications of input;
Detect whether the first test combination meets the qualifications;
When the described first test combination is unsatisfactory for the qualifications, then according to the qualifications to first test group Conjunction modifies to obtain the second test combination, according to the described second test combination producing test cases.
2. according to the method described in claim 1, it is characterized in that, the qualifications include the essential combination specified;
Described the step of modifying to obtain the second test combination to the described first test combination according to the qualifications, packet It includes:
It detects in the first test combination with the presence or absence of the essential combination;
When there is no the essential combination, the then upper essential combinations of addition, according to described essential in the described first test combination Combination and the described first test combination obtain the second test combination.
3. according to the method described in claim 1, it is characterized in that, the qualifications include taking the non-key factor The restriction of value;
Described the step of modifying to obtain the second test combination to the described first test combination according to the qualifications, packet It includes:
Whether the value for detecting the non-key factor in each first test combination meets the qualifications;
The value for the non-key factor being unsatisfactory in the first test combination of the qualifications is revised as meeting the restriction The test value of condition obtains modified second test combination.
4. according to the method described in claim 1, it is characterized in that, it is described will test corresponding with each key factor Before the step of complete combination is carried out between value, further include:
Obtain the item number inputted in complete combination field;
The quantity of the item number and key factor label of the input is compared, when item number and the key factor of the input When the quantity of label is consistent, then the step for complete combination being carried out between test value corresponding with each key factor is performed again Suddenly.
5. according to the method described in claim 1, it is characterized in that, the method further includes:
Obtain the separator inputted in multivalue separator field;
The test cases of generation is exported to obtain test cases file according to the separator.
6. according to the method described in claim 1, it is characterized in that, the qualifications include the instruction of case-insensitive;
Described the step of modifying to obtain the second test combination to the described first test combination according to the qualifications, packet It includes:
Whether have what is distinguished there is only capital and small letter in the first test combination according to the command detection of the case-insensitive Test combination;
When having in the described first test combination there is only during the test of size discrimination combination, then there is only capital and small letter differentiations from described Test combination in determine one retain test combination, it is described there is only capital and small letter distinguish test combination in except it is described retain survey Combination other than examination combination is non-reserved test combination;
The non-reserved test combination is deleted from the described first test combination, to obtain the second test combination.
7. a kind of test cases generating means based on visualization interface, which is characterized in that described device includes:
Acquisition module inputs for the Multiple factors for obtaining the factor field input in Excel plug-in units and in value field Test value corresponding with each factor;
First test combination producing module, it is described for choosing the key factor with key factor label from the factor Key factor will carry out complete combination to be multiple between test value corresponding with each key factor, pair with the factor In the corresponding test value of non-key factor carry out random value, obtain the first test combination;
The acquisition module is additionally operable to obtain the qualifications of input;
Detection module, for detecting whether the first test combination meets the qualifications;
Second test combination producing module, for when described first test combination be unsatisfactory for the qualifications when, then according to institute It states qualifications the described first test combination is modified to obtain the second test combination;
Test cases generation module, for according to the described second test combination producing test cases.
8. device according to claim 7, which is characterized in that the qualifications include the essential combination specified;It is described Second test combination producing module is additionally operable to detect in the first test combination with the presence or absence of the essential combination;When described There is no the essential combination in one test combination, then the upper essential combination is added, according to the essential combination and described the One test combination obtains the second test combination.
9. device according to claim 7, which is characterized in that the qualifications include taking the non-key factor The restriction of value;The second test combination producing module is additionally operable to detect the non-key factor in each first test combination Value whether meet the qualifications;By the non-key factor being unsatisfactory in the first test combination of the qualifications Value is revised as the test value for meeting the qualifications, obtains modified second test combination.
10. device according to claim 7, which is characterized in that the acquisition module is additionally operable to obtain on complete combination column The item number of position input;
Described device further includes:
Comparing module, for comparing the quantity of the item number of the input and key factor label, when the item number of the input When consistent with the quantity of key factor label, then reinform the first test combination producing module perform it is described will with it is each The step of complete combination being carried out between the corresponding test value of a key factor.
CN201710087565.1A 2017-02-17 2017-02-17 Test cases generation method and device based on visualization interface Pending CN108255698A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710087565.1A CN108255698A (en) 2017-02-17 2017-02-17 Test cases generation method and device based on visualization interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710087565.1A CN108255698A (en) 2017-02-17 2017-02-17 Test cases generation method and device based on visualization interface

Publications (1)

Publication Number Publication Date
CN108255698A true CN108255698A (en) 2018-07-06

Family

ID=62721893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710087565.1A Pending CN108255698A (en) 2017-02-17 2017-02-17 Test cases generation method and device based on visualization interface

Country Status (1)

Country Link
CN (1) CN108255698A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117369A (en) * 2018-08-01 2019-01-01 北京长城华冠汽车技术开发有限公司 Method for generating test case executes method and device
CN110888797A (en) * 2019-10-11 2020-03-17 平安信托有限责任公司 Test data generation method and device, computer equipment and storage medium
CN113360364A (en) * 2020-03-04 2021-09-07 腾讯科技(深圳)有限公司 Target object testing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251798A (en) * 2008-04-01 2008-08-27 中兴通讯股份有限公司 Test case generating method based on relationship
CN103049382A (en) * 2012-12-27 2013-04-17 中国建设银行股份有限公司 Method and device for generating test cases used for software module testing
CN103810094A (en) * 2012-11-14 2014-05-21 中国农业银行股份有限公司 Executing method and device for test case and test tool
CN104657274A (en) * 2015-03-06 2015-05-27 中国银行股份有限公司 Method and device for testing software interface
CN105022691A (en) * 2015-07-22 2015-11-04 国家电网公司 Highly automatic software testing method based on UML diagram

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251798A (en) * 2008-04-01 2008-08-27 中兴通讯股份有限公司 Test case generating method based on relationship
CN103810094A (en) * 2012-11-14 2014-05-21 中国农业银行股份有限公司 Executing method and device for test case and test tool
CN103049382A (en) * 2012-12-27 2013-04-17 中国建设银行股份有限公司 Method and device for generating test cases used for software module testing
CN104657274A (en) * 2015-03-06 2015-05-27 中国银行股份有限公司 Method and device for testing software interface
CN105022691A (en) * 2015-07-22 2015-11-04 国家电网公司 Highly automatic software testing method based on UML diagram

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117369A (en) * 2018-08-01 2019-01-01 北京长城华冠汽车技术开发有限公司 Method for generating test case executes method and device
CN109117369B (en) * 2018-08-01 2021-09-28 北京长城华冠汽车技术开发有限公司 Test case generation method, test case execution method and test case execution device
CN110888797A (en) * 2019-10-11 2020-03-17 平安信托有限责任公司 Test data generation method and device, computer equipment and storage medium
CN113360364A (en) * 2020-03-04 2021-09-07 腾讯科技(深圳)有限公司 Target object testing method and device
CN113360364B (en) * 2020-03-04 2024-04-19 腾讯科技(深圳)有限公司 Target object testing method and device

Similar Documents

Publication Publication Date Title
CN107330471B (en) Method and device for problem location of feedback content, computer equipment and storage medium
CN107783898A (en) The method of testing and test equipment of Mobile solution
CN110472082B (en) Data processing method, data processing device, storage medium and electronic equipment
CN111814885B (en) Method, system, device and medium for managing image frames
Yang et al. Don’t do that! hunting down visual design smells in complex uis against design guidelines
CN108255698A (en) Test cases generation method and device based on visualization interface
CN106201288A (en) Storage method, device and the mobile terminal of a kind of finger print information
CN112749547A (en) Generation of text classifier training data
Maguire et al. Visual compression of workflow visualizations with automated detection of macro motifs
CN108205685A (en) Video classification methods, visual classification device and electronic equipment
CN106599261A (en) Processing method for detection result data
CN107515716B (en) Billboard card management method, apparatus, computer equipment and storage medium
CN108874649A (en) Generation method, device and its computer equipment of automatic test script
CN112445693B (en) Page update detection method, device, equipment and storage medium
CN107729897A (en) A kind of text maninulation method, apparatus and terminal
CN104423800A (en) Electronic device and method of executing application thereof
CN104571871A (en) Method and system for selecting files
CN112948575A (en) Text data processing method, text data processing device and computer-readable storage medium
CN113821296B (en) Visual interface generation method, electronic equipment and storage medium
CN106681905A (en) Software testing device and software testing method thereof
CN109800147B (en) Test case generation method and terminal equipment
Yang et al. UIS-hunter: Detecting UI design smells in Android apps
CN108388513B (en) Automatic testing method and device
CN108845924A (en) Control response region display control method, electronic device and storage medium
JP5096850B2 (en) Search result display method, search result display program, and search result display 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180706

RJ01 Rejection of invention patent application after publication