Page 42 - SOFTWARE TESTING & QUALITY ASSURANCE
P. 42

Unit 3: Black Box Testing



               Testing the boundary is done by adding one, or a bit more, to the maximum value.  It could follow the
               rule like the following:
                1.   First value -1 and/or Last value +1

                2.   Start conditions -1 and/or Finish condition +1
                3.   Less than Empty condition and/ or More than Full condition
                4.   Minimum value -1 and/ or Maximum value +1

                                    1.   A text field on a web page allows the user to enter up to 255 characters.
                                        The boundary values can be between 1 and 255 characters. The tester can
                                        enter only one character or 255 characters in the text field.  254 or 256
                                        characters can be considered as boundary values to test the text field of
                                        the web page.

                                    2.   CD writer software can write 256k bytes of data on to a CD. The boundary
                                        value to test this software can be 1k bytes or 256 k bytes. The tester can
                                        provide the software 1 k bytes or 256k bytes of data to write it on the CD.

               Sub-Boundary Conditions

               Normal boundary conditions are based on the values that the user enters, but sub-boundary conditions
               are system-specific. These are the values that are related to the system hardware on which the software
               runs. Even though these values are not relevant to the end user, the tester has to test them, since it will
               result in unidentified bugs.
               Powers of two is a very good example for sub-boundary condition.
                                   The decimal range of a byte is 0 to 255, which can be represented in binary as
                                   0000 to 1111. The tester can write test cases to make the software handle these
                                   values. Pass the sub-boundary value 0, 1, 255 or 256 and check how the software
                                   responds.
               Nulls

               Null means no value. Testing is carried out without providing any input. The software should be able to
               cope with this kind of situation where no input is provided to the software.
                                   Login page has two empty fields, Login ID and password. Imagine a test case
                                   where the user tries to log in by providing the login ID and leaves the password
                                   field blank or vice versa. Here, only one field is filled by the user and the other
                                   field is left blank or null.

               Bad Data
               This is similar to test-to-fail. The tester enters erratic or irrelevant data and checks the response of the
               software.  The software might work correctly for all the correct inputs, but it is very important to check
               its response when incorrect or irrelevant data is provided as input.
                                  A login password field of a Webpage accepts only numerical values. It does not
                                  accept alphabets or combination of alphabets or numbers as password. If the
                                  tester enters these data, i.e., alphabets or combination of alphabets and numbers
                                  as password to test the Webpage, it is called as a bad data test.
               3.2.4   State Testing

               State testing refers to testing the software state. State is a mode or condition of the software at any given
               time when the software is running. State diagrams are used to indicate the state of the software. This
               indicates the actual working and the logical flow of the software.
               State based testing is used for high level black box testing  of  programming languages  like  object
               oriented programming. Object oriented programming languages that have features like encapsulation




                                        LOVELY PROFESSIONAL UNIVERSITY                           35
   37   38   39   40   41   42   43   44   45   46   47