A reference guide for writing and running SQL, TCL, and Rust tests in the database project.

skills.sh installs
1.3K
GitHub stars
25.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers test types by location: .sqltest suites for SQLite, shared, and PostgreSQL frontends, plus Rust integration, fuzz, and legacy TCL tests
  • Includes make targets (make test, make test-single, make -C sqlite/conformance run-rust) and cargo test commands, including a per-database leak check
  • Shows .sqltest syntax with @database, test and expect blocks, and how to convert TCL files with make -C sqlite/conformance convert
  • Designed for contributors adding tests to the database engine, with rules requiring a failing-then-passing test for every functional change

Install

$ npx -y skills add tursodatabase/turso --skill testing -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Testing Guide

Test Types

TypeLocationUse Case
.sqltestsqlite/conformance/sqlite-sqltests/SQL compatibility. Preferred for new tests
.sqltesttesting/shared-sqltests/SQL that both the SQLite and PostgreSQL frontends run
.sqltestpostgres/conformance/pg-sqltests/PostgreSQL frontend
Rust integrationtests/integration/Regression tests, multi-connection and storage scenarios
Fuzztests/fuzz/Edge cases found by fuzzing
TCL .testtesting/system/Legacy. Write new tests as .sqltest

Extend an existing test file before creating a new one.

Running Tests

make test                                   # TCL, sqlite3 compat, extensions, MVCC
make test-single TEST=select.test           # one TCL test
make -C sqlite/conformance run-rust ARGS='--snapshot-filter __never__'   # .sqltest runner
cargo test                                  # Rust unit and integration tests
cargo test -p core_tester --test leak_tests # per-database memory leak check (separate binary with a counting allocator)

make sets RUST_LOG=off.

Writing a .sqltest

Details

Repository
github.com/tursodatabase/turso
Categories
Testing & QA, Databases
First seen
May 16, 2026

More from tursodatabase/turso

All 7

Similar to Testing

More Testing & QA