WhiteBox Testing

July 17th, 2009  |  Published in Quality Assurance, Quality Control, Quality Management

What is a White Box Testing Strategy?
White box testing strategy deals with the internal logic and structure of the code. White box
testing is also called as glass, structural, open box or clear box testing. The tests written
based on the white box testing strategy incorporate coverage of the code written, branches,
paths, statements and internal logic of the code etc.
In order to implement white box testing, the tester has to deal with the code and hence is
needed to possess knowledge of coding and logic i.e. internal working of the code. White box
test also needs the tester to look into the code and find out which unit/statement/chunk of the
code is malfunctioning.
Advantages of White box testing are:
i) As the knowledge of internal coding structure is prerequisite, it becomes very easy to find
out which type of input/data can help in testing the application effectively.
ii) The other advantage of white box testing is that it helps in optimizing the code
iii) It helps in removing the extra lines of code, which can bring in hidden defects.
Disadvantages of white box testing are:
i) As knowledge of code and internal structure is a prerequisite, a skilled tester is needed to
carry out this type of testing, which increases the cost.
ii) And it is nearly impossible to look into every bit of code to find out hidden errors, which may
create problems, resulting in failure of the application.
Types of testing under White/Glass Box Testing Strategy:
Unit Testing:
The developer carries out unit testing in order to check if the particular module or unit of code
is working fine. The Unit Testing comes at the very basic level as it is carried out as and when
the unit of the code is developed or a particular functionality is built.
Static and dynamic Analysis:
Static analysis involves going through the code in order to find out any possible defect in the
code. Dynamic analysis involves executing the code and analyzing the output.
Statement Coverage:
In this type of testing the code is executed in such a manner that every statement of the
application is executed at least once. It helps in assuring that all the statements execute
without any side effect.
Branch Coverage:
No software application can be written in a continuous mode of coding, at some point we
need to branch out the code in order to perform a particular functionality. Branch coverage
testing helps in validating of all the branches in the code and making sure that no branching
leads to abnormal behavior of the application.
Security Testing:
Security Testing is carried out in order to find out how well the system can protect itself from
unauthorized access, hacking – cracking, any code damage etc. which deals with the code of
application. This type of testing needs sophisticated testing techniques.
Mutation Testing:
A kind of testing in which, the application is tested for the code that was modified after fixing a
particular bug/defect. It also helps in finding out which code and which strategy of coding can
help in developing the functionality effectively.
Besides all the testing types given above, there are some more types which fall under both
Black box and White box testing strategies such as: Functional testing (which deals with the
code in order to check its functional performance), Incremental integration testing (which
deals with the testing of newly added code in the application), Performance and Load testing
(which helps in finding out how the particular code manages resources and give performance
etc.) etc.

Leave a Response