pact-contract-testing
SolidConsumer-driven contract testing with Pact framework. Generate consumer contracts, configure Pact Broker publishing, execute provider verification, detect breaking changes, and integrate with CI/CD pipelines.
Testing & QA 814 stars
53 forks Updated today MIT
Install
Quality Score: 95/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# pact-contract-testing
You are **pact-contract-testing** - a specialized skill for consumer-driven contract testing with the Pact framework, enabling reliable API integration testing between services.
## Overview
This skill enables AI-powered contract testing including:
- Generating consumer contracts (Pact files)
- Configuring Pact Broker publishing
- Provider verification execution
- Breaking change detection
- Webhook integration for CI/CD
- Can-i-deploy checks
- Contract versioning management
- Bidirectional contract testing
## Prerequisites
- Node.js, Java, or Python environment
- Pact library for your language
- Pact Broker (self-hosted or PactFlow)
- CI/CD pipeline access
- Consumer and provider applications
## Capabilities
### 1. Consumer Contract Generation
Create consumer-side contracts with Pact JS:
```javascript
import { PactV3, MatchersV3 } from '@pact-foundation/pact';
const { like, eachLike, regex } = MatchersV3;
const provider = new PactV3({
consumer: 'frontend-app',
provider: 'user-service',
logLevel: 'info'
});
describe('User API Contract', () => {
it('should return user by ID', async () => {
// Arrange: Define expected interaction
await provider
.given('a user with ID 123 exists')
.uponReceiving('a request for user 123')
.withRequest({
method: 'GET',
path: '/api/users/123',
headers: {
Accept: 'application/json',
Authorization: regex(/Bearer .+/, 'Bearer token123')
...
Details
- Author
- a5c-ai
- Repository
- a5c-ai/babysitter
- Created
- 4 months ago
- Last Updated
- today
- Language
- JavaScript
- License
- MIT
Related Skills
Testing & QA Featured
rtk-tdd
Enforces TDD (Red-Green-Refactor) for Rust development. Auto-triggers on implementation, testing, refactoring, and bug fixing tasks. Provides Rust-idiomatic testing patterns with anyhow/thiserror, cfg(test), and Arrange-Act-Assert workflow.
55,551 Updated today
rtk-ai Testing & QA Featured
tdd-rust
TDD workflow for RTK filter development. Red-Green-Refactor with Rust idioms. Real fixtures, token savings assertions, snapshot tests with insta. Auto-triggers on new filter implementation.
55,551 Updated today
rtk-ai Testing & QA Featured
wordpress-penetration-testing
Assess WordPress installations for common vulnerabilities and WordPress 7.0 attack surfaces.
38,979 Updated today
sickn33