[Haskell-cafe] Regression test utility suggestions?

Peter Schmitz ps.haskell at gmail.com
Thu Oct 21 17:38:13 EDT 2010

I am seeking suggestions for a regression test utility or framework
to use while developing in Haskell (in a MS Windows environment).

I am developing a Haskell application that parses an input text file,
and outputs some information about what was parsed.

The application is currently in a GUI, but the parsing/analysis code
does not require any user interaction, so it would be simple to
implement a command-line based version (that could be invoked by a
regression test utility --
http://en.wikipedia.org/wiki/Regression_testing), that takes as
args: the input and output file pathnames.

As I develop, I have a growing set of input files that are used to
test various aspects of the grammar. I am seeking a regression test
utility that I could point at a dir of test input files, and it
would process each input file using my app, creating a corresponding
output file.

The utility would then compare each output file with a known good
output file, and let me somehow review the results (i.e., the
differences), and for each test file (or all of them) allow me to
decide one of:

-- there were no diffs; all is well

-- the diff shows the output changed as I expected, due to coding
enhancements or fixes; take the new output file and use it as the
new good output file

-- oops, unexpected diffs; I need to fix my code and then re-run the
utility afterwards

I have reviewed
http://www.haskell.org/haskellwiki/Introduction_to_QuickCheck and
but I did not see anything that seems to fit.

I'm not sure whether (or how) QuickCheck would lend itself to this
type of testing. I don't want to generate any test cases; I have a
manually created collection of test cases that I want to use (which
is all I am interested in, at this point).

In the past I have coded something like this using shell or Perl
scripts, etc. I am wondering if there is a commonly used utility
available for this purpose that you like. (I use a MS Windows
environment, but I have a Bash and various gnu shell utils

(It does not matter to me whether it is written in Haskell, although
I suppose that would make it more enjoyable to hack on.  :)

Thanks in advance very much for any suggestions.
-- Peter

More information about the Haskell-Cafe mailing list