api-testing

API Integration Testing

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "api-testing" with this command: npx skills add srstomp/pokayokay/srstomp-pokayokay-api-testing

API Integration Testing

Build robust test suites for your APIs with integration, contract, and E2E tests.

Testing Pyramid for APIs

Level What It Tests Speed Isolation

Unit Handlers, validators, utils Fast High

Integration API + database, services Medium Medium

Contract API shape vs OpenAPI spec Fast High

E2E Full stack, real DB Slow Low

Key Principles

  • Test API behavior through HTTP requests, not internal function calls

  • Use real database for integration tests (SQLite or test containers)

  • Validate response shapes against OpenAPI spec with contract tests

  • Isolate external services with MSW or similar mock servers

Quick Start Checklist

  • Set up test framework (Vitest + Supertest recommended)

  • Configure test database (separate from dev)

  • Create test factories for data setup

  • Write integration tests for each endpoint (happy + error paths)

  • Add contract tests against OpenAPI spec

  • Configure CI pipeline for automated test runs

References

Reference Description

test-frameworks.md Vitest, Jest, Supertest setup and configuration

test-patterns.md Request testing, authentication, error validation

test-data.md Factories, fixtures, database seeding

contract-testing.md OpenAPI validation, schema testing

ci-cd.md CI pipeline configuration, environment setup

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

architecture-review

No summary provided by upstream source.

Repository SourceNeeds Review
General

figma-plugin

No summary provided by upstream source.

Repository SourceNeeds Review
General

session-review

No summary provided by upstream source.

Repository SourceNeeds Review