Testing the right things in the right places
In the previous sections, we saw how easy is to add tests in dbt; most of the time, you just add a tests:
property with a few test names under a table or column in a YAML file.
Adding tests is so simple that it is easy to go overboard and start testing everything and everywhere, but please refrain from doing that, and remember that tests are code and, therefore, bring with them their fair share of errors (wrong application or configuration of generic tests from libraries and coding errors in our own singular tests), maintenance (false positives, errors without business value that can just be ignored, and constant test refactoring), and consequences (ignoring important tests because of constant test failure fatigue).
Tests also take time and money to execute, so waiting for useless tests to complete is a total waste of money, and of a developer’s time when they run tests in their development environments. It’s also not...