Showing posts with label Decision Table Testing. Show all posts
Showing posts with label Decision Table Testing. 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

Decision Table General Format

Decision Tables are used to describe and analyze problems that contain procedural decision situations that are characterized by one or more conditions; the state of which determines the execution of a set of actions.

They record the complex business rules that a system must implement. This serves as a guide to create Test Conditions. The basic parts of a decision table are shown below:

The upper left portion of the format is called the stub quadrant, it contains statements of the conditions. Similarly, the lower left portion is called the action stub quadrant, which contains statement of the actions. The condition entry and action quadrants appear in the upper and lower right portions (conditions and entry) forms a decision rule.

The various input conditions are represented by the conditions 1 through m and the actions are represented by actions 1 through n. These actions should be taken depending o the various combinations of input conditions.

Each of the rules defines a unique combination of conditions that result in the execution (firing) of the actions associated with rule. All the possible combinations of conditions define a set of alternatives. For each alternative, a test action should be considered. The number of alternatives increases exponentially with the number of conditions, which may b expressed as 2 power of Number of Conditions. When the decision table becomes too complex, a hierarchy of new decision tables can be constructed.

Note:
  • The actions do not depend on the order in which the conditions are evaluated, but only their values.
  • All the values are assumed to be available simultaneously.
  • Actions depend only on the specified conditions, not on any previous input conditions or system state.
Recommended: