Page 272 - DCAP305_PRINCIPLES_OF_SOFTWARE_ENGINEERING
P. 272

Principles of Software Engineering



                   Notes         Key Points
                                    •  Although in rare cases equivalence partitioning is also applied to outputs, typically it is
                                      applied to the inputs of a component being tested.
                                    •  This method divides the input domain of a program into classes of data from which test
                                      cases can be derived.
                                    •  It is based on an evaluation of equivalence classes for an input condition. An equivalence
                                      class represents a set of valid or invalid states for input conditions. An input has certain
                                      ranges which are valid and other ranges which are invalid.
                                    •  Supplemented by BVA(Boundary Value Analysis). Having determined the partitions of
                                      possible inputs the method of boundary value analysis has to be applied to select the most
                                      effective test cases out of these partitions.

                                 13.4.6 Boundary Value Analysis
                                 Boundary  value  analysis  is  a  technique  for  test  data  assortment.  A  test  engineer  chooses
                                 values that lie along data extremes. Boundary values include maximum, minimum, just inside
                                 boundaries, just outside boundaries, typical values, and error values. The expectation is that, if
                                 a systems works correctly for these extreme or special values, then it will work correctly for all
                                 values in between. An effective way to test code is to exercise it at its natural boundaries. Boundary
                                 Value Analysis is a method of testing that complements equivalence partitioning. In this case,
                                 data input as well as data output are tested. The rationale behind BVA is that the errors typically
                                 occur at the boundaries of the data. The boundaries refer to the upper limit and the lower limit
                                 of a range of values or more commonly known as the “edges” of the boundary. BVA is a black
                                 box approach to identifying test cases. In black box testing, test cases are selected based upon
                                 the desired product functionality as documented in the specifications without consideration of
                                 the actual internal structure of the program logic. A fundamental assumption in BVA is that
                                 the majority of program errors will occur at critical Input (or Output) boundaries, places where
                                 the mechanics of a calculation or data manipulation must change in order for the program to
                                 produce a correct result. An example that illustrates the general concept of boundary values
                                 would be a program that calculates income tax for a given income. In a progressive income
                                 text scheme, the tax rate applied increases from low income brackets to high income brackets.
                                 In this case, the critical input boundaries would be the set of incomes at which the applied tax
                                 rate should change along with any minimum or maximum extremes of the income value. Thus,
                                 the set of boundary incomes defines the limits of each tax bracket.
                                 The  BVA  also  serves  as  an  introduction  to  other  test  techniques.  Discussions  of  BVA  in  the
                                 literature  are  often  intermingled  with  a  related  black  box  technique  known  as  Equivalence
                                 Partitioning  (EP),  which  utilizes  the  boundary  values  in  an  attempt  to  define  partitions  or
                                 sets of test case that are equivalent in the sense that all test cases grouped within a particular
                                 partition would reveal the presence of the same set of defects and likewise fail to detect other
                                 defects. In its simplest form, once the partitions are identified, the set of test cases selected is
                                 one representative test case from each partition. A distinct advantage of the EP technique is
                                 that the total number of test cases is significantly smaller than the set of test cases identified
                                 through BVA. In fact, the set of test cases identified by EP can be a subset of those identified by
                                 BVA, and researchers have exploited this fact to reduce the total number of test cases identified
                                 in merged BVA EP schemes.
                                 Boundary value analysis
                                 It is widely recognized that input values at the extreme ends of input domain cause more errors
                                 in system. More application errors occur at the boundaries of input domain. ‘Boundary value
                                 analysis’ testing technique is used to identify errors at boundaries rather than finding those exist
                                 in centre of input domain. Boundary value analysis is a next part of Equivalence partitioning
                                 for designing test cases where test cases are selected at the edges of the equivalence classes.


        266                               LOVELY PROFESSIONAL UNIVERSITY
   267   268   269   270   271   272   273   274   275   276   277