$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Consumer Driven Contract Testing con Spring Cl...
Search
Eddú Meléndez Gonzales
July 06, 2019
Programming
0
110
Consumer Driven Contract Testing con Spring Cloud Contract
Eddú Meléndez Gonzales
July 06, 2019
Tweet
Share
More Decks by Eddú Meléndez Gonzales
See All by Eddú Meléndez Gonzales
Desarrollo de Software en la Era de la Transformación Digital
eddumelendez
1
340
Consumer Driven Contract Testing with Spring Cloud Contract
eddumelendez
0
140
Construyendo contenedores para aplicaciones Java con JIB
eddumelendez
0
210
CI CD de aplicaciones Spring Boot con Jenkins X
eddumelendez
0
1.4k
Testeando Aplicaciones con Docker y Arquillian Cube
eddumelendez
0
240
SpringOne Recap
eddumelendez
0
58
Intro to Spring Boot
eddumelendez
0
93
Other Decks in Programming
See All in Programming
ゆくKotlin くるRust
exoego
1
140
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
310
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
2
460
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
410
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
0
130
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
120
AIエージェントの設計で注意するべきポイント6選
har1101
5
2k
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
200
Microservices rules: What good looks like
cer
PRO
0
1.6k
エディターってAIで操作できるんだぜ
kis9a
0
750
GISエンジニアから見たLINKSデータ
nokonoko1203
0
180
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5k
Into the Great Unknown - MozCon
thekraken
40
2.2k
The Language of Interfaces
destraynor
162
25k
The agentic SEO stack - context over prompts
schlessera
0
550
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Why Our Code Smells
bkeepers
PRO
340
57k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
240
Scaling GitHub
holman
464
140k
Writing Fast Ruby
sferik
630
62k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.4k
Transcript
Consumer Driven Contract Testing con Spring Cloud Contract Eddú Meléndez
Gonzales
Sobre mí • • Desarrollador Java • Ingeniero de Software
• Arquitecto por Accidente • Contribuidor Open Source (spring-*, spring-cloud-contract, mybatis, arquillian) • Twitter: @eddumelendez • Blogger: https://blog.eddumelendez.me
La evolución de la Arquitectura de Software
Tendencias de Arquitectura
Qué necesitamos resolver? • Deployment • APIs • Contracts •
Testing • Service Discovery • Health Checking • Configuration • Circuit Breaking • Tracing • Logging • Monitoring • ...
Qué necesitamos resolver? • Deployment • APIs • Contracts •
Testing • Service Discovery • Health Checking • Configuration • Circuit Breaking • Tracing • Logging • Monitoring • ...
Test usando MockRestServiceServer @RestClientTest public class MockServerTest { @Autowired private
MockRestServiceServer server; @Test public void shouldReturnAllItems() { this.server.expect(requestTo(...uri...)) .andResponse(withSuccess(...body..., ...media type...)); }
Test usando Wiremock @AutoconfigureWireMock public class WireMockTest { @Test public
void shouldReturnAllItems() { stubFor( get(urlEqualTo(...uri...)) .willReturn( aResponse() .withHeader(...key..., ...value...) .withBody(...body...))); }
Consumer Driven Contracts
Términos • Productor • Consumidor • Contrato
Spring Cloud Contract
Beneficios de Spring Cloud Contract Por lado del Productor: •
Ofrece DSL para definir contratos • Genera stubs • Genera tests a partir de la definición de contratos
Beneficios de Spring Cloud Contract Por lado del Consumidor: •
Validación contra los contratos • Ejecución de tests contra stubs generados por el Productor gracias a StubRunner
Demo
Features • Soporta mensajería (Integration, Stream, RabbitMQ, Kafka, Camel) •
Integración con MockMvc • Integración con WebTestClient • Integración con RestDocs • Soporte para Maven y Gradle • Provee StubRunner • Provee reglas en JUnit 4 y extensiones en JUnit Jupiter • Soporta Pact • Definición de contratos a través de YAML
Recursos • https://github.com/eddumelendez/jconfcolombia19-demo • https://cloud.spring.io/spring-cloud-static/spring-cloud-contract/2.2.0.M1
Gracias! https://blog.eddumelendez.me / Twitter/Github: eddumelendez