SWE 437 In Class Exercise # 17
Graph Coverage


Names:
Instructions: Work with your neighbors in groups. This is a Graph Coverage exercise.

Consider the following graph and test paths.

N  = { 1, 2, 3, 4, 5, 6, 7, 8 }
N0 = { 1 }
Nf = { 8 }
E  = { (1, 2), (2, 3) (2, 8), (3, 4), (3, 5),
       (4, 3), (5, 6) (5, 7), (6, 7), (7, 2) }

t1 = [1, 2, 8]
t2 = [1, 2, 3, 5, 7, 2, 8]
t3 = [1, 2, 3, 5, 6, 7, 2, 8]
t4 = [1, 2, 3, 4, 3, 5, 7, 2, 8]
t5 = [1, 2, 3, 4, 3, 4, 3, 5, 6, 7, 2, 8]
t6 = [1, 2, 3, 4, 3, 5, 7, 2, 3, 5, 6, 7, 2, 8]
  1. Give a minimal set of test paths that achieve node coverage.


  2. Give a minimal set of test paths that achieve edge coverage.


  3. Identify all the edge pairs (14).


  4. Give a minimal set of test paths that achieves edge-pair coverage. Are any edge-pairs missed?


  5. Identify all the prime paths (19).


  6. Give a minimal set of test paths that achieves prime-path coverage. Are any prime paths missed? Do sidetrips help?