---
name: automating-api-testing-75c776903c44
description: |
  This skill automates API endpoint testing, including request generation, validation, and comprehensive test coverage for REST and GraphQL APIs. It is used when the user requests API testing, contract testing, or validation against OpenAPI specifications. The skill analyzes API endpoints and generates test suites covering CRUD operations, authentication flows, and security aspects. It also validates response status codes, headers, and body structure. Use this skill when the user mentions "API testing", "REST API tests", "GraphQL API tests", "contract tests", or "OpenAPI validation".
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
version: 1.0.0
---

## Overview

This skill empowers Claude to automatically generate and execute comprehensive API tests for REST and GraphQL endpoints. It ensures thorough validation, covers various authentication methods, and performs contract testing against OpenAPI specifications.

## How It Works

1. **Analyze API Definition**: The skill parses the provided API definition (e.g., OpenAPI/Swagger file, code files) or infers it from usage.
2. **Generate Test Cases**: Based on the API definition, it creates test cases covering different scenarios, including CRUD operations, authentication, and error handling.
3. **Execute Tests and Validate Responses**: The skill executes the generated tests and validates the responses against expected status codes, headers, and body structures.

## When to Use This Skill

This skill activates when you need to:
- Generate comprehensive API tests for REST endpoints.
- Create GraphQL API tests covering queries, mutations, and subscriptions.
- Validate API contracts against OpenAPI/Swagger specifications.
- Test API authentication flows, including login, refresh, and protected endpoints.

## Examples

### Example 1: Generating REST API Tests

User request: "Generate API tests for the user management endpoints in src/routes/users.js"

The skill will:
1. Analyze the user management endpoints in the specified file.
2. Generate a test suite covering CRUD operations (create, read, update, delete) for user resources.

### Example 2: Creating GraphQL API Tests

User request: "Create GraphQL API tests for the product queries and mutations"

The skill will:
1. Analyze the product queries and mutations in the GraphQL schema.
2. Generate tests to verify the functionality and data integrity of these operations.

## Best Practices

- **API Definition**: Provide a clear and accurate API definition (e.g., OpenAPI/Swagger file) for optimal test generation.
- **Authentication Details**: Specify the authentication method and credentials required to access the API endpoints.
- **Contextual Information**: Provide context about the API's purpose and usage to guide the test generation process.

## Integration

This skill can integrate with other plugins to retrieve API definitions from various sources, such as code repositories or API gateways. It can also be combined with reporting tools to generate detailed test reports and dashboards.

---
Source attribution: BbgnsurfTech
Original project: https://github.com/BbgnsurfTech/claude-skills-collection/blob/01d3fafeca1133f841956b8b90b939fee92d71e7/plugins/claude-code-plugins-plus/backups/skill-structure-cleanup-20251108-073936/plugins/testing/api-test-automation/skills/api-test-automation/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2025 Claude Code Plugins

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: BbgnsurfTech
Original project: https://github.com/BbgnsurfTech/claude-skills-collection/blob/01d3fafeca1133f841956b8b90b939fee92d71e7/plugins/claude-code-plugins-plus/backups/skill-structure-cleanup-20251108-073936/plugins/testing/api-test-automation/skills/api-test-automation/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering
Roles: Backend Developer, DevOps / SRE, QA / Test Engineer
Specialties: API, Testing
Tools: Openapi, Swagger
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: eaa321aa73534eb3268c577fc67575c52b239f28c930adeee4ce624e5fd6c707
