Page 217 - DCAP405_SOFTWARE_ENGINEERING
P. 217
Software Engineering
Notes suffix—four-digit number
password—six digit alphanumeric string
commands—check, deposit, bill pay, and the like
The input conditions associated with each data element for the banking application can be
specified as area code:
Input condition, Boolean—the area code may or may not be present.
Input condition, range—values defined between 200 and 999, with specific exceptions.
prefix: Input condition, range—specified value >200
Input condition, value—four-digit length
password: Input condition, Boolean—a password may or may not be present.
Input condition, value—six-character string.
command: Input condition, set—containing commands noted previously.
Applying the guidelines for the derivation of equivalence classes, test cases for each input
domain data item can be developed and executed. Test cases are selected so that the largest
number of attributes of an equivalence class are exercised at once.
Designing Test Cases using Equivalence Partitioning
To use equivalence partitioning, you will need to perform two steps
1. Identify the equivalence classes
2. Design test cases
Step 1: Identify Equivalence Classes
Take each input condition described in the specification and derive at least two equivalence
classes for it. One class represents the set of cases which satisfy the condition (the valid class) and
one represents cases which do not (the invalid class )
Following are some general guidelines for identifying equivalence classes:
1. If the requirements state that a numeric value is input to the system and must be within a
range of values, identify one valid class inputs which are within the valid range and two
invalid equivalence classes inputs which are too low and inputs which are too high. For
example, if an item in inventory can have a quantity of - 9999 to + 9999, identify the
following classes:
(a) one valid class: (QTY is greater than or equal to -9999 and is less than or equal to 9999).
This is written as (- 9999 < = QTY < = 9999)
(b) the invalid class (QTY is less than -9999), also written as (QTY < -9999)
(c) the invalid class (QTY is greater than 9999), also written as (QTY >9999)
2. If the requirements state that the number of items input by the system at some point must
lie within a certain range, specify one valid class where the number of inputs is within the
valid range, one invalid class where there are too few inputs and one invalid class where
there are, too many inputs.
210 LOVELY PROFESSIONAL UNIVERSITY