a code coverage tool for racket
Go to file
2015-04-06 13:13:53 -04:00
private new API 2015-04-05 20:23:13 -04:00
scribblings fixed docs slightly 2015-04-06 13:13:53 -04:00
tests new API 2015-04-05 20:23:13 -04:00
.gitignore ignoring the doc directory 2015-01-18 11:49:02 -05:00
.travis.yml now using Greg's new sh script and Travis Docker Containers 2015-01-13 22:35:34 -05:00
cover.rkt new API 2015-04-05 20:23:13 -04:00
coverage.rkt removing deps on racket/base, and checking cross-phase persistent modules 2015-04-02 13:04:48 -04:00
format.rkt separated html into its own folder 2015-02-14 18:57:14 -05:00
info.rkt FIXED. SUCK IT MACRO EXPANDER 2015-04-03 16:28:59 -04:00
LICENSE added MIT License 2015-02-14 00:19:04 -05:00
main.rkt new API 2015-04-05 20:23:13 -04:00
Makefile A first pass 2015-04-02 17:11:30 -04:00
raco.rkt new API 2015-04-05 20:23:13 -04:00
README.md Update README.md 2015-02-17 10:38:54 -05:00
strace.rkt refactor and fix regression 2015-04-03 17:34:21 -04:00

Cover

Build Status Coverage Status Stories in Ready

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

How to install

install via raco pkg install cover. To install for development, checkout the repo into a folder named cover and in the parent directory run raco pkg install cover/.

How to use

To view the arguments for Cover run raco cover -h.

Code coverage can be generated by specifying the -f <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.

For more detailed usage see the full documentation.

Use with TravisCI

If your code is hosted on a public github repo then you can use this plugin in conjunction with TravisCI and Coveralls. Just enable your repository on both services and then add a .travis.yml file to your repo with the following contents:

langauge: c
sudo: false
env:
  global:
    - RACKET_DIR=~/racket
  matrix:
    - RACKET_VERSION=6.1.1

before_install:
  - git clone https://github.com/greghendershott/travis-racket.git ../travis-racket
  - cat ../travis-racket/install-racket.sh | bash
  - export PATH="${RACKET_DIR}/bin:${PATH}"

install: raco pkg install --deps search-auto $TRAVIS_BUILD_DIR # install dependencies

script:
 - raco test $TRAVIS_BUILD_DIR # run tests. you wrote tests, right?
 - raco cover -f coveralls -d $TRAVIS_BUILD_DIR/coverage . # generate coverage information for coveralls

The above Travis configuration will install any project dependencies, test your project, and report coverage information to coveralls.

For a contrived example project, look at an example. For additional Travis configuration information look at Travis Racket.

Note: This currently only works for public Github repos. This project does not support coveralls.yml configurations for private repos.

Internals

Cover comes with a racket API, which can be read about in the full documentation.