Differentiate between Black Box Testing and White Box Testing with suitable Example
Black Box Testing
|
White Box Testing
|
Black Box Testing is a software testing method in
which the internal structure/ design/ implementation of the item being tested
is not known to the tester. Tester is mainly concerned with the validation of
output rather than how the output is produced (functionality of the item
under test is not important from tester's pov).
|
White
Box Testing is a software testing method in which the
internal structure/ design/ implementation of the item being tested is known
to the tester. Tester validates the internal structure of the item under
consideration along with the output.
|
Which is not
necessary in Black Box testing.
|
Programming knowledge and
implementation knowledge (internal structure and working) is required in White Box testing,
|
Black box testing is done by the professional testing team and can be done without
knowledge of internal coding of the item.
|
White Box testing is generally
done by the programmers who have developed the item or the programmers who have
an understanding of the item's internals.
|
Internal
system design is
not considered in this type of testing.
|
Internal software and code
working should be known for this type
of testing.
|
It is a software testing method where in testers are not required to
know coding or internal structure of the software.
|
This testing is based on
knowledge of the internal logic of an
application’s code.
|
Tests are based on requirements and functionality.
|
White box testing approach is
used in Unit testing which is usually
performed by software developers.
|
Black box testing method relies on testing software with various
inputs and validating results against expected output.
|
White box testing is also
known as clear box testing, transparent
box testing and glass box testing.
|
Tests are conducted at the software interface.
|
It is predicated on close
examination of procedural detail.
|
Black box testing is a testing strategy based solely
on requirements and specifications. Black box testing requires no
knowledge of internal paths, structures, or implementation of the
software being tested.
|
White box testing is a
testing strategy based on internal paths, code structures, and
implementation of the software being tested. White box testing generally
requires detailed programming skills.
|
Black-box Testing (functional)
Can you see what’s inside a closed black-box? No, right? Similarly Black-box method treats the AUT as a black-box (no knowledge about its internal structure). Result – We are not bothered about how the internal structure of the application is maintained/changed until the outside functionality is working as expected (as per requirements). Knowing what the application does is more important than knowledge of how it does it. This is the most widely used test method for System & Acceptance tests as it doesn’t require professionals with coding knowledge and also it provides an external perspective of the AUT (as an end-user who have no knowledge of the actual code).
E.g. we are only concerned if user can watch television, change channels & volume, etc.
White-box Testing (structural)
It’s obvious, just reverse the approach. Since it’s a White-box >> we can see what’s in it, i.e. the internal structure, and use that knowledge to expand the coverage to test every possible flow at code-level. For example – Statement coverage, Branch coverage or Path coverage. It requires programming skills and is usually preferred only for Unit & Integration test levels. You can call it by different names – Clear-box, Glass-box or Transparent-box as far as you can see the internal contents of the box :-).
E.g. we are concerned if the internal circuit for the television is designed correctly.
EmoticonEmoticon