postgresql-stored-program-tests

Generate Gauge specs and CSV or SQL fixtures for PostgreSQL stored programs.

1|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/ke-kishimoto/asp-todos --skill postgresql-stored-program-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql-stored-program-tests
Source: https://github.com/ke-kishimoto/asp-todos/tree/main/.agents/skills/postgresql-stored-program-tests
Command: npx skills add https://github.com/ke-kishimoto/asp-todos --skill postgresql-stored-program-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the generation of end-to-end tests for PostgreSQL stored programs by analyzing a target SQL file, its accompanying docs, and related table schemas to output a Gauge spec and data fixtures.

Core Features & Use Cases

  • Analyze function and procedure SQL files, docs in docs/, and schema definitions to infer inputs, outputs, and meaningful test branches.
  • Generate a Gauge spec under MyTodo.E2E/specs and seed/expected fixtures under MyTodo.E2E/fixtures, ready for execution.
  • Support deterministic test scenarios by seeding required tables and cleaning up after tests, with CSV fixtures preferred for readability.

Quick Start

Run the skill on a PostgreSQL stored program to produce the E2E test artifacts and place them in the MyTodo.E2E project.

Frequently Asked Questions about postgresql-stored-program-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate end-to-end tests for PostgreSQL stored programs?

Creating end-to-end tests for PostgreSQL stored programs involves analyzing function and procedure SQL files, docs, and schema definitions to produce Gauge specs and seed fixtures. The generated tests include cleanup steps and assertions on updated tables for deterministic validation.

What is the best way to write deterministic test fixtures for PostgreSQL functions?

Deterministic test fixtures for PostgreSQL functions use CSV files whenever possible for readability, or SQL files, placed under the fixtures directory. They seed required tables with test data and include cleanup steps to ensure consistent test execution.

Can I use Gauge specs for testing PostgreSQL procedures and functions?

Gauge specs can test both PostgreSQL procedures and functions by generating test scenarios under the specs directory. These specs leverage seed data and cleanup steps to validate stored program behavior deterministically.

Does this PostgreSQL stored program testing approach work with both functions and procedures?

PostgreSQL stored program testing applies to both functions and procedures, reading their SQL files and optional docs to infer test branches. It generates Gauge specs and fixtures tailored to each stored program's inputs and outputs.

What schema definitions are needed to test PostgreSQL stored programs end-to-end?

Testing PostgreSQL stored programs end-to-end requires table schema definitions that the stored programs read or modify. The tool analyzes these schemas to generate seed data, expected fixtures, and table assertions for deterministic test validation.

Why use CSV fixtures over SQL fixtures for PostgreSQL E2E testing?

CSV fixtures are chosen over SQL fixtures for PostgreSQL E2E testing to improve readability of seed and expected data. While both formats are supported, CSV files make deterministic test scenarios easier to review and maintain.