当前位置:网站首页>Method of designing test cases

Method of designing test cases

2022-07-28 06:54:00 Xiao Qiao

Catalog

One 、 Design test cases according to requirements

Two 、 Specific methods of designing test cases

1. Equivalence class

2. The boundary value

3. Cause and effect diagram

4. Orthogonal method

5. Scene method

6. Wrong guess

3、 ... and 、 How to evaluate the quality of test cases


One 、 Design test cases according to requirements

Verify the correctness of the requirements .

Analyze requirements , Refine requirements , Extract functional modules from requirements , Divide sub functions , Write test cases according to sub functions .

Two 、 Specific methods of designing test cases

1. Equivalence class

Put the input ( Output is considered only in special cases ) It is divided into several equivalent classes , Select a representative test case from each equivalent class to test , If this test case passes the test , Let's say that the equivalence class represented by this test case passes .

Effective equivalence class : According to the requirement specification , Meaningful input data set , Become a valid equivalence class ;

Invalid equivalence class : Not meeting the requirements ;

In order to solve the problem of too many test cases , Enter situations that cannot be exhausted .

2. The boundary value

Design test cases according to the boundary of input and output .

3. Cause and effect diagram

Cause and effect diagram is a kind of logic diagram ( Identity 、 And 、 or 、 Not ), When there are many inputs , Different combinations of inputs correspond to different outputs , Use cause and effect diagram to analyze the relationship between different input combinations and different outputs .

The steps of designing test cases by causality diagram :

① Analyze all inputs and outputs ;

② Find out the relationship between input and output ;

③ Draw a cause and effect diagram according to the relationship between input and output ;

④ According to the causal picture judgment table ;

⑤ Design test cases according to the decision table .

Cause and effect diagram example :

4. Orthogonal method

An experiment that studies multiple factors and levels ( test ) Method , According to orthogonality , Select the best combination from the input combination for test , The results of the analysis , Analyze the results of this test through the test results obtained from these optimal combinations .

factors : Input variables ;

level : Value of variable ;

Composition of orthogonal table :

① Column : Factor number ( Number of variables )

② Horizontal number : The maximum number of values of each variable

③ That's ok :L=( Horizontal number -1)* Factor number +1

Properties of orthogonal table :

① The number of different data in each column is the same

② The combination of any two columns of different data occurs the same number of times

Orthogonal table design test case steps :

① Identify all inputs ( Variable );

② Determine the number of values of each variable ;

③ Number of determining factors ( Columns of orthogonal table ), Horizontal number ;

④ According to the properties of orthogonal table , Map the values of variables to the table ;

⑤ Write test cases , Each row of the orthogonal table is a test case ;

⑥ Add test cases that are not in the orthogonal table but that you think may appear .

example :

full name 、 mailbox 、 password 、 Confirm the password 、 Verification Code , Only consider filling or not filling .

①②③ Factor number =5; Horizontal number =2; Columns of orthogonal table = Factor number =5; Row of orthogonal table =( Horizontal number -1)* Factor number +1=6

④ Orthogonal table :

⑤ Write test cases according to each line  

⑥ Add : Fill in all or nothing .

5. Scene method

Design test cases according to scenario method : Put forward each function point in the scene , Consider the possible different situations of function points , Design test cases according to these situations . for example :ATM ATM .

6. Wrong guess

According to the tester's knowledge , Experience , Intuitively judge which module will have problems , Write test cases specifically for this module , As a supplementary test case method .

3、 ... and 、 How to evaluate the quality of test cases

1. Use cases are clearly expressed , No ambiguity ;

2. The use case has strong operability ;

3. The input and output of use cases are clear , A use case has only one expected result ;

4. The maintainability of use cases is good ;

5. Use cases have high coverage of requirements ;

6. Exposure procedures BUG Your ability is strong .

原网站

版权声明
本文为[Xiao Qiao]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/209/202207280520116975.html