14
Structural (White-Box) Structural (White-Box) Testing Testing Software Testing Module Dr. Samer Hanna

Structural (White-Box) Testing

  • Upload
    sharne

  • View
    45

  • Download
    0

Embed Size (px)

DESCRIPTION

Structural (White-Box) Testing. Software Testing Module Dr. Samer Hanna. Outline. Path Testing Control Flow Graph DD-Path Graph Questions. Path testing. Structural testing method Based on the source code / Pseudocode of the program or the system, and NOT on its specification. - PowerPoint PPT Presentation

Citation preview

Page 1: Structural (White-Box) Testing

Structural (White-Box) Structural (White-Box) TestingTesting

Software Testing Module

Dr. Samer Hanna

Page 2: Structural (White-Box) Testing

Outline

• Path Testing

• Control Flow Graph

• DD-Path Graph

• Questions

Page 3: Structural (White-Box) Testing

Path testing

• Structural testing method

• Based on the source code / Pseudocode of the program or the system, and NOT on its specification

Page 4: Structural (White-Box) Testing

Example: Find the Control Flow Graph (CFG) for the Triangle Problem

Page 5: Structural (White-Box) Testing

CFG

Page 6: Structural (White-Box) Testing

CFG

Page 7: Structural (White-Box) Testing

DD – Path Graph

• A CFG can be broken into DD-paths

• The resulting graph is called a DD-path graph of the program

Page 8: Structural (White-Box) Testing

DD – Path Graph

DD: Decision – to – Decision path• A DD-path is a sub-path in a program graph fulfilling

one of the conditions below:1. It consists of a single node with indeg = 0

2. It consists of a single node with outdeg = 0

3. It consists of a single node with indeg ≥ 2 or outdeg ≥ 2

4. It consists of a single node with indeg = 1 and outdeg = 1

5. It is a maximal chain of length ≥ 1

Page 9: Structural (White-Box) Testing

DD – Path Graph

Node DD-Path Name

Case of Definition

1 Source 1

2 - 4 A 5

5 B 3

6 C 4

7 D 4

8 E 3

… … …

19 Sink 2

Page 10: Structural (White-Box) Testing

CFG to DD-Path

Page 11: Structural (White-Box) Testing

Independent (basis) paths

Independent path is a path through a DD-path graph of the program which cannot be reproduced from other paths

Page 12: Structural (White-Box) Testing

Independent (basis) paths

Page 13: Structural (White-Box) Testing

Independent (basis) paths

Page 14: Structural (White-Box) Testing