This section describes plug-ins that are built-in but not enabled by default. Functionality of default plugins is described in the Running Kaocha CLI section.
For information on writing plugins, see the section on extending Kaocha.
The profiling plugin will output a list of the slowest tests for each test type at the end of the test run.
bin/kaocha --plugin kaocha.plugin/profiling
or
#kaocha/v1
{:plugins [kaocha.plugin/profiling]}
Top 2 slowest kaocha.type/clojure.test (37.97308 seconds, 100.0% of total time)
integration
37.06616 seconds average (37.06616 seconds / 1 tests)
unit
0.08245 seconds average (0.90692 seconds / 11 tests)
Top 3 slowest kaocha.type/ns (37.71151 seconds, 99.3% of total time)
kaocha.integration-test
37.06421 seconds average (37.06421 seconds / 1 tests)
kaocha.type.var-test
0.57622 seconds average (0.57622 seconds / 1 tests)
kaocha.runner-test
0.03554 seconds average (0.07108 seconds / 2 tests)
Top 3 slowest kaocha.type/var (37.70178 seconds, 99.3% of total time)
kaocha.integration-test/command-line-runner-test
37.06206 seconds kaocha/integration_test.clj:25
kaocha.type.var-test/run-test
0.57399 seconds kaocha/type/var_test.clj:12
kaocha.runner-test/main-test
0.06573 seconds kaocha/runner_test.clj:10
--[no-]profiling Show slowest tests of each type with timing information.
--profiling-count NUM Show this many slow tests of each kind in profile results.
Shown with their default values:
#kaocha/v1
{:kaocha.plugin.profiling/count 3
:kaocha.plugin.profiling/profiling? true}
At the end of the test run, print command invocations that can be copy-pasted to re-run only specific failed tests.
bin/kaocha --plugin kaocha.plugin/print-invocations
or
#kaocha/v1
{:plugins [kaocha.plugin/print-invocations]}
[(.)(F..)(..)(...)(............)(....)(...........)(......)(....)(.)(...)]
FAIL in (clojure-test-summary-test) (kaocha/history_test.clj:5)
...
18 test vars, 50 assertions, 1 failures.
bin/kaocha --focus 'kaocha.history-test/clojure-test-summary-test'
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close