SE-2832 Introduction to Software Verification

Dr. Mark Sebern -- Spring quarter 2013-2014

Lab 3

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.


  1. Choose one of the following code samples:
  2. Draw the node graph, labeling each node with the line number of the first code line in the node's code segment.
  3. Identify the test requirements for:
    • Node coverage
    • Edge coverage
    • Edge-pair coverage
    • Prime path coverage
  4. 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.
  5. Write JUnit tests, starting with the lowest level of test path coverage and increasing up to the "prime path coverage" level.
    • 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.
  6. Write a brief report describing your experience with this lab (see below).

Extra credit

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:

One team member should email your team report to the instructor.