Kaocha's hooks plugin and volley's :volley/worker-setup, as data.
Kaocha runs every hook in its one process. volley has a parent that plans
and reports and workers that load and run namespaces, so each hook runs
where its work happens. semantics is the table, and doc/design.md
explains it. This namespace is pure: it reads the hook configuration out
of the Kaocha config, builds the {:op :configure} message for workers,
and builds the Kaocha-shaped maps hooks receive (testables, the test plan,
the result). Hooks are resolved and called by volley.shell.worker and,
for post-summary, volley.main.
Kaocha's hooks plugin and volley's `:volley/worker-setup`, as data.
Kaocha runs every hook in its one process. volley has a parent that plans
and reports and workers that load and run namespaces, so each hook runs
where its work happens. `semantics` is the table, and doc/design.md
explains it. This namespace is pure: it reads the hook configuration out
of the Kaocha config, builds the `{:op :configure}` message for workers,
and builds the Kaocha-shaped maps hooks receive (testables, the test plan,
the result). Hooks are resolved and called by `volley.shell.worker` and,
for `post-summary`, `volley.main`.(configure-message config)The {:op :configure} message every worker gets before its first run,
or nil when no hook, worker setup or custom reporter is configured.
:reporters are the project's own reporter symbols (--reporter,
:kaocha/reporter), which the workers call with each clojure.test
event.
The `{:op :configure}` message every worker gets before its first run,
or nil when no hook, worker setup or custom reporter is configured.
`:reporters` are the project's own reporter symbols (`--reporter`,
`:kaocha/reporter`), which the workers call with each clojure.test
event.(engine-opts config)The hook options of volley.engine/init for normalized config:
:configure (the message for workers) and :post-summary (the parent's
hooks), each nil when not configured.
The hook options of `volley.engine/init` for normalized `config`: `:configure` (the message for workers) and `:post-summary` (the parent's hooks), each nil when not configured.
(hook-key? k)True for a :kaocha.hooks/... key.
True for a `:kaocha.hooks/...` key.
(hook-keys m)The :kaocha.hooks/... keys of m.
The `:kaocha.hooks/...` keys of `m`.
(kaocha-config config)A Kaocha-shaped config for normalized config, which hooks get where
Kaocha passes its config or test plan.
A Kaocha-shaped config for normalized `config`, which hooks get where Kaocha passes its config or test plan.
(kaocha-result config suite-of run)The test result post-summary hooks get: Kaocha's shape
(:kaocha.result/tests, suites holding namespaces holding vars with
:kaocha.result/count, pass, fail, error and pending; vars
skipped by a filter carry :kaocha.testable/skip and no counts) built
from volley's run state. suite-of maps each namespace to its suite id.
The test result `post-summary` hooks get: Kaocha's shape (`:kaocha.result/tests`, suites holding namespaces holding vars with `:kaocha.result/count`, `pass`, `fail`, `error` and `pending`; vars skipped by a filter carry `:kaocha.testable/skip` and no counts) built from volley's run state. `suite-of` maps each namespace to its suite id.
(kaocha-test-plan config plan)--print-test-plan: Kaocha's test plan shape (kaocha.api/test-plan)
for normalized config and plan (volley.select/plan), suites holding
the planned namespaces holding the test vars the parser saw. A var the
filters skip carries :kaocha.testable/skip, as in Kaocha; tests a
macro defines appear only once loaded, so not here. volley's own part of
the plan is under :volley/* keys: each suite's filter passes once, each
namespace's :volley/serial?, and the namespaces workers preload.
`--print-test-plan`: Kaocha's test plan shape (`kaocha.api/test-plan`) for normalized `config` and `plan` (`volley.select/plan`), suites holding the planned namespaces holding the test vars the parser saw. A var the filters skip carries `:kaocha.testable/skip`, as in Kaocha; tests a macro defines appear only once loaded, so not here. volley's own part of the plan is under `:volley/*` keys: each suite's filter passes once, each namespace's `:volley/serial?`, and the namespaces workers preload.
The plugin that turns Kaocha's hooks on.
The plugin that turns Kaocha's hooks on.
(read-hooks m allowed where)The hooks in map m (the top-level config or one suite). allowed is
the set of supported short keys; where is text for warnings such as
" (suite :unit)". Returns {:hooks {short-key [entry ...]} :warnings [str]}, only non-empty vectors kept.
The hooks in map `m` (the top-level config or one suite). `allowed` is
the set of supported short keys; `where` is text for warnings such as
" (suite :unit)". Returns `{:hooks {short-key [entry ...]} :warnings
[str]}`, only non-empty vectors kept.(read-worker-setup m where)[entries warnings] for :volley/worker-setup in m.
`[entries warnings]` for `:volley/worker-setup` in `m`.
Where and when each :kaocha.hooks/* key runs in volley.
Where and when each `:kaocha.hooks/*` key runs in volley.
Hook keys Kaocha accepts on a suite (kaocha.plugin.hooks,
load-testable-level-hooks).
Hook keys Kaocha accepts on a suite (`kaocha.plugin.hooks`, `load-testable-level-hooks`).
(suite-testable {:keys [id type test-paths source-paths ns-patterns focus skip
focus-meta skip-meta]})The Kaocha testable of normalized suite suite, as hooks see it, with
the suite's own filters under Kaocha's :kaocha.filter/* keys.
The Kaocha testable of normalized suite `suite`, as hooks see it, with the suite's own filters under Kaocha's `:kaocha.filter/*` keys.
Hook keys Kaocha accepts at the top of tests.edn.
Hook keys Kaocha accepts at the top of tests.edn.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |