Showing posts with label decision table technique. Show all posts
Showing posts with label decision table technique. Show all posts

Sunday, 28 July 2013

Decision Table Testing Technique and Examples

Technique followed for decision table testing are follows:
STEP 1: Analyze the given test inputs or requirements an list out the various conditions in the decision table.
STEP 2: Calculate the number of possible combinations (Rules)
STEP 3: Fill columns of the decision table with all possible combinations (Rules)
STEP 4: Find out cases where the values assumed by a variable are immaterial for a given combination Fill the same by "don't care" symbol.
STEP 5: For each of the combination of values, find out the action or expected result.
STEP 6: Create at least one Test case for each rule. If the rules are binary, a single test for each combination is probably sufficient. Else if a condition is a range of values,, consider testing at both the low and high end of range.

Example problem for decision table testing:
Question: The following instructions were taken from a University Examination Application Form. Examine the and create a Decision Table to represent the University rules and thereby decide on the test cases to be designed.

  1. A candidate appearing for the exam should have a minimum 80% attendance
  2. Has attended 3 internal tests with an average of 10 or more marks or
  3. Has attended 2 internal tests with an average of 15 or more marks and 
  4. Has taken up the external examination and scored more than 35 marks.
If the above conditions are fulfilled, then the student can be considered as pass in that subject
Answer:
Based on the decision table technique, the decision table conditions and actions can be drafted as given below:
C1 = Condition 1 - Attendance greater than 80%
C2 = Condition 2 - Attended 3 internal tests with an average of 10 or more marks
C3 = Condition 3 - Attended 2 internal tests with an average of 15 or more marks.
C4 = Condition 4 - Cleared external exam and scored more than 35 marks
A1 = Action 1 - Pass
A2 = Action 2 - Fail
R1 = Rule 1- C1, C2, C4 are satisfied
R2  = Rule 2- C1, C3, C4 are satisfied

Note: list the remaining rule ie. R3 TO R6 accordingly
The total number of alternatives = 2 the power of number of conditions = 2 the power of four = 16