whitebox testing code example

Example 1: 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 2: whitebox testing

Statement Testing = (Number of Statements Exercised / Total Number of Statements) x 100 %

Branch Testing = (Number of decisions outcomes tested / Total Number of decision Outcomes) x 100 %

Path Coverage = (Number paths exercised / Total Number of paths in the program) x 100 %

Example 3: whitebox testing

Statement Testing = (Number of Statements Exercised / Total Number of Statements) x 100 %

Branch Testing = (Number of decisions outcomes tested / Total Number of decision Outcomes) x 100 %

Path Coverage = (Number paths exercised / Total Number of paths in the program) x 100 %

Tags:

Misc Example