Contract testing: Should or shouldn't?
summary
Three small services (Angular frontend, Spring Boot Java backend, Go microservice) demonstrate three approaches: Spring Cloud Contract generates Groovy-style contracts and Maven tests but needs fiddly plugin/config work and sometimes fails to start in containers; Pact produces JSON pact files quickly, spins up provider stubs and a broker, and is usable in minutes; Protocol Buffers compiles a single schema into Java/Go/TypeScript classes which works fast at runtime but makes cross-team changes costly.
AI-written summary · about
chapters (10)
- 0:00Introduction and setup
- 5:58What are contract tests?
- 11:40Team communication challenges
- 14:50API change impact demo
- 20:34Spring Cloud Contract overview
- 33:35Consumer-driven testing with Pact
- 45:45Pact Broker and versioning
- 55:22Protobuf as contract tool
- 1:01:25Comparison and final thoughts
- 1:08:14Q&A and closing remarks
