#cs408#testing#project#course

Q4. List the sets of Test Requirements (TRs) with respect to the CFG for each of the following coverages: node coverage; edge coverage; edge-pair coverage; and prime path coverage. In other words, write four sets: , , , and . If there are infeasible test requirements, list them separately and explain why they are infeasible

1, 2, 3, 5, 6, 7, 8, 9, 10, 11 : (1, 2), (1, 3), (2, 3), (3, 4), (3, 5), (3, 6), (3, 7), (4, 8), (5, 8), (6, 7), (7, 8), (8, 9), (8, 10), (9, 11), (10, 11) : (1, 2, 3), (1, 3, 4), (1, 3, 5), (1, 3, 6), (1, 3, 7), (2, 3, 4), (2, 3, 5), (2, 3, 6), (2, 3, 7), (3, 4, 8), (3, 5, 8), (3, 6, 7), (3, 7, 8), (4, 8, 9), (4, 8, 10), (5, 8, 9), (5, 8, 10), (6, 7, 8), (7, 8, 9), (7, 8, 10), (8, 9, 11), (8, 10, 11) :

  1. 1, 2, 3, 4, 8, 9, 11
  2. 1, 2, 3, 4, 8, 10, 11
  3. 1, 2, 3, 5, 8, 9, 11
  4. 1, 2, 3, 5, 8, 10, 11
  5. 1, 2, 3, 6, 7, 8, 9, 11
  6. 1, 2, 3, 6, 7, 8, 10, 11
  7. 1, 2, 3, 7, 8, 9, 11
  8. 1, 2, 3, 7, 8, 10, 11
  9. 1, 3, 4, 8, 9, 11
  10. 1, 3, 4, 8, 10, 11
  11. 1, 3, 5, 8, 9, 11
  12. 1, 3, 5, 8, 10, 11
  13. 1, 3, 6, 7, 8, 9, 11
  14. 1, 3, 6, 7, 8, 10, 11
  15. 1, 3, 7, 8, 9, 11
  16. 1, 3, 7, 8, 10, 11

Node Coverage; {} -> 1, 2, 3, 4, 8, 10, 11 {“a”} -> 1, 3, 5, 8, 9, 11 {“ab”} -> 1, 3, 6, 7, 8, 9, 11

Q5

  1. Does test satisfy NC and EC for method?
  2. Justify your answer. Explain why it does/doesn’t satisfy NC/EC.
  3. If it does not justify either criterion, write additional JUnit tests to satisfy one of them.
  • addNode() ✅ 2023-09-11
  • addEdge() ✅ 2023-09-11
  • deleteNode() ✅ 2023-09-11
  • deleteEdge() ✅ 2023-09-11
  • isReachable() ✅ 2023-09-11