Test boundary conditions means testing below and above the edges of input output equivalence classes. For example we take a example of bank application where some minimum and maximum limit is set. Let say a bank application where you can withdraw maximum Rs.20,000 and a minimum of Rs.100, so in boundary value testing we test only the exact boundaries, rather than hitting in the middle. That means we test above the maximum limit and below the minimum limit.
Boundary Value Analysis and Equivalence Partitioning both are test case design strategies in Black-Box Testing.
In this method, the input domain data is divided into different equivalence data classes. This method is typically used to reduce the total number of test cases to a finite set of testable test cases, still covering maximum requirements.
Test cases for input box accepting numbers between 1 and 1000 using Equivalence Partitioning:
#1) One input data class with all valid inputs. Pick a single value from range 1 to 1000 as a valid test case. If you select other values between 1 and 1000 the result is going to be the same. So one test case for valid input data should be sufficient.
#2) Input data class with all values below the lower limit. I.e. any value below 1, as an invalid input data test case.
#3) Input data with any value greater than 1000 to represent the third invalid input class.
So using Equivalence Partitioning you have categorized all possible test cases into three classes. Test cases with other values from any class should give you the same result.
We have selected one representative from every input class to design our test cases. Test case values are selected in such a way that largest number of attributes of equivalence class can be exercised.
Equivalence Partitioning uses fewest test cases to cover maximum requirements.
Boundary Value Analysis
It's widely recognized that input values at the extreme ends of the input domain cause more errors in the system. More application errors occur at the boundaries of the input domain. ‘Boundary Value Analysis' Testing technique is used to identify errors at boundaries rather than finding those that exist in the center of the input domain.
Boundary Value Analysis is the next part of Equivalence Partitioning for designing test cases where test cases are selected at the edges of the equivalence classes.