Different Types of White Box Testing? - TestingQ.com

-->Exclusive Portal for Testing Jobs

Different Types of White Box Testing?

Path Testing:
Taking up each and every individual path through which the flow of code taken place.
Loop Testing: 
A Piece of code executing continuously until the condition becomes false and testing whether it is proper or not.
Ex: For (Loop=1; Loop<=10; Loop++)
      {
        ------
        ------
       }

Condition Testing:
The process of condition testing ensures that a controlling expression has been adequately exercised whilst the software is under test by constructing a constraint set for every expression and then ensuring that every member on the constraint set is included in the values which are presented to the expression.
if ( cond1 AND cond2)
{
   stmt1;
}
else
{
   stmt2;
}

Cond1
Cond2
AND
OR
F
F
Stmt2
Stmt2
F
T
Stmt2
Stmt1
T
F
Stmt2
Stmt1
T
T
Stmt1
Stmt1

Performance perceptive:
1) If you are using AND condition, as the result is fail for 3 cases, it is better to write failure condition first.
2) If you are using OR , True condition should be written first.
when we have multiple conditions we need to use switch case rather than using if else if.


Must Read: