RegreSQL
lastmod 2025-11-24created 2025-11-241 edits
A tool that automates regression testing of SQL queries
About
- An SQL regression testing tool for PostgreSQL that automatically checks whether query results have changed
- Scans SQL files and generates and manages per-query expected JSON results, EXPLAIN cost baselines, and test plans
- Provides a YAML-based fixture system for declaratively setting up the test DB state (supports static/dynamic data generation)
- The CLI provides the full workflow, including init, plan, update, test, and baseline, so added or changed queries can be tracked automatically
- Easy to adopt across a team, with various output formats that integrate with GitHub Actions and CI/CD (console, TAP, JUnit, JSON, GitHub Actions)
- Main use cases
- Verifying SQL query behavior and results without changing app code
- Tracking changes in query results during migrations
- Automated quality control in large SQL repositories