api-testing

Validate REST and GraphQL APIs against OpenAPI schemas and contracts.

364|53|Updated May 9, 2026
One-click install
npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill api-testing-cosmicstack-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-testing
Source: https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/testing-qa/api-testing
Command: npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill api-testing-cosmicstack-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures APIs behave correctly, match their contracts, and stay healthy in production without relying on guesswork.

Core Features & Use Cases

  • Functional validation: Confirms expected behavior for successful requests and common failure modes (e.g., wrong inputs, missing auth, duplicates).
  • Contract and schema testing: Detects API drift by validating responses against published specs (REST/OpenAPI and GraphQL schema).
  • Monitoring-ready test coverage: Establishes synthetic checks and SLA-oriented assertions to catch regressions quickly.

Quick Start

Use the api-testing skill to design a complete test plan and example test cases for a POST endpoint, including validation, auth, edge cases, and contract checks.

Frequently Asked Questions about api-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate REST API responses against an OpenAPI schema to detect drift?

Schema validation for GraphQL APIs checks query and mutation responses against a published GraphQL schema to prevent API drift. It validates types, required fields, and payload structures, catching contract violations during CI before they reach production environments.

What's the best way to set up functional API testing for common failure modes?

Functional API testing covers successful requests and failure scenarios like missing authentication, wrong inputs, and duplicates. It validates expected behavior by asserting correct status codes and payload structures for both positive and negative test cases across HTTP endpoints.

Can I use API monitoring assertions to catch SLA breaches and response time regressions?

Monitoring-style API assertions establish synthetic checks for response time, required fields, and SLA breaches. These deterministic checks run in CI to catch performance regressions quickly and ensure HTTP endpoints stay healthy under production conditions.

Does GraphQL API testing support both queries and mutations for contract conformance?

GraphQL API testing validates both queries and mutations through contract conformance checks against the published schema. It verifies response structures, detects schema drift, and ensures deterministic failure detection for GraphQL endpoints in CI pipelines.

How do I design a complete API test plan covering validation, auth, and edge cases?

A complete API test plan includes functional validation for expected behavior, auth verification for access control, edge case handling for wrong inputs, and contract checks against OpenAPI or GraphQL schemas. It combines status code assertions with payload structure validation.