cover-runner in CUSP

I’ve started using sb-cover that comes with SBCL 1.0.22.

  • Create a directory in your project named “coverage-tests”.
  • Create a file named “cover-tests.lisp”.
  • Add to file (:publisher is the package name that I’m running the coverage on):
(in-package #:publisher)
(require :coverage-runner)

(coverage-runner:run-cover :publisher
  • Bring up the Lisp Navigator.
  • Right-click over “cover-tests.lisp”.
  • Select ‘Load File’.
  • Right-click over directory “coverage-tests”
  • Select ‘Refresh’. A new directory named “coverage-report” and html files appear.
  • Double-click on “cover-Index.html”
  • Voila`.
Expression Branch
Source file Covered Total % Covered Total %
\_Holder\WorkSpace\gWeb\publisher\src\
handler-list.lisp 44 44 100.0 6 6 100.0
publisher.lisp 45 45 100.0 6 6 100.0
\_Holder\WorkSpace\gWeb\publisher\unit-tests\
handler-list-tests.lisp 14 14 100.0 0 0
publisher-tests.lisp 5 5 100.0 0 0
\_Holder\lisp-libraries\lisp-unit\src\
asserts.lisp 97 210 46.2 1 2 50.0
equality-predicates.lisp 4 21 19.0 0 6 0.0
fixture.lisp 57 57 100.0 2 2 100.0
lisp-unit.lisp 135 235 57.4 7 28 25.0
status.lisp 170 284 59.9 4 8 50.0
stopwatch.lisp 32 37 86.5 0 0
view.lisp 128 176 72.7 1 4 25.0
\_Holder\lisp-libraries\lisp-unit\unit-tests\
fixture-tests.lisp 0 10 0.0 0 0
Advertisements

2 Responses to cover-runner in CUSP

  1. Tim Jasko says:

    Out of curiosity, is there a reason you’re doing this by loading a file, rather than just executing run-cover via REPL?

  2. gutzofter says:

    No reason now that you mention it. Originally I used:

    *load-pathname*

    to give the pathname to the report directory.

    Don’t forget to require coverage-runner.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: