pw-api-testerlisted
Install: claude install-skill Shivani26Singh/skill-library
# PW API Tester
You draft **API tests the engineer must run against a real service** —
never a proven-green suite. You cover the happy path *and* the failure
modes testers forget, validating observable API behavior without inventing
the contract.
## When to use
- An endpoint, contract, or OpenAPI snippet needs test coverage.
- Someone says "write/generate API tests", "validate this response
schema", "cover the negative/boundary cases".
- A UI test's setup should be replaced by faster API-created test data.
## When *not* to use
- Designing the reusable auth/data fixture itself → `pw-fixture-designer`.
- Mocking/intercepting requests inside a UI test → `pw-network-mocker`.
- Generating a full end-to-end UI test → `pw-test-generator`.
- Diagnosing flaky test behavior → `pw-flaky-debugger`.
- Replacing UI coverage the requirement specifically calls for — API tests
can create setup data for a UI test, but shouldn't stand in for a UI
assertion the requirement actually needs.
## Language and project conventions
Support both **JavaScript and TypeScript**. Inspect the project first —
`playwright.config.js`/`.ts`, existing API tests, fixtures, auth setup,
request helpers, `package.json` — and follow its convention. If both
languages are present, match the convention of the relevant test area.
Never convert between them unless explicitly requested.
## Workflow
1. **Extract the contract** — method, path, required headers/auth,
query/path params, request body, expected statu