a code coverage tool for racket
Go to file
2016-02-03 13:22:34 -06:00
cover Fixes links in HTML output. When the destination directory has more than one path component, e.g. raco cover -d foo/coverage file.rkt, the URLs were of the form coverage/coverage/file.html . Also, when the -d option was a relative path starting with ./, e.g. ./foo/coverage, the URL in the links was an absolute path, like /home/user/project/foo/coverage/file.html, which doesn't work if the generated HTML is put online. 2016-02-02 23:07:39 +01:00
.gitignore ignoring the doc directory 2015-01-18 11:49:02 -05:00
.travis.yml added 6.2.1 to build matrix 2015-09-14 10:55:46 -05:00
index_example.png moved example images 2015-08-30 16:56:53 -05:00
info.rkt bumbed version 2015-12-11 10:11:06 -06:00
LICENSE added MIT License 2015-02-14 00:19:04 -05:00
page_example.png moved example images 2015-08-30 16:56:53 -05:00
README.md Remove confusing prose in README 2016-02-03 13:22:34 -06:00

Cover

Build Status Coverage Status Scribble Stories in Ready

This library is an extensible code coverage tool for racket. It comes with the ability to generate HTML reports, and has extensions to submit coverage reports to Coveralls. You can also create your own coverage formats.

How to install

Install via raco pkg install cover, or from the "File" -> "Install Package..." menu in DrRacket.

Basic Usage

The basic usage of Cover will generate an HTML report. For example, checkout and install this library and run raco cover . in that directory. Then open coverage/index.html in your favorite web browser. You should see something like this:

Example

You can sort the entries by clicking on the header for any column. You can see a more detailed view for any file by clicking on its name. For example, private/format-utils.rkt looks like:

Example2

You can view the arguments for Cover run raco cover -h.

Different Formats

Code coverage can be generated in a different format by specifying the -f <format> flag.

The only built in format is html simply generates html files for each source file containing coverage information and highlighted source code. This is the default.

If you would like to use Cover with Coveralls see cover-coveralls.

You can also build a custom output format. For more detailed usage see the full documentation.

Use with TravisCI

Cover works with Travis CI, however you may want to install an output format specialized to cover coverage service, like cover-coveralls.

Gotchas and Bugs

There is a list of odd behavior you may encounter when using Cover in the Gotcha's Section of the documentation.

Racket API

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