Docsity

Decision Table Testing: A Systematic Approach to Logic-Based Test Design, Lecture notes of Software Engineering

Partial preview of the text

Download Decision Table Testing: A Systematic Approach to Logic-Based Test Design and more Lecture notes Software Engineering in PDF only on Docsity!

Chapter 5:

Dynamic Analysis-Test Design Techniques

Software Testing

Lecture 6

Decision Table Testing

Decision Table Testing

 Logic based testing technique

 Systematic approach input and output in tabular form

 Precise and compact way to model complicated logic

 Conditions and actions are used for test cases

 Conditions as inputs and actions as outputs

Developing Decision Table

 Decision table has following four portions

  • Stub portion
  • Entry portion
  • Condition portion, and
  • Action portion condition stubs Condition Alternatives - condition entries action stubs action entries

Developing Decision Table

 Conditions and Condition alternatives

-> Represent the specific rule when making a decision

 Actions

-> Represent all possible courses of action associated with a given set

of conditions

 Two types of condition entries

  • Limited entry table
    • All conditions binary
  • Extended entry table
    • Condition entries have more than one value

Developing decision tables

Step 3 :

 Determine the number of condition alternatives for each condition.

  • Simple table have two alternatives (Y/N)
  • Extended entry table many alternatives for each condition

Step 4 :

 Calculate the number of possible combinations (Rules).

 If four conditions and two alternatives, there will be 2^4 = 16 possibilities

Developing decision tables Step 5:  (^) Fill Columns of the decision table with all possible combinations 6. Complete the table by inserting an X,T,1 where rules suggest certain actions.

  • X means action should occur. We can also refer to it as T Or 1 - Blank means action should not happen. We can also represent it as N Or F Or 0. 7. Combine rules where it is apparent that an alternative does not make a difference in the outcome

Decision Table Methodology

Decision table- Example 1

One condition

Two Conditions

Condition Rule1 Rule A Y N Condition Rule1 Rule2 Rule3 Rule A Y Y N N B Y N Y N

Example 2 :Login Screen

Decision Base Table for Login Screen

Decision Table-Example 2 Login screen

 The condition is simple if the user provides correct username and password the

user will be redirected to the homepage. If any of the input is wrong, an error message will be displayed.

 4 Test Cases to check the functionality of login screen

 (^) Can we minimize the table?? Conditions Rule 1 Rule 2 Rule 3 Rule 4 Username (T/F) F T F T Password (T/F) F F T T Actions Output (E/H) E E E H

Decision Table- Example 3 Super Store

Decision Table- Example 3 Super Store

Decision Table- Example 3 Super Store

Decision Table- Example 3 Super Store