Testing in Clojure

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

TODO::work in progress, sorry

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

  • Scenari - executable specification / BDD in Clojure
  • kaocha-cucumber - support for Cucumber tests in the gerkin format
  • speclj - TDD/BDD framework for Clojure and ClojureScript based on RSpec.

Alternative BDD libraries are discussed at https://github.com/gphilipp/bdd-guide-clojure

Performance testing

  • time - simple results of evaluating an expression
  • criterion - a realistic measure of performance for clojure expressions
  • Gatling - open source & commercial load test tool for web applications
  • clj-gatling - wrapper around Gatling which enables tests to be expressed in Clojure.

Articles on testing in Clojure