What problem does it solve? Backend services often ship without adequate test coverage, or tests are flaky, hit real databases, and lack clear verification commands. This Skill provides a structured contract for designing, adding, and repairing backend tests so coverage is deterministic, isolated, and CI-ready. ## Core Features & Use Cases - Test Strategy & Layering: Chooses the smallest effective test layer (service/unit, API/route, integration) based on repo evidence, keeping the existing test runner and assertion style. - Fixture & Isolation Rules: Defines database isolation via transaction rollback, schema reset, or testcontainers, plus mocking of outbound HTTP, email, payment, and queue calls with tools like respx and pytest-mock. - Testing Contract Output: Generates an exact Backend Testing Contract section with test runner, paths, fixtures, coverage command, and CI command, blocking with BACKEND_TEST_CONTRACT_MISSING when key details cannot be determined. - Use Case: When adding a new FastAPI endpoint, use this Skill to create TestClient or async HTTPX tests that assert status codes, response shapes, and validation failures, then run pytest with coverage before finishing. ## Quick Start Use the backend-testing skill to add pytest API and unit tests with coverage for this FastAPI service.