current position:Home>Test theory series - Test Case elements and design methods Part II

Test theory series - Test Case elements and design methods Part II

2022-04-29 10:13:42Tanzania auduwei Canyon capable man

3. Decision table method

 background :
 Both the equivalence class division method and the boundary value analysis method focus on the input conditions of a single input , however   Various combinations of input conditions are not considered 、 The mutual restriction between input conditions and output conditions . 
 Therefore, the decision table method should be used to solve the process of writing test cases in the above cases 

What is the decision table method

 The decision table method indicates that there are multiple inputs and multiple outputs ,
 And there is a mutual combination relationship between inputs 、  Mutual restriction 
 There are interdependencies between inputs and outputs 

The four components of the decision table

 The judgment table usually consists of four parts 
1. Condition stake : All conditions entered . Lists all inputs to the system , The order of input listed is irrelevant  
2. Action post : All output results . Lists the possible actions the system may take , The order of these operations is not constrained  
3. Condition item : Value of conditional pile . List the values entered for its left column , True and false values in all possible cases  
4. Action items : The value of the action pile . List the actions that should be taken under various values of the input item 

Design steps of decision table

1.  Clear requirements  
2.  Draw a decision table  
    2.1、 Define the conditions , Action post  
    2.2、 Fill in the condition item , Make a full combination of conditions  
    2.3、 Specify the action items corresponding to each condition combination  

3.  Generate test cases , Each rule in the decision table corresponds to a test case 

Application :

1) There are mutual combinations or constraints between multiple inputs

2) The output depends on the combination of input conditions

Decision table case

 The user's mobile phone is down or in arrears , Calls are not allowed .
 Draw the decision table as follows 

 Insert picture description here

4. Cause and effect diagram

Cause and effect diagram definition

 Cause and effect diagram is to analyze the combination and restriction relationship between conditions by drawing a diagram , And the result of the combination of conditions .

The core of cause and effect diagram method

 because  、  fruit 
1、 Cause and effect diagram “ because ”—— reason , Input condition  
2、 Cause and effect diagram “ fruit ”—— result , Output results 

The relationship between cause and effect diagram and decision table :

 Causality diagram is the intermediate process of output decision table , Assist in analysis by drawing cause and effect diagram , Output judgment table .
 The cause and effect diagram must produce a judgment table , To produce use cases .

Basic symbols in cause and effect diagram method

 Usually used in cause and effect diagrams C Show why , use E Show the result .

 Insert picture description here
Basic elements of cause and effect diagram :

 Identity : ·  as long as   reason 1  happen ,  Will produce results 1
 Not :  As long as the reason 1  It doesn't happen   It will produce poor results 1
 or :  There are only a few reasons for one to happen ,  It produces results 1
 And :  Several reasons are satisfied at the same time , Will produce results 1

The basic steps of causality diagram method

1.  Clear requirements  
2.  Draw a cause and effect diagram  
3.  Convert the cause and effect diagram into a decision table  
4.  Generate test cases 

Cause and effect diagram case
If you want to modify the file , The first character entered must be A perhaps B, The second column of characters must be a number , If If the characters in the first column are incorrect, the information is given L, If the characters in the second column are incorrect , Then give the information M demand :
 Insert picture description here

5. Orthogonal method

Concept of orthogonal method

1.  Use the least test cases to obtain the maximum test coverage 

Scope of application

1)  When the number of combinations of multiple conditions is huge .
2)  There is a combinatorial relationship between conditions 

The concept of orthogonal table
 Insert picture description here
Use steps of orthogonal arrangement method

1.  Clear requirements  
2.  List factors and levels  
3.  Find the right orthogonal table , Replace numbers . 
4.  Convert bit test cases 

Orthogonal table features :

1.  Evenly distributed , 2.  Neat and comparable 

How to select orthogonal table and its practical tools
How to choose the right orthogonal table

6. Flow chart method

Definition :

 Flow method is a method of analyzing the scene by drawing a flow chart 

Applicable scenario :

 When there are complex business scenario analysis 

Test case design steps :

1)  Analyze requirements 
2)  According to the demand ( Business relationship ) Draw a flow chart 
3)  List the scenarios of the requirements process .
4)  Write test cases according to the flow chart .

Case study :

 Give the three sides of the user a,b,c,  Judge the shape of the triangle . 

 Insert picture description here

7. Scene method

Scene method definition :

 Simulate user's operation ,  Design test cases from the perspective of users , Consider the combination of multiple functions required .

The scene method focuses on :

1.  Focus on the combination of multiple functions . That is, focus on whether the process can go through 
2.  Don't focus on   details .

Application :

 Test of system function module .  Smoke testing .

Two important concepts :

 Basic flow : Correct operation of the product 
 Alternative streams : Wrong operation of the product .

Scenario method test case steps
、 ```
1. Clear requirements
2. Determine the basic flow and alternative flow
3. Determine the scene according to the basic flow and alternative flow
4. A scenario is a test case

## 8.  Wrong guess 
** Definition :**

Error inference refers to the use of intuition and experience to guess the possible types of errors ,
List all possible errors and error prone situations in the program ,
It is a test case design method that experienced testers like to use .

** The basic idea :**

The basic idea is to make a list of possible mistakes or mistakes , Then write test cases according to the list ;
This method is largely based on experience , That is, based on people's analysis of the test results made in the past , Intuitively speculate on the regularity of the revealed defects to find defects

** Applicable scenario :**

Tight projects and urgent tasks 、 Didn't have enough time , Don't test step by step at this time ;
Based on previous project experience , Find similar modules that have made mistakes before and focus on testing ;
After all normal tests , Through the error inference method, test some modules that have had problems before .

##  Last : Summary of test case design method 
 Usually when determining the test method , There are several reference principles :

(1) If there is an input function in a test function , Combination without input , have access to ------- Equivalence class
(2) If there is an input function in a test function , When the input type or range length has a boundary , have access to ----- The boundary value , The most error prone part of development is here
(3) If you test a product , There are multiple inputs , Multiple outputs , Moreover, there is a relationship of mutual combination and mutual restriction between inputs , There are interdependencies between inputs and outputs . Relationships can use ---------- Decision table Cause and effect diagram
(4) For the software of parameter configuration class , The combination of parameters needs to be considered , Get the maximum test coverage with the least test cases , can To use the ------------ Orthogonal method
(5) For the combinational logic test between multiple functions , have access to — Scene method , flow chart . There are many abnormal scenes , Also often miss
(6) use ( ---- Wrong inference ----- )) Then add test cases —— Rely on the experience and wisdom of Test Engineers .

copyright notice
author[Tanzania auduwei Canyon capable man],Please bring the original link to reprint, thank you.

Random recommended