SlideShare a Scribd company logo
1 of 28
Download to read offline
Source: time.com
CONTRACT
TESTING
W H AT TO
E X P E C T ?
 No code
 No tools
 How it can help you
 Some practices
Source: wallpaper21.com
A B O U T M E
 Maarten Groeneweg
 Portbase
 Tester & Guild lead
 @LazyTesting
WE HAVE A
PROBLEM
E2E
MONOLITH
Source: pinterest.com
MONOLITH PIPELINE
App
E2E
Tests
Feature team 1
Feature team 2
Platform team
Production
E2E
Tests
App
App
App
App
App
App
App
App
App
Feature team 1
Feature team 2
Platform team
MICROSERVICE PIPELINE
Production
A REAL MICROSERVICE PIPELINE
App
Tests
App
App
App
App
App
Tests
Tests
Tests
Tests
Tests
Feature team 1
Feature team 2
Platform team
Production
REAL MICROSERVICES IN PRODUCTION
App
App
App
App
App
App
App
App
App
Source: wikia.com
Source: theglobeandmail.com
THE
SOLUTION
C O N T R A C T
T E S T I N G
 Kills integration bugs
 Does not harm your
microservices
 Enables autonomous delivery
Source: therange.co.uk
STEP 1: CREATE CONTRACT
All-the-
beers-app
Beers API
/beers
Consumer
Provider
Contract
When: GET /beers
Then:
[{ name: 'Kaapse Harrie',
brewery: 'Kaapse Brouwers'}]
STEP 2: TEST CONSUMER AGAINST MOCK
Contract
Beer API
Mock
All-the-
beers-app
Test Consumer
STEP 3: VALIDATE CONTRACT
Contract
Contract
Contract
Beers API
Provider
When: GET /beers
Then:
[{ name: 'Kaapse Harrie',
brewery: 'Kaapse Brouwers'}]
MICROSERVICES PIPELINE
TestsConsumer
Provider Tests
Consumer
tests
Provider
Mock
Contract Ok
Provider
tests
Production
Production
A DVA N TA G E S
 Autonomous testing
 Consumer driven contracts
 Enables provider to optimize
 Insight in usage
Source: techtimes.com
7 ANTI-
PATTERNS
#1:
THE DICTATOR
Source: inrealdeep.com
#2:
THE TOOLIST
Source: wjs.com
#3: HAPPY PATH
COVERAGE
Source: reddit.com
Source: imgflip.com
#5: THE
NAYSAYER
Source: riseandshine.com.sg
#6:
THE COMPLEXITY
COMPLEX
Source: hbr.org
#7:
THE LEAKING
PIPELINE
Source: thespruce.com
CONCLUSION
I T ' S
A W E S O M E
 Autonomous releasing
 No testing monolith
 Insight in integrations
 But don't forget the humans
Source: Futurama
M O R E I N F O
 lazytesting.com/contract-
testing
 @LazyTesting

More Related Content

Similar to Contract Testing - bye-bye Testing Monolith?

CI/CD for mobile development using Visual Studio App Center
CI/CD for mobile development using Visual Studio App CenterCI/CD for mobile development using Visual Studio App Center
CI/CD for mobile development using Visual Studio App CenterDan Ardelean
 
MOPCON 2015 - Tips of Mobile Continuous Delivery
MOPCON 2015 - Tips of Mobile Continuous DeliveryMOPCON 2015 - Tips of Mobile Continuous Delivery
MOPCON 2015 - Tips of Mobile Continuous Deliveryanistar sung
 
Enterprise E-Commerce Webinar #3: Bringing Your API to Market
Enterprise E-Commerce Webinar #3: Bringing Your API to MarketEnterprise E-Commerce Webinar #3: Bringing Your API to Market
Enterprise E-Commerce Webinar #3: Bringing Your API to MarketNikita Sharma
 
WebRTC Reborn Hackference
WebRTC Reborn HackferenceWebRTC Reborn Hackference
WebRTC Reborn HackferenceDan Jenkins
 
Bug clipper - #TiEBootcamp Batch 1 Demo Day Pitch
Bug clipper - #TiEBootcamp Batch 1 Demo Day PitchBug clipper - #TiEBootcamp Batch 1 Demo Day Pitch
Bug clipper - #TiEBootcamp Batch 1 Demo Day Pitchtiemumbai
 
Context Aggregation and Analysis: A tool for User-Generated Video Verification
Context Aggregation and Analysis: A tool for User-Generated Video VerificationContext Aggregation and Analysis: A tool for User-Generated Video Verification
Context Aggregation and Analysis: A tool for User-Generated Video VerificationOlga Papadopoulou
 
Build once deploy everywhere using the telerik platform
Build once deploy everywhere using the telerik platformBuild once deploy everywhere using the telerik platform
Build once deploy everywhere using the telerik platformAspenware
 
Building APIs with the OpenApi Spec
Building APIs with the OpenApi SpecBuilding APIs with the OpenApi Spec
Building APIs with the OpenApi SpecPedro J. Molina
 
WebRTC Reborn - Full Stack
WebRTC Reborn  - Full StackWebRTC Reborn  - Full Stack
WebRTC Reborn - Full StackDan Jenkins
 
Building Mobile Apps: A PhoneGap Enterprise Introduction for Developers
Building Mobile Apps: A PhoneGap Enterprise Introduction for DevelopersBuilding Mobile Apps: A PhoneGap Enterprise Introduction for Developers
Building Mobile Apps: A PhoneGap Enterprise Introduction for Developersarumsey
 
WebRTC Reborn Over The Air
WebRTC Reborn Over The AirWebRTC Reborn Over The Air
WebRTC Reborn Over The AirDan Jenkins
 
Centralize Data to Cut Costs and Increasing Quality of Cabling Installations
Centralize Data to Cut Costs and Increasing Quality of Cabling InstallationsCentralize Data to Cut Costs and Increasing Quality of Cabling Installations
Centralize Data to Cut Costs and Increasing Quality of Cabling InstallationsBrother Mobile Solutions
 
Second Screen Apps - On Google TV
Second Screen Apps - On Google TVSecond Screen Apps - On Google TV
Second Screen Apps - On Google TVCarmen Delessio
 
Mastering Mobile Test Automation with Appium
Mastering Mobile Test Automation with AppiumMastering Mobile Test Automation with Appium
Mastering Mobile Test Automation with AppiumPerfecto by Perforce
 
Automating the API Product Lifecycle
Automating the API Product LifecycleAutomating the API Product Lifecycle
Automating the API Product LifecycleOlyaSurits
 
How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...
How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...
How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...Perfecto by Perforce
 
Broadcast Music Inc. Release Rockstars: Program-Wide DevOps Success with Urba...
Broadcast Music Inc. Release Rockstars: Program-Wide DevOps Success with Urba...Broadcast Music Inc. Release Rockstars: Program-Wide DevOps Success with Urba...
Broadcast Music Inc. Release Rockstars: Program-Wide DevOps Success with Urba...Prolifics
 

Similar to Contract Testing - bye-bye Testing Monolith? (20)

CI/CD for mobile development using Visual Studio App Center
CI/CD for mobile development using Visual Studio App CenterCI/CD for mobile development using Visual Studio App Center
CI/CD for mobile development using Visual Studio App Center
 
MOPCON 2015 - Tips of Mobile Continuous Delivery
MOPCON 2015 - Tips of Mobile Continuous DeliveryMOPCON 2015 - Tips of Mobile Continuous Delivery
MOPCON 2015 - Tips of Mobile Continuous Delivery
 
Enterprise E-Commerce Webinar #3: Bringing Your API to Market
Enterprise E-Commerce Webinar #3: Bringing Your API to MarketEnterprise E-Commerce Webinar #3: Bringing Your API to Market
Enterprise E-Commerce Webinar #3: Bringing Your API to Market
 
WebRTC Reborn Hackference
WebRTC Reborn HackferenceWebRTC Reborn Hackference
WebRTC Reborn Hackference
 
EMEA Regional OSUG
EMEA Regional OSUG EMEA Regional OSUG
EMEA Regional OSUG
 
Bug clipper - #TiEBootcamp Batch 1 Demo Day Pitch
Bug clipper - #TiEBootcamp Batch 1 Demo Day PitchBug clipper - #TiEBootcamp Batch 1 Demo Day Pitch
Bug clipper - #TiEBootcamp Batch 1 Demo Day Pitch
 
Context Aggregation and Analysis: A tool for User-Generated Video Verification
Context Aggregation and Analysis: A tool for User-Generated Video VerificationContext Aggregation and Analysis: A tool for User-Generated Video Verification
Context Aggregation and Analysis: A tool for User-Generated Video Verification
 
Build once deploy everywhere using the telerik platform
Build once deploy everywhere using the telerik platformBuild once deploy everywhere using the telerik platform
Build once deploy everywhere using the telerik platform
 
Building APIs with the OpenApi Spec
Building APIs with the OpenApi SpecBuilding APIs with the OpenApi Spec
Building APIs with the OpenApi Spec
 
WebRTC Reborn - Full Stack
WebRTC Reborn  - Full StackWebRTC Reborn  - Full Stack
WebRTC Reborn - Full Stack
 
Building Mobile Apps: A PhoneGap Enterprise Introduction for Developers
Building Mobile Apps: A PhoneGap Enterprise Introduction for DevelopersBuilding Mobile Apps: A PhoneGap Enterprise Introduction for Developers
Building Mobile Apps: A PhoneGap Enterprise Introduction for Developers
 
WebRTC Reborn Over The Air
WebRTC Reborn Over The AirWebRTC Reborn Over The Air
WebRTC Reborn Over The Air
 
Andriod apps
Andriod appsAndriod apps
Andriod apps
 
Centralize Data to Cut Costs and Increasing Quality of Cabling Installations
Centralize Data to Cut Costs and Increasing Quality of Cabling InstallationsCentralize Data to Cut Costs and Increasing Quality of Cabling Installations
Centralize Data to Cut Costs and Increasing Quality of Cabling Installations
 
Second Screen Apps - On Google TV
Second Screen Apps - On Google TVSecond Screen Apps - On Google TV
Second Screen Apps - On Google TV
 
Mastering Mobile Test Automation with Appium
Mastering Mobile Test Automation with AppiumMastering Mobile Test Automation with Appium
Mastering Mobile Test Automation with Appium
 
Automating the API Product Lifecycle
Automating the API Product LifecycleAutomating the API Product Lifecycle
Automating the API Product Lifecycle
 
Ci for-android-apps
Ci for-android-appsCi for-android-apps
Ci for-android-apps
 
How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...
How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...
How to Create a Risk Based Testing Strategy With Simulators, Emulators, and R...
 
Broadcast Music Inc. Release Rockstars: Program-Wide DevOps Success with Urba...
Broadcast Music Inc. Release Rockstars: Program-Wide DevOps Success with Urba...Broadcast Music Inc. Release Rockstars: Program-Wide DevOps Success with Urba...
Broadcast Music Inc. Release Rockstars: Program-Wide DevOps Success with Urba...
 

Recently uploaded

Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxSasikiranMarri
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdfSteve Caron
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...kalichargn70th171
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfkalichargn70th171
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 

Recently uploaded (20)

Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptxUnderstanding Plagiarism: Causes, Consequences and Prevention.pptx
Understanding Plagiarism: Causes, Consequences and Prevention.pptx
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 

Contract Testing - bye-bye Testing Monolith?

Editor's Notes

  1. Ask questions
  2. Test Automation Human aspect We use pact
  3. Slow feedback E2E test have knowledge of everything Dependencies between teams (if team 1 introduces a bug, others cannot deploy) Other team needs to provide it’s application => need for 1 or more integrated envs
  4. This is what you want
  5. A lot of implicit expectations
  6. How I feel as tester> slackline Creating a monolith Having integration bugs
  7. Next slide> talk about beer
  8. 1. Consumer writes a contract
  9. 2. Consumer can mock provider based on the contract 3. Consumer can test it’s own app against the mock But still… not that useful (just mocking)
  10. 4. Provider can validate the contract(s) against the actual implementation (and the other way around)
  11. Explain provider/consumer broker
  12. Consumer dictated contracts Customer collaboration over contract negotiation
  13. Tools over human interaction
  14. Bad coverage - forgetting fault paths (404s) Asume an evil provider team
  15. Consumers expect more then they actually need Example : all the beers api doesn’t need a breweyname
  16. Autonomous teams, what if 1 team doesn’t wat to?
  17. Integration testing is complex, accept it (your e2e test are complex as well) Complexity in testing is a smell of complexity in architecture
  18. Pipelines of provider and consumer need to interact If release provider: check all contracts If release of consumer: validate contract against provider