A simple example to define Boundary Value Analysis and Equivalence Partitioning:
Equivalence Partitioning and Boundary Value Analysis are both test case design strategies used in Black-Box Testing.
Recommended IPTV Service Providers
- IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
- IPTVRESALE – Rating 5/5 ( 200+ Reviews )
- IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
- IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
- IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
- IPTVTOPS – Rating 5/5 ( 43 Reviews )
Through this tutorial, we aim to delve deep into the concepts of Boundary Value Analysis and Equivalence Partitioning, supplemented with easy examples for better comprehension.
Without further ado, let’s get started!
Equivalence Partitioning
In this approach, input data is divided into distinct equivalence data groups. Equivalence Partitioning is often used to limit the total number of test cases to a manageable set of testable cases, covering as many requirements as possible.
Simply put, it involves categorizing all potential test cases into groups. A single test value is chosen from every group for testing.
For instance, if you are testing an input field that accepts numbers from 1 to 1000, it’s not feasible to write thousands of test cases for all 1000 valid inputs and additional test cases for invalid data.
Using the above Equivalence Partitioning method, test cases can be divided into three groups or ‘classes’ of input data. Each test case represents its respective class.
In the above example, we could segregate our test cases into three equivalence classes of valid and invalid inputs.
Testing input fields that accept numbers between 1 and 1000 with Equivalence Partitioning yields:
#1) A data class with all valid inputs. Choose a single value from the range of 1 to 1000 as a valid test case. Any other choice within this range would yield the same result. Therefore, one valid input data test case should suffice.
#2) A class of input data with all values below the lower limit (i.e., any value less than 1), as a test case of invalid input data.
#3) A class of input data with any value exceeding 1000, to represent the third class of invalid inputs.
With Equivalence Partitioning, you would be categorizing all possible test cases into three classes. Testing other values from any class should yield identical results.
We’ve chosen one representative from each input class to design our test cases. These values are chosen in such a way as to exercise the maximum possible attributes of each equivalence class.
Equivalence Partitioning is the most effective strategy to cover maximum requirements with the fewest test cases.
Boundary Value Analysis
It’s well observed that the input values at the edge of the input domain tend to result in more system errors.
Input domain boundaries typically witness more errors. Consequently, ‘Boundary Value Analysis’ testing strategy is employed to identify errors at the boundaries rather than at the center of the input domain.
Boundary Value Analysis extends Equivalence Partitioning by selecting test cases at the boundaries of the equivalence classes.
Test cases for an input field accepting numbers between 1 and 1000 using Boundary value analysis are:
#1) Test cases with data values exactly at the input domain boundaries i.e., values 1 and 1000, in this case.
#2) Test data values just below the extreme boundaries of the input domain i.e., values 0 and 999.
#3) Test data values just beyond the extreme boundaries of the input domain i.e., values 2 and 1001.
Often, Boundary Value Analysis is addressed as a part of Stress and Negative Testing.
Note: Testing one value from each equivalence class you create for input domains isn’t a strict rule. You’re free to select several valid and invalid values from each equivalence class, depending on your specific requirements and prior judgments.
For example, if you partition 1 to 1000 input values into equivalence classes of invalid data, you could select test case values like 1, 11, 100, 950, etc. The same applies to other test cases with invalid data classes.
This is a simple and basic example that should offer clarity on the concepts of Boundary Value Analysis and Equivalence Partitioning.
We welcome you to share your examples in the comments section below.