Page 56 - SOFTWARE TESTING & QUALITY ASSURANCE
P. 56
Unit 4: White Box Testing
4.2.1 Dynamic White Box Testing vs. Debugging
Dynamic white box testing and debugging are two techniques which appear similar, since they deal
with the code and the bugs in software. They do overlap when bugs are found. However, they are
different in their goals. Dynamic white box testing finds the bugs in the software while debugging deals
with the process of fixing the bugs that have been found during the testing phase.
As a software tester, you are required to emphasize on the test cases that demonstrate a bug. In white
box testing, you narrow down to the information pertaining to the number of lines of code which look
erroneous. The programmers debug the erroneous lines of code which are reported to them. They find
the reason for the cause of bug and fix it.
Most often, while performing low level testing, a software tester uses the same tools
which a programmer uses.
A code-level debugger is used to watch variables and set break conditions.
When a program is compiled, the same compiler is used with different
settings to ensure that major defects or errors are detected.
4.2.2 Testing the Pieces
In dynamic black box testing, a bug is found at the final stages of testing. It is difficult and at times
impossible to figure out the occurrence of bug and hence a tester will be unable to learn which part of
the software is causing the problem.
There are also possibilities of some bugs which hide the existence of other bugs and these bugs might
cause the software to fail. Although, a programmer fixes the problem, when the tester re-runs the
software, it will fail again. As a result, bugs keep accumulating and it becomes impossible to get to the
core of the defect.
Unit and Integration Testing
To overcome the problem of accumulating core defects, the concept of testing the software in pieces and
gradually integrating these pieces into larger portions to form the system came in to existence. Thus, the
lowest level of testing known as unit or module level testing came up.
In this method, the small units are tested where bugs are logged and fixed. These units are then
integrated and integration testing is performed against groups of modules. This process continues until
a complete system is ready for testing. This is known as system testing. The unit and integration testing
enable the tester to locate the bugs in software at a lower level, thereby reducing the cost. The bugs
found in the multiple units while integrating relate to how modules interact with each other.
The three integration testing strategies are shown in figure 4.2.
Figure 4.2 Integration Testing Strategies
LOVELY PROFESSIONAL UNIVERSITY 49