test-paths
dbt_project.yml
test-paths: [directorypath]
Definition
Optionally specify a custom list of directories where singular tests and custom generic tests are located.
Default
Without specifying this config, dbt will search for tests in the tests
directory, i.e. test-paths: ["tests"]
. Specifically, it will look for .sql
files containing:
- Generic test definitions in the
tests/generic
subdirectory - Singular tests (all other files)
test-paths
must be relative to the location of your dbt_project.yml
file. Avoid using absolute paths like /Users/username/project/test
, as they may lead to unexpected behavior.
-
✅ Do:
# Recommended relative path example
test-paths: ["test"] -
❌ Don't:
# Avoid using absolute paths
test-paths: ["/Users/username/project/test"]
Examples
Use a subdirectory named custom_tests
instead of tests
for data tests
dbt_project.yml
test-paths: ["custom_tests"]
0