Skip to content
Skills Library
Programming · Testing

contract-testing

/contract-testing

Use when setting up integration testing for a frontend-backend API boundary, evaluating whether two services are safe to deploy independently, or replacing slow end-to-end tests with contract tests.

Licence
MIT
Last repository change
06.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 06.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when setting up integration testing for a frontend-backend API boundary, evaluating whether two services are safe to deploy independently, or replacing slow end-to-end tests with contract tests.

Original author description

Use when setting up integration testing for a frontend-backend API boundary, evaluating whether two services are safe to deploy independently, or replacing slow end-to-end tests with contract tests.

How it works

  1. Quick Reference
  2. Check
  3. Fix
  4. Explain
  5. Code Review
Original SKILL.md headings · 35 lines, 253 words
SKILL.md preview
---
name: contract-testing
description: "Use when setting up integration testing for a frontend-backend API boundary, evaluating whether two services are safe to deploy independently, or replacing slow end-to-end tests with contract tests."
metadata:
  category: testing
  priority: medium
  difficulty: advanced
  estimatedTime: "120"
  source: frontendchecklist.io
  url: https://frontendchecklist.io/rules/testing/contract-testing
---

# Implement consumer-driven contract testing for API boundaries

Integration tests that require both services running at the same time are slow, brittle, and hard to maintain. Consumer-driven contract testing decouples the consumer and provider test suites — each team can run their tests independently, yet the broker guarantees that the published contract is always verified against the live provider. This catches API mismatches days earlier than end-to-end tests, with far less infrastructure overhead.

## Quick Reference

- The consumer writes tests that describe what it expects from the API (the "contract")
- The contract is published to a Pact Broker and verified against the real provider
- Provider changes that break the contract fail CI before they are deployed
- This replaces fragile end-to-end tests that require both services to be running simultaneously

## Check

Check whether the frontend has consumer-driven contract tests that define and verify the API contract with the backend.

## Fix

Add Pact consumer tests for the frontend API client, publish the contracts to a broker, and add provider verification to the backend CI pipeline.

## Explain

Explain how consumer-driven contract testing works, what the Pact workflow looks like end-to-end, and how it compares to mocking and end-to-end testing.

## Code Review

Review the Pact consumer tests. Flag interactions that are too permissive (any-type matchers on fields the consumer actually uses), missing status code assertions, and interactions for endpoints the consumer no longer calls.

---

For full implementation details, code examples, and framework-specific guidance,
see `references/rule.md`.

Rule page: https://frontendchecklist.io/rules/testing/contract-testing
Files in this package (2)
  • SKILL.md 2 KB
  • references/rule.md 10 KB

Versions

RepositoryScoreLicence
This page · thedaviddias/front-end-checklist100MIT
proffesor-for-testing/agentic-qe100MIT
claude-dev-suite/claude-dev-suite100MIT
sebastiendegodez/skraft-plugin100GPL-3.0
petrkindlmann/qa-skills100MIT
jacob-balslev/skill-graph100Apache-2.0
Tyler-R-Kendrick/agent-skills95MIT
RobinBeraud/claude-qa-skills90MIT
Amey-Thakur/AI-SKILLS90MIT

Database snapshot: 13.11.2026 · package version 68926ad99138 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100running-e2e-tests
    Execute end-to-end tests covering full user workflows across frontend and backend. Use when performing specialized testing. Trigger with phrases like "run end-to-end tests", "test user flows", or "execute E2E suite".
  • 95integration-testing
    Use when writing tests that hit a real database or broker, setting up Testcontainers for a project, testing HTTP endpoints end-to-end within the service boundary, or implementing contract tests between two services.
  • 100running-e2e-tests
    Execute end-to-end tests covering full user workflows across frontend and backend. Use when performing specialized testing. Trigger with phrases like "run end-to-end tests", "test user flows", or "execute E2E suite".
  • 100api-testing
    Use when writing API endpoint tests — integration tests, contract validation, response assertions, mocked external services — even when the user says 'test this route' without naming API testing.
  • 100testing
    Generate, execute, and analyze tests for codebases, covering unit, integration, and end-to-end testing with coverage reporting. Use when the user requests testing or provides relevant inputs for this workflow.
  • 100type-safe-api
    End-to-end type safety patterns for API development. Covers Zod-to-OpenAPI, ts-rest, Zodios, and contract testing. Use for ensuring type consistency between backend and frontend. USE WHEN: user mentions "type-safe API", "end-to-end types", "Zod to OpenAPI", "ts-rest", "Zodios",…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.