Revised: 27 March 2014
In this lab, you will work in a small team (2-3 members) to explore test coverage. You may not do this lab by yourself.
- Choose one of the following code samples:
- Draw the node graph, labeling each node with the line number of the first code line in the node's code segment.
- Identify the test requirements for:
- Node coverage
- Edge coverage
- Edge-pair coverage
- Prime path coverage
- Identify test paths for each type of coverage. Note that some of the path sets may be the same for two or more coverage categories.
- Write JUnit tests, starting with the lowest level of test path coverage and increasing up to the "prime path coverage"
- Run Emma at each stage, though you might not expect to see much change above the "node coverage" level.
- If you find that additional tests or test paths are required to satisfy a given level of coverage, see if you can think of a defect to inject that would be caught by the more thorough test, but not by the less thorough one.
- Write a brief report describing your experience with this lab (see below).
- Do more than one of the three code examples.
- Try writing a program to generate the node/path/edge data, like the textbook example at:
Assignment submission (due by 11:59PM CDT, Monday, March 31)
Prepare a PDF report (named "SE2832-username1-username2-username3-Lab3.pdf", where each "usernameN" is the MSOE email username of a team member) on your lab experience, including:
- Your names and assignment identification ("SE-2832 Lab 3")
- Your description of the lab experience and any remaining questions that you have.
- The location of your final test code, in one team member's Bitbucket repository.
One team member should email your team report to the instructor.