# What is Boundary value analysis?

BVA (abbreviation for Boundary value analysis ) is one of the black box testing technique which helps us to select the test cases cleverly from the pool of the test cases to save our time and efforts

It is a technique of making sure that the functionality of the system is foreseeable for input and output boundary conditions. Boundary values are very important for testing as defects could be introduced at boundaries conveniently

### Where Boundary value analysis is applicable?

Boundary value analysis is applicable on test objects where we have defined boundary values. It is applicable to a problem also that can be modelled in terms of variables and domains.

### How to apply BVA?

For applying BVA we have a very simply defined formula

`lower_boundary - 1,  lower_boundary and  upper_boundary, upper_boundary + 1`

Let’s try to understand by an example

We have a number field in which we have following condition

```// Input should be greater than equal to 20 and less than 60
If (input > = 20 AND input < 50) then
do  some
else
do something else

// So, according to this input values from 20 to 59 are valid```

So using BVA formula we will get our test cases

Now, we have :

• lower_boundary = 20
• upper_boundary= 59

And we will take the values in consideration which lies between lower_boundary and upper_boundary (inclusive)

• lower = 20 -1
• 20 and 59
• upper = 59+1

So, values we will get ,

• 19 as an invalid value as the lower boundary >= 20 is a valid lower boundary value
• 59 as a valid upper boundary value
• 60 as an invalid boundary value

### Examples of BVA

• Maximum negative, maximum positive, and 0 inputs or output;
• If input conditions specify the number of values n, test with (n-1), n and n+1) input values;
• Empty input files and files with one character in them;
• For a range of values bounded by x and y, test (x-1), x, (x+1) , (y-1), y , (y+1)