Contract testing

From rnavarych/alpha-engineer · View interactive version

Contract testing is an AI agent skill from the GitHub repository rnavarych/alpha-engineer. Contract testing: Pact consumer-driven contracts (provider states, interaction definitions), provider verification with state handlers, OpenAPI validation middleware, breaking change detection. Use when microservices need integration confidence without full e2e tests.

How to use this skill

Skill file

Contract Testing

When to use

Core principles

  1. Consumer drives the contract — the client defines what it actually needs
  2. Provider verifies against consumer contracts — not against a human-written spec
  3. Contracts live in Pact Broker — visible to all teams, tracked over time
  4. State handlers make tests reproducible — provider sets up data for each interaction
  5. Can-I-Deploy check — never deploy a provider that breaks a consumer contract

References available

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.