0% found this document useful (0 votes)
5 views11 pages

White Box Testing

The document discusses White Box Testing, specifically focusing on Basis Path Testing and its reliance on the program's control structure. It introduces concepts such as control flow graphs, cyclomatic complexity, and independent paths, emphasizing the need for thorough path selection to achieve maximum logic coverage. Additionally, it provides formulas for calculating cyclomatic complexity and examples to illustrate these concepts.

Uploaded by

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

White Box Testing

The document discusses White Box Testing, specifically focusing on Basis Path Testing and its reliance on the program's control structure. It introduces concepts such as control flow graphs, cyclomatic complexity, and independent paths, emphasizing the need for thorough path selection to achieve maximum logic coverage. Additionally, it provides formulas for calculating cyclomatic complexity and examples to illustrate these concepts.

Uploaded by

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

White Box Testing

1
Basis Path Testing

• Path Testing is based on control structure of the program for


which flow graph is prepared.

• requires complete knowledge of the program’s structure.

• closer to the developer and used by him to test his module.

• The effectiveness of path testing is reduced with the increase in


size of software under test.

• Choose enough paths in a program such that maximum logic


coverage is achieved.

2
Control Flow Graph

• Node

• Edges or Links

• Decision Node

• Junction Node

• Regions

3
Control Flow Graph

Flow Graph Notations for Different Programming


Constructs

4
Software Testing
Path Testing Myths
Terminology

• Path

• Segment

• Path Segment

• Length of a Path

• Independent Path

5
Path Testing Terminology

Cyclomatic Complexity

• V(G) = e-n+2P

• V(G) = d + P

• V(G) = number of Regions in the graph

6
Example

7
Example

8
Decision to Decision Path
Graph

9
Example

• Cyclomatic Complexity
V(G) = e – n + 2 * P
= 10 – 8 +2
= 4
V(G) = Number of predicate nodes + 1
= 3 (Nodes B,C and F) + 1
= 4

V(G) = No. of Regions


• = 4 (R1, R2, R3, R4)

10
Example

Independent Paths

• A-B-F-H
• A-B-F-G-H
• A-B-C-E-B-F-G-H
• A-B-C-D-F-H

11

You might also like