Skip to main content
On this page

Kater CLI Build and check test

kater test readiness

Says whether a shared model is ready to hand off to the people who will use it.

It reads the last run of each test on this machine, so run kater test first. Readiness only informs: nothing stops you from using a model that is not ready.

Examples

Terminal window
# Run the tests of the shared ad_reporting model
kater test --select semantic.ad_reporting
# Check whether the model is ready to hand off
kater test readiness --model semantic.ad_reporting

Options

OptionDescription
--connection <name>The connection, by its folder name under connections/. Leave it out when only one connection has the --model.
--model <model>Required. The model to check, by its name or typed address, such as semantic.ad_reporting.

It also takes the global options --json, --kater-root, --scope and --help.

What ready means

Only the tests in the shared layer’s file count. A model is ready when each of these checks is met:

CheckMet when
Every test passesEvery test passed on its last run, and nothing that it reads changed since.
No draftsNo test is still a draft.
Every measure in a checked testEach measure of the model is in at least one checked test.
Matches native SQLA same_as test against native SQL, such as a query of a dbt mart, passes.
Every rule pinnedEach NOT_ADDITIVE_ACROSS rule that the model declares has a passing refused test.

It also lists how many of the model’s business questions a checked test answers. It lists known issues too: the tests that the last kater test generate could not write. These two do not block hand-off.

What it prints

One line for each part: Tests, Measures, Families, Picker path, Oracle, Refusals and Questions, then any known issues. The last line says “Ready to hand off: yes”, or “not yet” with the checks still to meet. The command exits with 0 when the model is ready and 1 when it is not, so a script or a CI job can wait for it.

See also