문서 보기역링크PDF로 내보내기맨 위로 이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. # 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 마지막으로 수정됨: 2022/06/10 07:30저자 127.0.0.1