Software Testing - Boundary Value Analysis, Equivalent Class Partition, Decision Table
1. SOFTWARE TESTING
BLACK BOX TESTING
Prepared by
Ms. S. Shanmuga Priya
Senior Assistant Professor
Department of Computer Science and Engineering
New Horizon College of Engineering
Bangalore
Karnataka
India
4. UNIT TESTING
ā¢ In a procedural programming language, a unit can be
ā A single procedure
ā A function
ā A body of code that implements a single function
ā Source code that fits on one page
ā A body of code that represents work done in 4 to 40 hours
(as in a work breakdown structure)
ā The smallest body of code that can be compiled and
executed by itself
ā¢ In Object Oriented Programming, a unit can be
- Methods of a class might be limited by any of the
ādefinitionsā of a unit
ā¢ Bottom line is that āunitā is probably best defined by
organizations implementing code
5. Black Box Test Design Techniques
Types of Black Box Testing Techniques
1) Boundary Value Analysis
2) Equivalence Classes Partitioning
3) Decision Table Testing
7. BOUNDARY VALUE ANALYSIS (BVA)
Definition
ā¢ Boundary Value Analysis is a black box test
design technique where test case are designed by
using boundary values
ā¢ Boundary value analysis (BVA) is based on
testing at the boundaries between partitions
ā¢ Most errors occur at extremes (< instead of <=,
counter off by one)
8. ā¢ Here we have both:
ā valid boundaries (in the valid partitions) and
ā invalid boundaries (in the invalid partitions)
ā¢ BVA is used in range checking
ā¢ Mainly useful for looping
9. ā¢ When a function F is implemented as a
program, the input variables x1 and x2 will
have some boundaries:
a <= x1 <=b
c <= x2 <=d
where
- [a,b] and [c,d] are the intervals
BVA focuses on the boundary of the input
space to identify test cases
10. EXAMPLE 1 FOR BVA
ā¢ Suppose you have to check the User Name and Password field that accepts
ā minimum 8 characters and
ā maximum 12 characters
ā Valid range 8-12
ā Invalid range 7 or less than 7
ā Invalid range 13 or more than 13
ā¢ Test Cases for Valid partition value, Invalid partition value and exact
boundary value
ā¢ Test Cases 1: Consider password length less than 8.
ā¢ Test Cases 2: Consider password of length exactly 8.
ā¢ Test Cases 3: Consider password of length between 9 and 11.
ā¢ Test Cases 4: Consider password of length exactly 12.
ā¢ Test Cases 5: Consider password of length more than 12.
11. EXAMPLE 2 FOR BVA
ā¢ Test cases for the application whose input box accepts numbers
between 1-1000
- Valid range 1-1000
- Invalid range 0 and
- Invalid range 1001 or more
ā¢ Test Cases for Valid partition value, Invalid partition value and
exact boundary value.
ā¢ Test Cases 1: Consider test data exactly as the input boundaries of
input domain i.e. values 1 and 1000
ā¢ Test Cases 2: Consider test data with values just below the extreme
edges of input domains i.e. values 0 and 999
ā¢ Test Cases 3: Consider test data with values just above the extreme
edges of input domain i.e. values 2 and 1001
12. ā¢ SINGLE FAULT ASSUMPTION
Assumes the āsingle faultā or āindependence of
input variables.ā
ā Failures are rarely the result of the simultaneous
occurrence of two (or more) faults
ā e.g. If there are 2 input variables, these input
variables are independent of each other.
ā¢ MULTIPLE FAULT ASSUMPTION
ādependence among the inputsā
13. VARIANTS OF BVA
ā¢ Four variations of boundary value testing:
āNormal boundary value testing
āRobust boundary value testing
ā Worst-case boundary value testing
ā Robust worst-case boundary value testing
15. ā¢ Basic idea of BVA is to use input variable values
at their: blue shaded region ā input domain
space
- Minimum (min)
- Above Minimum (min+)
- Nominal Value (nom) (Average Value)
- Below Maximum (max-)
- Maximum (max)
VALUE SELECTION IN BVA
a <= x1 <=b
c <= x2 <=d
16. X1, X2ļ Variables
Dots ļ Represents a test value at
which the program is to be tested
INPUT BOUNDARY VALUE TEST CASES
(2 VARIABLES)
18. GENERALIZING BVA
ā¢ BVA can be generalized in two ways:
ā By the number of variables ļ (4n+1) test cases
for n variables
ā¢ Where,
ā 4 Values (min, min+, max, max-)
ā n, number of variables
ā 1, nor (average value)
ā¢ By the kinds of ranges of variables
ā Programming language dependent
ā Logical variables
ā Bounded (upper or lower bounds clearly defined)
ā Unbounded (no upper or lower bounds clearly defined)
19. EXAMPLES
TRIANGLE PROBLEM BVA TEST CASES
CONDITIONS
c1: 1<=a<=200
c2: 1<=b<=200
c3: 1<=c<=200
Min = 1
Min+ = 2
Nom = 100
Max- = 199
Max = 200
Min
Min+
Nom
Max-
Max
20. TEST CASE FOR NEXT DATE FUNCTION
Min
Min+
Nom
Max-
Max
22. ROBUSTNESS TESTING
ā¢ Robustness can also be defined as the ability of an algorithm to
continue operating despite abnormalities in input, calculations, etc.
ā¢ Robustness testing is a simple extension of boundary value analysis
ā¢ In addition to the 5 BVA values of variables includes, add values slightly
greater than the maximum (max+) and a value slightly less than the
minimum (min-)
ā Min ā 1
ā Min
ā Min +1
ā Nom
ā Max -1
ā Max
ā Max +1
ā¢ Main value of robustness testing is to force attention on exception
handling
ā¢ In some strongly typed languages values beyond the predefined range will
cause a run-time error
Number of TC = 6n+1
6 ļ Values
n ļ Number of Variables
1ļ Nom (Average Value)
23. ROBUSTNESS TEST CASES FOR A FUNCTION
OF TWO VARIABLES
Dots that are outside the range
[a, b] of variable x1.
Similarly, for variable x2, we have
crossed its legitimate boundary of
[c, d] of variable x2.
29. SPECIAL VALUE TESTING
ā¢ Most widely practiced form of functional testing
ā¢ Tester uses (to devise test cases):
ā his/her domain knowledge,
ā experience with similar programs, and
ā information about āsoft spotsā
ā¢ Dependent on the abilities of the tester!!!
ā¢ Test cases involving Feb 28, 29 and leap years are most
likely to be identified as test cases using special value
testing
ā¢ Robustness testing and worst case testing do not
identify Feb 28 as a test case
ā¢ Also known as Ad-hoc Testing
32. LOCK: $45 STOCK: $30 BARREL: $25
CONSTRAINT(s)
1. Sales person should sell at least
one complete rifle per month
2. Production limit/month:
LOCK: 70, STOCK: 80, BARREL: 90
36. RANDOM TESTING
ā¢ Basic idea is that, rather than always choose the
min, min+, nom, max-, and max values of a
bounded variable, use a random number
generator to pick test case values
ā¢ In Visual Basic application, to pick values for a
bounded variable a<=x<=b, uses
x=Int((b-a+1)*Rnd+a)
where,
Int ļ Returns the integer part of floating
point number
Rnd ļ Function generates random numbers
in the interval [0,1]
37. HOW MANY TEST CASES DO WE MAKE?
ā¢ Related to the probability of producing every
outcome at least once
ā¢ Related to the probability of executing every
statement / path at least once
42. ā¢ Boundary Value Testing derives test cases with
Serious gaps
Massive redundancy
ā¢ Motivations for equivalence class testing are
Complete testing
Avoid redundancy
CONS OF BVA
43. ā¢ Black Box Technique
ā¢ Utilizes a subset of data which is representative of a larger
class
ā¢ Equivalence partitioning involves partitioning of the input
domain of a software system into several equivalent classes
in a manner that the testing of one particular representative
from a class is equivalent to the testing of some different value
from the subject class
ā¢ Applicability
ā Program is a function from input to output
ā Input and/or output variables have well defined intervals
46. ā¢ Here is the test condition
ā¢ Number > 10 entered in the reservation column (let say 11) is considered
invalid
ā¢ Number < 1 that is 0 or below, then it is considered invalid
ā¢ Numbers 1 to 10 are considered valid
ā¢ Any 3 Digit Number say -100 is invalid
ā¢ We cannot test all the possible values because if done, number of test cases
will be more than 100
ā¢ To address this problem, we use equivalence partitioning hypothesis where
we divide the possible values of tickets into groups or sets as shown below
where the system behavior can be considered the same
47. The divided sets are called Equivalence Partitions or Equivalence Classes. Then we
pick only one value from each partition for testing. The hypothesis behind this
technique is that if one condition/value in a partition passes all others will also pass.
Likewise, if one condition in a partition fails, all other conditions in that partition will
fail.
48. EQUIVALENCE CLASS TEST CASE
ā¢ Consider a numerical input variable, i, whose values
may range from -200 through +200. Then a possible
partitioning of testing input variable, i, by 4
partitions may be:
ā -200 to -100
ā -101 to 0
ā 1 to 100
ā 101 to 200
ā¢ Define āsame signā as the equivalence relation, R,
defined over the input variableās value set, i = {-200 -
-,0, - -, +200}. Then one partitioning will be:
ā -200 to -1 (negative sign)
ā 0 (no sign)
ā 1 to 200 (positive sign)
50. TRADITIONAL EQUIVALENCE CLASS TESTING
ā¢ Nearly identical to Weak
Robust Equivalence
Class Testing
ā¢ Focuses on Invalid data
values
51. ā¢ The idea of equivalence class testing is to identify test cases by
using one element from each equivalence class
ā¢ If the equivalence classes are chosen wisely, the potential
redundancy among test cases can be reduced
ā¢ [ ļ Closed Interval ļ Includes end-points
ā¢ ) ļ Open Interval ļ Does not include end-points
Example (0,1) means greater than 0 and less than 1
IMPROVED EQUIVALENCE CLASS TESTING
52. ā¢ Invalid values of x1 and x2 are
ā x1 <a, x1> d, and x2 <e, x2> g.
ā¢ The equivalence classes of valid values are
V1 = {x1: a ā¤ x1 < b},
V2 = {x1: b ā¤ x1 < c},
V3 = {x1: c ā¤ x1 ā¤ d},
V4 = {x2: e ā¤ x2 < f },
V5 = {x2: f ā¤ x2 ā¤ g}
ā¢ The equivalence classes of invalid values are
NV1 = {x1: x1 < a},
NV2 = {x1: d < x1},
NV3 = {x2: x2 < e},
NV4 = {x2: g < x2}
53. TYPES OF EQUIVALENCE CLASS TESTING
1) Weak Normal Equivalence Class Testing
2) Strong Normal Equivalence Class Testing
3) Weak Robust Equivalence Class Testing
4) Strong Robust Equivalence Class Testing
54.
55. WEAK NORMAL EQUIVALENCE CLASS
TESTING
ā¢ Weak ļ Single Fault Assumption (One
from each class)
ā¢ Normal ļ Classes of Valid Values of Input
(Identify Classes)
ā¢ Choose the test case from each of the
equivalence classes for each input variable
independently of the other input variable
ā¢ Test cases have all valid values
ā¢ Detects faults due to calculations with valid
values of single variable
56. DOT ļ Indicates a Valid
Value (Test Data)
Valid value one from each
class
57. Example
Assume the equivalence partitioning of input X2 is: 1 to 10; 11 to 20, 21 to 30
and the equivalence partitioning of input X1 is: 1 to 5; 6 to 10; 11 to 15; and 16 to 20
NUMBER OF TEST CASES = #classes in the partition with the largest numbering of
subsets.
X2
X1
1
10
20
30
1 5 10 15 20
We have covered everyone of
the 3 equivalence classes for
input X.
For ( X2, X1 )
we have:
(24, 2)
(15, 8 )
( 4, 13)
(23, 17)
PROBLEM: May miss some equivalence classes
58. STRONG NORMAL EQUIVALENCE CLASS TESTING
ā¢ Strong ļ Multiple Fault Assumption (One
from each class in Cartesian
Product)
ā¢ Normal ļ Identify equivalence classes of Valid
Inputs
ā¢ Test cases from Cartesian Product of valid
values
ā¢ Cartesian Product guarantees notion of
completeness
ā¢ Detects faults due to interaction with valid values
of any number of variables
59. Dots ļ Valid
values but with all
possibilities
COVERS ONE
POSSIBLE
COMBINATION
FROM EACH
PARTITION
60. Example of : Strong Normal Equivalence testing
Assume the equivalence partitioning of input X2 is: 1 to 10; 11 to 2; 21 to 30
and the equivalence partitioning of input X1 is: 1 to 5; 6 to 10; 11 to 15; and 16 to 20
NUMBER OF TEST CASES: Based on Cartesian product of the partition subsets
X2
X1
1
10
20
30
1 5 10 15 20
We have covered everyone of
the 3 x 4 Cartesian product of
equivalence classes
PROBLEM: Doesnāt test values outside of intervals
61. WEAK ROBUST EQUIVALENCE CLASS
TESTING
ā¢ Weak ļ Single Fault Assumption (One from each
class)
ā¢ Robust ļ Classes of valid and invalid values of
input
ā¢ Up to now we have only considered partitioning the
valid input space
ā¢ āWeak robustā is similar to āweak normalā
equivalence test except that the invalid input variables
are now considered
62.
63. Example of : Weak Robust Equivalence testing
Assume the equivalence partitioning of input X2 is 1 to 10; 11 to 20, 21 to 30
and the equivalence partitioning of input X1 is 1 to 5; 6 to 10; 11 to 15; and 16 to 20
X2
X11
10
20
30
1 5 10 15 20
We have covered
everyone of the 5
equivalence classes for
input X.
PROBLEM: Misses some equivalence classes
64. PROBLEMS WITH ROBUST EQUIVALENCE TESTING
a) Very often the specification does not define
what the expected output for an invalid test
case should be
b) Thus, testers spend a lot of time defining
expected outputs for these cases
c) Strongly typed languages like Pascal, Ada,
eliminate the need for the consideration of
invalid inputs
65. STRONG ROBUST EQUIVALENCE CLASS TESTING
ā¢ Strong ļ Multiple Fault Assumption (One
from each class in Cartesian
Product)
ā¢ Robust ļ Classes of valid and invalid values
of input
ā¢ Obtain the test cases from each element of the
Cartesian product of all the equivalence
classes
66.
67. Example of : Strong Robust Equivalence testing
Assume the equivalence partitioning of input X is: 1 to 10; 11 to 20, 21 to 30
and the equivalence partitioning of input Y is: 1 to 5; 6 to 10; 11 to 15; and 16 to 20
X
Y
1
10
20
30
1 5 10 15 20
We have covered everyone of
the 5 x 6 Cartesian product of
equivalence classes (including
invalid inputs)
Problem: None, but results in lots of test cases (expensive)
71. WEAK NORMAL EQUIVALENCE CLASS TEST CASE
Four weak normal equivalence class test cases,
chosen arbitrarily from each class
72. STRONG NORMAL EQUIVALENCE CLASS TEST CASE
ā¢ Because no valid subintervals of variables a,
b, and c exist, the strong normal equivalence
class test cases are identical to the weak
normal equivalence class test cases.
73. WEAK ROBUST TEST CASES
The invalid
values could be
- Zero (0)
- Any Negative
Number (-ve)
- Any number
>200
Considering, the invalid values for a, b, and c
yield the above additional
weak robust equivalence class test cases
75. TRIANGLE INPUT EQUIVALENCE CLASSES
For example, triplet <1,4,1> has exactly one pair of
equal sides, but those sides do not form a triangle
76. If we want to be even more thorough, we could
separate the āgreater than or equal toā to two
distinct cases as:
D6 will become:
D6ā={<a,b,c>:a=b+c}
D6ā={<a,b,c>:a>b+c}
Similarly, for D7 and D8
77. EQUIVALENCE CLASS TEST CASES FOR THE
NEXTDATE FUNCTION
ā¢ Intervals of valid values defined as follows:
M1= {month : 1 <= month <=12}
D1 = {day : 1<= day <= 31}
Y1 = {year : 1812 <= year <= 2012}
83. EQUIVALENCE CLASS TEST CASES FOR THE
NEXTDATE FUNCTION
ā¢ Variables:
ā Month
ā Day
ā Year
ā¢ Equivalence Classes for Months M=M1UM2UM3
ā 30 days months (M1)
ā 31 days months (M2)
ā February (M3)
84. ā¢ Equivalence Classes for Years Y=Y1UY2UY3UY4
ā Non-Century Common Years (Y1)
ā Non-Century Leap Years (Y2)
ā Common Century Years (Y3)
ā Leap Century Years (Y4)
ā¢ Equivalence Classes for Days D= D1UD2UD3ā¦
āD1=1ā¦?
āD2=?
MAY GIVE A SOLUTION, BUT
THE CLASSES MAY BE LARGE
87. NUMBER OF TEST CASES = #classes in the
partition with the largest numbering of
subsets.
WEAK NORMAL EQUIVALENCE CLASS
88.
89. NUMBER OF TEST CASES:
Based on Cartesian
product of the partition
subsets
3 MONTH CLASSES
4 DAY CLASSES
3 YEAR CLASSES
3*4*3=36
90. EQUIVALENCE CLASS TEST CASE FOR
COMMISSION PROBLEM
ā¢ The input domain of the commission problem is
partitioned by the limits on:
ā Locks
ā Stocks
ā Barrels
ā¢ The first class is the valid input and other two are
invalid
ā¢ When a value of -1 is given for locks, the while
loop terminates, and the values of totalLocks,
totalStocks, and totalBarrels are computed to
compute sales and then commission
94. WEAK NORMALAND STRONG
NORMAL EQUIVALENCE CLASS
We will have exactly one weak normal
equivalence class test case and its identical to
the strong normal equivalence class test case
98. ā¢ Equivalence partitions are designed so that
every possible input belongs to one and only
one equivalence partition
ā¢ It is appropriate when input data is defined in
terms of intervals
ā¢ Equivalence class testing is strengthened by a
hybrid approach with boundary value testing
ADVANTAGES OF EQUIVALENCE PARTITIONING
ECT BVA
99. DISADVANTAGES
ā¢ No guide lines for choosing inputs
ā¢ Doesnāt test every input
ā¢ Several tries may be needed before the right
equivalence relation is discovered
100. EDGE TESTING
ā¢ Edge Testing ļ Hybrid of boundary
value analysis and equivalence class
testing
ā¢ Need for Edge Testing?
ācontiguous ranges of a particular
variable constitute equivalence classes
101. ā¢ Normal test values for x1: {a, a+, bā, b, b+, cā, c, c+, dā, d}
ā¢ Robust test values for x1: {aā, a, a+, bā, b, b+, cā, c, c+, dā, d, d+}
ā¢ Normal test values for x2: {e, e+, fā, f, f+, gā, g}
ā¢ Robust test values for x2: {eā, e, e+, fā, f, f+, gā, g, g+}
ā¢ NOTE: One subtle difference is that edge test values do not include
the nominal values that we had with boundary value testing.
105. ā¢ A decision condition is constructed with a condition
stub and a condition entry
ā¢ Condition Stub
ā is declared as a statement of a condition
ā¢ Condition Entry
ā provides a value assigned to the condition stub
ā¢ Similarly, an action (or decision) composes two elements:
an action stub and an action entry
ā¢ Action Stub
ā One states an action with an action stub
ā¢ Action Entry
ā specifies whether (or in what order) the action is to be performed
106. STRUCTURE OF DECISION TABLE
ā¢ A column in the entry portion is known as a
rule
ā¢ Rules indicate which actions are taken for the
conditional circumstances indicated in the
condition portion of the rule
ā¢ Decision table is used for ātest case
identificationā
ā¢ Decision tables are declarative that conditions
and actions follows no particular order
107. TYPES OF DECISION TABLES
ā¢ Limited Entry Decision Table
ā Decision tables in which all conditions are binary
are known as āLimited entry decision tablesā
ā¢ Extended Entry Decision Table
ā If conditions are allowed to have several values,
the resulting tables are known as āExtended entry
decision tablesā
108. DECISION TABLE INTERPRETATION
ā¢ How are condition entries in a decision table interpreted with respect
to a program?
Conditions are interpreted as:
Input
Equivalence classes of inputs
ā¢ How are action entries in a decision table interpreted with respect to a
program?
Actions are interpreted as:
Output
Major functional processing portions
ā¢ What is the relationship between decision tables and test cases?
ā Rules are interpreted as test cases
ā With a complete decision table, have a complete set of test cases
109. ā¢ Donāt Care Entries
ā Donāt care entries indicates, that the
condition is irrelevant or condition does
not apply
āHelps in giving a complete decision table
āRepresented by using the symbol ā__ā
ā¢ Use of donāt care entries
ā Reduce the number of explicit rules by implying
the existence on non-explicitly stated rules
110. ā¢ In Limited Entry Decision Table:
ENTRIES NOTATION USED
CONDITION ENTRIES T (TRUE), F (FALSE)
ACTION ENTRIES X
DONāT CARE ENTRIES __
111. TRIANGLE DECISION TABLE
A5ļ Action added by tester, showing rule impossible
Action impossible shows when a rule is logically impossible
CONDITION ENTRY
ACTION ENTRY
DONāT CARE ENTRY
Conditions ļ Input
Actions ļ Output
REASON : If two pairs of integers are equal, by transitivity,
the third pair must be equal
1 2 3 4 5 6 7 8 9
113. TRIANGLE DECISION TABLE - REFINED
Number of Rules = 2Number of Conditions
So therefore, Number of Rules = 26 = 64
What are we going to consider here?
A more detailed view of the three
inequalities of the triangle property.
If any one of these fails, the three
integers do not constitute sides of a triangle.
114. TRIANGLE DECISION TABLE - REFINED
Number of Rules = 2Number of Conditions
So therefore, Number of Rules = 26 = 64
1 2 3 4 5 6 7 8 9 10 11
116. ā¢ For limited entry decision table:
ā If n conditions exist, there must be 2n rules
ā When donāt care entries really indicate that the
condition is irrelevant, we can develop a rule count as
follows:
ā¢ Rules in which donāt care entries do not occur count as
one rule
ā¢ And each donāt care entry in a rule doubles the count of
that rule
ā¢ Usefulness of rule count
ā Less rules than combination rule count, indicates
missing rules
ā More rules than combination rule count, indicates
redundant rules or indicate inconsistent table
117. DECISION TABLE WITH RULE COUNT
When donāt care entries really indicate that the condition is
irrelevant, we can develop a rule count as follows:
Rules in which donāt care entries do not occur
count as one rule
And each donāt care entry in a rule doubles the
count of that rule
If n conditions
exist, there must
be 2n rules
Here, n=6
So, rules 64
We can make sure that
this is a complete
decision table by
counting the total
number of rules:
32+16+8+1+1+1+1+1+1+
1+1= 64 = 26
119. ā¢ Using the decision table, we obtain 11
functional test cases:
ā 1 way to get a scalene triangle
ā 1 way to get an equilateral triangle
ā 3 impossible cases
ā 3 ways to fail the triangle property
ā 3 ways to get an isosceles triangle
120. TEST CASE FOR THE NEXTDATE FUNCTION
FIRST TRY
ā¢ Suppose we start with a set of equivalence
classes:
121. ā¢ In the NextDate problem, three of the conditions can be the
equivalence classes of the months
c1 : M1 ļ 30 Days a1 : Impossible
c2 : M2 ļ 31 Days a2 : Next Date
c3 : M3 ļ Feb
ā¢ Since the equivalence classes are mutually exclusive, then a
month can only exist in one condition, i.e. we cannot have a
rule in which two of these three conditions are true
DECISION TABLE WITH MUTUALLY
EXCLUSIVE CONDITION
DONāT CARE ENTRY MEANS,
MUST BE FALSE IN THIS CASE
128. SECOND TRY
To produce next date Actions
involved (manipulations) are:
1. Increment day
2. Reset day
3. Increment month
4. Reset month
5. Increment year
TOTAL
NUMBER OF
RULES:
3*4*3 = 36
129. M1 ļ 30 DAYS
M2 ļ 31 DAYS
M3 ļ FEBRUARY (28/29)
D1 ļ 1-28
D2 ļ 29
D3 ļ 30
D4 ļ 31
130. SECOND TRY TABLE WITH 36 RULES
M1 ļ 30 DAYS
M2 ļ 31 DAYS
M3 ļ FEBRUARY (28/29)
D1 ļ 1-28
D2 ļ 29
D3 ļ 30
D4 ļ 31
132. M1 ļ 30 DAYS
M2 ļ 31 DAYS EXCEPT
DECEMBER
M3 ļ MONTH IS DECEMBER
M4 ļ MONTH IS FEBRUARY
D1 ļ 1-27
D2 ļ 28
D3 ļ 29
D4 ļ 30
D5 ļ 31
Y1 ļ LEAP YEAR
Y2 ļ COMMON YEAR
133. M1 ļ 30 DAYS
M2 ļ 31 DAYS EXCEPT DECEMBER
M3 ļ MONTH IS DECEMBER
M4 ļ MONTH IS FEBRUARY
D1 ļ 1-27
D2 ļ 28
D3 ļ 29
D4 ļ 30
D5 ļ 31
Y1 ļ LEAP YEAR
Y2 ļ COMMON YEAR
140. APPLICATIONS WHERE DECISION TABLES
ARE USED
1. Where prominent if-then-else logic
2. Logical relationships among input variables
3. Calculations involving subsets of the input variables
141. ADVANTAGES OF DECISION TABLE
ā¢ Decision tables are precise and compact way to model
complicated logic
ā¢ Testing also works iteratively. The table that is drawn
in the first iteration, acts as a stepping stone to derive
new decision tables (s)
ā¢ These tables guarantee that we consider every possible
combination of condition values. This is known as its
ācompleteness propertyā
ā¢ Decision tables are declarative. There is no particular
order for conditions and actions to occur
142. DISADVANTAGES OF DECISION TABLE
ā¢ Decision tables do not scale up well. We need
to āfactorā large tables into smaller ones to
remove redundancy
143. REFERENCE
ā¢ Paul C. Jorgensen: Software Testing, A
Craftsmanās Approach, 4th Edition, Auerbach
Publications, 2013.