docs/agent-guides/testing.md
| Type | Location | Use Case |
|---|---|---|
.sqltest | testing/runner/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/runner. The .sqltest format allows the same test cases to run against multiple backends (CLI, Rust bindings, etc.).
# Main test suite (TCL compat, sqlite3 compat, Python wrappers)
make test
# Single TCL test
make test-single TEST=select.test
# SQL test runner
make -C testing/runner run-cli
# Rust unit/integration tests (full workspace)
cargo test
@database :memory:
@query
SELECT 1 + 1;
@expected
2
Location: testing/runner/tests/*.sqltest
do_execsql_test_on_specific_db {:memory:} test-name {
SELECT 1 + 1;
} {2}
Location: testing/*.test
// tests/integration/test_foo.rs
#[test]
fn test_something() {
let conn = Connection::open_in_memory().unwrap();
// ...
}
:memory: (sqltest) or {:memory:} (TCL)testing/testing.db has users and products tables. See docs/testing.md for schema.
RUST_LOG=none,turso_core=trace make test
Output: testing/test.log. Warning: very verbose.