SlideShare a Scribd company logo
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)

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...
David Currie
 
Consumer driven contracts in java world
Consumer driven contracts in java worldConsumer driven contracts in java world
Consumer driven contracts in java world
Yura Nosenko
 
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
Joel Thimsen
 
Modernization: Moving workloads to cloud
Modernization: Moving workloads to cloud Modernization: Moving workloads to cloud
Modernization: Moving workloads to cloud
Shikha Srivastava
 
Wcf best practice
Wcf best practiceWcf best practice
Wcf best practice
Yu GUAN
 
Achieving Interoperability Through Web Services
Achieving Interoperability Through Web ServicesAchieving Interoperability Through Web Services
Achieving Interoperability Through Web ServicesJorgen Thelin
 
Testing Microservices
Testing MicroservicesTesting Microservices
Testing Microservices
Nagarro
 
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
 
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
Seb Rose
 
Evolution from LwCCM to UCM
Evolution from LwCCM to UCMEvolution from LwCCM to UCM
Evolution from LwCCM to UCM
Remedy IT
 
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 (...
Michael Elder
 
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
Daniel Berg
 
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...
Sabino Labarile
 
Microservices.pdf
Microservices.pdfMicroservices.pdf
Microservices.pdf
SelmaJelovac1
 
Dependency Injection in .NET
Dependency Injection in .NETDependency Injection in .NET
Dependency Injection in .NET
ssusere19c741
 
Consumer Driven Contracts (DDD Perth 2016)
Consumer Driven Contracts (DDD Perth 2016)Consumer Driven Contracts (DDD Perth 2016)
Consumer Driven Contracts (DDD Perth 2016)
Rob Crowley
 
Raju ponnam CV
Raju ponnam CVRaju ponnam CV
Raju ponnam CVraju p
 
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...
abeforu
 
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
gtilton
 
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) OverviewJorgen 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

Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 

Recently uploaded (20)

Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 

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