Lab: Head to Head Testing

Steven J. Zeil

October 16, 2013

Course Home   e-mail

There are many circumstances where you are working on a program but have access to a working (or nearly working) executable.

Whenever you find yourself working on a system for which you already have a (nearly) working executable, you can take advantage of this by doing head to head testing, in which you

  1. Run the old code on a set of inputs, capturing the outputs into a file.
  2. Run your new code on the same set of inputs, capturing the outputs into a different file.
  3. Compare the two output files to see what, if any, differences you can find between them.

Whatever the reason, it’s the differences in outputs that are particularly interesting. Spotting those differences can be quite tricky, however, if they are buried in a sea of nearly identical outputs or if the differences are “invisible” changes like adding blanks at the ends of lines or improperly indenting output.

Luckily, there are simple tools that you can use to find and highlight those differences.

1 Lab Instructions
2 Problem Description: Triangle Diagnosis

[Previous]