backend-tester

Verifies backend changes with pgTAP tests and Supabase CLI against a local database.

Updated Jan 31, 2023
One-click install
npx skills add https://github.com/Briian3306/Transporte --skill backend-tester-briian3306
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: backend-tester
Source: https://github.com/Briian3306/Transporte/tree/main/ibarra-app/.agents/skills/backend-tester
Command: npx skills add https://github.com/Briian3306/Transporte --skill backend-tester-briian3306

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Backend features often get marked as complete without any proof they actually work. This Skill enforces a verification step for the Peajes / Transporte Ibarra project: every backend change must be tested against a local Supabase CLI instance with pgTAP, and the evidence must be recorded before a feature can be marked as passing. ## Core Features & Use Cases - Local-first testing: Runs schema rebuilds (supabase db reset --local --no-seed) and pgTAP suites (supabase test db) against the local Supabase CLI, never against remote environments as a source of truth. - Environment guardrails: Clearly separates the local CLI (testing) from the DESARROLLO remote project (optional app smoke checks only), and forbids reusing OrdenCompra project refs. - Structured evidence recording: Defines exact formats for logging verification results in feature_list.json and docs/claude-progress.md, including command, exit code, environment, and date. - Use Case: After implementing a new Postgres RPC and writing its documentation, run this Skill to rebuild the local schema, execute the pgTAP test file, and record a supabase_db_test evidence entry proving the feature passes. ## Quick Start Verify the latest backend change by resetting the local Supabase database, running the pgTAP test suite, and recording the results as evidence in feature_list.json.

Frequently Asked Questions about backend-tester

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

FAQPage Schema
How do I test Supabase migrations locally with pgTAP?▼

Run `npx supabase db reset --local --no-seed` to rebuild the schema without seed data, then execute `npx supabase test db` to run the pgTAP suites in `supabase/tests/database/`. Afterwards, `pnpm seed:local` restores Auth and pasadas data if the app will be used.

How do I record backend test evidence in feature_list.json?▼

Add an evidence entry with the date, type (e.g. `supabase_db_test`, `rls_scenario`, `migration_rebuild`), command executed, target file, environment, outcome, and a short summary. Also append a session note to `docs/claude-progress.md` describing the verification run.

Can I run SQL tests against the remote Supabase development project?▼

No. The DESARROLLO remote project is for optional app/API smoke checks only, never as a SQL testing source of truth. All migration and pgTAP testing must run against the local Supabase CLI at `http://127.0.0.1:54321`, and `db reset --linked` against DESARROLLO is forbidden.

When should a backend feature be marked as passing?▼

A backend feature can only be marked as passing after verification evidence exists. This means a recorded command, exit code or result summary, and date in `feature_list.json`, plus a progress note, produced by running tests on the local Supabase CLI.

What is the difference between --no-seed and pnpm seed:local in Supabase testing?▼

`db reset --local --no-seed` rebuilds the schema only, which is what pgTAP tests need. `pnpm seed:local` runs afterwards to restore Auth users and pasadas data and execute the tarifario migration loader, and is only skipped for pgTAP-only sessions.