RegreSQL
Because 'It Works on My Database' Won't Fly in the Postmortem
Know when your query results change. Catch regressions before they reach production.
How It Works
# Initialize in your project
regresql init postgres://localhost/mydb
# Generate expected results for your queries
regresql update
# Build reproducible test database snapshot
regresql snapshot build
# Run regression tests
regresql test
Features
Query Result Testing
Compare query outputs against known baselines. Automatic diff generation highlights exactly what changed.
Declarative Fixtures
YAML-based configuration with 15+ data generators. Automatic foreign key detection builds consistent test data.
Database Snapshots
Reproducible test environments with hash validation. Supports pg_dump custom and directory formats.
EXPLAIN Baselines
Track query plan costs over time. Get warnings when performance regresses beyond thresholds.
CI/CD Integration
Output formats for JUnit XML, pgTAP, and GitHub Actions. Seamless integration with your pipeline.
Migration Testing
Test migration impact on your queries. See affected results before deploying to production.
Installation
Homebrew
brew tap boringsql/regresql && brew install regresql
Go
go install github.com/boringsql/regresql@latest