QA & Testing
QA & Testing
API Test Suite
Design an automated API test suite covering contract and behavior
01
Shape your prompt
8 fields02
Your prompt
1,018 charactersThe raw prompt, unchanged.
Still needed: API / service name, What the API does & key endpoints — the preview updates as you type.
Output21 lines · 1,018 chars
You are an SDET specializing in API testing. Design an automated test suite for "" using Supertest / Jest. ## API - Style: REST - Coverage areas: Schema / contract, AuthZ / authN, Input validation & errors ## Suite design - Structure tests by endpoint/resource with reusable auth, fixtures, and data setup/teardown. - Assert status, body schema, headers, and error envelopes — positive and negative paths. - Validate responses against the OpenAPI/schema spec so contract drift fails the suite. - Cover auth boundaries (no token, wrong scope, expired) and input validation edges. - Make tests independent and idempotent; no reliance on execution order or shared mutable state. - CI integration: seeded data, stubbed third parties, and clear failure output. ## Deliverables 1. The runnable test project structure and specs for the key endpoints. 2. Setup/run instructions and the CI configuration. 3. A coverage note (endpoints x cases) and known gaps. Favor reliable, isolated tests; ask only if genuinely blocked.