Formerly known as Boot-alt-test
Fast Clojure.test runner for Boot and Leiningen.
- Requires tools.namespace 0.3.0-alpha3
- Uses eftest to display pretty reports
- Can optionally run tests parallel
- Can capture output and display the output just for the failing tests (
:capture-output?, enabled by default) - Can be configured to stop running tests after the first failure (
:fail-fast?)
- Easy way to setup and combine eftest reporters:
- Built-in reporters can be referred by keywords
:pretty,:progressand:junit - Reporter can be map with
:type(referring to reporter fn) and option:output-towhich will redirect the output to a file. - Multiple reporters can be combined when defining them as vector:
(bat-test :report [:pretty {:type :junit :output-to "target/junit.xml"}])
- Built-in reporters can be referred by keywords
- Uses clojure.tools.namespace to reload changed namespaces and to run only the tests in changed or affected namespaces
- Tries to recover from namespace reload errors so that no process restart is needed
- Run all tests by hitting
enter - Two hooks to manage the test environment
on-starthook: run a function before any tests are runon-endhook: run a function after all tests are run
- Cloverage integration
cloverage-optsoption to set (subset) of Cloverage optionsboot bat-test -corlein bat-test cloverage- Probably doesn't work well together with
watchtask
- Built-in file change watcher
- Copies lein-test API, e.g. test-selectors:
lein bat-test :only namespace/test-varlein bat-test only-this-namespacelein bat-test :integration
:notify-commandfor callingnotify-sendor Growl or such
-
Add
[metosin/bat-test "X.X.X" :scope "test"]as a dependency in yourbuild.boot -
Add
(require '[metosin.bat-test :refer (bat-test)])somewhere in your build.boot to make the task available to your Boot workflow. -
Run
boot bat-testat the command-line or(boot (bat-test))in the REPL, or addbat-testtask as part of your Boot pipeline.
See boot bat-test -h for a list of available task options.
-
Add
[metosin/bat-test "X.X.X"]as a plugin in yourproject.clj -
Add options under
:bat-testkey in project map and runlein bat-testat the command-line
See lein bat-test help for a list of available task options.
Copyright © 2016-2019 Metosin Oy
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
