Agent skill · software engineering · jeremylongshore

automating-api-testing

Test automate API endpoint testing including request generation, validation,

Why this skill is useful

Adds executable scripts for comprehensive API testing across multiple frameworks and generates detailed test coverage reports.

What it needs

Requires ajv, httpx, jsonschema, postman, rest-assured, supertest installed locally. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

API Test Automation Overview Automate comprehensive API endpoint testing for REST and GraphQL APIs including request generation, response validation, schema compliance, authentication flows, and error handling. Supports Supertest (Node.js), REST-assured (Java), httpx/pytest (Python), Postman/Newman collections, and Pact for consumer-driven contract testing. Prerequisites API testing library installed (Supertest, REST-assured, httpx, or Postman/Newman) API specification file (OpenAPI/Swagger YAML/JSON or GraphQL SDL) Target API running in a test environment with seeded data Authentication credentials or API keys for protected endpoints JSON Schema validator (Ajv, jsonschema, or built-in framework assertions) Instructions 1. Read the API specification and extract all endpoints: Parse OpenAPI spec to catalog every path, HTTP method, request schema, and response schema. For GraphQL APIs, introspect the schema to list queries, mutations, and subscriptions. Document authentication requirements per endpoint (API key, Bearer token, OAuth, none). 2. Generate test cases for each endpoint: Success cases: Send valid requests matching the schema and assert 200/201 responses. Validation errors: Send requests with missing required fields, wrong types, and out-of-range values; assert 400 responses. Authentication: Test with valid, expired, and missing credentials; assert 200, 401, and 403 respectively. Not found: Request non-existent resources; assert 404 responses. Idempotency: Send the same PUT/DELETE request twice and verify consistent behavior. 3. Validate response structure against schemas: Assert response Content-Type matches expected (application/json, etc.). Validate response body against the OpenAPI response schema using JSON Schema validation. Check response headers (Cache-Control, Rate-Limit headers, CORS headers). Verify pagination metadata (total count, page number, next/previous links). 4. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/automating-api-testing--1e1e9d

View the source on GitHub

Browse the @skills marketplace