BlackBoxTesting

# If 200 areacode areacode 999 valid area code testing

• Notes
• 43

This preview shows page 18 - 30 out of 43 pages.

If (200 <= areaCode && areaCode <= 999) { // valid area code } Testing area codes 200 and 999 would catch this error, but a center value like 770 would not In addition to testing center values, we should also test boundary values Right on a boundary Very close to a boundary on either side

Subscribe to view the full document.

Valid Invalid Boundary Value Analysis Create test cases to test boundaries of equivalence classes
Boundary Value Analysis - examples Input Boundary Cases A number N such that: -99 <= N <= 99 ? Phone Number Area code: [200, 999] Prefix: (200, 999] Suffix: Any 4 digits ?

Subscribe to view the full document.

Boundary Value Analysis - examples Input Boundary Cases A number N such that: -99 <= N <= 99 -100, -99, -98 -10, -9 -1, 0, 1 9, 10 98, 99, 100 Phone Number Area code: [200, 999] Prefix: (200, 999] Suffix: Any 4 digits ?
Boundary Value Analysis - examples Input Boundary Cases A number N such that: -99 <= N <= 99 -100, -99, -98 -10, -9 -1, 0, 1 9, 10 98, 99, 100 Phone Number Area code: [200, 999] Prefix: (200, 999] Suffix: Any 4 digits Area code: 199, 200, 201 Area code: 998, 999, 1000 Prefix: 200, 199, 198 Prefix: 998, 999, 1000 Suffix: 3 digits, 5 digits

Subscribe to view the full document.

Boundary Value Analysis - examples Numeric values are often entered as strings which are then converted to numbers internally [int x = atoi(str);] This conversion requires the program to distinguish between digits and non-digits A boundary case to consider: Will the program accept / and : as digits? / 0 1 2 3 4 5 6 7 8 9 : 47 48 49 50 51 52 53 54 55 56 57 58 Char ASCII
Testing combinations of inputs Equivalence Partitioning and Boundary Value Analysis are performed on each individual input, resulting in a set of test values for each input TV 1 = set of test values for Input 1 TV 2 = set of test values for Input 2 Etc. Beyond testing individual inputs, we must also consider input combinations

Subscribe to view the full document.