SlideShare a Scribd company logo
1 of 13
Download to read offline
MICROSERVICES
ERFOLGREICH TESTEN
Consumer	Driven	Contract	Testing	mit Spring	Cloud	Contract
Frank	Scheffler
Senior	Solution	Architect
@maverick_1601
Florian	Pfleiderer
Senior	Solution	Consultant
@fpfleiderer
Integrated	Test	Scope
Integration	Testing:	then and now ...
Consumer	Driven	Contract	Testing S.2
Module	A
Module	B
Module	C
In-Process
Communication
• Inter-Process Communication	
(REST/Messaging)
• Multiple	Transactions
• Polyglot Persistence
• Independent	Teams	&	
Deployments
Integrated	Test	Scope
Testing in	a	Microservice Environment
Consumer	Driven	Contract	Testing S.3
Service
A
Service
C
Service
B
Integrated	Testing doesn‘t scale!
Consumer	Driven	Contract	Testing S.4
#	of involved services
fully integrated
testing
isolated integration
testing based on	contracts
It‘s all	about the Contract
Consumer	Driven	Contract	Testing S.5
Consumer
Consumer
Provider
ContractBlack	Box	View(s) White	Box	View
Aligned &	tested?
Spring	Cloud	Contract @	REST
Consumer	Driven	Contract	Testing S.6
Groovy
Contracts
Maven/Gradle
WireMock
Stub Server
Quelle:	https://cloud.spring.io/spring-cloud-contract/
Interface
Schema
Contract-based Testing Approach
Consumer	Driven	Contract	Testing S.7
Consumer ProviderContract
Stub(s) Test(s)
Contract Aspects
Consumer	Driven	Contract	Testing S.8
Contract
Interface
Schema
Protocol
Business	Logic
Security
Documentation
Performance
Spring	Cloud	
Contract
Based on	„example“	
requests/messages
Isolated Testing Example
Consumer	Driven	Contract	Testing S.9
Service	A Service	B
Business	Logic
Integration	
Service
(e.g.	Feign)
REST	Controller Business	Logic
Integration	Service
(e.g.	RestTemplate)
Consumer	Test
<<generated>>
WireMock Stubs
<<generated>>
Contract Test
Mockito Mocks
Unit	Test
Mockito Mocks
Unit	Test
Mockito Mocks
Consumer	Test
API	
Performance	
Test
Demo
Consumer	Driven	Contract	Testing S.10
Production
Consumer-Driven Contract Development
Consumer	Driven	Contract	Testing S.11
C
Create/Change
Contract
Consolidate
Contract
C P
Generate
Stubs
Implement
using Stubs
C
CI
Implement API	
using Contract Test
Implement
business logic
P P
CI/CD
CI/CD
Summary
Consumer-Driven Contract Testing
• Scalable testing for distributed
systems
• Focus	on	consumer expectations
drives API	design
• Loose	coupling in	the
development process
• Automated compatibility
verification of interfaces
Consumer	Driven	Contract	Testing S.13
Spring	Cloud	Contract
• Contracts as 1st-class	citizens
• Groovy	DSL
• Stub generation
• StubRunner Spring/Standalone
• Spring	MockMvc/JAX-RS
• JSON,	REST	&	Messaging
• Backward compatibility testing
WAS	SIND	IHRE	ERFAHRUNGEN	
MIT	TESTS	IN	VERTEILTEN	
SYSTEMEN?
Frank	Scheffler
Senior	Solution	Architect
@maverick_1601
Florian	Pfleiderer
Senior	Solution	Consultant
@fpfleiderer

More Related Content

Similar to Microservices erfolgreich testen mit Consumer Driven Contract Testing und Spring Cloud Contract (OOP 2018)

Achieving Interoperability Through Web Services
Achieving Interoperability Through Web ServicesAchieving Interoperability Through Web Services
Achieving Interoperability Through Web Services
Jorgen Thelin
 
InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...
InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...
InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...
Daniel Berg
 
Raju ponnam CV
Raju ponnam CVRaju ponnam CV
Raju ponnam CV
raju p
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) Overview
Jorgen Thelin
 

Similar to Microservices erfolgreich testen mit Consumer Driven Contract Testing und Spring Cloud Contract (OOP 2018) (20)

Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
Microservice Builder: A Microservice DevOps Pipeline for Rapid Delivery and P...
 
Consumer driven contracts in java world
Consumer driven contracts in java worldConsumer driven contracts in java world
Consumer driven contracts in java world
 
Migrate existing web services and build native microservices in bluemix
Migrate existing web services and build native microservices in bluemixMigrate existing web services and build native microservices in bluemix
Migrate existing web services and build native microservices in bluemix
 
Modernization: Moving workloads to cloud
Modernization: Moving workloads to cloud Modernization: Moving workloads to cloud
Modernization: Moving workloads to cloud
 
Wcf best practice
Wcf best practiceWcf best practice
Wcf best practice
 
Achieving Interoperability Through Web Services
Achieving Interoperability Through Web ServicesAchieving Interoperability Through Web Services
Achieving Interoperability Through Web Services
 
Testing Microservices
Testing MicroservicesTesting Microservices
Testing Microservices
 
InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...
InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...
InterConnect 2015: 3045 Hybrid Cloud - How to get a return from an investment...
 
Software contracts - Global Enterprise Agile 2023.pdf
Software contracts - Global Enterprise Agile 2023.pdfSoftware contracts - Global Enterprise Agile 2023.pdf
Software contracts - Global Enterprise Agile 2023.pdf
 
Evolution from LwCCM to UCM
Evolution from LwCCM to UCMEvolution from LwCCM to UCM
Evolution from LwCCM to UCM
 
Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...
Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...
Hybrid Cloud: How to Get a Return from an Investment Made Three Decades Ago (...
 
Cloud-Native Applications with Microservices and Containers
Cloud-Native Applications with Microservices and ContainersCloud-Native Applications with Microservices and Containers
Cloud-Native Applications with Microservices and Containers
 
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...
 
Microservices.pdf
Microservices.pdfMicroservices.pdf
Microservices.pdf
 
Dependency Injection in .NET
Dependency Injection in .NETDependency Injection in .NET
Dependency Injection in .NET
 
Consumer Driven Contracts (DDD Perth 2016)
Consumer Driven Contracts (DDD Perth 2016)Consumer Driven Contracts (DDD Perth 2016)
Consumer Driven Contracts (DDD Perth 2016)
 
Raju ponnam CV
Raju ponnam CVRaju ponnam CV
Raju ponnam CV
 
Solution guide -load balancing with the brocade server iron platform --micros...
Solution guide -load balancing with the brocade server iron platform --micros...Solution guide -load balancing with the brocade server iron platform --micros...
Solution guide -load balancing with the brocade server iron platform --micros...
 
Project findings paper TMForum catalyst 2014 B2B service bundling 1.0
Project findings paper TMForum catalyst 2014 B2B service bundling 1.0Project findings paper TMForum catalyst 2014 B2B service bundling 1.0
Project findings paper TMForum catalyst 2014 B2B service bundling 1.0
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) Overview
 

Recently uploaded

Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
drm1699
 

Recently uploaded (20)

Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
 
Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 
Test Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdfTest Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdf
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
 
Your Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | EvmuxYour Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | Evmux
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
 

Microservices erfolgreich testen mit Consumer Driven Contract Testing und Spring Cloud Contract (OOP 2018)