Welcome To TestQSpider

It's Testing World.Lets Explore Your Life Here

Boundary value analysis and Equivalence Class Partitioning both are test case design techniques in black box testing. In this article we are covering “What is Boundary value analysis and equivalence partitioning & its simple examples”.


Practically, due to time and budget considerations, it is not possible to perform exhausting testing for each set of test data, especially when there is a large pool test cases. We need an easy way or special techniques that can select test cases intelligent from the pool of test-case, such that all test scenarios are covered.
For that, we use two techniques - Equivalence Partitioning & Boundary Value Analysis testing techniques.
Equivalence Partitioning – It is a black box technique (code is not visible to tester) which can be applied to all levels of testing like unit, integration, system etc. In this technique, you divide set of test condition into partition that can be considered the same. To get a better idea let see an example.
Let's consider the behavior of tickets in the Flight reservation application, while booking a new flight.
Ticket values 1 to 10 are considered valid & ticket is booked. While value 11 to 99 are considered invalid for reservation and error message will appear, "Only ten tickets may be ordered at one time". 
Here is the test condition
  1. Any Number greater than 10 entered in the reservation column (let say 11) is considered invalid.
  2. Any Number less than 1 that is 0 or below, then it is considered invalid.
  3. Numbers 1 to 10 are considered valid
  4. Any 3 Digit Number say -100 is invalid.
We cannot test all the possible values because if done, number of test cases will be more than 100.To address this problem, we use equivalence partitioning hypothesis where we divide the possible values of tickets into groups or sets as shown below where the system behavior can be considered the same.
The divided sets are called Equivalence Partitions or Equivalence Classes. Then we pick only one value from each partition for testing. The hypothesis behind this technique is that if one condition/value in a partition passes all others will also pass. Likewise, if one condition in a partition fails, all other conditions in that partition will fail.
Boundary Value Analysis- in Boundary Value Analysis, you test boundaries between equivalence partitions
In our earlier example instead of checking, one value for each partition you will check the values at the partitions like 0, 1, 10, 11 and so on. As you may observe, you test values at both valid and invalid boundaries. Boundary Value Analysis is also called range checking.
Equivalence partitioning and boundary value analysis are closely related and can be used together at all levels of testing.

Difference between Black Box Testing and White Box Testing


             Black Box Testing
                   White Box Testing
1
In this testing knowledge of programming is not necessarily essential.
In this form of testing knowledge of programming is must means it is essential.
2
Normally independent software testers are responsible for doing this type of testing.
Normally software developers are responsible for doing this type of testing.
3
In this form of testing Knowledge of implementation is not required.
In this form of testing Implementation knowledge is required.
4
In this testing testers may or may not be technically sound.
Normally software developers are doing the white box testing but if it is performed by software testers than testers should be technically sound.
5
In this sort of testing testers mainly focuses on the functionality of the system.
In this sort of testing developers mainly focuses on the structure means program/code of the system.
6
This testing is done by testers.
This testing is mostly done by developers.
7
This type of testing always focuses on what is performing/ carried out.
This type of testing always focuses on how it is performing/ carried out.
8
In Black Box Testing no knowledge regarding internal logic of code is needed means no need of programming is necessary.
In White Box Testing knowledge regarding internal logic of code is needed means need of programming is mandatory.
9
Other names of this testing include means synonyms of black box testing are testing regarding functionality means Functional testing, Behavioral testing, and Opaque-box/ Closed-box testing that is the reason why in this testing no knowledge of programming is needed.
Other names of this testing include means synonyms of white box testing are testing regarding code means Structural testing, Glass-box/ Clear-box testing, Open-box testing/ Transparent-box testing, Logic-driven testing and Path-oriented testing that is the reason why in this testing knowledge of programming is needed.
10
Black box testing means functional test or external test.
White box testing means structural test or interior test.