# Boundary Value Analysis: An Easy Overview For 2021

**Introduction**

When test data has several combinations in the input set and needs exhaustive testing of each set, it takes a lot of time and costs aplenty. That’s where boundary value analysis and equivalence partitioning help provide a solution to testing exhaustively. All test scenarios and the selected test cases representative of the test data are intelligently covered.

In this article let us look at:

**What is Boundary Testing?****What is Equivalent Class Partitioning?****Example 1: Boundary and Equivalence Value****Example 2: Boundary and Equivalence Value****Why Boundary Analysis & Equivalence Testing**?

## 1. **What is Boundary Testing?**

BVA is the process of boundary value analysis and testing used to test the partitioned input data’s boundary values during exhaustive testing. The boundary values or extreme end values are the types of boundaries like the Lower- Upper, Start- End, Just Inside-Just Outside and Maximum-Minimum values are used for the testing technique called “boundary testing”. Thus input data is the select variable when it is at the minimum, just-above-it, any nominal value, just near the maximum value and the maximum value. One must note that equivalence partitioning of classes of the input data set always takes place before boundary testing. Then boundary values of the partitioned classes are exhaustively tested using boundary values.

## 2. **What is Equivalent Class Partitioning?**

ECP- Equivalence Class Partitioning or Equivalence Partitioning is a testing-technique similar to a black box applied to software testing at all levels like the system, integration, basic units, etc. The data is divided into input units called the equivalent partitions of test data from which the test cases are selected. Thus the equivalence class testing time is vastly reduced, as also the number of test cases since only representative cases are used for boundary value analysis and testing. This technique is especially used where the input data has a range of data types and hence equivalence classification of partitions always precedes the selection of test cases.

## 3. **Example 1: Boundary and Equivalence Value**

Let’s demonstrate the differences between boundary values and equivalence values using the equivalence class partitioning examples below. Consider the Order Pizza Text Box’s behaviour. Values of pizzas between ten and one are taken as valid values, and an ‘order complete’ message is displayed to place the order, and values between eleven and ninety-nine are considered invalid and display the message that only ten pizzas may be ordered using the box.

The test condition is represented for the equivalence class example as below.

- A number greater than ten is invalid. For Ex: in 12 states, one can order only ten pizzas using the box.
- Any number less than one is invalid. For Ex: 0 or negative values or decimals like 1.5 will output the message for invalid numbers.
- Numbers between one and ten are valid.
- A three-digit number like 102 is invalid.

In this example, how to find equivalence class? Testing all values means wading through over 100 cases. Thus the hypothesis of equivalence partitioning is applied, partitioning the possible ticket values into the groups indicated. The system behaviour is based on the conditions input. The sets or groups are known as the Equivalence Classes or Equivalence Partitions. For testing, we select one representative value from each partition, meaning that if one value/ condition is valid in a partition, then all other values in the same partition will also be valid. And, if the representative value from the equivalence class fails, then all the values in that partitioned set will also fail.

Using boundary value testing, one uses boundary value analysis of the boundary values of the equivalence partitions. Thus, instead of checking all values, one checks the boundary value analysis example values, namely zero, one, ten, eleven etc. Testing occurs at boundary values of both invalid and valid boundaries, and this technique is known as range checking. Thus though both techniques of equivalence partitioning and boundary value analysis are different, they are closely interrelated and help in testing the test data intelligently, saving much time and costs.

## 4. **Example 2: Boundary and Equivalence Value**

In this example, consider a value analysis example of a password of 6 to 10 characters long. Here partition values are zero to five, six to ten, and eleven to fourteen for equivalence.

This provides 3 scenarios in boundary value analysis using the equivalence classes as below.

- Password field has zero to five characters is invalid password unacceptable to the system.
- Password has 6 to 10 characters is valid and acceptable to the system.
- Password has 11 to 14 characters is invalid and unacceptable to the system.

## 5. **Why Boundary Analysis & Equivalence Testing**?

Boundary value analysis and equivalence testing hypotheses score because

- Testing is done on a small number of representative test values of partitioned classes and not on every value of the test data.

- The guidelines or hypothesis set for selecting test cases is very clear and does not compromise as boundary values ensure the testing effectiveness.

- It is the ideal method for exhaustive and calculation-intensive cases of applications having a large number of inputs and variables in the input range of values.

**Conclusion**

Testing by boundary value analysis is used when a huge number of test cases are impossible to test practically and use equivalence partitioning of the input dataset to test the selected test cases from each partition. Both techniques can be used for testing in a BVA and ECP testing model.

If you are interested in making it big in the world of data and evolve as a Future Leader, you may consider our** Business Analytics Course Online**, a 10-month online program, in collaboration with IIM Indore!

## ALSO READ

**Bottom Up Parsing: A Basic Concise Guide in 5 Points****Fraud Detection Analytics: A Comprehensive Guide(2021)**