a code coverage tool for racket
Go to file
Spencer Florence ac7a1498bf fixed README
2014-12-29 10:56:28 -06:00
private fixed tests and renamed to cover 2014-12-29 10:29:03 -06:00
tests covered? now correctly handles comments 2014-12-28 18:42:28 -06:00
.gitignore added a gitignore 2014-12-28 15:08:43 -05:00
coverage.rkt initial commit 2014-09-22 17:03:24 -05:00
curl.sh added rudementary coveralls support 2014-12-28 23:52:19 -06:00
format.rkt separated html and coveralls into two private files. 2014-12-29 11:07:18 -05:00
info.rkt fixed tests and renamed to cover 2014-12-29 10:29:03 -06:00
main.rkt now better-test can run on itself 2014-12-29 10:10:00 -06:00
raco.rkt now disabling test coverage when its not needed 2014-12-28 22:24:14 -06:00
README.md fixed README 2014-12-29 10:56:28 -06:00
strace.rkt now disabling test coverage when its not needed 2014-12-28 22:24:14 -06:00

Cover

This library is a supplement to rackets raco test that adds code coverage capabilities.

How to install

install via raco pkg install better-test. To install for development, checkout the repo into a folder named Better Test and in the parent directory run raco pkg install better-test/.

How to use

To view the arguments for Better Test run raco better-test -h.

Code coverage can be generated by specifying the -c <format> flag. Right now the valid formats are: html and coveralls.

html simply generates html files for each source file containing coverage information and highlighted source code.

coveralls generates a coveralls coverage report and sends it to coveralls. Using coveralls requires the "COVERALLS_REPO_TOKEN" to be set, and needs bash and curl. Travic-ci/Coveralls support coming soon...

Note that coveralls expect coverage by line. To convert from an expression based coverage to line based coverage we consider any line with any unrun expression to be not run.

The directory that the coverage is outputted to can be specified with the -d flag.

If any tests run by rackunit fail, Better Test will return with exit code 1. If all tests pass it will return with exit code 0.

Internals

Better Test also comes with a racket API for running tests and generating coverage reports. Documentation coming soon...