Skip to content
Testing

dbt Unit Tests

Generate dbt unit test scaffolds without starting from blank YAML.

Analyze dbt model logic and generate unit test scenarios with mock inputs and expected outputs.

Add meaningful dbt unit tests faster with Altimate Code.

The problem it solves

dbt unit tests are powerful but often skipped because writing mock inputs, expected outputs, and edge cases takes time and careful model understanding.

What it does

Analyzes SQL logic such as joins, CASE statements, null handling, windows, and incremental behavior.
Finds upstream dependencies that need mock inputs.
Generates type-aware dbt unit test YAML scaffolds.
Supports iterative refinement and validation of generated tests.

When to use it

WHEN

adding coverage for a business-critical dbt model

WHEN

a model contains logic that could silently regress

DURING

test-driven development in dbt

BEFORE

refactoring model SQL

How it works

The skill reads model SQL and manifest context, identifies testable logic, generates scenarios, refines expected outputs, and validates the tests when possible.

Tools used

dbt_unit_test_gen

Generate dbt unit test scaffolds from model SQL, manifest metadata, and upstream dependencies.

dbt_manifest

Parse dbt manifest metadata to understand models, sources, tests, and dependency structure.

dbt_lineage

Extract dbt model dependency and lineage context.

altimate_core_validate

Run deterministic SQL or data-engineering validation through Altimate Core.

altimate_core_testgen

Generate testing suggestions and scenarios through Altimate Core.

Related skills