Boundary Value Analysis &equivalence Partitioning-Unit I
Boundary Value Analysis &equivalence Partitioning-Unit I
Invalid
Valid Invalid
(min-
(min, min + 1, nominal, max – 1, max) (max + 1)
1)
Valid Test cases: Valid test cases for the above can be any value
entered greater than 17 and less than 57.
Enter the value- 18.
Enter the value- 19.
Enter the value- 37.
Enter the value- 55.
Enter the value- 56.
Invalid Testcases: When any value less than 18 and greater than 56 is
entered.
Enter the value- 17.
Enter the value- 57.
Single Fault Assumption: When more than one variable for the same
application is checked then one can use a single fault assumption.
Holding all but one variable to the extreme value and allowing the
remaining variable to take the extreme value. For n variable to be
checked:
Maximum of 4n+1 test cases
Problem: Consider a Program for determining the Previous Date.
Input: Day, Month, Year with valid ranges as-
1 ≤ Month≤12
1 ≤ Day ≤31
1900 ≤ Year ≤ 2000
Design Boundary Value Test Cases.
Solution: Taking the year as a Single Fault Assumption i.e. year will be
having values varying from 1900 to 2000 and others will have
nominal values.
Test
Cases Month Day Year Output
Taking Day as Single Fault Assumption i.e. Day will be having values
varying from 1 to 31 and others will have nominal values.
Da
Test Case Month y Year Output
Example 2:
Let us consider an example of an online shopping site. In this site,
each of products has a specific product ID and product name. We can
search for product either by using name of product or by product ID.
Here, we consider search field that accepts only valid product ID or
product name.
Let us consider a set of products with product IDs and users wants to
search for Mobiles. Below is a table of some products with their
product Id.
Product Product ID
Mobiles 45
Laptops 54
Product Product ID
Pen Drives 67
Keyboard 76
Headphones 34
Example-3 :
Let us consider an example of software application. There is function
of software application that accepts only particular number of digits,
not even greater or less than that particular number.
Consider an OTP number that contains only 6 digit number, greater
and even less than six digits will not be accepted, and the application
will redirect customer or user to error page. If password entered by
user is less or more than six characters, that equivalence partitioning
method will show an invalid OTP. If password entered is exactly six
characters, then equivalence partitioning method will show valid
OTP.