100% found this document useful (2 votes)
1K views4 pages

Boundary Value Analysis Examples

The document provides examples of boundary value analysis testing for different scenarios. It demonstrates how to write test cases that validate minimum, maximum, and boundary values for fields like password length, age, and salary. Test cases are created to validate values at the boundaries as well as just inside and outside the boundaries to ensure proper handling of invalid values.

Uploaded by

Raheela Nasim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
1K views4 pages

Boundary Value Analysis Examples

The document provides examples of boundary value analysis testing for different scenarios. It demonstrates how to write test cases that validate minimum, maximum, and boundary values for fields like password length, age, and salary. Test cases are created to validate values at the boundaries as well as just inside and outside the boundaries to ensure proper handling of invalid values.

Uploaded by

Raheela Nasim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Examples for Boundary Value Analysis

Example 1
Suppose you have very important tool at office, accepts valid User Name and Password
field to work on that tool, and accepts minimum 8 characters and maximum 12
characters. Valid range 8-12, Invalid range 7 or less than 7 and Invalid range 13 or more
than 13.

Write Test Cases for Valid partition value, Invalid partition value and exact boundary
value.

Solution:

• Test Cases 1: Consider password length less than 8.


• Test Cases 2: Consider password of length exactly 8.
• Test Cases 3: Consider password of length between 9 and 11.
• Test Cases 4: Consider password of length exactly 12.
• Test Cases 5: Consider password of length more than 12.

Example 2

Assume, we have to test a field which accepts Age 18 – 56

Solution:
Minimum boundary value is 18

Maximum boundary value is 56


Valid Inputs: 18,19,55,56
Invalid Inputs: 17 and 57

Test case 1: Enter the value 17 (18-1) = Invalid


Test case 2: Enter the value 18 = Valid
Test case 3: Enter the value 19 (18+1) = Valid
Test case 4: Enter the value 55 (56-1) = Valid
Test case 5: Enter the value 56 = Valid
Test case 6: Enter the value 57 (56+1) =Invalid

Example 3

Suppose there is program that takes two inputs: age ([18-55]), salary ([0-10000]) and output the
total mortgage for one person Mortgage = salary * factor,
where factor is given by the following table
Category Age Factor
Young (18-35 years) 75
Middle (36-45 years) 55
Old (46-55 years) 30

Solution :

Normal Boundary Value Testing


Input Values:
Age: Min 18, Min+ 19, Nom 25, Max- 54 Max 55
Salary : Min 0, Min+ 1, Nom 5000, Max- 9999, Max 10000

Test case for normal boundary value analysis will be prepared according to
{<x1nom, x2min>, <x1nom, x2min+>, <x1nom, x2nom>, <x1nom, x2max–>, <x1nom, x2max>,
<x1min, x2nom>, <x1min+, x2nom>, <x1max–, x2nom>, <x1max, x2nom>}

Test Age Salary Mortgage


Cases Output
1 25 0 75*0
2 25 1 75*1
3 25 5000 75*5000
4 25 9999 75*9999
5 25 10000 75*10000
6 18 5000 75*5000
7 19 5000 75*5000
8 25 5000 75*5000
9 54 5000 30*5000
10 55 5000 30*5000

Testcase 3 and 8 are redundant so will consider only once. total number of acceptable test cases
are 9
Robust Boundary Value Testing
Input Values:
Age: Min- 17, Min 18, Min + 19, Nom 25, Max- 54 Max 55, Max+ 56
Salary : Min- -1, Min 0, Min+ 1, Nom 5000, Max- 9999, Max 10000,Max+ 10001

Test Age Salary Mortgage


Cases Output
1 25 -1 Invalid Salary
2 25 0 75*0
3 25 1 75*1
4 25 5000 75*5000
5 25 9999 75*9999
6 25 10000 75*10000
7 25 10001 Invalid Salary
8 17 5000 Invalid Age
9 18 5000 75*5000
10 19 5000 75*5000
11 25 5000 75*5000
12 54 5000 30*5000
13 55 5000 30*5000
14 56 5000 Invalid Age
Test case 4 and 11 are redundant so will consider only once. So total number of acceptable test
cases are 13. The main value of robustness testing is that it forces attention on exception
handling.

Worst-Case Boundary Value Testing


Input Values:
Age: Min 18, Min+ 19, Nom 25, Max- 54 Max 55
Salary : Min 0, Min+ 1, Nom 5000, Max- 9999, Max 10000

Total number of test cases will be 5n = 25(where n =2)

Robust Worst-Case Boundary Value Testing


Input Values:
Age: Min- 17, Min 18, Min + 19, Nom 25, Max- 54 Max 55, Max+ 56
Salary : Min- -1, Min 0, Min+ 1, Nom 5000, Max- 9999, Max 10000,Max+ 10001

Total number of test cases will be 7n = 49 (where n =2)

You might also like