black box testing and white box testing example

Example 1: black box testing vs white box

BlackBox Testing:
When the tester does not know the code
behind the functionality, it is called
black box testing.
 Testers do not need that code in order to
 test the functionality. This is mostly what we as testers do.
 
On the other hand white box testing 
When the tester knows the code behind
functionality and uses that knowledge for testing
purposes, it is called white box testing.
Unit test is considered as white box testing.

Example 2: white box testing

white box testing 
When the tester knows the code behind
functionality and uses that knowledge for testing
purposes, it is called white box testing.
Unit test is considered as white box testing.

Example 3: what is black box testing

When the tester does not know the code
behind the functionality, it is called black box testing.
 Testers do not need that code in order to
 test the functionality. This is mostly what we as testers do.

Example 4: black box testing vs white box

BlackBox Testing:
When the tester does not know the code
behind the functionality, it is called
black box testing.
 Testers do not need that code in order to
 test the functionality. This is mostly what we as testers do.
 
On the other hand white box testing 
When the tester knows the code behind
functionality and uses that knowledge for testing
purposes, it is called white box testing.
Unit test is considered as white box testing.

Tags:

Misc Example