Updated June 9, 2023
Introduction to Boundary Value Testing
Boundary Value Testing is one of the popular software testing mechanism, where testing of data is done based on boundary values or between two opposite ends where the ends may be like from start to end, or lower to upper or from maximum to minimum. This testing process was introduced to select boundary values that came from the boundary based on the inputs at different ends of testing values. This black box testing strategy was introduced after equivalence class partitioning where the partition of classes takes place first followed by a partition at the boundaries.
What is Boundary Value Testing?
- The testing is an analysis testing process that does testing practices at the boundaries of the partition covering all the testing defects where equivalence testing alone was difficult to handle those defects.
- This testing machine is in conjunction with an equivalence testing mechanism that provides valid testing scenarios when there is ordered partition and the data consists of numeric format.
- The boundary values of such a testing mechanism are identified by the values present at the extreme boundaries, i.e. minimum and maximum value.
- This is used mainly to analyze the testing at the partition boundaries and also to detect anomalies that may occur during testing cases.
- The black box testing techniques are helpful for detecting any errors or threats that happened at the boundary values of valid or invalid partitions rather than focusing on the center of the input data.
Explain the Test Case of Boundary Value Testing
The idea regarding this is cleared from the above statements. Now, it is time to test what are the possible causes for Boundary value testing.
Test Case Number #1
Let us assume a test case that takes the value of age from 21 to 65.
BOUNDARY VALUE TEST CASE | ||
INVALID TEST CASE
(Min Value – 1) |
VALID TEST CASES
(Min, +Min, Max, -Max) |
INVALID TEST CASE
(Max Value + 1) |
20 | 21, 22, 65, 64 | 66 |
From the above table, we can view the following inputs that are given.
- The minimum boundary value is given as 21.
- The maximum boundary value is given as 65.
- The valid inputs for testing purposes are 21, 22, 64 and 65.
- The invalid inputs for test cases are 20 and 66.
Test Case Scenarios
1. Input: Enter the value of age as 20 (21-1)
Output: Invalid
2. Input: Enter the value of age as 21
Output: Valid
3. Input: Enter the value of age as 22 (21+1)
Output: Valid
4. Input: Enter the value of age as 65
Output: Valid
5. Input: Enter the value of age as 64 (65-1)
Output: Valid
6. Input: Enter the value of age as 66 (65+1)
Output: Invalid
Test Case Number #2
Let us assume the next test case that takes the length of the input name from 8 to 14 characters.
BOUNDARY VALUE TEST CASE | ||
INVALID TEST CASE
(Min Value – 1) |
VALID TEST CASES
(Min, +Min, Max, -Max) |
INVALID TEST CASE
(Max Value + 1) |
7 | 8, 9, 14, 13 | 15 |
From the above table, we can view the following inputs that are given.
- The minimum boundary value is given as 8.
- The maximum boundary value is given as 14.
- The valid character lengths for testing purpose are 8, 9, 14 and 13
- The invalid character lengths for test cases are 7 and 15.
Test Case Scenarios
1. Input: Enter the text length as 7 (Min length -1)
Output: Invalid
2. Input: Enter the text length as 8 (Min length)
Output: Valid
3. Input: Enter the text length as 9 (Min length +1)
Output: Valid
4. Input: Enter the text length as 14 (Max length)
Output: Valid
5. Input: Enter the value of age as 13 (Max length -1)
Output: Valid
6. Input: Enter the value of age as 15 (Max length +1)
Output: Invalid
Importance
There are lots of importance where I will share some of them below:
- This is done when there is a huge number of test cases are available for testing purposes and for checking them individually, this testing is of great use.
- The analysis of test data is done at the boundaries of partitioned data after equivalence class partitioning happens and analysis is done.
- This testing process is actually known as black-box testing that focuses on valid and invalid test case scenarios and helps in finding the boundary values at the extreme ends without hampering any effective test data valuable for testing purpose.
- This is also responsible for testing where lots of calculations are required for any kind of variable inputs and for using in varieties of applications.
- The testing mechanism also helps in detecting errors or faults at the boundaries of the partition that is a plus point as most errors occur at the boundaries before the applications are submitted to the clients.
Examples to Implement Boundary Value Testing
The examples to implement for the same are as follows:
Example #1: Suppose, a printer has to make and deliver printed copies ranging from 1 to 150. So, to apply boundary value testing, the analysis is done on the boundaries, taking the extreme ends. The maximum value is 150 and the minimum value is 1. The invalid values in this test case will be 0 and 151. Therefore, there will be four boundary value tests for such a scenario.
Example #2: Another example is that consider the field that holds the maximum 5 digit character. The maximum value of the field is 99999 and the minimum value is 10000. These are the boundary values and the values below minimum and above maximum, all fall under invalid cases and testing is done according to that.
Conclusion
For designing and testing a large set of data for creating a major application, various techniques are required and for running and executing such test cases, boundary value testing plays an important role in achieving 100 percent efficiency, quality, and reliability in testing procedures.
Recommended Articles
This is a guide to Boundary Value Testing. Here we discuss an introduction, what is Boundary Value Testing, explanation with testing, and examples. You can also go through our other related articles to learn more –