[racket] Rackunit best practices

From: Chad Albers (calbers at neomantic.com)
Date: Thu Aug 22 01:54:43 EDT 2013

As a Ruby engineer, we have a wonderful tool called "guard" that
automatically runs our unit-tests every time a test-case changes or
every-time a source file changes.

I have written a guard plugin that performs the same task for Racket's
rackunit.  Currently, it pretty primitive - guard runs all tests if
anything changes - and it makes several assumptions about how tests
are structured.

guard's ruby unit test plug works so well because there is a set of
informal conventions that Ruby developers follow, and guard's ruby
plugin works so well because it can counts on those conventions.

Before I release "guard-rackunit" to the general public, I am
wondering if similar conventions exist for rackunit.

For instance, in my Racket project, the following conditions hold true
1. all tests are located at the root of the project in a directory call "tests"
2. in the "tests" directory, I have a "test-runner.rkt" file that
performs all '(run-tests *).
3. Each test-suite file contains one 'provide' which corresponds to
the name of the test-suite
4. Each test-suite file is name after the file that it tests and
appends "-test.rkt"; eg. foo.rkt corresponds to foo-test.rkt

If the Racket community follows a different set of conventions, I can
change my guard plugin to follow those conventions, and only have
guard run a test suite for the file it tests.

Let me know 1) if there is any interest in this project, and 2) a set
of conventions that I can generally depend upon.

Thanks,
Chad

Posted on the users mailing list.