Decision-Table Test Case Generation. DT terminology 2.
-
Upload
kristofer-fifield -
Category
Documents
-
view
219 -
download
1
Transcript of Decision-Table Test Case Generation. DT terminology 2.
Decision-Table Test Case Generation
2
DT terminology
3
DT terminology
• Limited entry tables: Condition entries have binary values• Extended entry tables: Condition entries have more
than two values (values in a set)
4
A sample DT
5
DT test cases
• Conditions are interpreted as• Input• Equivalence classes of inputs
• Actions are interpreted as• Output• Major functional processing portions
• Complete decision tables• Complete set of test cases
6
DT for the triangle problem
7
DT for the triangle problem refined
8
The triangle problem test cases
9
DT rule counting
10
The NextDate problem
• The NextDate problem illustrates the correspondence between equivalence classes and decision table structure• The NextDate problem illustrates the problem of
dependencies in the input domain• Decision tables can highlight such dependencies• Impossible dates can be clearly marked as a separate
action
11
NexDate: the first try
12
Mutually exclusive conditions• Because a month is in an equivalence class we
cannot have T in more than one entry; the “do not care entries” are really F
13
NextDate: first try (partial)
14
NextDate: a second try
M1 = {month : 1 .. 12 | days(month) = 30 }M2 = {month : 1 .. 12 | days(month) = 31 }M3 = {month : {2} } (i.e., the month is February)D1 = {day : 1 .. 28}D2 = {day : {29} }D3 = {day : {30} }D4 = {day : {31} }Y1 = {year : {2000} }Y2 = {year : 1812 .. 2012 | leap_year (year) year ≠ 2000 }∧
Y3 = {year : 1812 .. 2012 | common_year (year) }
15
NextDate: second try, first part
16
NextDate: second try, second part
17
NextDate: third try
M1 = {month : 1 .. 12 | days(month) = 30 }M2 = {month : 1 .. 12 | days(month) = 31 month ≠ 12 }∧M3 = {month : {12} } (a special EC for December)M4 = {month : {2} } (February)D1 = {day : 1 .. 27}D2 = {day : {28} }D3 = {day : {29} }D4 = {day : {30} }D5 = {day : {31} }Y1 = {year : 1812 .. 2012 | leap_year (year) }Y2 = {year : 1812 .. 2012 | common_year (year) }
18
NextDate: third try first part
19
NextDate: third try second part
20
NextDate: final version
• Month:– M1 = { month : month has 30 days}– M2 = { month : month has 31 days except December}– M3 = { month : month is February}– M4 = {month : month is December}
• Day– D1 = {day : 1 <= day <= 27}– D2 = {day : day = 28 }– D3 = {day : day = 29 }– D4 = {day : day = 30 }– D5 = {day : day = 31 }
• Year (are these disjoint?)– Y1 = {year : year is a leap year}– Y2 = {year : year is a common year}
21
NextDate: as extended entries (first half)
22
NextDate: as extended entries (second half)
23
NextDate: as extended entries (first half reduced)
24
NextDate: as extended entries (second half reduced)
25
NextDate test cases