POTD 3: Graph coverage criteria

Due 2-Oct-2025, 11am EST

Purpose: Understand the basic concept of graph and apply graph coverage criteria


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

   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) }

   Test paths
   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. Draw the graph (You may draw the graph by hand, take a screenshot of your graph, and embed it in your write-up)
  2. Use the given test paths, list a minimal set of test paths that achieve Node coverage
    Test requirements       Visited by
       1. node 1             t1  t2   t3   t4   t5   t6
       2. node 2             t1  t2   t3   t4   t5   t6
       3. node 3                 t2   t3   t4   t5   t6 
       4. node 4                           t4   t5   t6
       5. node 5                 t2   t3   t4   t5   t6
       6. node 6                      t3        t5   t6
       7. node 7                 t2   t3   t4   t5   t6
       8. node 8             t1  t2   t3   t4   t5   t6
    
    There are several possible solutions: { t5 } or { t6 } 
       or { t3, t4 } -- assume loop only once 
  3. Use the given test paths, list a minimal set of test paths that achieve Edge coverage
    Test requirements       Visited by
       1. (1,2)              t1  t2   t3   t4   t5   t6
       2. (2,3)                  t2   t3   t4   t5   t6
       3. (2,8)              t1  t2   t3   t4   t5   t6 
       4. (3,4)                            t4   t5   t6
       5. (3,5)                  t2   t3   t4   t5   t6
       6. (4,3)                            t4   t5   t6
       7. (5,6)                       t3        t5   t6
       8. (5,7)                  t2        t4        t6
       9. (6,7)                       t3        t5   t6
      10. (7,2)                  t2   t3   t4   t5   t6 
       
    There are several possible solutions: { t6 } or { t2, t5 }
       or { t3, t4 } -- assume loop only once 
  4. List the test requirements for Edge-Pair Coverage (hint: you should get 14 requirements of length 2) and then list a minimal set of test paths that achieve Edge-Pair coverage
    Test requirements        (direct) Toured by
       1. (1,2,3)                 t2   t3   t4   t5   t6
       2. (1,2,8)             t1
       3. (2,3,4)                           t4   t5   t6 
       4. (2,3,5)                 t2   t3             t6
       5. (3,4,3)                           t4   t5   t6
       6. (3,5,6)                      t3        t5   t6
       7. (3,5,7)                 t2        t4        t6
       8. (4,3,4)                                t5
       9. (4,3,5)                           t4   t5   t6
      10. (5,6,7)                      t3        t5   t6
      11. (5,7,2)                 t2        t4        t6
      12. (6,7,2)                      t3        t5   t6
      13. (7,2,3)                                     t6
      14. (7,2,8)                 t2   t3   t4   t5   t6
      
    The only test path that covers a test requirement (1,2,8) is t1. Thus, we need t1.
    The only test path that covers a test requirement (4,3,4) is t5. Thus, we need t5.
    The only test path that covers a test requirement (7,2,3) is t6. Thus, we need t6.
       
    Test path t6 tours the remaining test requirements.    
    Thus, there is one possible answer: { t1, t5, t6 }   
  5. Does the given set of test paths satisfy Node Coverage? If not, what is missing.
    Yes   
  6. Does the given set of test paths satisfy Edge Coverage? If not, what is missing.
    Yes   
  7. Does the given set of test paths satisfy Edge-Pair Coverage? If not, what is missing.
    Yes   
  8. If, instead, the given test path t6 is [1, 2, 3, 4, 3, 5, 6, 7, 2, 8], does the given set of test paths satisfy Edge-Pair Coverage? If not, what is missing?
    The given set of test paths will no longer satisfy Edge-Pair Coverage (missing [7,2,3]) 


Grading rubric

[Total: 10 points]: Done (or provide evidence of your attempt, full or reasonable effort)

(-2.5 points) for 24 hours late (submitted after 2-Oct-2025 11am EST, by 3-Oct-2025 11am EST)
(-5 points) for 48 hours late (submitted after 3-Oct-2025 11am EST, by 4-Oct-2025 11am EST)


Submission

Making your submission available to instructor and course staff is your responsibility; if we cannot access or open your file, you will not get credit. Be sure to test access to your file before the due date.



Copyright © 2025 Upsorn Praphamontripong
Released under the Creative Commons License CC-BY-NC-SA 4.0 license.
Last updated 2025-09-25 21:37