[plt-scheme] Best way to run a bunch of test-suites with schemeunit?

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Sun Jun 17 13:33:50 EDT 2007

In addition to everything mentioned, I have this little script that I
use to test a single file after accumulating all the other tests.


if [ "x$2" == "x" ] ; then
    T=$(basename $FILE .ss)s


if [ "x${MODE}" == "xgraphical" ] ; then

${PROG} -mvt ${FILE} -e "(begin (require (planet \"${MODE}-ui.ss\"
(\"schematics\" \"schemeunit.plt\" 2))) (test/${MODE}-ui ${T}))"


which I call 'mztest'

And I run it like:

mztest file-test.ss


mztest file-test.ss test-suite

On 6/17/07, Noel Welsh <noelwelsh at gmail.com> wrote:
> On 6/17/07, Grant Rettke <grettke at acm.org> wrote:
> >
> > How would I go about running each test case for each test file in a
> > single pass at the console?
> >
> Ryan has told you how to combine test cases and suites into larger
> suites.  I normally have a file called 'run-tests.ss' that contains
> something like the following:
> (require (planet "test.ss" ("schematics" "schemeunit.plt" 2)))
> (require (planet "text-ui.ss" ("schematics" "schemeunit.plt" 2)))
> (require "all-vb-tests.ss")
> (test/text-ui all-vb-tests)
> On the console I use the following command:
> mzscheme -qev '(exit (load "run-tests.ss"))'
> -----------
> Aside: Various people (not naming names, but Robby) have requested a
> feature that would automatically collect test cases into a default
> test suite and automatically run them.  I've implemented a hacky
> version of this, but to work properly it should transparently work
> with all shortcuts.  Till recently I couldn't figure out how to do
> this, but I recently had the thought that I could abuse #%module-begin
> to set a parameter that has module level scope.  So it will happen
> when I feel the impetus to implement it, and will mean you have to
> write less code to construct test suites, at the cost of having less
> flexibility over how tests are run.
> N.
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Jay McCarthy <jay.mccarthy at gmail.com>

Posted on the users mailing list.