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 it will lead to unexpected behavior and outcomes.
-
✅ Do
- Use relative path:
test-paths: ["test"]
- Use relative path:
-
❌ Don't:
- Avoid absolute paths:
test-paths: ["/Users/username/project/test"]
- Avoid absolute paths:
Examples
Use a subdirectory named custom_tests
instead of tests
for data tests
dbt_project.yml
test-paths: ["custom_tests"]
0