A regression testing tool for SQL queries that ensures consistent results against PostgreSQL databases.
RegreSQL is a regression testing tool specifically designed for SQL queries, enabling developers to verify that query outputs remain consistent after code changes. It helps maintain data integrity by comparing current query results against previously stored expected outputs, ensuring that modifications don't introduce unexpected behavior.
Database developers and engineers working with PostgreSQL who need to ensure SQL query reliability, such as those maintaining data pipelines, ETL processes, or applications with complex SQL logic.
Developers choose RegreSQL for its PostgreSQL-native approach, supporting parameterized queries with psql-style variables and organizing tests via directory structure and YAML plans. It produces TAP output for integration with existing testing frameworks, offering a specialized, automated solution for SQL regression testing.
Regression Testing your SQL queries
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements psql-style variables (:foo, :'foo', :"foo") for parameterized queries, allowing flexible test scenarios as shown in the example with :name binding.
Automatically finds and runs all .sql files in the directory structure, organizing tests without manual registration, as demonstrated by the 'regresql list' command.
Produces Test Anything Protocol output, enabling easy integration with existing CI/CD pipelines and testing frameworks for streamlined automation.
Uses YAML files to define multiple parameter bindings per query, supporting comprehensive test coverage with different inputs, as seen in the album-by-artist.yaml example.
Only supports PostgreSQL databases, making it unsuitable for projects using other database systems like MySQL or SQLite, as stated in the README.
Tests must run against a live PostgreSQL database with a known state, complicating isolated testing and mocking without built-in support for fixtures or stubs.
Requires creating and maintaining YAML plan files for each query, adding setup time and overhead compared to tools with inline test definitions.