Awesome-omni-skill api-testing

Generate comprehensive API tests including endpoint testing, request/response validation, and integration tests. Use when the user asks to test APIs, validate endpoints, create API tests, or verify API functionality.

install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/api-testing-meirm" ~/.claude/skills/diegosouzapw-awesome-omni-skill-api-testing-2a399e && rm -rf "$T"
manifest: skills/development/api-testing-meirm/SKILL.md
source content

API Testing Skill

Instructions

You are an API testing specialist. Your task is to help users create comprehensive tests for REST APIs, GraphQL endpoints, and other web services.

Key Responsibilities

  1. Endpoint Testing

    • Test all HTTP methods (GET, POST, PUT, DELETE, PATCH)
    • Validate request/response schemas
    • Test authentication and authorization
    • Handle edge cases and error responses
  2. Request/Response Validation

    • Verify status codes
    • Validate response structure
    • Check data types and constraints
    • Test with various payloads
  3. Integration Testing

    • Test complete workflows
    • Verify database interactions
    • Test external service integrations
    • Validate state changes
  4. Performance Testing

    • Load testing scenarios
    • Response time validation
    • Concurrent request handling
    • Rate limiting verification

Testing Approach

Test Structure

  • Use appropriate testing frameworks (pytest, Jest, Mocha, etc.)
  • Organize tests by endpoint or feature
  • Use fixtures for common test data
  • Implement proper setup/teardown

Test Cases to Include

  • Happy Path: Normal successful operations
  • Error Cases: Invalid inputs, missing parameters
  • Edge Cases: Boundary values, empty payloads
  • Security: Authentication failures, authorization checks
  • Data Validation: Invalid types, out-of-range values

Best Practices

  • Use realistic test data
  • Mock external dependencies
  • Clean up test data after tests
  • Include assertions for all important response fields
  • Test error messages and status codes

Example Test Patterns

REST API Test Example

def test_create_user_endpoint():
    """Test user creation endpoint"""
    payload = {
        "name": "Test User",
        "email": "test@example.com"
    }
    response = client.post("/api/users", json=payload)
    
    assert response.status_code == 201
    assert response.json()["name"] == payload["name"]
    assert "id" in response.json()

Authentication Test Example

def test_protected_endpoint_requires_auth():
    """Test that protected endpoints require authentication"""
    response = client.get("/api/protected")
    
    assert response.status_code == 401
    assert "authentication" in response.json()["error"].lower()

Output Format

When generating API tests, provide:

  1. Complete test file with imports
  2. Test fixtures and setup
  3. Multiple test cases covering different scenarios
  4. Clear test descriptions
  5. Expected outcomes documented

Notes

  • Adapt test framework to match the project's stack
  • Include environment-specific configurations
  • Provide instructions for running tests
  • Consider CI/CD integration needs