Skip to content

About

Consumer‑driven contract testing using the Pact pattern A Python consumer defines expected API behaviour (contract), a Flask provider is verified against it Consumer generates a JSON pact file from expectations Provider is verified automatically against the contract Pure Python, no native dependencies

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Pact Contract Testing

CI

Consumer‑driven contract testing using Pact (Python).
A consumer defines expectations and a provider is verified against those expectations automatically.

What it does

  • A Flask provider serves user data.
  • A Python consumer defines the contract (expected request/response).
  • Pact generates a JSON contract file.
  • The provider is then verified against that contract.
  • CI runs everything on every push.

Why it matters

Microservices must communicate reliably. Contract testing catches breaking API changes before they reach production — without deploying the whole system.

How to run locally

git clone https://github.com/kallurayaankit/pact-contract-testing.git
cd pact-contract-testing
python -m venv venv
venv\Scripts\activate.bat
pip install -r requirements.txt
pytest

About

Consumer‑driven contract testing using the Pact pattern A Python consumer defines expected API behaviour (contract), a Flask provider is verified against it Consumer generates a JSON pact file from expectations Provider is verified automatically against the contract Pure Python, no native dependencies

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages