Decision Tables and Error Guessing

 Decision tables:

- It is a technique to document and test complicated logic.
- Helps test all combinations of Conditions
- A Decision table contains CONDITIONS and ACTIONS.
- The number of total combinations can be calculated by multiplying the number of each values a condition can take

Example 1: Test the login feature using Decision table








Decision table will look as follows: (T means a valid input is given and F means the field is left blank)

CONDITIONS

Username

T

T

F

F

Password

T

F

T

F

ACTIONS

Expected Result

Msg: Log in is success

Msg: Please enter password

Msg: Please Enter Username

Msg: Invalid Username and Password

Here, No. of combinations =  No. of condition1 values * No. of condition2 values 

Condition 1 can have 2 values: T or F. Similarly condition2 also can have 2 values T or F

Therefore, No. of combinations = 2*2=4


Example 2:












Example 3: Library system which allocates a book to the student only if he has no dues and the number of books is under borrow limit and the user is registered.

The decision table looks like this:

CONDITIONS

Is Registered?


T


T


T


T


F



F


F


F

No outstanding fees



T



T



F


F


F


F


T


T

Under borrow limit?

T


F


F


T


F


T


T


F

ACTIONS

Issue Book?

YES

NO

NO

NO

NO

NO

NO

NO

No. of combinations = No. Of condition1 values* No. Of condition2 values* No. Of condition3 values = 2*2*2 = 8


This decision table can be further optimized.

If you see combination 2 and 3, it can be observed that whatever be the value of condition2(no outstanding fees) the output is always the same i.e. NO

Hence these 2 combinations can be merged into one.

Simillary, combinations 5 & 6 can also be combined into one.

And also combinations 6 & 8 can be combined into one.

Hence the resulting optimized table looks like this:


CONDITIONS

Is Registered?


T


T


F



T

No outstanding fees



T



F


-


F

Under borrow limit?

T


-


-


-

ACTIONS

Issue Book?

YES

NO

NO

NO


Error Guessing

Error Guessing is a software testing technique based on guessing the error which can prevail in the code. The technique is heavily based on the experience where the test analysts use their experience to guess the problematic part of the testing application. Hence, the test analysts must be skilled and experienced for better error guessing.




Comments

Popular posts from this blog

Jenkins CICD in One Page

Why do we need a build tool?

Deutsche Bank Interview Questions - 2024