cl-tap-producerX is a testing framework for Common Lisp which produces reports in the TAP (Test Anything Protocol) format.
Common Lisp
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


cl-tap-producerX (latest as of 19 Apr 2011)

Current Maintainer:
  Brendon Robinson

  This work is licensed under the MIT (X11) License.
  The latest code from this project should be available at:

  cl-tap-producerX is a testing library for Common Lisp which produces test results in the Test Anything Protocol (TAP) format. The most common usage is to print the TAP output to standard output, for use with tools such as the Perl prove utility, but other usages are possible. cl-tap-producerX supports most parts of the TAP specification, including TODO tests, skipped tests, and diagnostics. cl-tap-producerX automatically infers diagnostics in the most common usages. cl-tap-producerX is extremely light-weight with almost no boilerplate required in the most common usage scenario. Boilerplate is available for those who prefer it.

  cl-tap-producerX is split into two parts - a test library which generates structured test result data, and a TAP producer which formats the structured test data to TAP output. In the most common usage, this process is transparent.

  cl-tap-producerX has no external dependencies.

  This module has only been tested on GNU CLISP.

  cl-tap-producerX consists of two main subsystems: a test framework (unit-test-framework.lisp) and a set of utilities for exporting test results in the TAP format (cl-tap-producer.lisp). The file cl-tap-framework.lisp is provided for convenience and will load both into their own namespace as well as setting the TAP formatter as the default test formatter. The easiest way to get started with cl-tap-producerX is to load cl-tap-framework.lisp.

  There are two main ways of using cl-tap-producerX's unit test framework. One is to use deftest forms, as described in Practical Common Lisp. In this case, executing the test function will return a list of test result structures. Those test result structures can be passed to structured-test-list->tap to produce the TAP output as a string, or to print-test-list to print to standard output directly. Some additional testing facilities are provided beyond those described in Practical Common Lisp - please see unit-test-framework.lisp for the specific facilities available.

  The other method is to use test expressions directly. If test expresions are evaluated outside the context of a deftest form, the result will be printed to standard output automatically. If you use this method, you may also wish to call print-test-plan at the end of all testing to print the test plan to standard output. The test plan is not required as part of the TAP standard but many TAP consumers, including prove, behave better if it is present.

  NOTE: The forms inside of a deftest are stored quoted, and eval'd each time, so if they contain macros the macros will be re-expanded each time the tests are run. Tests declared using is at top level are not guaranteed to have that behaviour.

  mw-equiv:object= is used by default for comparisons. See mw-equiv-0.1.3/doc/index.html for details on how to alter the way objects are compared. It is also possible to supply a keyword parameter :compare-fun or :compare-sym to change the function used for comparisons.

  See example.test.lisp, arithmetic.test.lisp, unit-test-framework.test.lisp and cl-tap-producer.test.lisp for usage examples.