Skip to main content

test

dbt test runs tests defined on models, sources, snapshots, and seeds. It expects that you have already created those resources through the appropriate commands.

The tests to run can be selected using the --select flag discussed here.

# run tests for one_specific_modeldbt test --select one_specific_model
# run tests for all models in packagedbt test --select some_package.*
# run only custom data testsdbt test --data
# run only schema testsdbt test --schema
# run custom data tests for one_specific_modeldbt test --data --select one_specific_model
# run schema tests for one_specific_modeldbt test --schema --select one_specific_model

For more information on writing tests, see the Testing Documentation.