What is Boundary Value Analysis?
Boundary Value Analysis is one of the most commonly used black box testing techniques in software testing. This testing technique used to identify errors at the boundaries of input domains. It’s based on the observation that defects often occur at the edges of input values rather than in the middle. This technique is especially useful in functional testing, where inputs are validated against expected outputs.
Reason of Boundary Value Analysis
Some defects may often occur at boundaries because of:
-Programmers may use incorrect comparison operators like "<" instead of "<=".
-Users give input data at the minimum or maximum allowed limits.
-Edge conditions are more error-prone due to the logic or data type issues.
Core Principles of BVA
Boundary Value Analysis typically involves testing:
. Minimum boundary value
. Maximum boundary value
. Just below the minimum
. Just above the maximum
. Nominal (valid) value within the range
For example: The login form accepts an age from the range of 18–60:
Test values: 17, 18, 19, 59, 60, 61
This approach ensures coverage of:Test values of Lower boundary 17: Invalid - Just below the minimum
Test values of Lower boundary 18,19: Valid - Just above the minimum
Test values of Upper boundary 59, 60: Valid - Just below the maximum
Test values of Upper boundary 61: Invalid - Just above the maximum
Types of Boundary Value Analysis
Two types of Boundary Testing Techniques:
i) Single Input Boundary Testing:
It used when the input field has a single variable or range(like age, marks, or salary)
Example: Testing minimum and maximum marks allowed in a grade field.
ii) Multiple Input Boundary Testing:
It used when multiple fields have their own boundaries.
Example: The login form accepts the age from the range of 18 to 40 and Experience 0 to 10 years.
This both set of boundaries must be tested individually and or combinations.
Real life Example
We check a Password Length
- Valid range: 8–20 characters
- Boundary value of test cases: 7, 8, 9, 19, 20, 21
i)Test value of 7 : Invalid Password
ii)Test value of 8, 9, 19, 20: Valid Password
iii)Test value of 21: Invalid Password
Pros of BVA
. Efficient: Targets high-risk areas with fewer test cases.
. Effective: Catches common boundary-related bugs.
. Simple to apply: Easy to derive test cases from specifications.
Limitations of BVA
. Assumes errors only occur at boundaries—not always true.
. May miss logic errors in the middle of input ranges.
Time to Use BVA
. Input fields with defined ranges (age, salary, quantity)
. During system testing, integration testing or acceptance testing
. Validations involving minimum/maximum constraints
Steps of Boundary Value Analysis
- Identify input variables in the requirement function.
- Determine valid input range for each variable.
- Identify boundary values of minimum and maximum.
- Add test cases for values just below or above boundary.
- Execute test cases
- Log defects if output moves from expected behavior.
Conclusion
Boundary Value Analysis is the most effective software testing. By focusing on the edges of input domains and helps uncover bugs that might otherwise slip through. Whether we testing a login form, a financial calculator, or a mobile app, BVA ensures your system behaves reliably at its limits.
Top comments (0)