top of page

What is Boundary Values Analysis(BVA)?


ISTQB definition:

Boundary value analysis (BVA) - is based on testing the boundaries between partitions that are ordered, such as a field with numerical input or an alphabetical list of values in a menu.

Human language:

Boundary Value Analysis and Equivalence Partitioning are both black-box test techniques.


Boundary Value Analysis - it is the next part of Equivalence Partitioning for designing test cases, where test cases are selected at the edges of the equivalence classes, rather than finding those that exist in the center of the input domain.

Every partition has its maximum and minimum values, and these maximum and minimum values are the boundary values of a partition. The name comes from the Boundary, which means the limits of an area. So, BVA mainly focuses on testing both valid and invalid input parameters for a given range of software components.


Why do we have both equivalence partitioning and boundary value analysis?

Technically, because every boundary is in some partition, if you did only BVA you would also have tested every equivalence partition. However, this approach may cause problems if that value fails - was it only the boundary value that failed, or did the whole partition fail? Therefore, It’s widely recognized that the input values near the boundary or at the extreme end have higher chances of error.

How does It work?

The Boundary value analysis can be applied at all test levels. The test basis for BVA is those inputs that belong to the same equivalence class as defined by the equivalence partitioning. Given that the basis sets are neighbors, a boundary should exist between them.

The expected input and output values of the software component should be extracted from the component specification. The values are then grouped into sets with identifiable boundaries. Each set, or partition, contains values that are expected to be processed by the component in the same way. It is important to consider both valid and invalid partitions when designing test cases.

A boundary value testing might select input variable values at their minimum, just above the minimum, a nominal value, just above the maximum, and a maximum depending on the specification. The best way to test the Boundary value is by representing the partitions and boundaries in a table - it makes it easier to see whether you have tested each one.

While to achieve 100% coverage for EP, we need to ensure that there is at least one test for each identified equivalence partition, to achieve 100% coverage of boundary values, we need to ensure that there is at least one test for each boundary value identified.

Definitely, just one test for either a partition or a boundary may not be sufficient testing, but it does show some degree of thoroughness since we have not left any partition or boundary untested.

Life example:

Example: Boundary value analysis for numerical input

Imagine that our development team builds a registration form

Our registration form contains the field Age.

The requirement for this field are:

  • Only users in the range from 18 to 60 years have the possibility to create an account;

  • Only integer values are allowed as input, so our boundary is an integer 18 and 60 years in increments of 1.

So, the development team builds this registration form according to the requirement and our goal is to test it, in particular the Age field. Without using any test design technique we can create a test case for each input and try to create an account with ages 1,2,3,4,5,6,7,8 and till 60, but it is a time-consuming process that doesn't make sense.

The best approach in our case is to use Boundary Value and Equivalence partition test design techniques for testing the age fields.

So we will have the following equivalent classes

  • Equivalence partition 1: Invalid values - Age from 0 to 17;

  • Equivalence partition 2: Valid values - Age from 18 to 60;

  • Equivalence partition 3: Invalid values - Age 61 and older.

Therefore, for testing our age field by Equivalence Partition, we need to cover at least 3 test cases:

As example:

  • Equivalence partition 1: Registration by inputting age 5 into the Age field;

  • Equivalence partition 2: Registration by inputting age 40 into the Age field;

  • Equivalence partition 3: Registration by inputting age 90 into the Age field.

And for extending our testing by using the Boundary Value analysis, we need to cover at least 6 test cases:

Where test cases 1 and test case 2 cover the valid minimum and maximum values on the boundaries;

  • Test case 3 covers an invalid value just below the minimum on the first boundary;

  • Test case 4 covers a valid value just above the minimum on the first boundary;

  • Test case 5 covers a valid value just below the maximum on the second boundary;

  • Test case 6 covers an invalid value just above the maximum on the second boundary.

Conclusion:

So, if you are asked at an interview: What is Boundary Values Analysis(BVA)? The best way to answer is: Boundary Value Analysis - it is the next part of Equivalence Partitioning for designing test cases, where test cases are selected at the edges of the equivalence classes, rather than finding those that exist in the center of the input domain.

Every partition has its maximum and minimum values, and these maximum and minimum values are the boundary values of a partition. The name comes from the Boundary, which means the limits of an area. So, BVA mainly focuses on testing both valid and invalid input parameters for a given range of software components.

319 views

Recent Posts

See All
bottom of page