Activity: Graph: Data flow coverage criteria
(no submission)
Purpose:
Understand Defs, Uses, DU-pairs, DU-paths; apply data flow coverage to design tests
You may make a copy of a
worksheet
and complete this activity, or simply type your answers in any text editor.
You may work alone or with at most two other students in this course
Consider the following graph and test paths (Ref: AO exercise 7.2.3, Q1, Graph II)
N = { 1, 2, 3, 4, 5, 6 }
N0 = { 1 }
Nf = { 6 }
E = { (1, 2), (2, 3), (2, 6), (3, 4), (3, 5), (4, 5), (5, 2) }
def(1) = def(3) = use(3) = use(6) = { x }
// Assume the use of x in node 3 precedes the def
Test paths
t1 = [1, 2, 6]
t2 = [1, 2, 3, 4, 5, 2, 3, 5, 2, 6]
t3 = [1, 2, 3, 5, 2, 3, 4, 5, 2, 6]
t4 = [1, 2, 3, 5, 2, 6]
- Draw the graph. Annotate all defs and uses.
- List all of the du-paths with respect to x.
(Note: include all du-paths, even those that are subpaths of some other du-paths)
- Determine which du-paths each test path tours.
| Test path |
DU-path(s) the test tours (direct) |
DU-pair(s) the test covers |
| |
|
|
| |
|
|
- List a minimal test set that satisfies all defs coverage
with respect to x (direct tours only). If possible, use the given test paths.
If not, provide additional test path(s) to satisfy the criterion.
- List a minimal test set that satisfies all uses coverage
with respect to x (direct tours only). If possible, use the given test paths.
If not, provide additional test path(s) to satisfy the criterion.
- List a minimal test set that satisfies all du-paths coverage
with respect to x (direct tours only). If possible, use the given test paths.
If not, provide additional test path(s) to satisfy the criterion.