Saturday, 7 February 2015

White Box Testing types

White Box Testing:

This is a process of validating internal components or structures. So one must be having good knowledge on internal components or structure of a System.


We can divide white box testing in to two types called,

1.Static Testing.

2.Dynamic Testing.


1.Static Testing:

Testing performed without executing the source code.


2.Dynamic Testing:

Testing performed by executing the source code.


Static Testing types will be covered in next articles.

Under Dynamic Testing mostly 3 types of testing was performed.



1.Statement Coverage.

2.Branch Coverage.

3.Path Coverage.


1.Statement Coverage:

A Statement is a line of code which get executed after compilation. This method is to find whether all the statements in source code are executed at least once.

Example:

int A;
int B;
int C;

C=A+B

if(C>70)
print "True"

So how many test cases are required to test verify all the statements in the above code get executed or not.?

1 Test case is enough right?

Lets see how it is...

Suppose consider we gave input 'A' and 'B' as 40 and 50 then the value of 'C' becomes 90.

So the condition (90>70) becomes True and it will print "True" at output screen.

Is the above Test case is enough to cover all the conditions?..

Absolutely not!!!

Let's consider if we gave the input as 10 and 20 then the value of 'C' becomes 30 the condition will fail and the print statement will not get executed. In that case not all statements get executed. This method cannot cover the all the possible scenarios.




 

1 comment:

  1. Hello,
    The Article on The informative Article on White Box Testing types is good. It gives detailed information about it .Thanks for Sharing the information on types of white box testing.mobile application testing

    ReplyDelete