Build resilient systems with Spring Cloud Contract and Testcontainers
summary
Example GitHub repo demonstrates a coffee app with waiter and barista exchanging JSON via Kafka while Spring Cloud Contract generates producer tests and a stubs jar that the consumer uses for integration. Tests run against a real Kafka container provided by Testcontainers (Spring Boot 3.1 service-connection wiring), the generated verifier initially fails on a broken producer then passes after fixes, and artifacts (app + stubs) install to local Maven for pipeline and local development use.
AI-written summary · about
chapters (11)
- 0:00Resilient system testing intro
- 8:27Contract tests vs manual stubs
- 13:27Spring Cloud Contract with Maven
- 22:47Generating and running contract tests
- 28:29Consumer integration with stubs
- 33:33Testcontainers Kafka setup
- 37:50Full round-trip test scenarios
- 41:24Local development with Testcontainers
- 42:28Team workflows for contracts
- 47:05Evolving APIs safely
- 49:55Summary and resources
related talks
44mBuild Resilient Systems with Spring Cloud Contract and Testcontainers
52mBootiful Testing
52mBootiful Testing
48mTestcontainers and Spring Boot from integration tests to local development!
17mConsumer driven development with Spring cloud contract
30mManaging APIs and Contracts in a Microservices World Using Spring Cloud Contract
01h 11mBootiful Testing
45mREST and Messaging contracts with Spring Cloud Contract
