Arunkumar Khannur's Software Testing Knowledge Center
   
 

9.4 Decision Tables in Structural Testing


Decision tables are not only useful in functional testing but also can be used to check structure of a program. Let us consider a program segment as shown in Fig. 9.1 A Sample Program Seg- ment.

Fig. 9.1 A Sample Program Segment

From the flow chart shown in Fig. 9.1 A Sample Program Segment, we trace the paths that cause ACTION 1 and ACTION 2. Now we consider each path and start tracing it. If the decision appears on any condition that appears on that path, we put a YES or NO as appropriate. If any condition from the conditions listed in condition stub does not appear on the path, we put in an I. We repeat this exercise for second path, and then third path etc till we will all possible paths. The corresponding decision table is shown in Table. 9.4 The Decision Table Corresponding to Fig. 9.1.






Table 9.4 The decision table corresponding to Fig.9.1

As can be seen, there are two conditions and two alternatives (Y or N) for each of the conditions, there would be four alternatives, that is, 22 = 4.
Now we check for completeness and consistency. In order to do this, we:

  • Firstly check for number of rules which shall not be more than: Number of Conditions (Conditions Alternatives) . In this case, 22 = 4. In Table 9.4 The Decision Table Corresponding to Fig. 9.1, we can see that there .are exactly 4 rules.
  • Secondly, we shall consider each row and check whether number of YES’s and number of NO’s are equal.

If both these rules are fulfilled then we say that the decision table is complete and consistent. Thus, this approach is very much useful testing for completeness and consistency in structure of the program. However, this technique does not discover any deviations from the specification. In order to find deviations from specifications, we need to use Boolean Algebra, and Karnaugh-Veitch (KV) charts.
 
 
Khannur's Book
Arunkumar Khannur, Software Testing - Techniques and Applications, Published by Pearson Publications, 2011 (ISBN:978-81-317-5836-6; Pages:341 + xxii)
Follow Khannur
         
Khannur's Company
ISQT Process & Consulting Services Pvt. Ltd., Bangalore, INDIA
Khannur's Software Testing Forum
STEP-AUTO Forum
 Contact Khannur
ISQT Process & Consulting Services Pvt. Ltd.
#732, 1st Floor, 12th Main,
3rd Block, Rajajinagar,
Bangalore - 560010, INDIA
Phone: +91 80 23012511
URL: www.isqtinternational.com
Email: khannur@isqtinternational.com
Skype: arun.isqt