CN100349135C - Test vector generation method - Google Patents

Test vector generation method Download PDF

Info

Publication number
CN100349135C
CN100349135C CNB2005100632426A CN200510063242A CN100349135C CN 100349135 C CN100349135 C CN 100349135C CN B2005100632426 A CNB2005100632426 A CN B2005100632426A CN 200510063242 A CN200510063242 A CN 200510063242A CN 100349135 C CN100349135 C CN 100349135C
Authority
CN
China
Prior art keywords
level value
input level
orthogonal arrage
value
parameter
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.)
Expired - Fee Related
Application number
CNB2005100632426A
Other languages
Chinese (zh)
Other versions
CN1845079A (en
Inventor
易敏
程智辉
王进成
肖东源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2005100632426A priority Critical patent/CN100349135C/en
Publication of CN1845079A publication Critical patent/CN1845079A/en
Application granted granted Critical
Publication of CN100349135C publication Critical patent/CN100349135C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention discloses a test vector generation method which comprises the following steps: an orthogonal table data base is built previously; according to test conditions to determine input level values and the number of corresponding input parameters; an orthogonal table congregation with the level values is selected, and the highest input level value is used as the initial current input level value; according to the current input level values, the appropriate orthogonal table is looked up in the orthogonal table congregation, and a corresponding orthogonal table subset is judged whether being looked up in the orthogonal table congregation; if the corresponding orthogonal table subset is looked up, the current input level value is judged whether is the minimal level value and the orthogonal table that the test times of the orthogonal table subset are the minimum is used as a result and is returned; or else, continuously searching in the result according to the secondary lower input level value; or else, processes are ended. According to the result, the orthogonal table can generate test vectors so as to carry out test. Under the condition that effects can be ensured, the present invention can reduce the number of the test vectors, and can reduce test time and cost.

Description

A kind of production method of test vector
Technical field
The present invention relates to field tests, particularly the production method of a kind of test vector in carrying out ASIC checking or software test.
Background technology
In the process of carrying out special-purpose tandem circuit (ASIC) checking or software test, need to consider the influence of various parameters.Between the different values of various parameters many combinations are arranged, each combination is called a test vector.Suppose to have 3 parameter A, B, C, each parameter has 3 kinds of value A1, A2, A3 respectively; B1, B2, B3; C1, C2, C3, their combination reaches the 33=27 kind so, and 27 test vectors are promptly arranged.If in the process of carrying out ASIC checking or software test, these 27 test vectors are all tested, can expend very big resource and time, the cost that test is used is very high.
In actual test process, it is very big to run into some parameter range through regular meeting, and for example the Bao Changcong 1 to 2050 of an Ethernet bag might occur, and that is to say that long this parameter of bag has 2050 kinds of values.If consider to have a plurality of parameters, their combination meeting is more so.If every kind of situation all will be tested, its testing cost will be huge unusually, and how kind producing a representative test vector in these combinations is unusual important techniques problem.
The prior art scheme adopts the mode that imposes restriction on basis at random to produce the data of some, the value that is about to each parameter is divided into several equivalence sections, in each equivalence section, use method at random to produce data, can also carry out proportional control to each equivalence section simultaneously.For example, the parameter of certain test is that the bag of above-mentioned Ethernet bag is long, and prior art is divided into 5 following equivalence sections according to the test needs with it:
1~63、64~200、201~1000、1001~1522、1523~2050
In each equivalence section, use method at random to produce data, and the ratio that requires to produce data in each equivalence section is 5: 20: 40: 20: 5, so just produce the data of corresponding proportion in each segmentation at random according to above-mentioned segmentation and proportion requirement, for example the data number that produces at random in each segmentation is respectively 10,40,80,40,10.Then, with the value formation test vector of these data that produce at random, carry out ASIC checking or software test according to test vector as parameter.When doing test can not reach target, the data number that increases generation at random is to reach target, still with above-mentioned Ethernet Bao Changwei example, if producing 10,40,80,40,10 data in each segmentation respectively at random tests and can not reach target, increase so produce data at random number to reach target, for example in each segmentation, produce 5,20,40,20,10 data respectively again.
When a plurality of parameter combinations were arranged, the equivalence section that this method is carried out as above each parameter was divided and the generation random data, and the random data with each parameter carries out the combination results test vector then, carries out ASIC checking or software test according to test vector.
From technique scheme as can be seen, prior art is passed through at random, and means produce test vector, can not be effectively produce test vector at test target, though can be to retraining at random, what still usually occur test vector in practice does not cover desired result at random.
And existing method does not have certain rule and theoretical foundation when the definition test target, combination to multiple parameter, because combined situation is very huge, can not test each combination, but which prior art should occur to which combination should not occur, can not provide reasonable target, also not provide the rationale of production method.And prior art can only retrain single parameter, the constraint of each parameter is uncorrelated, and in fact most situations all be a plurality of parameters constituted a system mutually, prior art can only be by the abundant coverage rate target that reaches at random, along with increasing of test vector, test duration and cost are also just high more.
Summary of the invention
In view of this, the present invention proposes a kind of production method of test vector,, reduce the number of test vector, reduce the time and the cost of test in order to reasonably to produce test vector.
According to above-mentioned purpose, the invention provides a kind of production method of test vector, this method may further comprise the steps:
A. set up the orthogonal arrage database of being made up of the orthogonal arrage of representing different parameters value combination in advance, described orthogonal arrage comprises the corresponding relation that each parameter value makes up in the level value of expression parameter value kind number and the pairing number of parameters of each level value and the each test;
B. according to the value kind number and number of parameters of each parameter in the test condition with identical value kind number, determine to be tested in each input level value and the input parameter number corresponding with each input level value;
C. the orthogonal arrage set of selecting the orthogonal arrage of level value kind and input level value kind quasi-equal in the orthogonal arrage database to form; Determine that the highest input level value and the input parameter number corresponding with this highest input level value are current input level value and current input parameter number;
D. in described orthogonal arrage set, search suitable orthogonal arrage according to current input level value and current input parameter number, judge whether in orthogonal arrage set, to find that level value equates with current input level value, number of parameters is more than or equal to the orthogonal arrage subclass of current input parameter number, if then
Judge whether current input level value is the floor level value, if then will test the orthogonal arrage of least number of times in the above-mentioned orthogonal arrage subclass as described suitable orthogonal arrage, execution in step E; Otherwise described orthogonal arrage subclass is gathered as new orthogonal arrage, determine that than current input level value time low input level value be that new current input level value, the input parameter number corresponding with new present level value are new current input parameter number, return step D;
Otherwise process ends;
E. according to the parameter value combination results test vector of described suitable orthogonal arrage representative, test.
Described step B further comprises: when input level value kind is a plurality of, choosing arbitrarily, the input level value merges, and with input level value maximum in the selected input level value as the input level value after merging, with each selected input level value corresponding parameters number addition as the number of parameters after merging.
Described step B further comprises: in existing greater than the orthogonal arrage database input level value of maximum horizontal value the time, described input level value is divided into smaller or equal to a described maximum horizontal value number equivalence section, and the number of described equivalence section is replaced described input level value as new input level value; Step according to the parameter value combination results test vector of described suitable orthogonal arrage representative described in the step e further comprises: in each described equivalence section, select at random parameter value as the concrete value of this equivalence section in order to produce test vector.
Before the step of process ends described in the step D, further comprise and judge that current input level value is whether smaller or equal to the step of level value maximum in the described orthogonal arrage database, if then current input level value is added 1 back, otherwise process ends as new current input level value execution in step D.
Step according to the parameter value combination results test vector of described suitable orthogonal arrage representative described in the step e further comprises: if the level value in the described suitable orthogonal arrage greater than the input level value, the parameter value of unnecessary kind replaces with the parameter value of existing kind in the orthogonal arrage.
Further, the parameter value of unnecessary kind replaces with the parameter value of existing kind in turn in the orthogonal arrage.
Step according to the parameter value combination results test vector of described suitable orthogonal arrage representative described in the step e further comprises: if the number of parameters in the described suitable orthogonal arrage greater than corresponding input parameter number, in described orthogonal arrage, choose with the same number of parameter of described input parameter in order to produce test vector.
Preferably, this method further is included in the step of adding orthogonal arrage in the described orthogonal arrage database.
As can be seen, the present invention adopts orthogonal matrix (orthogonal array, OA) algorithm from such scheme, provide the theoretical foundation of science for choosing test vector, under the situation that guarantees the test effect, significantly reduced the number of test vector, reduced test duration and cost.And the present invention adopts the rise algorithm and the algorithm that gathers according to test condition, in the orthogonal arrage database of setting up in advance, search suitable orthogonal arrage, make the orthogonal matrix theory of algorithm in engineering, to use easily, reduced the difficulty of setting up orthogonal arrage, further reduced testing cost.
Description of drawings
Fig. 1 is the quadrature synoptic diagram of three parameters, three level values;
Fig. 2 a and Fig. 2 b are according to schematic flow sheet of the present invention;
Fig. 3 is the schematic flow sheet of searching of single type orthogonal arrage;
Fig. 4 a and Fig. 4 b are for mixing the schematic flow sheet of searching of 2 type orthogonal arrages;
Fig. 5 a, Fig. 5 b and Fig. 5 c are for mixing the schematic flow sheet of searching of 3 type orthogonal arrages.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in more detail by the following examples.
By practice and theoretical analysis, the multiple value of multiple parameter makes up, all combined situation are tested there is no need, pass through mathematical derivation, there is such subclass in complete or collected works to all combinations, the effect same that the combination of adopting the combination of this subclass to reach to adopt complete or collected works can reach, the algorithm that obtains this subclass is exactly orthogonal matrix (orthogonal array, OA) algorithm.The uniform sampling in the factors vary scope of orthogonal matrix algorithm makes each test have stronger representativeness.
The orthogonal matrix algorithm utilizes " orthogonal arrage " scientifically to arrange and analyze multifactorial experiment.Orthogonal arrage is a kind of special form, is the basic tool of orthogonal matrix algorithm, and it uses mark L N(q s) expression, wherein L is the code name of orthogonal arrage, and N is the line number of orthogonal arrage, and the test number (TN) that expression need be done, q are the level value of each parameter, and promptly parameter has the how many kinds of value, and s is the columns of orthogonal arrage, expression number of parameters, q sIt is s that expression has the number of parameters of q kind value.
With three parameters and each parameter three kinds of values being arranged below is example explanation orthogonal matrix algorithm.If three parameters are A, B, C, three kinds of values of each parameter are respectively A1, A2, A3; B1, B2, B3; C1, C2, C3, Figure 1 shows that their quadrature synoptic diagram, each round dot is represented a kind of combination of parameter A, B, C among the figure, totally 27, wherein 9 black circles are represented input parameter A, the B that is obtained by the orthogonal matrix algorithm, a kind of value of C respectively, one group of value like this is called single test again, is exactly a test vector.As can be seen from the figure these 9 solid dot distributions on any one plane are uniform, such value can guarantee to use orthogonal test can find the problem that the various value traversals of single parameter can be found, the problem that any two value combinations of any two kinds of parameters can cause can be found, multimodal fault also can be found.The test that so original needs are 27 times is made up, and draws by the orthogonal matrix algorithm and can use 9 kinds of combinations to replace, and has significantly reduced the number of test vector, has reduced test duration and cost.
Top example is expressed as L with orthogonal arrage 9(3 3), the expression level value is that 3 number of parameters is 3, needs 9 tests altogether.Table 1 is this orthogonal arrage:
L 9(3 3) A B C
1 A1 B1 C1
2 A1 B2 C2
3 A1 B3 C3
4 A2 B1 C2
5 A2 B2 C3
6 A2 B3 C1
7 A3 B1 C3
8 A3 B2 C1
9 A3 B3 C2
Table 1 orthogonal arrage L 9(3 3)
Except the title ranks, have 9 row, 3 row in the table 1, test vector value of each line display, i.e. each parameter value combination in the single test, 9 line displays need be done 9 tests, and a parameter is shown in each tabulation, and 3 tabulations are shown with 3 parameters.
The value number of all parameters is all the same in the above-described orthogonal arrage, promptly has only a kind of level value, and this orthogonal arrage is called " single type " orthogonal arrage.The situation that also has multiple level value in addition for example has " mixing 2 types " orthogonal arrage of two kinds of level values and has " mixing 3 types " orthogonal arrages of three kinds of level values.The method for expressing of the orthogonal arrage that " mixes 2 types " is L N(q1 S1* q2 S2), L for example 12(4 1* 2 9), the expression level value is that 1 number of parameters is 4, level value is that 2 number of parameters is 9, need do 12 tests.The method for expressing of the orthogonal arrage that " mixes 3 types " is L N(q1 S1* q2 S2* q3 S3), L for example 72(4 1* 3 24* 2 20), the expression level value is that 4 number of parameters is 1, level value is that 3 number of parameters is 24, level value is that 2 number of parameters is 20, need do 72 tests.The rest may be inferred for the orthogonal arrage of other multilevel value.
Table 2 is " mixing 2 types " orthogonal arrage L 12(4 1* 2 9), wherein parameter 1 has 4 kinds of values, distinguishes with 0,1,2,3 and represents that parameter 2 to parameter 10 has two kinds of values respectively, distinguishes expression with 0,1 respectively.This orthogonal arrage represents to do 12 tests, and the value condition of each parameter is listed in the table 2 in each test.
L 12(4 1×2 9) Parameter 1 Parameter 2 Parameter 3 Parameter 4 Parameter 5 Parameter 6 Parameter 7 Parameter 8 Parameter 9 Parameter 10
1 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 1 1 1 1 1 1
3 0 1 1 1 0 0 0 1 1 1
4 1 0 1 1 0 1 1 0 0 1
5 1 1 0 1 1 0 1 0 1 0
6 1 1 1 0 1 1 0 1 0 0
7 2 1 1 0 0 1 1 0 1 0
8 2 1 0 1 1 1 0 0 0 1
9 2 0 1 1 1 0 1 1 0 0
10 3 1 0 0 0 0 1 1 0 1
11 3 0 1 0 1 0 0 0 1 1
12 3 0 0 1 0 1 0 1 1 0
Table 2 orthogonal arrage L 12(4 1* 2 9)
The present invention is exactly as the theoretical foundation that produces test vector, a kind of method of proposition with the orthogonal matrix algorithm in the mathematics.With reference to figure 2a and Fig. 2 b, flow process of the present invention is as follows:
Step 210 according to the actual needs of test, is set up the orthogonal arrage database in advance.
Set up " single type ", " mixing 2 types ", " mixing 3 types " orthogonal arrage of three types in the present embodiment.And convenient when being described below search procedure, present embodiment is the upper limit of level value in every kind of orthogonal arrage with 7, and promptly level value is 7 to the maximum in the orthogonal arrage of Jian Liing.
Single orthogonal arrage has three basic parameters: number of parameters, level value and test number (TN).Here be index with level value and number of parameters, set up the corresponding relation of different level values, number of parameters and respective orthogonal table.For the convenience of searching below, present embodiment further is divided into the orthogonal arrage database three set: only contain " single type " orthogonal arrage the single type concordance list, only contain " mixing 2 types " orthogonal arrage mixing 2 type concordance lists, only contain the mixing 3 type concordance lists of " mixing 3 types " orthogonal arrage.
The orthogonal arrage database that the present invention set up can change, and promptly according to the needs in the actual use, can increase orthogonal arrage.
Step 220 is determined each the input level value used and the input parameter number corresponding with each level value according to the number of parameters in the test condition and level value when searching, search suitable orthogonal arrage in the orthogonal arrage database that step 210 is set up.
Different number of parameters and different level values, need derive corresponding orthogonal arrage according to mathematical method in advance because different orthogonal arrages does not have unified algorithm to different orthogonal arrages should be arranged, and in use search corresponding orthogonal arrage then as required.But can not calculate in advance the orthogonal arrage that might occur, and the orthogonal arrage number that deposits in advance is limited, so when searching orthogonal arrage according to level value and number of parameters, may search less than level value and the on all four orthogonal arrage of number of parameters, the present invention has further proposed " matching algorithm ", searches suitable orthogonal arrage in the orthogonal arrage database.So-called suitable orthogonal arrage is meant that level value equates, number of parameters is more than or equal to input parameter number and the minimum orthogonal arrage of test number (TN).
, shown in Fig. 2 b, may further comprise the steps in the detailed process of searching in the orthogonal arrage database:
Step 221, in the orthogonal arrage database, select the identical orthogonal arrage set of level value kind as the scope of initially searching according to the kind of input level value, for example have only an input level value just in " single type " concordance list, to search, have two input level values just in " mixing 2 types " concordance list, to search.
With the highest input level value in the input level value and corresponding input parameter number thereof as initial search criterion.If have only an input level value, so this level value be the highest input level value also be minimum input level value; If two or more input level values are arranged, wherein Zui Da input level value is exactly the highest input level value.
Step 222 according to current input level value and current input parameter number, is searched suitable orthogonal arrage in determined orthogonal arrage set.
Step 223, judge whether in orthogonal arrage set, to find level value and equal current input level value, number of parameters orthogonal arrage subclass more than or equal to current input parameter number, if then execution in step 224 and subsequent step thereof, otherwise execution in step 227 and subsequent step thereof.
Step 224 judges to step 225 whether current input level value is minimum input level value, if then the orthogonal arrage of testing least number of times in the described orthogonal arrage subclass of step 223 is as a result of returned, otherwise execution in step 226.
Step 226, in than the little input level value of current input level value, choose wherein maximum input level value as new current input level value, promptly with in all input level values than time low input level value of current input level value as new current input level value, and with the input parameter number corresponding with new current input level value as new current input parameter number.The described orthogonal arrage subclass of step 223 is gathered as new orthogonal arrage, promptly new seek scope, execution in step 222 then.
Whether step 227 judges current input level value less than 7 to step 228, if after then the present level value being added 1, execution in step 222 continues to search.Otherwise process ends.Also can not judge whether direct process ends of current input level value less than 7.
Below respectively with search " single type ", " mixing 2 types ", " mixing 3 types " orthogonal arrage is an example, description of step 221 is to the search procedure of step 228.
As shown in Figure 3, searching mainly in the single type concordance list may further comprise the steps:
Step 301 is to step 302, search in the single type concordance list according to input level value and input parameter number, if found that level value equates and number of parameters more than or equal to the orthogonal arrage of input parameter number, then that test number (TN) is minimum orthogonal arrage as a result of returns, otherwise execution in step 303.
Step 303 is to step 304, whether judges the level value that will search smaller or equal to 7, if, then this input level value is added 1 after, execution in step 301 continues to search; Otherwise process ends.Here level value is added 1 method and be called " rising " algorithm.
The orthogonal arrage L that " mixes 2 types " N(q1 S1* q2 S2) contain two level values and number of parameters, be without loss of generality and can suppose q1 greater than q2, promptly q1 is that high input level value, q2 are low input level value, shown in Fig. 4 a and Fig. 4 b, searching mainly in mixing 2 type concordance lists may further comprise the steps:
Step 401 is to step 402, search in mixing 2 type concordance lists according to high input level value and input parameter number, if found that high-level value equates and the relevant parameter number more than or equal to the orthogonal arrage of input parameter number, then preserve the result that all satisfy condition, the step 411 of execution shown in Fig. 4 b is to step 414, otherwise execution in step 403.
Whether step 403 judges high input level value smaller or equal to 7 to step 404, if then high input level value is carried out " rising " algorithm, after soon the high level value added 1, execution in step 401 continued to search; Otherwise process ends.
Step 411 shown in Fig. 4 b is to step 412, according to searching in low input level value and the superincumbent Search Results of input parameter number, if found that low value equates and number of parameters more than or equal to the orthogonal arrage of input parameter number, then that test number (TN) is minimum orthogonal arrage as a result of returns, otherwise execution in step 413.
Whether step 413 judges low input level value smaller or equal to 7 to step 414, if then low input level value is carried out " rising " algorithm, after soon low value added 1, execution in step 411 continued to search; Otherwise process ends.
The orthogonal arrage L that " mixes 3 types " N(q1 S1* q2 S2* q3 S3) contain three level values and number of parameters, be without loss of generality can suppose q1 greater than q2 and q2 greater than q3, be that q1 is that high input level value, q2 are that middle input level value, q3 are low input level value, the suitable orthogonal arrage of searching in mixing 3 type concordance lists mainly may further comprise the steps:
Step 501 is to step 502, search in mixing 3 type concordance lists according to high input level value and number of parameters, if found that high-level value equates and the relevant parameter number more than or equal to the orthogonal arrage of input parameter number, then preserve the result who is found, the flow process of execution shown in Fig. 5 b, otherwise execution in step 503.
Whether step 503 judges high input level value smaller or equal to 7 to step 504, if then high input level value is carried out " rising " algorithm, is about to high input level value and adds 1, and execution in step 501 continues to search then; Otherwise process ends.
Step 511 shown in Fig. 5 b is to step 512, according to searching in middle input level value and the superincumbent Search Results of input parameter number, if found that middle level value equates and number of parameters more than or equal to the orthogonal arrage of input parameter number, then preserve the result that all satisfy condition, the step of execution shown in Fig. 5 c, otherwise execution in step 513.
Step 513 is to step 514, and whether the input level value is smaller or equal to 7 in the judgement, if then centering input level value is carried out " rising " algorithm, the input level value adds 1 in being about to, and execution in step 511 continues to search then; Otherwise process ends.
Step 521 shown in Fig. 5 c is to step 522, according to searching in low input level value and the superincumbent Search Results of input parameter number, if found that low value equates and number of parameters more than or equal to the orthogonal arrage of input parameter number, then that test number (TN) is minimum orthogonal arrage as a result of returns, otherwise execution in step 523.
Whether step 523 judges low input level value smaller or equal to 7 to step 524, if then low input level value is carried out " rising " algorithm, is about to low input level value and adds 1, and execution in step 521 continues to search then; Otherwise process ends.
Introduced above and how directly in the orthogonal arrage database, to have searched the orthogonal arrage mutually suitable with test condition with searching with " rising " algorithm.When searching, can also further use " gathering " algorithm of introducing below according to top method.
Can also search in conjunction with " gathering " algorithm for " mixing 2 types " orthogonal arrage, process is as follows:
At first adopt step 401 to the method for step 414 in mixing 2 type concordance lists, to search, if find suitable orthogonal arrage then return results, otherwise will hang down the input level value and gather high input level value, form a new input level value, and with original two number of parameters additions as new input parameter number, be about to L N(q1 S1* q2 S2) become L N1(q1 S1+s2), search in the single type concordance list according to step 221 to the method for step 226 then.
For the initial conditions that mixes 3 types, adopt the search procedure of " gathering " algorithm as follows:
At first adopt step 501 to the method for step 524 in mixing 3 type concordance lists, to search,, otherwise three input level value two two-phases are gathered, be about to L if find suitable orthogonal arrage then return results N(q1 S1* q2 S2* q3 S3) change into following three kinds of situations: high input level value is gathered mutually with middle input level value and is formed L N1(q1 S1+s2* q3 S3), middle input level value and low input level value gather mutually and form L N2(q1 S1* q2 S2+s3), high input level value and low input level value gather mutually and form L N3(q1 S1+s3* q2 S2).Search in mixing 2 type concordance lists according to step 401 to the method for step 414 respectively according to these three new input level values and number of parameters then, if find suitable orthogonal arrage, then as a result of return with the minimum orthogonal arrage of number of trials, if in mixing 2 type concordance lists, do not find suitable orthogonal arrage, then three input level values are gathered together, be about to L N(q1 S1* q2 S2* q3 S3) change into L N(q1 S1+s2+s3).Be that q1 and input parameter number are that the condition of s1+s2+s3 is searched in the single type concordance list according to step 301 to the method for step 304 according to new input level value again.
In a nearlyer step,, search condition can be expanded to the more situations of level value such as mixing 4 types, mixing 5 types, mixing 6 types according to gathering algorithm.For example, for the condition of mixing 4 types, wherein any two input level values are gathered mutually and are formed mixing 3 types respectively, are total to C 4 2 = 6 The situation of kind is then according to mixing handling of 3 types; For the condition of mixing 5 types, wherein any three input level values are gathered mutually to form and are mixed 3 types, altogether C 5 3 = 10 The situation of kind is then according to mixing handling of 3 types; For the condition of mixing 6 types, wherein any four input level values are gathered mutually to form and are mixed 3 types, altogether C 6 4 = 15 The situation of kind is then according to mixing handling of 3 types.
For certain input level value is the very large situation of parameter value scope, for example the long value of the bag of Ethernet bag can be 1~2050, reach 2050 kinds of situations, the present invention is divided into several equivalence sections with it, the number of equivalence section is less than the level value 7 that equals maximum in the orthogonal arrage database, for example be divided into 5 equivalence section: a1 (1~63), a2 (64~200), a3 (201~1000), a4 (1001~1522), a5 (1523~2050), with a kind of value of each equivalence section as this parameter, be that Ethernet bag length has 5 kinds of value a1, a2, a3, a4, a5 is 5 to search in the orthogonal arrage database according to the long input level value of Ethernet bag then.When choosing certain equivalence section according to the orthogonal arrage that searches, in this equivalence section, choose the part of a concrete value again as test vector according to mode at random, for example a4 is chosen in certain test in the orthogonal arrage, produces the occurrence of a number as a4 in 1001~1522 at random.
Step 230, after finding suitable orthogonal arrage, also need " to gather " situation of algorithm according to " the rising " of adopting in the search procedure, which combination needs in the orthogonal arrage of determining to be found, which combination because of " rising " " gather " algorithm produce, actual unwanted, last combination results test vector is as required tested.
For example for the initial conditions 4 of 1 parameter, 4 level values and 7 parameters, 2 level values 1* 2 7Search according to step 401 to the method for step 414, find some orthogonal arrages that satisfy high level value 4 and number of parameters 1 in step 402, execution in step 411 is searched according to low value 2 and number of parameters 7 in these results then, is met the orthogonal arrage L of condition at last 12(4 1* 2 9), this orthogonal arrage concrete condition is as shown in table 2.Because the orthogonal arrage L that finds 12(4 1* 2 9) and initial conditions 4 1* 2 7Different, additional parameter 9, parameter 10 these two parameters are unwanted, when producing test vector, only need in orthogonal arrage, choose the columns that equates with the input parameter number and produce test vector, for example select the combination results test vector that parameter 1~parameter 8 is formed in the orthogonal arrage, these test vectors are as shown in table 3.
The concrete value of a test vector of each line display in the table 3, and each test vector only contains parameter 1~parameter 8.
L 12(4 1×2 9) Parameter 1 Parameter 2 Parameter 3 Parameter 4 Parameter 5 Parameter 6 Parameter 7 Parameter 8 Parameter 9 Parameter 10
1 0 0 0 0 0 0 0 0
2 0 0 0 0 1 1 1 1
3 0 1 1 1 0 0 0 1
4 1 0 1 1 0 1 1 0
5 1 1 0 1 1 0 1 0
6 1 1 1 0 1 1 0 1
7 2 1 1 0 0 1 1 0
8 2 1 0 1 1 1 0 0
9 2 0 1 1 1 0 1 1
10 3 1 0 0 0 0 1 1
11 3 0 1 0 1 0 0 0
12 3 0 0 1 0 1 0 1
Table 3 initial conditions 4 1* 2 7Test vector
L 9(3 3) A B C
1 A1 B1 C1
2 A1 B2 C2
3 A1 B3 C3
4 A2 B1 C2
5 A2 B2 C3
6 A2 B3 C1
7 A1(A3) B1 C3
8 A2(A3) B2 C1
9 A1(A3) B3 C2
Table 4 is according to initial conditions L N '(3 1* 3 2) check in orthogonal arrage L 9(3 3) test vector that produced is for because the unnecessary value condition that " rising " algorithm or " gathering " algorithm produce, and can also adopt in existing value value to replace the method solution of unnecessary value.For example initial conditions is L N(2 1* 3 2) situation, wherein parameter A has two kinds of value A1, A2, supposes in search procedure to use " rising " algorithm to make initial conditions become L N '(3 1* 3 2) be L N '(3 3), search the result who obtains so and be orthogonal arrage L 9(3 3), as shown in table 1, orthogonal arrage L 9(3 3) in parameter A three kinds of value A1, A2, A3 are arranged, wherein A3 be actual conditions do not have, since in searching " rising " algorithm produce.For the A3 in the table 1, use value A1, A2 to replace in turn, form result as shown in table 4.
Note the last triplex row in the table 4, original orthogonal arrage L 9(3 3) that get is A3, reality is respectively A1, A2, A1 in conjunction with the initial conditions value.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1, a kind of production method of test vector is characterized in that, this method may further comprise the steps:
A. set up the orthogonal arrage database of being made up of the orthogonal arrage of representing different parameters value combination in advance, described orthogonal arrage comprises the corresponding relation that each parameter value makes up in the level value of expression parameter value kind number and the pairing number of parameters of each level value and the each test;
B. according to the value kind number and number of parameters of each parameter in the test condition with identical value kind number, determine to be tested in each input level value and the input parameter number corresponding with each input level value;
C. the orthogonal arrage set of selecting the orthogonal arrage of level value kind and input level value kind quasi-equal in the orthogonal arrage database to form; Determine that the highest input level value and the input parameter number corresponding with this highest input level value are current input level value and current input parameter number;
D. in described orthogonal arrage set, search suitable orthogonal arrage according to current input level value and current input parameter number, judge whether in orthogonal arrage set, to find that level value equates with current input level value, number of parameters is more than or equal to the orthogonal arrage subclass of current input parameter number, if then
Judge whether current input level value is the floor level value, if then will test the orthogonal arrage of least number of times in the above-mentioned orthogonal arrage subclass as described suitable orthogonal arrage, execution in step E; Otherwise described orthogonal arrage subclass is gathered as new orthogonal arrage, determine that than current input level value time low input level value be that new current input level value, the input parameter number corresponding with new present level value are new current input parameter number, return step D;
Otherwise process ends;
E. according to the parameter value combination results test vector of described suitable orthogonal arrage representative, test.
2, method according to claim 1 is characterized in that, described step B further comprises:
When input level value kind is a plurality of, choosing arbitrarily, the input level value merges, and with input level value maximum in the selected input level value as the input level value after merging, with each selected input level value corresponding parameters number addition as the number of parameters after merging.
3, method according to claim 1 is characterized in that, described step B further comprises:
In existing the input level value of maximum horizontal value the time greater than the orthogonal arrage database, described input level value is divided into smaller or equal to a described maximum horizontal value number equivalence section, and the number of described equivalence section is replaced described input level value as new input level value;
Step according to the parameter value combination results test vector of described suitable orthogonal arrage representative described in the step e further comprises: in each described equivalence section, select at random parameter value as the concrete value of this equivalence section in order to produce test vector.
4, method according to claim 1, it is characterized in that, before the step of process ends described in the step D, further comprise and judge that current input level value is whether smaller or equal to the step of level value maximum in the described orthogonal arrage database, if then current input level value is added 1 back, otherwise process ends as new current input level value execution in step D.
5, method according to claim 1 is characterized in that, the step according to the parameter value combination results test vector of described suitable orthogonal arrage representative described in the step e further comprises:
If the level value in the described suitable orthogonal arrage is greater than the input level value, the parameter value of unnecessary kind replaces with the parameter value of existing kind in the orthogonal arrage.
6, method according to claim 5 is characterized in that, the parameter value of unnecessary kind replaces with the parameter value of existing kind in turn in the orthogonal arrage.
7, method according to claim 1 is characterized in that, the step according to the parameter value combination results test vector of described suitable orthogonal arrage representative described in the step e further comprises:
If the number of parameters in the described suitable orthogonal arrage greater than corresponding input parameter number, in described orthogonal arrage, choose with the same number of parameter of described input parameter in order to produce test vector.
8, method according to claim 1 is characterized in that, this method further is included in the step of adding orthogonal arrage in the described orthogonal arrage database.
CNB2005100632426A 2005-04-07 2005-04-07 Test vector generation method Expired - Fee Related CN100349135C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100632426A CN100349135C (en) 2005-04-07 2005-04-07 Test vector generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100632426A CN100349135C (en) 2005-04-07 2005-04-07 Test vector generation method

Publications (2)

Publication Number Publication Date
CN1845079A CN1845079A (en) 2006-10-11
CN100349135C true CN100349135C (en) 2007-11-14

Family

ID=37064007

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100632426A Expired - Fee Related CN100349135C (en) 2005-04-07 2005-04-07 Test vector generation method

Country Status (1)

Country Link
CN (1) CN100349135C (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101487876B (en) * 2009-02-23 2011-08-03 中国科学院计算技术研究所 Optimization method and apparatus for verification vectors
CN103176893B (en) * 2011-12-21 2016-06-29 北大医疗信息技术有限公司 Orthogonal table expanding unit, software testing system and orthogonal table extended method
CN103853652B (en) * 2012-11-29 2019-02-12 百度在线网络技术(北京)有限公司 A kind of test cases generation method and device
CN106339310A (en) * 2015-07-14 2017-01-18 北京国双科技有限公司 Method and device for generating test webpage
CN106791824B (en) * 2016-11-29 2019-05-31 深圳Tcl数字技术有限公司 Select test screen method and device
CN109753714B (en) * 2018-12-28 2023-03-21 中国人民解放军国防科技大学 Knowledge base-based test vector generation method and system for covering data path boundary condition
CN109947646A (en) * 2019-03-13 2019-06-28 平安信托有限责任公司 Interface test method, device, computer equipment and storage medium
CN112445710B (en) * 2020-12-02 2022-08-09 深圳平安医疗健康科技服务有限公司 Test method, test device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5159600A (en) * 1990-01-02 1992-10-27 At&T Bell Laboratories Arrangement for generating an optimal set of verification test cases
JP2004133659A (en) * 2002-10-10 2004-04-30 Toshiba Corp Optimal design support apparatus and optimal design support method, and program therefor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5159600A (en) * 1990-01-02 1992-10-27 At&T Bell Laboratories Arrangement for generating an optimal set of verification test cases
JP2004133659A (en) * 2002-10-10 2004-04-30 Toshiba Corp Optimal design support apparatus and optimal design support method, and program therefor

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Orthogonal Latin Squares: An Application of ExperimentDesign to Compiler Testing. Robert Mandl.Communications of the ACM,Vol.28 No.10. 1985 *
正交试验设计方法在测试用例设计中的应用 于秀山.计算机工程与应用,第20期 2004 *

Also Published As

Publication number Publication date
CN1845079A (en) 2006-10-11

Similar Documents

Publication Publication Date Title
CN100349135C (en) Test vector generation method
Xu et al. Link prediction with signed latent factors in signed social networks
CN104537010A (en) Component classifying method based on net establishing software of decision tree
CN107632590B (en) A kind of bottom event sort method priority-based
CN103336790A (en) Hadoop-based fast neighborhood rough set attribute reduction method
CN107368648A (en) It is a kind of towards municipal water supply ductwork pressure monitoring point optimization method for arranging
Wu et al. A parallel algorithm for enumerating all the maximal k-plexes
CN105426499A (en) Implementation method of data visualization
CN104933624A (en) Community discovery method of complex network and important node discovery method of community
CN105183796A (en) Distributed link prediction method based on clustering
CN101645012A (en) Combinational selection method of foundational software platform integrated test
CN108053454A (en) A kind of graph structure data creation method that confrontation network is generated based on depth convolution
CN104462374A (en) Generalized maximum degree random walk graph sampling algorithm
CN110019622A (en) A kind of real time mass map point polymerization and device
CN107870934B (en) App user clustering method and device
CN103647673A (en) Method and device for QoS (quality of service) prediction of Web service
CN109033322A (en) A kind of test method and device of multidimensional data
CN112559316A (en) Software testing method and device, computer storage medium and server
CN112541584A (en) Deep neural network model parallel mode selection method
Cappello et al. covatest: an R package for selecting a class of space-time covariance functions
CN103426039B (en) A kind of method that location selecting model of mountain photovoltaic power station is set up
CN106508027B (en) Deployment diagram point army mark automatic avoiding method based on genetic algorithm
CN109635473A (en) A kind of heuristic high-throughput material simulation calculation optimization method
Chou et al. Finding Maximal Quasi-cliques Containing a Target Vertex in a Graph.
De Loof Efficient computation of rank probabilities in posets

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20071114

Termination date: 20160407