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
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
150
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
72
Intro to Spring Boot
eddumelendez
0
110
Other Decks in Programming
See All in Programming
setup-vp GitLab対応の裏側
naokihaba
0
150
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
4.8k
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
250
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
370
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.3k
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
330
iOSDCのペンライトを自動制御したい!
akkeylab
0
340
The Rails Doctrine Decade
koic
2
460
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
1
2.1k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
33
14k
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Agile that works and the tools we love
rasmusluckow
331
22k
Crafting Experiences
bethany
1
370
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
430
Six Lessons from altMBA
skipperchong
29
4.5k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
850
Are puppies a ranking factor?
jonoalderson
2
4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
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