test framework

Somebody once said that Lispniks have been the first agile developers, doing the stuff people now all go mad about decades ago without thinking twice. So maybe it isn't very surprising that there are quite a lot of tools that help with test driven development.

A quite comprehensive review of various test frameworks is available here.

Known Common Lisp Test Frameworks on CLiki include:

There are probably more, because CL makes it really easy to write test code. :)

Like COVER: Common Lisp test case coverage determination tool.

XPTEST and clos-unit ( clos-unit appears to be deprecated in favor of xlunit which has almost the same semantics ) are basically implementations of the *Unit design (like JUnit, SUnit etc), where a test case (and a test fixture, there isn't much differentiation) is a CLOS class, and the individual tests are its methods. Failure of a test is usually indicated by calls to some assertion forms or by signaling an appropriate condition.

FiveAM seems to offer similar functionality, but handles it in another fashion. For example, setting up and tearing down a fixture isn't done with defining methods for a test-case class, but with a WITH-FIXTURE macro which simply wraps one piece of code with another.

rt is an older library from the CMU AI repository. It takes a more simplistic approach, a single test is made up of its name, a form to evaluate, and the expected return values of this form. CLUnit takes a similar approach, but with a lot more sugar, like collecting and classifying tests, giving a comparison function to match the real with the expected output etc.

Clickcheck is a specification based random testing tool.


See also Test framework comparison and Test Frameworks on ALU Wiki.


Status notes


Pages in this topic: ASDF-Install-Tester   cl-smoketest   Clickcheck   clos-unit   CLUnit   EnclineTest   FiveAM   FReT   LIFT   lisp-unit   LispUnit   MSL-Test   ptester   RT   Stefil   tester   unit-test   xlunit   XPTEST  


Also linked from: development   Test   Test Frameworks   Testing  

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively