ST Module 2 2024
ST Module 2 2024
Functional Testing
Chapter 5
Boundary Value Testing
Boundary Value Analysis
When the function F is implemented as a program of two input variables, the input
variables x1 and x2 will have some boundaries:
a ≤ x1 ≤ b
c ≤ x2 ≤ d
The intervals [a, b] and [c, d] are referred to as the ranges of x1 and x2, (instead of domain)
so we have overloaded the term.
Figure: Input domain of a function of two variables
in
u d.
Boundary value analysis focuses on the boundary of the input space to identify test cases.
The basis behind boundary value testing is that errors tend to occur near the extreme
lo
values of an input variable.
The basic idea of boundary value analysis is to use input variable values at their minimum,
just above the minimum, a normal value, just below their maximum, and their
maximum as shown in figures below.
uc
A commercially available testing tool (originally named T) generates such tests cases for a
properly specified program.
vt
The boundary value analysis test cases for function F of two variables are as shown in table
and figure below.
Keep X1 at normal value and vary X2 Keep X2 at normal value and vary X1
<X1nom,X2min>,<X1nom, X2min+>, <X1nom, <X1min,X2nom>,<X1min+,X2nom>,<X1max-,
X2nom>,<X1nom,X2max->, <X1nom,X2max> X2nom>,<X1max,X2nom>
in
u d.
Limitations of Boundary value analysis
Boundary value analysis works well when the program is a function of several
independent variables that represent bounded physical quantities.
lo
A quick look at the boundary value analysis test cases for next-date shows them to be
inadequate.
– For example, very little stress occurs on February and on leap years. The real
problem here is that interesting dependencies exist among the month, day, and
uc
year variables.
Boundary value analysis assumes the variables to be truly on independent. Even so
boundary value analysis happens to catch end-of-month and end-of-year faults.
Boundary value analysis test cases are derived from the extreme of bounded, independent
variables that refer to physical quantities, with no consideration of the nature of the
function, or of the semantic meaning of the variable.
vt
Worst-Case testing
in
Boundary value analysis makes a single fault assumption of reliability theory.
Rejecting single fault assumption, we are interested in what happens when more than one
variable has an extreme value. This is called worst case analysis.
For each variable, we start with the five elements set that contain the min, min+, nom,
d.
max-, and max values.
We then take the Cartesian product of the sets to generate test cases. Worst-Case testing
for a function of n variables generates 5n test cases. In this case 52= 5*5= 25 test
cases.
u
Figure: Worst-Case test cases for a function of two Variables
lo
uc
vt
in
No guidelines are used other than to use “best engineering judgment”. As a result, special
value testing is very dependent on the abilities of the tester.
If an interested tester defines special value test cases for NextDate, we would see several test
cases involving February 28, February 29 and leap years. Even though special value testing is
d.
highly subjective, it often results in a set of test cases that is more effective in revealing
faults than the test cases generated by the other methods of software testing.
Examples
u
Test Cases for the Triangle Problem
Table below contains Boundary Value Analysis Test Cases using 1-200 range. We have
lo
noticed that case 3, 8, 13 are identical, so two should be deleted.
in
6 1 2 1 Not a Triangle
7 1 2 2 Isosceles
8 1 2 100 Not a Triangle
9 1 2 199 Not a Triangle
d.
10 1 2 200 Not a Triangle
11 1 100 1 Not a Triangle
12 1 100 2 Not a Triangle
13 1 100 100 Isosceles
u 14
15
1
1
100
100
199
200
Not a Triangle
Not a Triangle
16 1 199 1 Not a Triangle
lo
17 1 199 2 Not a Triangle
18 1 199 100 Not a Triangle
19 1 199 199 Isosceles
uc
in
8 1 2 1915 January 3,1915
9 1 2 2018 January 3,2018
10 1 2 2019 January 3,2019
d.
11 1 15 1812 January 16,1812
12 1 15 1813 January 16,1813
13 1 15 1915 January 16,1915
u 14
15
1
1
15
15
2018
2019
January 16,2018
January 16,2019
lo
16 1 30 1812 January 31,1812
17 1 30 1813 January 31,1813
18 1 30 1915 January 31,1915
uc
in
1 1 1
d.
Commission Problem Output Boundary Value Analysis Test Cases
u
Case Locks Stocks Barrels Sales Commission
1 100 10
Comment
Output minimum
lo
2 1 1 2 125 12.5 Output minimum+
3 1 2 1 130 13 Output minimum+
4 2 1 1 145 14.5 Output minimum+
uc
5 5 5 5 500 50 Midpoint
6 10 10 9 975 97.5 Border point-
7 10 9 10 970 97 Border point-
8 9 10 10 955 95.5 Border point-
vt
in
Output special Value Test Cases
Case Locks Stocks Barrels Sales Commission Comment
d.
2 18 17 19 1795 219.25 Border Point-
3 18 19 17 1805 221 Border Point+
Random Testing
u
Here, the idea is to generate random number to pick test cases rather than always choosing
min, min+, nom, max-, max values. The tables below are derived from a visual basic
lo
application that picks values for a bounded variable a ≤ x ≤ b as follows:
x=Int ((b-a+1) * Rnd+a)
Int: returns integer, Rnd: generates random numbers in the interval [0, 1]
The program keeps generating random test cases until at least one of each output occurs.
uc
in
Random Test Cases for the NextDate Program
Test Cases Days 1-30 of 31- Day 31 of 31- Days 1-29 of 30- Days 30 of 30-
Day Months Day Months Day Months Day Months
913 542 17 274 10
d.
1101 621 9 358 8
4201 2448 64 1242 46
1097 600 21 350 9
5853 3342 100 1804 82
3959
1436
u 2195
786
73
22
1252
456
42
13
Percentage 56.76% 1.65% 30.91% 1.13%
lo
Probability 56.45% 1.88% 31.18% 1.88%
45 1 1 1 22
83 1 1 1 19
312 1 8 3 77
vt
92 1 4 1 19
417 1 11 2 94
310 1 6 5 75
126 1 5 1 26
7.46% 0.04% 0.19% 0.08% 1.79%
7.26% 0.07% 0.20% 0.07% 1.01%
Disadvantages of BVA
Does not test all possible inputs.
Does not test dependencies between combinations of inputs.
Chapter 6
Equivalence Class Testing
Equivalence classes
in
The important aspect of equivalence classes is that they form a partition of a set, where
partition refers to collection of mutually disjoint subsets, the union of which is the entire
set.
This law has two important implications for testing:
d.
- The fact that the entire set is represented provides a form of completeness, and the
disjointedness ensures a form of non redundancy.
The elements of a subset have something in common. The idea of equivalence class testing is
to identify test cases by using one element from each equivalence class.
If the equivalences classes are chosen wisely, this greatly reduces the potential redundancy
u
among test cases.
The key point in equivalence class testing is to choose the equivalence relation that
lo
determines the classes.
We need the function that we have used in boundary value testing for the sake of
comprehensible drawings, which relates to a function F of two variables x1 and x2.
When F is implemented as a program, the input variables x1 and x2 will have the following
uc
in
u d.
Weak Robust Equivalence Class Testing
The name for this form is admittedly counterintuitive and oxymoronic.
- How can something be both weak and robust?
lo
The robust part comes from consideration of invalid values.
And weak part refers to the single fault assumption.
- For valid inputs, use one value from each valid class.
- For invalid inputs, a test case will have one invalid value and the remaining values
uc
in
d.
Equivalence Class Test Cases for the Triangle Problem
According to problem statement, four possible outputs can occur: Not a Triangle, Scalene,
Isosceles and Equilateral. We can use these to identify output equivalence classes as
follows:
u
R1= {< a, b, c >: the triangle with sides a, b, and c is equilateral}
R2= {< a, b, c >: the triangle with sides a, b, and c is isosceles}
lo
R3= {< a, b, c >: the triangle with sides a, b, and c is scalene}
R4= {< a, b, c >: sides a, b, and c do not form a triangle}
Four weak normal equivalence class test cases, chosen arbitrarily from each class are:
uc
Because no valid subintervals of variables a, b, and c exist, the strong normal equivalence
class test cases are identical to weak normal equivalence class test cases.
Considering, the invalid values for a, b, and c yields the following additional weak robust
equivalence class test cases.
We can notice that how thoroughly the expected outputs describe the invalid inputs values.
in
Equivalence class testing is clearly sensitive to the equivalence relation used to define
classes. If we base equivalence classes on the input domain, we obtain a richer set of test
cases.
What are some of the possibilities for the three integers, a, b and c? They can all be equal,
d.
exactly one pair can be or none can be equal:
D1= {< a, b, c >: a = b = c}
D2= {< a, b, c >: a = b, a ≠ c}
D3= {< a, b, c >: a = c, a ≠ b}
D4= {< a, b, c >: b = c, a ≠ b}
u
D5= {< a, b, c >: a ≠ b, a ≠ c, b ≠ c}
We can apply the triangle property to see if they even constitute a triangle.
D6= {< a, b, c >: a ≥ b+c}
lo
D7= {< a, b, c >: b ≥ a+c}
D8= {< a, b, c >: c ≥ a+b}
If we want to be even more thorough, we could separate the “greater than or equal to” into
uc
The NextDate function illustrates very well the craft of choosing the underlying equivalence
relation. NextDate is a function of three variables month, day and year and these have
intervals of valid classes defined as follows,
M1 = {month: 1 ≤ month ≤ 12}
D1 = {day: 1 ≤ day ≤ 31}
Y1 = {year: 1812 ≤ year ≤ 2019}
The invalid equivalence classes are,
M2 = {month: month < 1}
M3 = {month: month > 12}
D2 = {day: day < 1}
D3 = {day: day > 31}
Y2 = {year: year < 1812}
Y3 = {year: year > 2019}
in
WR4 6 -1 1915 Value of day not in the range 1..31
WR5 6 32 1915 Value of day not in the range 1..31
WR6 6 15 1811 Value of year not in the range 1812..2019
WR7 6 15 2020 Value of year not in the range 1812..2019
Expected Output
Value of month not in the range 1..12
Value of day not in the range 1..31
Value of year not in the range 1812..2019
lo
Value of month not in the range 1..12
SR4 -1 -1 1915
Value of day not in the range 1..31
Value of day not in the range 1..31
SR5 6 -1 1811
Value of year not in the range 1812..2019
uc
If we more carefully choose the equivalence relation, the resulting equivalence classes will
be more useful.
If it is not the last day of a month what must be done to an input date?
- The NextDate function will simply increment the day value.
- At the end of a month, the next day is 1 and the month is incremented.
- At the end of a year, both the day and month are reset to 1, and the year is
incremented.
Finally, the problem of leap year makes determining the last day of a month is interesting.
With all above in mind, we might postulate the following equivalence classes:
M1 = {month: month has 30 days}
M2 = {month: month has 31 days}
M3 = {month: month is February}
HN, RSG & KTC, ISE, RNSIT 2022 Page 53
VI sem ISE (A, B & C) Module II
D1 = {day: 1≤ day ≤ 28}
D2 = {day: day=29}
D3 = {day: day=30}
D4 = {day: day=31}
Y1= {year: year = 2000}
Y2 = {year: year is a non-century leap year}
Y3 = {year: year is a common year}
By having separate classes for 30 and 31 day months, we can simplify the question of the
last day of the month.
By taking February as a separate class, we can give more attention to leap year questions.
We can give special attention to day values: days in D1 are always incremented, while days
in D4 only have meaning for months in M2.
in
Finally, we have three classes of years: the special case of the year 2000, leap years, and
non-leap years.
Note: This is not a perfect set of equivalence classes, but its use will reveal many potential
d.
errors.
The strong normal equivalence class test cases for the revised classes are,
in
SN29 2 29 1996 3/1/1996
SN30 2 29 2002 Invalid Input Date
SN31 2 30 2000 Invalid Input Date
SN32 2 30 1996 Invalid Input Date
d.
SN33 2 30 2002 Invalid Input Date
SN34 2 31 2000 Invalid Input Date
SN35 2 31 1996 Invalid Input Date
SN36 2 31 2002 Invalid Input Date
u
When we move from weak to strong normal testing, issues of redundancy may arise.
The move from weak to strong, whether with normal or robust classes, always makes
lo
the presumption of independence and this is reflected in the cross-product of the
equivalence classes.
Three month classes times four day classes times three year classes (3*4*3=36) results
in 36 strong normal equivalence class test cases.
uc
Adding two invalid classes for each variable (3+2 * 4+2 * 3+2) will result in 150 strong
robust equivalence class test cases ie., (5*6*5).
and barrels.
These equivalence classes are exactly similar to be identified by traditional equivalence class
testing.
The first class is the valid input and other two are invalid.
The input domain equivalence classes lead to very unsatisfactory sets of test cases and
equivalence classes defined on the output range of the commission function will be an
improvement.
The valid classes of the input variables are:
L1= {locks: 1 ≤ locks≤70}
L2= {locks= -1} (occurs if locks =-1 is used to control input iteration)
S1= {stocks: 1 ≤ stocks ≤ 80}
B1= {barrels: 1 ≤ barrels ≤ 90}
When a value of -1 is given for locks, the while loop terminates, and the values of
totalLocks, totalStocks, and total Barrels are used to compute sales, and then commission.
Here, we will have exactly one weak normal equivalence class test case and it is identical to
the strong normal equivalence class test case.
in
WN1, SN1 35 40 45 $3900
Note that the case for locks = -1 just terminates the iteration. We will have eight weak
robust test cases.
d.
Case ID Locks Stocks Barrels Expected Output
WR1 10 10 10 $1000
WR2 -1 40 45 Input loop terminates
WR3 -2 40 45 Value of Locks not in the range 1..70
WR4
WR5
u
71
35
40
-1
45
45
Value of Locks not in the range 1..70
Value of Stocks not in the range 1..80
WR6 35 81 45 Value of Stocks not in the range 1..80
lo
WR7 35 40 -1 Value of Barrels not in the range 1..90
WR8 35 40 91 Value of Barrels not in the range 1..90
uc
Finally, a corner of the cube will be in 3-space of the additional strong robust equivalence
class test cases:
Figure below helps us get a better feel for the input space.
Elements of S1 are points with integer coordinates in the pyramid near the origin.
in
Elements of S2 are points in the triangular slice between the pyramid and the rest of the
input space.
Finally, elements of S3 are all those points in the rectangular volume.
All the error cases found by the strong equivalence classes of the input domain are not in
d.
S1 or S2.
All error cases found by the strong equivalence classes of the input domain are outside of
the rectangular space shown in figure below.
Figure: Input space of the commission problem
u
lo
uc
Output test cases give us some sense that we are exercising important parts of the
problem. We might want to add some boundary checking, just to make sure the transitions
at sales of $1000 and $1800 are correct. This is not particularly easy because we can only
vt
Advantages
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 and sets of discrete
value.
It is used when program function is complex.
HN, RSG & KTC, ISE, RNSIT 2022 Page 57
VI sem ISE (A, B & C) Module II
Strong and weak classes helps to distinguish between progression and regression
testing.
Disadvantages
Doesn’t test every input.
No guide lines for choosing inputs.
Several tries may be needed before the right equivalence relation is discovered.
in
3. If error conditions are of high priority, the robust forms are appropriate.
4. Equivalence class testing is appropriate when input data is defined in terms of intervals and
sets of discrete values. This is certainly the case when system malfunctions can occur for
out-of-limit variable values.
5. Equivalence class testing is strengthened by a hybrid approach with boundary value
d.
testing.
6. Equivalence class testing is indicated when the program function is complex. In such cases,
the complexity of the function can help identify useful equivalence classes, as in the
NextDate function.
u
7. Strong equivalence class testing makes a presumption that the variables are independent,
and the corresponding multiplication of test cases raises issues of redundancy. If any
dependencies occur, they will often generate “error” test cases.
lo
8. Several tries may be needed before the “right” equivalence relation is discovered. This is
sometimes known as the “competent programmer hypothesis”.
9. The difference between the strong and weak forms of equivalence class testing is helpful in
the distinction between progression and regression testing.
uc
Chapter 7
Decision Table – Based Testing
Decision tables
vt
Functional testing based on decision tables are most rigorous because decision tables
enforce logical rigor.
Decision tables have been used to represent and analyze complex logical relationships.
They are ideal for describing situations in which a number of combinations of action are
taken under varying sets of conditions.
A decision Table has four portions: the left- most columns is the stub portion; to the right
is the entry portion. The condition portion is noticed by c’s, action portion is noted as a’s.
They are referred as condition stub, condition entries, action stub, and action entries.
When we have binary conditions (true/false, yes/no, 0/1), the condition portion of a
decision table is truth table that has been rotated 900. This structure guarantees that we
consider every possible combination of condition values.
Rules indicate which action, if any, are taken for the circumstances (pre-conditions)
in
A1 X X X
A2 X X
A3 X X
A4 X X
Technique
u d.
To identify test cases with decision tables, we interpret conditions as inputs and actions
as outputs. Sometimes conditions end up referring to equivalence classes of inputs, and
actions refer to major functional processing portions of the item tested.
The rules are then interpreted as test cases.
The Decision Table for the Triangle Problem is as shown below,
lo
R1 R2 R3 R4 R5 R6 R7 R8 R9
C1:a,b,c form a triangle F T T T T T T T T
C2: a=b? - T T T T F F F F
uc
C3: a=c? - T T F F T T F F
C4: b=c? - T F T F T F T F
A1: Not a Triangle X
A2:Scalene X
A3: Isosceles X X X
A4: Equilateral X
vt
A5:Impossible X X X
Refined Decision Table for the Triangle Problem (*) is as shown below,
R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11
C1: a < b+c? F T T T T T T T T T T
C2: b < a+c? - F T T T T T T T T T
C3: c < a+b? - - F T T T T T T T T
C4: a=b? - - - T T T T F F F F
C5: a=c? - - - T T F F T T F F
C6: b=c? - - - T F T F T F T F
A1 : Not a Triangle X X X
A2 : Scalene X
in
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 in power of 2.
d.
Decision Table for above Table (previous page (*)) with Rule Counts
R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11
C1 : a < b+c? F T T T T T T T T T T
C2 : b < a+c? - F T T T T T T T T T
C4 : a=b?
u
C3 : c < a +b? -
-
-
-
F
-
T
T
T
T
T
T
T
T
T
F
T
F
T
F
T
F
C5 : a=c? - - - T T F F T T F F
lo
C6 : b=c? - - - T F T F T F T F
Rule count 32 16 8 1 1 1 1 1 1 1 1
A1 : Not a
X X X
Triangle
uc
A2 : Scalene X
A3 : Isosceles X X X
A4 : Equilateral X
A5 : Impossible X X X
vt
R1 R2 R3
Conditions
C1: month in M1? T - -
C2: month in M2? - T -
C3: month in M3? - - T
A1
A2
A3
If we apply this simplistic algorithm to the above decision table we get rule counts shown in
table below. But the actual rule count is 23=8 but 12 rules are generated. By expanding the
C1 : month in M1 T - -
C2 : month in M2 - T -
C3 : month in M3 - - T
Rule count 4 4 4
A1
in
DT1 4 1 2 Not a Triangle
DT2 1 4 2 Not a Triangle
DT3 1 2 4 Not a Triangle
DT4 5 5 5 Equilateral
d.
DT5 ? ? ? Impossible
DT6 ? ? ? Impossible
DT7 2 2 3 Isosceles
DT8 ? ? ? Impossible
DT9 2 3 2 Isosceles
u DT10
DT11
3 2 2 Isosceles
3 4 5 Scalene
lo
Using the above decision table (*), we obtain 11 functional test cases:
3 ways to fail the triangle property and
1 way to get an equilateral triangle
3 impossible cases
3 ways to get an isosceles triangle
uc
This makes it a perfect example for decision table based testing, because decision tables can
highlight such dependencies.
The decision table format lets us emphasize such dependencies using the notion of the
“impossible” action to denote impossible combination of conditions which are actually
impossible rules.
First Try
Consider the following set of equivalence classes
M1 = {month: month has 30 days}
M2 = {month: month has 31 days}
M3 = {month: month is February}
in
C1: month in M1? T
C2: month in M2? T
C3: month in M3? T
C4: day in D1?
C5: day in D2?
d.
C6: day in D3?
C7: day in D4?
C8 : year in Y1
A1 : Impossible
u A2 : next date
If we want to show why these rules are impossible we might revise our actions as follows,
lo
A1: Day invalid for this month
A2: cannot happen in a non – leap year
A3: compute the next date
Second Try
uc
If we focus on leap year aspect of the NextDate function; we could use the set of
equivalence classes. These classes have a Cartesian product that contains 36 entries, with
several that are impossible.
Here, Y2 is the set of years between 1812 and 2019, excluding the year 2000.
M1= {month: month has 30 days}
vt
in
A2 : Increment day X X X X X
A3 : reset day X X
A4 : Increment month X ?
A5 : reset month ?
d.
A6 : Increment year ?
9 10 11 12 13 14 15 16
C1 : month in M3 M3 M3 M3 M3 M3 M3 M3
u
C2 : day in
C3 : year in
D1 D1 D1 D2 D2 D2 D3 D4
Y1 Y2 Y3 Y1 Y2 Y3 - -
Rule count 1 1 1 1 1 1 3 3
lo
Actions
A1 : Impossible X X X
A2 : Increment day X X
A3 : reset day X X X
uc
A4 : Increment month X X X
A5 : reset month
A6 : Increment year
Third try
vt
We can clear up the end-of-year consideration with a third set of equivalent classes. This
time, we are very specific about days and month, and we revert to the simpler leap year or
non-leap year condition of the first try, so the year 2000 gets no special attention.
M1= {month: month has 30 days}
M2= {month: month has 31 days except December}
M3= {month: month is December}
M4= {month: month is February}
D1= {day: 1 ≤ day ≤ 27}
D2= {day: day = 28}
D3= {day: day =29}
D4= {day: day =30}
D5= {day: day= 31}
in
C1 : month in M1 M1 M1 M1 M1 M2 M2 M2 M2 M2
C2 : day in D1 D2 D3 D4 D5 D1 D2 D3 D4 D5
C3 : year in - - - - - - - - - -
Rule count
d.
Actions
A1 : Impossible X
A2 : Increment day X X X X X X X
A3 : reset day X X
u
A4 : Increment month X X
A5 : reset month
lo
A6 : Increment year
11 12 13 14 15 16 17 18 19 20 21 22
C1 : month in M3 M3 M3 M3 M3 M4 M4 M4 M4 M4 M4 M4
uc
C2 : day in D1 D2 D3 D4 D5 D1 D2 D2 D3 D3 D4 D5
C3 : year in - - - - - - Y1 Y2 Y1 Y2 - -
Rule count
Actions
A1 : Impossible X X X
vt
A2 : Increment day X X X X X X
A3 : reset day X X X
A4 : Increment month X X
A5 : reset month X
A6 : Increment year X
in
11-14 15 16 17 18 19 20 21,22
C1 : month in M3 M3 M4 M4 M4 M4 M4 M4
C2 : day in D1,D2,D3,D4 D5 D1 D2 D2 D3 D3 D4,D5
d.
C3 : year in - - - Y1 Y2 Y1 Y2 -
Rule count
Actions
A1 : Impossible X X
A2 : Increment day X X X
u
A3 : reset day
A4 : Increment month
X X
X
X
X
A5 : reset month X
lo
A6 : Increment year X
in
Input data decision Table
RULES R1 R2 R3 R4 R5 R6 R7 R8 R9
C1: Locks = -1 T F F F F F F F F
C2 : 1 ≤ Locks ≤ 70 - T T F T F F F T
Conditions
d.
C3 : 1 ≤ Stocks ≤ 80 - T F T F T F F T
C4 : 1 ≤ Barrels ≤ 90 - F T T F F T F T
A1 : Terminate the input loop X
A2 : Invalid locks input X X X X
A3 : Invalid stocks input X X X X
Actions
u
A4 : Invalid barrels input
A5 : Calculate total locks, stocks and
X
X X X
X
X
X
X X
X
X
barrels
lo
A6 : Calculate Sales X
A7: proceed to commission decision table X
Rule Count 8 1 1 1 1 1 1 1 1
uc
C4 : sales ≥1801 T
A1 : Terminate the program X
A2 : comm= 10%*sales X
Actions A3 : comm = 10%*1000 + (sales-1000)*15% X
A4 : comm = 10%*1000 + 15% *
800 + (sales-1800)*20% X
in
within a precondition limit and Should
3 locks and barrels and 15 -2 45
display value of stocks is not in the range
invalid for stocks
1..80.
Total of stocks , barrels is updated if it is
Enter the valid input for
within a precondition limit and Should
d.
4 stocks and barrels and -4 15 16
display value of locks is not in the range
invalid for locks
1..70
Total of locks is updated if it is within a
Enter the valid input for precondition limit and (i) Should display
5
u
locks and invalid value for
stocks and barrels
15 81 100 value of stocks is not in the range 1..80.
(ii) Should display value of barrels is not in
the range 1..90.
lo
Total of stocks is updated if it is within a
Enter the valid input for precondition limit and (i) Should display
6 stocks and invalid value for 88 20 99 value of locks is not in the range 1..70.
locks and barrels (ii) Should display value of barrels is not in
uc
in
d.
Applications of where Decision Tables are used
Where prominent if-then-else-logic.
Logical relationships among input variables.
Calculations involving subsets of the input variables.
Cause-and-effect relationships between inputs and outputs.
u
High cyclomatic complexity
lo
Advantages of Decision Tables
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 table(s).
uc
These tables guarantee that we consider every possible combination of condition values.
This is known as its "completeness property". This property promises a form of
complete testing as compared to other techniques.
Decision tables are declarative. There is no particular order for conditions and actions to
occur.
vt
Module II
1. What do you mean by Boundary value Analysis (BVA)? Explain the same with diagrams.
2. Explain how we introduce Robustness to BVA with diagram.
3. Discuss about Worst-case Testing in case Boundary Value Testing. How Robustness can be
introduced here with diagram.
4. Give conditions and generate BVA test cases and discuss test cases for triangle problem.
5. Give conditions and generate BVA worst case test case and discuss on the same for triangle
problem.
6. Generate robust test cases for triangle problem with BVA.
7. Give BVA test cases for Next Date problem with conditions.
in
8. Give worst case test cases for the Next Date problem along with conditions.
9. Give set of test cases for commission problem based on output boundary value analysis with
conditions.
10. What are the Advantages and Disadvantages of BVA.
d.
11. Explain equivalence class testing with relevant diagrams.
12. What do you mean by Weak normal equivalence class testing, explain with diagram.
13. What do you mean by strong normal equivalence class testing, explain with diagram.
14. What do you mean by weak robust equivalence class testing, explain with diagram.
15. What do you mean by strong robust equivalence class testing, explain with diagram.
u
16. Give test cases for the triangle problem with conditions on output/input for WNs, WRs, SRs
with equivalence class testing.
17. Give WN, WR, SR test cases for Next Date problem.
lo
18. What do you mean by Fault-Based testing? What are the assumptions made in Fault-Based
testing? Explain.
19. What is Mutation Analysis? Explain Mutation Analysis with an appropriate example?
20. Explain Fault-Based Adequacy criteria.
uc
in
19. Give BVA test cases for triangle problem.
20. Briefly explain the variants of equivalence class testing. Derive equivalence class test cases
for NextDate problem.
u d.
lo
uc
vt