Testing in Clojure

Testing is well supported in Clojure and there are numerous testing libraries and test runners you can use.

Unit Test style frameworks

  • clojure.test
  • Midge - a more advanced version of clojure.test with mocking, nested checkers, etc.
  • fudje - a lightweight version of Midge
  • clojure.alpha.spec which included generative testing

Behaviour Driven Development frameworks

Leiningen and book build tools provide test runners and also have plugins to add more features. There are also standalone test runners available as libraries.

  • eftest - James Reeves fast and pretty test runner for clojure.test and compatable test libraries (midge, etc)
  • Kaocha - full featured next gen test runner for Clojure
  • cljs-test-display - visual display of in-browser ClojureScript test run
  • lein-test-refresh - Leiningen plugin to run tests on file changes
  • humane-test-output - Leiningen plugin for more human readable test output with equality assertions diffed.
  • Bolth - a more humane test runner
  • bat-test - test runner for boot projects

Articles on testing in Clojure

results matching ""

    No results matching ""