0% found this document useful (0 votes)
29 views2 pages

Lab Task TOPIC: White Box Testing Techniques: Program

This document discusses white box testing techniques for a program and flow chart. It calculates the statement coverage, branch coverage, and path coverage as follows: Statement coverage is 1, as traveling through one path covers all statements. Branch coverage is 2, as two paths are needed to cover all branches - one for the "yes" decision and one for the "no" decision. Path coverage is 4, as there are 4 possible paths from start to end through the flow chart.

Uploaded by

student ww
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views2 pages

Lab Task TOPIC: White Box Testing Techniques: Program

This document discusses white box testing techniques for a program and flow chart. It calculates the statement coverage, branch coverage, and path coverage as follows: Statement coverage is 1, as traveling through one path covers all statements. Branch coverage is 2, as two paths are needed to cover all branches - one for the "yes" decision and one for the "no" decision. Path coverage is 4, as there are 4 possible paths from start to end through the flow chart.

Uploaded by

student ww
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

LAB TASK

TOPIC: White Box Testing Techniques

Program:

Flow Chart:

Question: Find the Statement Coverage, Branch Coverage, Path Coverage


by
Using the above program and flow graph?

1. Statement coverage:
  If we traverse through path 1A-2C-3D-E-4G-5H all 
the nodes are covered. And by traveling through only one path all the nodes
12345 are covered,  so the Statement coverage in this case is 1.

2. Branch coverage:
In the first case traversing through "Yes "decision, the path is 1A-2C-3D-E-
4G-5H, and the number of covered edges is A, C, D, E,G,H and but edges B
and F is not covered in this path. To cover B and F edges, we have to
traverse through "No" decision. In the case of "No" decision the path is 1A-
2B-E-4F, and the number of covered edge is B . So by traveling through these
two paths, all branches have covered.
Hence,
Path 1= 1A-2C-3D-E-4G-5H
Path 2= 1A-2B-E-4F
Branch Coverage= No of Paths= 2

Case Covered Path Branch


Branches coverage
yes A-C-D-E-G-H 1A-2C-3D-E-4G- 2
5H
No A-B-E-F 1A-2B-E-4F

3. Path Coverage:
Path Coverage ensures covering of all the paths from start to end.
All possible paths are
i. 1A-2B-E-4F
ii. 1A-2B-E-4G-5H
iii. 1A-2C-3D-E-4G-5H
iv. 1A-2C-3D-E-4F
So path coverage is 4.

You might also like