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 another student in this course (max team size = 2).
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]
x has 6 du-paths
| DU-pair | DU-path(s) |
| (1,3) | [1,2,3] |
| (1,6) | [1,2,6] |
| (3,3) | [3,5,2,3], [3,4,5,2,3] |
| (3,6) | [3,5,2,6], [3,4,5,2,6] |
| Test path | DU-path(s) the test tours (direct) | DU-pair(s) the test covers |
| t1 | [1,2,6] | (1,6) |
| t2 | [1,2,3], [3,4,5,2,3], [3,5,2,6] | (1,3), (3,3), (3,6) |
| t3 | [1,2,3], [3,4,5,2,6], [3,5,2,3] | (1,3), (3,3), (3,6) |
| t4 | [1,2,3], [3,5,2,6] | (1,3), (3,6) |
This question has multiple possible answers.
All test paths use the def in 1, and test paths t2, t3, t4 each use the def in 3.
Possible answers: {t2} or {t3} or {t4}
This question only has two possible answers.
t1 is required for the def in 1 to reach the use in 6.
Either t2 or t3 is required for the def in 3 to reach the use in 3.
Possible answers: {t1, t2} or {t1, t3}.
This question has one possible answer: {t1, t2, t3}.
t1 is required for path [1,2,6].
t2 is required for path [3,4,5,2,3].
t3 is required for path [3,4,5,2,6] and [3,5,2,3].
Since t1, t2, and t3 together tour all six du-paths, t4 is not needed.
CC-BY-NC-SA 4.0 license.