Page 58 - SOFTWARE TESTING & QUALITY ASSURANCE
P. 58

Unit 4: White Box Testing



                     intermediate values during program execution. This enables a tester to analyze things better, by
                     viewing the changes in a program.
                2.   Sub-Boundaries:  Sub-boundaries  in software are the most common places where bugs  can be
                     found.

                                  An operating system which is running on low RAM may move the data to a
                                  temporary storage on the hard drive. In this case, the boundary may not be
                                  fixed, as it depends on the  space remaining on the disk. There are more
                                  possibilities of errors occurring at the sub-boundaries.

                           While performing white box testing, code must be carefully examined around the sub-
                           boundary conditions and test cases should be created accordingly.


                3.   Formulas and Equations: Generally formulas and equations are not visible and are embedded
                     deep in the code. Hence, we cannot know their effect and presence.
                4.   Error Forcing: This is a method of data testing, where a software tester can force a variable to
                     hold  a value in order to check how the software  handles it. When the software runs  in a
                     debugger, there is a privilege of not just watching the variable and the values that they hold, but
                     you also have the privilege of adding  required specific values. (A debugger is used to force a
                     variable value to zero)



                           While using error forcing, one must ensure that only situations which happen in real
                           world scenarios are created. If not, an invalid test case would be created.
               4.2.4   Code Coverage

               Testing a black box is just the half work done and the rest needs to be completed with the white box
               testing. While testing, testers need to assure that they test the entry and exit of every module, every line
               of code, and follow logical and decision path of the product. This methodology of testing followed is
               known as code coverage testing.
               Code coverage testing is a dynamic white box testing where testing is done by executing the test and
               the tester has complete access to the code. He/she is also aware of the parts of the software that have
               passed and the parts that have failed.
               Code based testing, which involves detecting errors by following execution oriented methods, is also
               known as white box testing.  Here, a tester is expected to know and understand the low level design
               and identify the code-based approach and to apply the techniques in the code that is written.
               The strategy of white box testing is to ensure that the internal structure of the program has a logical
               flow. The need for code-based testing is to:
                     (a)  Understand the objective and arrive at test cases.

                     (b)  Check programming styles and compliance with coding standards.
                     (c)   Check for logical errors and incorrect assumptions introduced during coding.
                     (d)  Find incorrect assumptions about execution of paths.
                     (e)  Find typographical errors.
               A tester is also required to maintain  a checklist for code walkthrough, code inspection, traceability
               matrix, and record bug findings in the bug report and in the review records.








                                        LOVELY PROFESSIONAL UNIVERSITY                           51
   53   54   55   56   57   58   59   60   61   62   63