Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Consumer Driven Contract Testing con Spring Cl...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Eddú Meléndez Gonzales
July 06, 2019
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Consumer Driven Contract Testing con Spring Cloud Contract
Eddú Meléndez Gonzales
July 06, 2019
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
350
Consumer Driven Contract Testing with Spring Cloud Contract
eddumelendez
0
160
Construyendo contenedores para aplicaciones Java con JIB
eddumelendez
0
220
CI CD de aplicaciones Spring Boot con Jenkins X
eddumelendez
0
1.4k
Testeando Aplicaciones con Docker y Arquillian Cube
eddumelendez
0
250
SpringOne Recap
eddumelendez
0
76
Intro to Spring Boot
eddumelendez
0
110
Other Decks in Programming
See All in Programming
phperだってパンチカードでコーディングしたい
o0h
PRO
0
400
ジョジョの世界をXRで再現する
mofurune
0
180
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.3k
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
190
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
440
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
110
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
1.2k
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
34k
AI-Powered Domain-Driven Design
ziobrando
0
270
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.9k
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
520
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
47k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
Site-Speed That Sticks
csswizardry
13
1.6k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
750
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
930
Build your cross-platform service in a week with App Engine
jlugia
234
19k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
360
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
640
Code Review Best Practice
trishagee
74
20k
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