mcpField
T
testing-api

testing-api

github.com/wojonsTesting & quality340 installsUpdated 30w ago
Repository

About testing-api

A skill for testing REST, GraphQL, gRPC, and other APIs, aimed at developers validating endpoint behavior and service contracts. It covers schemas, authentication, errors, rate limits, and compatibility.

Key features

  1. 01HTTP endpoint testing
  2. 02Request and response schema validation
  3. 03OAuth, JWT, and API key checks
  4. 04Error and status code verification
  5. 05Rate limit and throttling checks
  6. 06OpenAPI contract testing

Use cases

  1. 01Validate API behavior during development
  2. 02Check authentication and authorization
  3. 03Verify error responses and quotas
  4. 04Test service contracts and compatibility

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/wojons/skills --skill testing-api

After installing, type/testing-apiin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

README.md
references/
README.md
scripts/
example.sh

Details

From the project README

API Testing

Test REST, GraphQL, gRPC, and other API endpoints for functionality, performance, and reliability.

When to use me

Use this skill when:

  • Developing or consuming API services
  • Testing API contracts and schemas
  • Validating request/response formats
  • Testing authentication and authorization
  • Checking rate limiting and quotas
  • Verifying error responses and status codes
  • Performing contract testing between services

What I do

  • Test API endpoints with various HTTP methods
  • Validate request/response schemas and formats
  • Test authentication mechanisms (OAuth, JWT, API keys)
  • Verify error handling and status codes
  • Check rate limiting and throttling behavior
  • Test payload validation and error messages
  • Perform contract testing with OpenAPI/Swagger
  • Test API versioning and backward compatibility

Examples

# Test APIs with common tools
npx newman run collection.json    # Postman collections
curl -X GET https://api.example.com/users
http GET https://api.example.com/users Authorization:"Bearer token"

# Run API tests with frameworks
npm run test:api                 # Supertest, Jest
pytest tests/api/                # Python requests/pytest
go test ./api/                   # Go httptest

# Test with schema validation
npx ajv validate -s schema.json -d data.json
openapi-test --spec openapi.yaml --base-url https://api.example.com

# Load test APIs
npx autocannon -c 10 -d 30 https://api.example.com/users
wrk -t2 -c100 -d30s https://api.example.com/users

Output format

API Test Results:
──────────────────────────────
✅ GET /api/users
  ✓ Returns 200 OK
  ✓ Returns JSON array
  ✓ Includes pagination headers
  ✓ Respects limit parameter

❌ POST /api/users
  ✗ Missing required fields returns 400
    Expected: {"error": "Missing email"}
    Received: {"error": "Validation failed"}

⚠️ PUT /api/users/{id}
  ⚠️ Authentication required but not tested

Authentication Tests:
  ✓ Valid token returns 200
  ✗ Invalid token returns 401 (should return 403)

Summary: 15 endpoints tested, 12 passed, 2 failed, 1 skipped

Notes

  • Test all HTTP methods supported by endpoints
  • Validate response schemas against OpenAPI specs
  • Test edge cases: empty arrays, null values, large payloads
  • Verify CORS headers if applicable
  • Test authentication flows thoroughly
  • Consider contract testing for microservices
  • Monitor API response times and latency

Comments

Markdown supported