0
5.6kviews
Boundary Value Analysis
1 Answer
0
124views

An effective test case design requires test cases to be designed such that they maximize the probability of finding errors. BVA technique addresses this issue. From the experience of testing teams, it has been observed that test cases designed with boundary input values have a high chance to find errors. It means that most of the failures crop up due to boundary values.

BVA is applicable when the module to be tested is a function of several independent variables. This method becomes important for physical quantities where boundary condition checking is crucial. For example, systems having requirements of minimum and maximum temperature, pressure or speed, etc. However, it is not useful for Boolean variables.

BVA is considered a technique that uncovers bugs at the boundary of input values. Here, boundary means the maximum or minimum value taken by the input domain. For example, ifA is an integer between 10 and 255 , then boundary checking can be on 10 $(9,10,11)$ and on 255$(256,25,254).$ Similarly, if B is another integer variable between 10 and $100,$ then boundary checking can n n be on 10$(9,10,11)$ and $100(99,100,101),$ as shown in below figure.

enter image description here

BVA offers several methods to design test cases

1. Boundary Value Checking (BVC)

In this method, the test cases are designed by holding one variable at its extreme value and other variables at their nominal values in the input domain.

The variable at its extreme value can be selected at:

(a) Minimum value (Min)

(b) Value just above the minimum value ($Min^+$)

(c) Maximum value (Max)

(d) Value just below the maximum value ($Max^-$)

Let us take the example of two variables, A and B . If we consider all the above combinations with nominal values, then following test cases (see Fig. 1) can be designed:

1.$A_{nom}, B_{min}$, 2. $A_{nom}, B_{min+}$, 3. $A_{nom}, B_{max}$

4.$A_{nom}, B_{max-}$, 5. $A_{min}, B_{nom}$, 6. $A_{min+}, B_{nom}$

7.$A_{max}, B_{nom}$, 8. $A_{max-}, B_{nom}$, 9. $A_{nom}, B_{nom}$

It can be generalized that for n variables in a module, $4 n+1$ test cast cast be designed with boundary value checking method.

2. Robustness Testing Method

The idea of BVC can be extended such that boundary values are exceeded as:

  • A value just greater than the Maximum value $(Max^+)$
  • A value just less than Minimum value $(Min^-)$

When test cases are designed considering the above points in addition to BVC, it is called robustness testing.

Let us take the previous example again. Add the following test cases to the list of 9 test cases designed in BVC:

10.$A_{max+}, B_{nom}$, 11. $A_{min-}, B_{nom}$,

12.$A_{nom}, B_{max+}$, 13. $A_{nom}, B_{min-}$

3. Worst Case Testing Method

We can again extend the concept of BVC by assuming more than one variable on the boundary. It is called worst-case testing method.

Again, take the previous example of two variables, A and B . We can add the following test cases to the list of 9 test casigned in $\mathrm{BVC}$ as:

10.$A_{min}, B_{min}$, 11. $A_{min+}, B_{min}$, 12. $A_{min}, B_{min+}$

13.$A_{min+}, B_{min+}$, 14. $A_{max}, B_{min}$, 15. $A_{max-}, B_{min}$

16.$A_{max}, B_{min+}$, 17. $A_{max-}, B_{min+}$, 18. $A_{min}, B_{max}$

19.$A_{min+}, B_{max}$, 20. $A_{min}, B_{max-}$, 21. $A_{min+}, B_{max-}$

22.$A_{max}, B_{max}$, 23. $A_{max-}, B_{max}$, 24. $A_{max}, B_{max-}$

25.$A_{max-}, B_{max-}$,

It can be generalized that for n input variables in a module, $5^{n}$ test can be designed with worst-case testing.

4. Robust Worst Case Testing Method

In third point the extreme values of a variable considered are of BVC only. The worst case can further be extended if we consider robustness also, that is, in worst-case testing if we consider the extreme values of the variables as in robustness testing method covered in second topic.

Again take the example of two variables, A and B . We can add the following test cases to the list of 25 test cases designed in Section 3 as:

26.$A_{min-}, B_{min-}$, 27. $A_{min-}, B_{min}$, 28. $A_{min}, B_{min-}$

29.$A_{min-}, B_{min+}$, 30. $A_{min+}, B_{min-}$, 31. $A_{min-}, B_{max}$

32.$A_{max}, B_{min-}$, 33. $A_{min-}, B_{max-}$, 34. $A_{max-}, B_{min-}$

35.$A_{max+}, B_{max+}$, 36. $A_{max+}, B_{min}$, 37. $A_{min}, B_{min+}$

38.$A_{max+}, B_{min+}$, 39. $A_{max+}, B_{max+}$, 40. $A_{max+}, B_{max}$

41.$A_{max}, B_{max+}$, 42. $A_{max+}, B_{max-}$, 43. $A_{max-}, B_{max+}$

44.$A_{max+}, B_{nom}$, 45. $A_{nom}, B_{max+}$, 46. $A_{min-}, B_{nom}$

47.$A_{nom}, B_{min-}$, 48. $A_{max+}, B_{min-}$, 49. $A_{min-}, B_{max+}$

It can be generalized that for n input variables in a module, $7^{n}$ test cases can be designed with robust worst-case testing.

Please log in to add an answer.