FiveAM

FiveAM is a Test Framework whose goal is to be as simple as possible. This Development tool was created because the author, Marco Baringer, felt that the other testing frameworks required the user to write too much "stuff" before writing the actual tests.

Some useful user comment is linked from the project home page.

has the usual features you’d expect from an xUnit style test framework [...] presents a more lispish macro interface.

Distinguishing Characteristics

  1. assert-equal, assert-eql, assert-true, etc. have been replaced by the single is macro which inspects its argument to determine how to test equality
  2. Tests and test suites are named via symbols, this allows tests with the same name to peacfully live together (in different packages), and makes removing or runing single tests easy.
  3. !, !! and !!! functions for easily re-running recently run tests.
  4. inter test dependencies

Download ASDF package from http://common-lisp.net/project/bese/tarballs/fiveam-latest.tar.gz


Example:

CL-USER> (def-suite my-suite :description "My Example Suite")
CL-USER> (in-suite my-suite)
CL-USER>
(test my-tests
  "Example"
  (is (= 4 (+ 2 2)) "2 plus 2 wasn't equal to 4 (using #'= to test equality)")
  (is (= 0 (+ -1 1)))
  (signals
      (error "Trying to add 4 to FOO didn't signal an error")
    (+ 'foo 4))
  (is (= 0 (+ 1 1)) "this should have failed"))
CL-USER> (run!)
...f
 Did 4 checks.
    Pass: 3 (75%)
    Skip: 0 ( 0%)
    Fail: 1 (25%)

Failure Details: -------------------------------- MY-TESTS [Example]: this should have failed. --------------------------------


This page is linked from: armish   liards   Marco Baringer   test framework  

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