← Files SQL CopilotARCHIVED FILE

references/testing-method.md

1019 Bytes · Nov 4, 2026 · 00:11 UTC

↓ Download file

See the change to this file →

# SQL testing strategy and fixture boundaries

Use tiny intentionally adversarial fixtures: 1-to-many joins, repeated amounts, two identical timestamps with different event IDs, null key, invalid cast, midnight boundary and out-of-order CDC. Declare expected row counts, totals and winners.

Local `sqlite3` tests validate universal relational properties for the exact SQLite syntax exercised. They do **not** verify Snowflake, BigQuery, SQL Server, Databricks, PostgreSQL or Oracle syntax. Target-engine testing requires a proper engine/tool and ideally a nonproduction schema with safe data.

Test invariants by grain, not merely query success. For each regression, capture query text, runtime/engine, input fixture hashes or source, expected/actual results and pass/fail status. Never call a proposed test "passed".

The bundled `sql_fixture_checker.py` uses SQLite in memory and illustrative synthetic records only; the advisory risk scanner is not a substitute for a real SQL parser, security review or approvals.

SHA-256: 5117eab369daa74954f4c1f4e6d5a575e3fb5f0143265d46a93bc9ed976e2e34