0% found this document useful (0 votes)
36 views16 pages

05 Boundary Value Analysis - Done

SOFTWARE TESTING

Uploaded by

abbastayyaba417
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views16 pages

05 Boundary Value Analysis - Done

SOFTWARE TESTING

Uploaded by

abbastayyaba417
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

SOFTWARE

TESTING
(BOUNDARY VALUE
ANALYSIS)
Engr. Sajid Saleem
OUTLINE
 Boundary Value Analysis
 Applicability and Limitations
 Example
 Password Field Problem
 Banking Problem

2
REMEMBER ITS
EQUIVALENCE CLASS
PARTITIONING?

What is wrong in it?? Any


guess??
LET US INSPECT THROUGH
ECP
Id Input Expected Actual status
output output
1 -5
2 10
3 17
4 20
5 60
6 105
LET US INSPECT
THROUGH BVA
Id Input Expected
output
Actual
output
status

1 -1
2 0
3 1
4 15
5 16
6 17
7 18
8 19
9 54
10 55
11 56
12 98
13 99
14 100
NOW IT IS EASY TO FIND??
ANY GUESS??

• Notice the problem at the boundaries—the "edges" of each class.


• The age "16" is included in two different equivalence classes (as are 18
and 55).
• The first rule says don't hire a 16-yearold.
• The second rule says a 16-year-old can be hired on a part-time basis.
(CONTD.)
 Of course, the mistake that programmers make is coding inequality
tests improperly.
 Writing > (greater than) instead of ≥ (greater than or equal) is an example.

 The most efficient way of finding such defects, either in the


requirements or the code, is through inspection.
NOW INSPECT
TO DEFINE BOUNDARY VALUE
ANALYSIS FOLLOW THE GUIDELINE
 The steps for using boundary value testing are simple.
 First, identify the equivalence classes.
 Second, identify the boundaries of each equivalence class.
 Third, create test cases for each boundary value by
choosing one point on the boundary, one point just below
the boundary, and one point just above the boundary.
 "Below" and "above" are relative terms and depend on the
data value's units.
 If the boundary is 16 and the unit is "integer" then the
"below" point is 15 and the "above" point is 17.
 If the boundary is $5.00 and the unit is "US dollars and
cents" then the below point is $4.99 and the above point is
$5.01.
 On the other hand, if the value is $5 and the unit is "US
dollars" then the below point is $4 and the above point is
APPLICABILITY AND
LIMITATIONS
 Boundary value testing can significantly reduce the number of test cases that
must be created and executed.
 It is most suited to systems in which much of the input data takes on values
within ranges or within sets.
 Boundary value testing is equally applicable at the unit, integration, system,
and acceptance test levels.
 All it requires are inputs that can be partitioned and boundaries that can be
identified based on the system's requirements.
 Equivalence partitioning and boundary value analysis(BVA) are
closely related and can be used together at all levels of testing.
PASSWORD FIELD PROBLEM
BY USING ECP AND BVA
TECHNIQUES
A password field accepts minimum 6 characters and maximum 10 characters

 That means results for values in partitions 0-5, 6-10, 11-14 should be
equivalent
ECP AND BVA Test
Scenario
Scenario Expected Actual
Description Outcome Outcome
#
Test
Scenario Expected Actual
Scenario Enter 5 System
Description Outcome Outcome
# 1 characters in should not
password field accept
Enter 0 to 5 System
Enter 6 System
1 characters in should not
2 characters in should
password field accept
password field accept

Enter 6 to 10 System Enter 7 System


2 characters in should 3 character in should
password field accept password field accept
Enter 9 System
Enter 11 to 14 System 4 characters in should
3 character in should not password field accept
password field accept Enter 10 System
5 characters in should
password field accept
Enter 11 System
6 character in should not
password field accept
BANKING PROBLEM BY
USING ECP AND BVA
TECHNIQUES

A savings account in a bank has a different rate of interest
depending on the balance in the account. In order to test the
software that calculates the interest due, identify the ranges of
balance values that earn the different rates of interest. For
example, 3% rate of interest is given if the balance in the
account is in the range of $0 to $100, 5% rate of interest is
given if the balance in the account is in the range of $100 to
$1000, and 7% rate of interest is given if the balance in the
account is $1000 and above.
ECP Id Input Expected
output
Actual
output
1 -5 NA
2 50 3%
3Id 150
Input 5% Actual
Expecte status
<0 4 1050 7% output
d output
0 – 100 51 -1 -1 InvalidNA
100 – 1000
62 50 0 3% 3%
>1000
73 150
1 5% 3%
84 1100
99 7% 3%
9 100 --
SO THE CONCLUSION IS : IN CASE OF REPETITION, YOU
10 101 5%
HAVE TO DELETE THE DUPLICATIONS OF TEST CASES.
11 999 5%
12 1000 --
13 1001 7%
Id Input Expected Actual

BVA
output output
1 -0.01 Invalid
Id Input Expected Actual
2 0 3%
output output
3
1 0.01
-0.01 3%
Invalid
4
2 99.99
0 3%
5
3 100
0.01 3% or 5%
6
4 100.01
99.99 5%
3%
<0
7
5 99.99
100 3% or 5%
0 – 100
8
6 100
100.01 3%
5% or 5%
100 – 1000
9
7 100.01
999.99 5%
>1000
10
8 999.99
1000 5% or 7%
11
9 1000
1000.01 5%
7% or 7%
12 1000.01 7%
SO
13 THE CONCLUSION
999.99 IS : IN5%
CASE OF REPETITION OF
3
14POINTS (M-1, M, M+1), YOU
1000 5%HAVE
or 7%TO DELETE THE
DUPLICATIONS
15
OF TEST CASES.
1000.01 7%
THANK YOU

You might also like