Types of white box testing

Types of white box testing are

1.Statement Coverage-The number of executable statements covered divided by total no of executable statements is called statement coverage percentage.

If(a>10)&(title=”ABC”) {print(“ABC”} Else if(a>20)||(tiitle=”XYZ”) {print(“XYZ”);

So if a=12 and title ABC statements 1,3 and 4 will be covered so 3/4 I,e 75% statements will be covered. If a=22 and title =ABC then 100 percent statement coverage is obtained in one step.

2.Decision Coverage-It is determined by number of all outcomes covered by test cases, divided by number of all possible decision outcomes in code under test.

So we can see 100% decision coverage guarantees 100 % statement coverage but vice versa is not true.