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, 2, 3, 4, 8, 9, 11
- 1, 2, 3, 4, 8, 10, 11
- 1, 2, 3, 5, 8, 9, 11
- 1, 2, 3, 5, 8, 10, 11
- 1, 2, 3, 6, 7, 8, 9, 11
- 1, 2, 3, 6, 7, 8, 10, 11
- 1, 2, 3, 7, 8, 9, 11
- 1, 2, 3, 7, 8, 10, 11
- 1, 3, 4, 8, 9, 11
- 1, 3, 4, 8, 10, 11
- 1, 3, 5, 8, 9, 11
- 1, 3, 5, 8, 10, 11
- 1, 3, 6, 7, 8, 9, 11
- 1, 3, 6, 7, 8, 10, 11
- 1, 3, 7, 8, 9, 11
- 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
- Does test satisfy NC and EC for method?
- Justify your answer. Explain why it does/doesn’t satisfy NC/EC.
- 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