Black Box Test Technique : Decision Table Testing

Decision tables are used to test the interaction between combinations of Inputs. The goal/aim of the decision table is to ensure that every combination of inputs, relationships and constraints is tested. Decision Tables are a good way to record complex business rules that a system must implement.

While implementing decision table testers need to keep in mind there should be “Condition”(INPUT), and resultant “Action”(Output). The decision table shall be implemented by means of tabulation. 

Rows : The input “Conditions” are available in Top rows and output “Actions” are available in the bottom row once condition statements are given.


Column : It is the combination of all possible/different Test Cases(TC). 


The Input(Conditions) and Output(Actions) are expressed as Boolean values(True[T] or False[F]) or discrete values(eg. Red, Green, Blue, Black, White), numbers(0,1) or range or number.


Conditions about decision table testing:

Input → Condition

Y

True

T or 1

N

False

F or 0

-

Doesn’t matter

N/A

Output → Action

X

Action occur

Y or T or 1


Blank action not to occur

- Or N or F or 0



Possible number of Decision Table Test cases are 2^n, Where n is number of inputs. 


If the condition is 4, 2 ^ 4 = 16 combination as below


0

0

0

0

0

1

0

0

0

1

2

0

0

1

0

3

0

0

1

1

4

0

1

0

0

5

0

1

0

1

6

0

1

1

0

7

0

1

1

1

8

1

0

0

0

9

1

0

0

1

10

1

0

1

0

11

1

0

1

1

12

1

1

0

0

13

1

1

0

1

14

1

1

1

0

15

1

1

1

1



Total number of TCs will increase exponentially when the number of input increases. When trying to test every possible combination, decision tables can become very large. Practically, we may not be able to cover all the TCs arrived in the Decision Table. 


A method of intelligently reducing the number of combinations from all possible to those which are interesting is called collapsed decision table testing.


Conditions for Collapsed Decision Table :

  • When this technique is used, the combinations are reduced to those that will produce differing outputs by removing sets of conditions that are not relevant for the outcome.

  • Redundant/similar tests or tests in which the combination of conditions is not possible are removed.

  • This is a purely Risk Based and Real world Outcome based solution. 


Decision Table Example:

How to make Decision Base Table for Net-banking login


Solution:




T1

T2

T3

T4

T5

T6

T7

T8

Condition

UserName

T

T

T

T

F

F

F

F

Password

T

T

F

F

T

T

F

F

Text Enter

T

F

T

F

T

F

T

F

Action

Login

L

-

-

-

-

-

-

-


Error

-

E

E

E

E

E

E

E


*Correct / True = C / T
*Incorrect / False = IC / F
*Login / Error = L / E
*x = Don’t Care


Full Decision table:



T1

T2

T3

T4

T5

T6

T7

T8

Condition

UserName

T

T

T

T

F

F

F

F

Password

T

T

F

F

T

T

F

F

Text Enter

T

F

T

F

T

F

T

F

Action

Login /

Error

L

E

E

E

E

E

E

E


STEP 1: Reduce Decision Table



T1

T2

T3

T4

T5

T6

T7/T8

Condition

UserName

T

T

T

T

F

F

F

Password

T

T

F

F

T

T

F

Text Enter

T

F

T

F

T

F

x

Action

Login / 

Error

L

E

E

E

  E

E

E


STEP 2 : Reduce Decision Table



T1

T2

T3

T4

T5/T6

T7/T8

Condition

UserName

T

T

T

T

F

F

Password

T

T

F

F

T

F

Text Enter

T

F

T

F

x

x

Action

Login / 

Error

L

E

E

E

    E

E


STEP 3 : Reduce Decision Table



T1

T2

T3/T4

T5/T6

T7/T8

Condition

UserName

T

T

T

F

F

Password

T

T

F

T

F

Text Enter

T

F

x

x

x

Action

Login / 

Error

L

E

E

      E

E


STEP 4 : Reduce Decision Table



T1

T2

T3/T4

T5/T6/T7/T8

Condition

UserName

T

T

T

F

Password

T

T

F

x

Text Enter

T

F

x

x

Action

Login /

Error

L

E

E

        E


Description:

If all condition is TRUE, the login shall be success

→ If any one condition is FALSE, the login shall be Error/fails


Comments