Page 218 - DCAP405_SOFTWARE_ENGINEERING
P. 218

Unit 12: Testing Tactics




                                                                                                Notes
                 Example: Specifications state that a maximum of 4 purchase orders can be registered
          against anyone product. The equivalence classes are: the valid equivalence class: number of
          purchase orders is greater than or equal to 1 and less than or equal to 4 , also written as (1 < = no.
          of purchase orders < = 4) the invalid class (no. of purchase orders> 4) the invalid class (no. of
          purchase orders < 1)

          3.   If the requirements state that a particular input item match one of a set of values and each
               case will be dealt with the same way, identify a valid class for values in the set and one
               invalid class representing values outside of the set. For example, if the requirements state
               that a valid province code is ON, QU, and NB, then identify : the valid class code is one of
               ON, QU, NB the invalid class code is not one of ON, QU, NB.
          4.   If the requirements state that a particular input item match one of a set of values and each
               case will be dealt with differently, identify a valid equivalence class for each element and
               only one invalid class for values outside the set. For example, if a discount code must be
               input as P for preferred customer, R for standard reduced rate, or N for none, and if each
               case is treated differently, identify
               the valid class code = P
               the valid class code = R
               the valid class code = N

               the invalid class code is not one of P, R, N
          5.   If you think any elements of an equivalence class will be handled differently than the
               others, divide the equivalence class to create an equivalence class with only these elements
               and an equivalence class with none of these elements. For example, a bank account balance
               may be from $0 up to $ 1,000,000, and balances $ 1,000 or over are not subject to service
               charges. Identify:
               the valid class: ($ 0 < = balance < $ 1,000) i.e., balance is between 0 and $ 1,000 - not
               including $ 1,000
               the valid class: ($ 1, 000 < = balance < = $ 1,000,000 i.e., balance is between $ 1,000 and
               $1,000,000 inclusive

               the invalid class: (balance < $ 0)
               the invalid class: (balance> $ 1,000,000)
          A definition of Equivalence Partitioning from our software testing dictionary:

          Equivalence Partitioning: An approach where classes of inputs are categorized for product or
          function validation. This usually does not include combinations of input, but rather a single
          state value based by class. For example, with a given function there may be several classes of
          input that may be used for positive testing. If function expects an integer and receives an integer
          as input, this would be considered as positive test assertion. On the other hand, if a character or
          any other input class other than integer is provided, this would be considered a negative test
          assertion or condition.

          Boundary Value Analysis

          BVA extends equivalence partitioning by focusing on data at the “edges” of an equivalence
          class.






                                           LOVELY PROFESSIONAL UNIVERSITY                                   211
   213   214   215   216   217   218   219   220   221   222   223