Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. # kaocha {{tag>clojure test}} [[lambdaisland]]/[[kaocha]] is a comprehensive test runner that support unit testing and [[clojure.spec]] generative testing. [[Clojure]] and [[ClojureScript]] languages are supported. ### watch <code clojure> clj -M:test-kaocha --watch </code> ### bin/kaocha 파일 생성 <code shell> #!/usr/bin/env bash clojure -J-Xmx512m -M:test-kaocha -m kaocha.runner --config-file test/tests.edn "$@" </code> ### test/test/edn 파일 생성 <code clojure> #kaocha/v1 {} </code> ### deps.edn <code clojure> :test/runner {:extra-paths ["test"] :extra-deps {lambdaisland/kaocha {:mvn/version "1.0.700"}} :main-opts ["-m" "kaocha.runner"]} </code> ### Running tests With a [[deps.edn]] project with tests under the standaart [[test]] directory and using [[-test]] postfix on test names, then all that is required is the [[kaocha]] command <code shell> bin/kaocha </code> ### Plugins Much of the functionality of Kaocha is provide by plugins - [[profiling]] - lists the slowest test for each test category - [[cucumber]] - [[bdd]] style test - [[junit-xml reports]] - format used by Continuouis Integratino servers to display results ### Profiling Show the 3 slwest tests for each category of test, after the test results As a command line option: <code shell> bin/kaocha --plugin kaocah.plugin/profiling </code> or added to the [[test.edn]] configuration <code clojure> #kaocha/v1 {:plugins [:kaocha.plugin/profiling]} </code> ## Refs - https://github.com/lambdaisland/kaocha - https://practical.li/clojure/testing/test-runners/kaocha-test-runner.html open/kaocha.txt Last modified: 2024/10/05 06:15by 127.0.0.1