Sunday, October 25, 2026 4,350 lists 78,100 records on file
List your app or device

  1. Home
  2. Database Testing Tools
  3. pgtestdb

pgtestdb

Plans and prices

pgtestdb

Free

Open source Go library · requires a Postgres server

Every plan, in full

On the record

Cleanup and debugging
Databases from passing tests are deleted automatically, while a failed test leaves its database available and logs a connection string for inspection.github.com · read 4 Oct 2026
Concurrency
Each test gets its own database, and the README says pgtestdb is concurrency-safe for parallel tests.github.com · read 4 Oct 2026
Database drivers
The library uses Go's database/sql interface and supports pgx, lib/pq, or another database/sql driver.github.com · read 4 Oct 2026
Database limits
The README notes that highly parallel test suites can exceed a Postgres server's connection limit and suggests tuning test parallelism or server capacity.github.com · read 4 Oct 2026
Default test role
The default role used for test databases has NOSUPERUSER, NOCREATEDB, and NOCREATEROLE capabilities, so it cannot create extensions by default.github.com · read 4 Oct 2026
License
The repository identifies the project as MIT licensed.github.com · read 4 Oct 2026
Maker
The repository is maintained under the GitHub account peterldowns; the opened project page does not state a maker name, headquarters, or founding date.github.com · read 4 Oct 2026
Migration integrations
Built-in adapters are listed for pgmigrate, golang-migrate, goose, dbmate, Atlas, sql-migrate, Bun, and Tern; custom migrators are also supported.github.com · read 4 Oct 2026
Permissions
The configured server user needs capabilities to create databases and roles, and the README recommends using a dedicated testing server rather than production.github.com · read 4 Oct 2026
Postgres requirement
Users must provide a running Postgres server; the README describes Docker, native installations, and remote servers as options.github.com · read 4 Oct 2026
Purpose
pgtestdb is a Go library for database-backed tests that provisions an isolated, migrated Postgres database for each test.github.com · read 4 Oct 2026
Speed
The README says creating a test database from a template takes on the order of 10 milliseconds.github.com · read 4 Oct 2026
Template databases
It runs migrations once to build a template database and clones that template for individual tests.github.com · read 4 Oct 2026

Alternatives to pgtestdb

Every alternative, ranked