FiveAM is a testing framework. It takes care of all the boring bookkeeping associated with managing a test framework allowing the developer to focus on writing tests and code.
FiveAM was designed with the following premises:
- Defining tests should be about writing tests, not infrastructure. The developer should be able to focus on what they're testing, not the testing framework.
- Interactive testing is the norm. Common Lisp is an interactive development environment, the testing environment should allow the developer to quickly and easily redefine, change, remove and run tests.
(defpackage :it.bese.FiveAM (:use :common-lisp :it.bese.arnesi) (:nicknames :5am) (:export ;; creating tests and test-suites #:make-suite #:def-suite #:in-suite #:make-test #:test #:get-test #:rem-test ;; fixtures #:make-fixture #:def-fixture #:with-fixture #:get-fixture #:rem-fixture ;; running checks #:is #:is-true #:is-false #:signals #:finishes #:skip #:pass #:fail #:*test-dribble* #:for-all #:gen-integer #:gen-string #:gen-character ;; running tests #:run #:run-all-tests #:explain #:explain! #:run! #:! #:!! #:!!! #:*debug-on-error* #:*debug-on-failure* #:*verbose-failures*))
You can use #+5am to put your test-defining code inline with your other code - and not require people to have fiveam to run your package.
(pushnew :5am *features*)