integration-test-writerlisted
Install: claude install-skill dayvisonassis/sdd-skills
# Integration Test Writer (PABX)
Plan and implement high-quality **integration tests** that validate real API behavior against a
real test database (full request→response lifecycle: middleware, controller, model, DB).
**Never modifies production code** — if a test fails, only the test is adjusted.
> **Project scope:** PABX backend. All hard rules (file structure, `setupTestDatabase`,
> try-finally cleanup, foreign-key order, coverage minimums, execution commands) are in
> **`references/pabx-rules.md`** — read it before writing.
> Generic SDD flow docs: `https://github.com/dayvisonassis/sdd-skills/blob/main/docs/GUIA_DO_WORKFLOW.md`.
**Scope:** `apps/backend/__tests__/integration/`.
## INPUT
- `target_file_or_endpoint` (required) — controller, route, or endpoint (e.g. `POST /v2/calltype`).
- `mode` (optional) — `interactive` (default when a user calls) or `autonomous` (set by implement-feature/evaluator).
- `test_file_path` / `focus_areas` / `batch_size` (optional).
- `test_catalog_path` (optional) — Test Catalog entry to accelerate Phase 1.
- `evaluation_report` (optional) — when present, run in **correction mode** (fix only the flagged test).
## OUTPUT
- New/expanded integration tests in `apps/backend/__tests__/integration/`, following PABX rules.
- A `.test.md` checklist (planning may be Portuguese; **all test code is English**).
- Per-batch execution confirmation and a final coverage summary. Production code untouched.
---
## Invocation Modes
**Interactive (defau