Boundary Value Analysis Examples

Bounday value analysis is a test case design technique in software testing. This covers the known areas of frequent problems at the boundaries of software component input ranges. Experience has shown that the boundaries of input and output ranges of a software component are common locations for errors that result in software faults. Boundary value analysis assists with the design of test cases that will exercise these boundaries in an attempt to uncover faults in the software during the testing process.Applying boundary value analysis you have to select now a test case at each side of the boundary between two partitions. The boundary value analysis can have 6 text cases: n, n-1, n+1 for the upper limit and n, n-1, n+1 for the lower limit. The best way to learn boundary value analsysis is by going though some examples. In this artticle we will cover few examples of BVA:

1) Order numbers on a purchase control system can range between 10000 and 99999 inclusive. Which of the following inputs might be a result of designing tests for only valid equivalence classes and valid boundaries?

Answer:
a) 1000, 50000, 99999
b) 9999, 50000, 100000
c) 10000, 50000, 99999
d) 10000, 99999, 100000

2) An input field takes the year of birth between 1900 and 2004
The boundary values for testing this field are
a. 0,1900,2004,2005
b. 1900, 2004
c. 1899,1900,2004,2005
d. 1899, 1900, 1901,2003,2004,2005

3) To test the password field which accepts minimum of 6 characters and Maximum of 12 Characters.
To satisfy Boundary value, tester will have to write Test Cases considering values from  Valid region and each Invalid Region and Values which define exact boundary.
For our example we require 5 Test Cases
1. Consider password length less than 6
2. Consider password of length exactly 6
3. Consider password of length between 7 and 11
4. Consider password of length exactly 12
5. Consider password of length more than 12

Test Case Checklist

1. Is each test case numbered and named as per the standards?

2. Is it clear which features or requirements are being executed by the test?

3. Have test case(s) been identified for each test objective/scenario?

4. Have test case (s) been designed for the positive flows in each business scenario?

5. Have test case (s) been designed for the negative flows in each business scenario?

6. "Have the test case (s) been designed for all simple boundaries - maximum, minimum, and off-by-one boundaries?"
7. Are the test case (s) designed, redundant with any other test case or business scenario?

8.  Are the test case (s) designed in a flexible manner so that there are minimum rework required in case of change in requirements?

9. "Have the Expected Results been identified correctly?
(Expected Results should clearly state how the application should respond to the user actions given in each step/action. - Ensure that too many things are not included to be verified under one expected output)"

10. Are the pre-requisites described clearly for executing the tests?

11. Are the test cases traceable to a test requirement?

12. Have test cases been developed to exercise all error handling?

13. "Have the related areas that could possibly be affected by the implementation of the requirement been identified and covered in the test cases?
(Identify the impact areas and check with the test cases)"

14. Have the test case (s) been organized in a hierarchical order?

15. "Have test cases cover every possible validation checks?
(blank, invalid, mandatory, long text etc.)"