Figure 1: dbt tests and model contracts gate the build. TestGen profiles the tables dbt produces and generates the rest.
Automatic test generation from profiling and metadata
dbt’s four built-in generic tests cover uniqueness, nulls, accepted values, and relationships. Everything else is hand-written in YAML or SQL, one model at a time, even with dbt-expectations (now a Metaplane-maintained fork that adds about 60 test macros).
In practice, teams test primary keys and a few critical fields, because writing and maintaining tests across every layer (bronze, silver, gold) outruns the time they have. In DataKitchen’s analysis of 849 community comments, the top reason engineers don’t test is that nobody gives them the time. The full breakdown is in We just eyeball row counts and pray.
TestGen starts from the data. It profiles tables on 55 column characteristics, then uses those results plus catalog metadata to generate tests from 34 test types, alongside 32 data hygiene detectors. The tests include distribution, range, pattern, cardinality, completeness, and timeliness checks on columns nobody would hand-test. Table monitors for freshness, volume, and schema learn from each table’s history.
Generated tests treat the data as profiled as normal, so review them in the TestGen UI before you schedule them.
Business rules stay yours. 19 more test types, a separate set from the 34 generated ones, cover them and custom SQL, and you configure them. For the authoring comparison, including Great Expectations, read How is TestGen different from dbt tests and Great Expectations?. To judge whether your team has outgrown dbt tests, read When are dbt tests enough?.
Create a contract from a profiled table group, and TestGen generates the tests and an ODCS contract document. On DataKitchen’s five-table demo, that was 98 tests in one step. You can also import an ODCS file that another team or a supplier wrote. ODCS is the Open Data Contract Standard, maintained by Bitol under the Linux Foundation. Rules TestGen can’t check stay in the document but never run, and service levels are documented, not verified. A contract’s terms are data tests, as The terms and conditions of a data contract are data tests argues. Contracts shipped in TestGen 5.185.1 on November 12, 2026, in open source and Enterprise, as Data contracts ship in open source TestGen announced. Start from the data contracts page.
A dbt model contract is the hand-written counterpart. It fixes a model’s column names and data types, doesn’t apply to sources or seeds, and doesn’t speak ODCS. The dbt docs describe the full behavior. For what a data contract is and how to enforce one, see What is a data contract and how do you enforce one?
A UI, because data tests are a team sport
TestGen comes with a web UI. dbt has dbt docs or a separate tool, and its contracts live in YAML in git. Managing data tests is a collaboration: engineers run the pipelines, but data stewards and business users own what the data means, and they don’t edit YAML in a git repo. Data quality testing: a shared resource for modern data teams makes the case.
A Data Steward role can update catalog metadata and change test parameters without seeing PII or changing schedules. Tests carry timestamped notes and review flags, and the contract document is readable without SQL. DataKitchen enhances its support for data stewards describes the role, and Your best data quality rules live in someone else’s head explains why those people matter.
Contracts live in numbered versions. You edit a draft, then freeze it, and only runs of the active version count toward results, scores, and notifications. The UI compares any two versions rule by rule or as documents. For why a contract is really communication between teams, read Data contracts are communication for data teams who dislike each other.
A rich MCP server and skills
TestGen has an MCP server. An AI assistant such as Claude, Cursor, or Copilot, with skills and context about your business, can import an ODCS file as a new contract or into a draft, and read the contract document whole or by section, table, or column. It can edit the draft, run test generation, and freeze the draft. It can compare versions test by test and as documents, list versions, discard a draft, and export a version as ODCS. dbt has no MCP server for contracts.
Setup is in How to use the TestGen MCP server with Claude, Cursor, and Copilot. The supported tools list has every tool.
Metadata that drives test creation in your domain
Profiling results plus catalog metadata tell generation what matters. That metadata means descriptions, tags, critical data elements, and PII and excluded flags. Stewards can bulk-load it by CSV import, including from an external catalog or semantic model, and excluded columns stay out of generation. dbt has no profile to generate from, and a dbt model contract holds only what someone typed.
These are DataKitchen’s estimates, from its data contracts webinar: profiling generates about 80 percent of a contract’s tests in about 60 seconds. An LLM working through the MCP server with business context takes it toward 90 percent. The last 10 percent lives in people’s heads, so business users add it in the TestGen UI. The recording is How to Do Data Contracts.
How the three compare
| dbt tests | dbt model contracts | DataOps TestGen | |
|---|---|---|---|
| Authoring | Four built-in generic tests, everything else hand-written in YAML or SQL | Columns and types declared by hand, model by model | Generated from a profile of the data |
| Who works in it | Engineers, in YAML or SQL in git | Engineers, in YAML in git | Engineers, data stewards, and business users, in a web UI |
| Coverage | Usually primary keys and a few critical fields | Models only, not sources or seeds | Every profiled table, including distribution, range, pattern, cardinality, completeness, and timeliness checks |
| What a contract checks | No contract; each test checks one rule | Column names and data types | A test behind each rule TestGen can check, plus a Schema Conformance test for drift from declared columns and types |
| Supports the ODCS standard | No | No | Yes: import, export, and compare ODCS documents |
| Contract format | YAML or SQL in your dbt project | dbt’s own format, not ODCS | ODCS, with import, export, and numbered versions |
| Results UI and monitors | dbt docs or a separate tool | Build fails on a mismatch | Web UI, data quality scorecards, and table monitors for freshness, volume, and schema that learn from each table’s history |
| Where it runs | Inside dbt build | Inside dbt build, before the table is written | In the warehouse against tables, after or between builds, or from a pipeline step |
What dbt does better
dbt tests run inside the build and stop bad models from building downstream. TestGen runs against the tables after, or between, builds unless you wire it into the pipeline.
dbt model contracts catch a column name or type change before the table is written, which TestGen can’t do. TestGen’s Schema Conformance test, which each declared table gets, covers the same columns and types but reports drift after the table lands. TestGen blocks nothing unless a pipeline step fails on its results.
Hand-written dbt tests also encode business rules that no profile can infer. Generation covers the routine tests. It doesn’t know your business.
Use both
Keep core dbt tests and model contracts as the gate inside dbt build. A failed test with error severity makes the models downstream of it skip.
Then point TestGen at the tables dbt produces. It connects to the warehouse and runs profiling and tests as SQL in place, without reading dbt’s SQL, YAML, or manifest. It generates the coverage nobody had time to write, monitors between runs, and holds the contract other teams read, in ODCS. A pipeline step after dbt build can call the TestGen REST API to run a test suite and fail if tests fail. The mechanics are in How TestGen fits into a dbt project.
Try the data contract walkthrough, then install open source TestGen and profile one dbt-built schema.