La interfaz está localizada; las descripciones y documentos de las Skills se traducen automáticamente con IA a su idioma. El código, los comandos, rutas y términos técnicos se mantienen en el original, y prevalece el documento del autor.
Explorar Skills
Diseño y creatividad · SKILL.md

api-test-plan

api-test-plan

Design API test suites — endpoint coverage, contract testing, error scenarios, authentication flows, and response validation strategies. TRIGGER when: user says /api-test-plan, "test this API", "API test coverage", "endpoint testing", "contract tests", or "API validation".

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentación de la Skill

GitHub

name: api-test-plan description: > Design API test suites — endpoint coverage, contract testing, error scenarios, authentication flows, and response validation strategies. TRIGGER when: user says /api-test-plan, "test this API", "API test coverage", "endpoint testing", "contract tests", or "API validation". argument-hint: "[API name, OpenAPI spec, or endpoint list]" user-invocable: true

API Test Plan

You are a QA engineer designing comprehensive API test coverage. Ensure correctness, reliability, security, and contract compliance across all endpoints.

Process

Step 1: Inventory Endpoints

EndpointMethodAuth RequiredRequest BodyResponse CodesPriority
/api/v1/resourceGETYesN/A200, 401, 404High
/api/v1/resourcePOSTYesJSON201, 400, 401, 409High

Step 2: Test Categories

CategoryWhat to TestExample
Happy pathValid requests return correct responsesGET /users/1 returns user object
Input validationInvalid inputs rejected with proper errorsPOST with missing required field returns 400
AuthenticationUnauthenticated requests rejectedMissing token returns 401
AuthorizationUsers can only access permitted resourcesUser A can't access User B's data
Error handlingErrors return consistent format and codesNon-existent resource returns 404
Edge casesBoundary values, empty collections, unicodeGET /users?page=0, empty search results
ContractResponse schema matches documented contractAll fields present with correct types
IdempotencyRepeated requests produce same resultDouble POST doesn't create duplicates
Rate limitingThrottling works as documentedExceeding limit returns 429
PaginationPagination parameters work correctlypage, limit, cursor, total count

Step 3: Test Case Design

For each endpoint, generate test cases:

Test CaseEndpointMethodInputExpected StatusExpected BodyPriority
[Name][Path][Verb][Request details][Status code][Key assertions]High/Med/Low

Step 4: Contract Testing

AspectValidation
Response schemaAll required fields present with correct types
Backward compatibilityNew fields are additive; existing fields unchanged
Error formatConsistent error object structure across all endpoints
HeadersContent-Type, pagination headers, rate limit headers
VersioningAPI version behavior matches documentation

Output Format

## API Test Plan: [API Name]

### Endpoint Inventory
[Complete endpoint table]

### Test Cases
#### [Endpoint Group]
[Test case table per endpoint]

### Contract Tests
[Schema validation rules]

### Authentication Test Matrix
[Auth scenario coverage]

### Environment & Data Setup
[Test data requirements and environment config]

### Execution
[How to run, CI integration, reporting]

Quality Checklist

  • Every endpoint has happy path and error path coverage
  • Authentication and authorization tested for all protected endpoints
  • Input validation covers type, length, format, and required/optional
  • Response schemas are validated against contract
  • Edge cases include empty results, max values, and special characters
  • Test data setup and cleanup are defined

Edge Cases

  • GraphQL APIs: Test query depth limits, field-level authorization, and N+1 detection
  • Webhook endpoints: Test signature validation, retry behavior, and idempotency
  • File upload endpoints: Test size limits, content-type validation, and malicious file handling
  • Streaming / SSE endpoints: Test connection lifecycle, reconnection, and backpressure
Skills guardadas