On this page:
1.1 Caveats, Known Bugs, and Odd Behavior

1 Basic Usage of Cover

The cover library adds the command raco cover command to run test coverage. For every file it is given it will execute that file and its test submodule (it if exists). It will then dump the coverage information into a directory, by default "coverage". By default the coverage information will be generated as html.

The raco cover command accepts the following flags:

In addition raco cover supports the test-omit-paths and test-command-line-arguments "info.rkt" options like raco test. In addition cover supports cover-omit-paths, which is identical to test-omit-paths, but is specific to cover. The same holds for test-include-paths and cover-include-paths.

1.1 Caveats, Known Bugs, and Odd Behavior

Cover is capable of covering code at phases above 0. However cover runs post-expansion, which means it can only cover the body of macros that are used outside of their defining module.

Sometimes, if a macro does not propagate the syntax-location for some syntax object in a way cover understands, the coverage information will appear to be incorrect.

If a test submodule is not constructed with a module+ or a module* with #f for the language the enclosing module will not be run.

Dynamically loading a covered module with current-logger set to a logger who’s (transitive) parent is not the global logger may cause Cover to hang.