testing

Installation
Summary

SQL and Rust testing guide covering test types, execution, and writing patterns.

  • Three primary test formats: .sqltest (preferred for SQL compatibility across backends), TCL .test (legacy, being phased out), and Rust integration tests for regression and complex scenarios
  • Run tests via make test for the full suite, make -C testing/sqltests run-cli for SQL tests, or cargo test for Rust tests
  • .sqltest format uses simple declarative syntax with @database, test blocks, and expect sections; TCL tests are being converted automatically with the convert command, though manual adjustment of expected results is often needed due to database seed differences
  • Every functional change requires a test that fails without the change and passes with it; prefer in-memory databases (:memory:) for test isolation
SKILL.md

Testing Guide

Test Types & When to Use

Type Location Use Case
.sqltest testing/sqltests/tests/ SQL compatibility. Preferred for new tests
TCL .test testing/ Legacy SQL compat (being phased out)
Rust integration tests/integration/ Regression tests, complex scenarios
Fuzz tests/fuzz/ Complex features, edge case discovery

Note: TCL tests are being phased out in favor of testing/sqltests. The .sqltest format allows the same test cases to run against multiple backends (CLI, Rust bindings, etc.).

Running Tests

# Main test suite (TCL compat, sqlite3 compat, Python wrappers)
make test

# Single TCL test
Related skills
Installs
598
GitHub Stars
18.7K
First Seen
Jan 28, 2026