Saturday, May 27, 2006

Testing Advice?

Sean and I are both used to unit testing libraries, but now we need to broaden our reach a bit and work on an executable for CheckR. Since we really want to work test first, we need to figure out how to test it. This is something neither of us has really done. Anyone have some advice to share?


Anonymous said...

I don't know what CheckR does, but for many things `expect` is a good testing tool.

Let us know what you end up using.

Anonymous said...

My executables all look something like this:

require 'imap_flag

where run is:

def = ARGV)
options = process_args args
client = new options

This makes testing dead executables dead simple.

Ryan Platte said...

I second Eric. If it's hard to test (as is the case with ARGV), extract the hard-to-test part.