cover-runner in CUSP

November 19, 2008

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

Status of Lisp as I See It

July 2, 2008

Dependency Management: Seems to be brittle.

Project Management: Weak also.

Mocking Framework: None. I found this: ‘el-expectations.el’ and ‘el-mock.el’

Unit Testing: I am presently using lisp-unit. I have found that this tool is pretty good. Sofar I’ve been able to change it’s output pretty easy. I changed the format of the output and then wrapped the macro in (time). I really like this tool.