[Software QA Practices] Equivalence Partitioning Vs Boundary Value Analysis

1 minute read

Equivalence Partitioning and Boundary Value techniques go hand in hand in Black box testing. Using these both techniques can reduce the number of input data from infinite values to finite and still maintain the quality of testing.

Equivalence partitioning technique

So, what is Equivalence partitioning technique and how it differs from Boundary Value Analysis technique?

Given that we have a range of values or a set of values that fulfills certain conditions, then we could divide and partition the values as per the given conditions. Based from the partitioned values, we can select the value within the range in the partition.

For example,

The average normal body temperature is within the range of 36.1°C to 38°C. If the temperature is more than 38°C, it means the person is having fever caused by an infection or illness. When the body temperature is lower than 36.0 °C, the person is having Hypothermia which is a medical emergency that occurs when your body loses heat faster than it can produce heat.

• Hyphothermia = Body temperature < 36
• Normal = 36 < Body temperature < 38
• Fever = Body temperature > 38

img

Answer:

Temperature Type Valid Equivalence partitioning values
Hypothermia 35.0,35.1,35.2,35.3,35.4,35.5,35.6,35.7,35.8,35.9
Normal 36.3, 36.4,36.5,36.6,36.7,36.8,36.9,37.0,37.1,37.2 ,37.3,37.4,37.5,37.6,37.7,37.8
Fever** 38.2, 38.3, 38.4.38.5,38.6,38.7,38.8,38.9

Boundary Value technique

Boundary Value Analysis technique takes the value at the border of the range. It could be 2-point value (two-value) boundary or 3-point value (three-value) boundary.

2-point boundary takes the boundary values on and above the boundary
3-point boundary takes the boundary values of before, on and above the boundary

Using the same example above, we can drive the testing input data using Boundary Value technique

Answer:

Temperature Type 2-point boundary values 3-point boundary values
Hypothermia 36.0, 36.1 35.9,36.0,36.1
Normal 36.0,36.1,38.0,38.1 35.9,36.0,36.1,37.9,38.0,38.1
Fever 38.0,38.1 37.9,38.0,38.1

Using both techniques enable testing to be done efficiently and effectively without worrying if testing coverage is not sufficient.