api-testing

Creates and runs API tests for REST and GraphQL endpoints using Playwright and REST Assured.

Updated Jul 4, 2026
One-click install
npx skills add https://github.com/100Thieves-team/plady-expert-skills --skill api-testing-100thieves-team
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-testing
Source: https://github.com/100Thieves-team/plady-expert-skills/tree/main/.claude/skills/api-testing
Command: npx skills add https://github.com/100Thieves-team/plady-expert-skills --skill api-testing-100thieves-team

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @playwright/test, supertest, zod, rest-assured, assertj, json-schema-validator, and includes references (resource) and scripts (resource) components.

What problem does it solve? Manually verifying REST and GraphQL endpoints with tools like Postman is not repeatable, cannot run in CI, and misses silent contract breaks such as renamed fields or missing auth checks. This Skill provides structured patterns for writing automated API tests that validate schemas, status codes, authentication, and idempotency on every run. ## Core Features & Use Cases - Dual-stack test patterns: Write API tests in TypeScript with the Playwright request fixture, Supertest, and Zod, or in Java 21+ with REST Assured, AssertJ, and JSON Schema Validator. - Schema and contract validation: Validate every response against Zod schemas or JSON Schema definitions, with guidance on strict versus loose validation for owned versus third-party APIs. - Auth, error, and edge-case coverage: Test 401/403 on protected endpoints, error codes (400, 404, 409, 422, 500), pagination, filtering, and idempotency of PUT/DELETE operations. - Use Case: When adding a new /api/users endpoint, generate a Playwright spec that checks CRUD operations, validates the paginated response schema with Zod, and confirms unauthenticated requests return 401. ## Quick Start Ask the AI to create API tests for your REST endpoint using Playwright or REST Assured, including schema validation and authentication checks.

Frequently Asked Questions about api-testing

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

FAQPage Schema
How do I write API tests with Playwright in TypeScript?

Use the Playwright request fixture to send HTTP requests directly without a browser, then assert on status codes and parse JSON bodies. Combine it with Zod schemas to validate response structure on every test run.

How to test REST APIs in Java with REST Assured?

REST Assured uses a given-when-then fluent API to set headers and bodies, execute requests, and assert on status codes and JSON paths. Pair it with AssertJ for deserialized object assertions and json-schema-validator for schema checks.

Should I use strict or loose schema validation for API tests?

Use strict validation (z.strictObject or additionalProperties: false) for APIs you own, so unexpected field changes fail tests. Use loose validation for third-party APIs that may add fields without notice.

Why do API tests return 401 on authenticated endpoints?

A 401 usually means the token is expired or missing. Verify the token is fresh, check its expiry, and re-authenticate before the request; also confirm the Authorization header uses the correct Bearer format.

How do I test idempotency for PUT and DELETE requests?

Send the same PUT or DELETE request multiple times and assert the response and resulting resource state are identical each time. This catches duplicate-record and duplicate-charge bugs caused by retried requests in production.