Contract Testing Made Easy: Master Pact for Microservices in C#
summary
Shows how consumer-driven contracts with Pact and Pact.Net turn slow flaky end-to-end suites into fast, local checks: the consumer test Pact.Net consumer test generates JSON pact then the provider runs a verifier that fails if headers, status codes or body fields differ. Demo includes a C# consumer and products API provider, failing when a required culture header is missing, and a Pact Broker via Docker Compose to publish/version pacts for CI verification.
AI-written summary · about
chapters (9)
- 0:00Contract testing challenges
- 3:21Unit vs integration testing limits
- 8:44End-to-end testing pitfalls
- 15:27Semantic breakages and contracts
- 20:21Pact for consumer-driven testing
- 29:07Pact demo in C# consumer tests
- 41:12Verifying provider contracts
- 57:43Pact Broker for contracts
- 1:02:24Summary
related talks
59mUsing Pact to Deploy Microservice with Confidence
01h 21mMicro-Service Delivery Without the Pitfalls
09m"Contract Testing 101"
39mPacts to the Rescue! Making your microservices play nicely together
24mHow to test microservices and stay sane
32mConsumer-Driven Contract: A better approach for API Testing
47mContract-Based Testing for Microservices and UI
42mNonviolent Communication in the world of distributed systems
