# SWE 637 Homework 6Fall 2017 Graph Coverage

### Due 23-October, beginning of class

“I have not failed. I’ve just found 10,000 ways that won’t work.”
—Thomas Edison

Answer the following questions. Bring hardcopies of your answers to class; either hand written or printouts. All homeworks are due before class on the due date. You may use one of the collaborative options as specified on the syllabus, but any help not allowed by that policy will be an honor code violation.

1. (6 pts.) Answer the following questions for the graph:
```   N  = {1, 2, 3, 4, 5, 6, 7, 8}
N0 = {1}
Nf = {8}
E  = { (1, 2), (1, 3), (1, 4), (2, 1), (4, 1), (3, 5), (3, 6), (3, 8), (5, 7), (6, 7), (7, 8) }
```
1. (1 pt.) Is [1, 4, 1, 3, 6] a test path? (If not, say why not.)
2. (1 pt.) Is [1, 4, 1, 2, 1, 3, 5, 7, 8] a test path? (If not, say why not.)
3. (2 pts.) Give test requirements to satisfy edge-pair coverage.
4. (2 pts.) Give test paths to satisfy edge-pair coverage.

2. (14 pts.) Ammann & Offutt, edition 2, exercises chapter 7.3, Number 8.
1. (2 pts.) Part (a) as in book
2. (1 pt.) Part (b) as in book
3. (2 pts.) Part (c) as in book
4. (3 pts.) Part (d) as in book
5. (3 pts.) Part (e): Give test requirements and test values for edge-pair coverage. Note that you do not need complete tests, just the test values as calls to methods on a list (including equals()).
6. (3 pts.) Part (f): Give test requirements and test values for prime path coverage. Note that you do not need complete tests, just the test values as calls to methods on a list (including equals()).