What is Boundary Value Analysis(BVA) with Video Example?
Lets look into Equivalence Partitioning & Boundary Value Analysis testing techniques .
- Equivalence Partitioning - is a block box technique which can be applied to all levels of testing like unit , integration , system etc.
- A black box technique where the code is not visible to the tester.
- In Equivalence Partitioning , you divide set of test conditions into partitions that can be considered the same.
- To understand this better , lets 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.
- Values 11 to 99 are considered invalid and a error message "Only ten tickets may be ordered at one time" is shown
- On entering values 100 and above , the ticket # number defaults to a two digit number
- On entering values 0 and below , the ticket # defaults to 1
- We can not 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 where we divide the possible values of tickets into groups or sets 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.
- In Boundary Value Analysis , you test boundaries between equivalence partitions
- In our earlier example instead of checking, one value from 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.
0 comments: