Build Resilient Systems with Spring Cloud Contract and Testcontainers
summary
Spring Cloud Contract generates runnable verification tests from DSL contracts and uses Testcontainers to start a real Kafka broker so generated tests actually spin up the Barista app, trigger its handler, and consume the produced message; passing runs also publish a stubs jar for consumers. The pipeline catches real mistakes (wrong topic, misspelled id, disabled error path) during build. Demo shows Spring Cloud Contract, Testcontainers, and the new service-connection annotation driving reproducible messaging integration tests.
AI-written summary · about
chapters (17)
- 0:00Introduction and speakers
- 1:27Speaker introductions
- 8:09Consumer-driven contracts concept
- 10:14Demo setup and Kafka listener
- 12:21Spring Cloud Contract verifier plugin
- 18:42Testcontainers overview
- 19:47Writing contract definitions
- 23:19Running contract tests
- 24:23Verifying test failures
- 26:52Generating and using stubs
- 27:56Consumer-side integration tests
- 31:07Recap of contract testing flow
- 32:29Spring Boot service connection
- 35:17Testcontainers Desktop tool
- 37:05Team workflows with contracts
- 40:33Evolving services safely
- 42:20Closing and resources
related talks
52mBuild resilient systems with Spring Cloud Contract and Testcontainers
45mREST and Messaging contracts with Spring Cloud Contract
17mConsumer driven development with Spring cloud contract
33mPractical Contract Testing with Spring Cloud Contract
52mBootiful Testing
30mManaging APIs and Contracts in a Microservices World Using Spring Cloud Contract
47mCollaborative Contract Driven Development
52mBootiful Testing
