SlideShare a Scribd company logo
An Empirical Analysis of Microservices Systems
Using Consumer-Driven Contract Testing
Hamdy Michael Ayas | Hartmut Fischer | Philipp Leitner | Francisco Gomes de Oliveira Neto
Department of Computer Science | Interaction Design & Software Engineering
01/09/2022
2022-08-29
What? à Microservices-Based Architecture
2
2022-08-29
What? à Microservices-Based Architecture
3
Structuring systems into:
- loosely coupled pieces
- developed and operated independently
- own individual domains and resources
- communicate to compose a complete
system
2022-08-29
What? à Microservices-Based Architecture
4
Structuring systems into:
- loosely coupled pieces
- developed and operated independently
- own individual domains and resources
- communicate to compose a complete
system
2022-08-29
What? à Microservices-Based Architecture
5
Structuring systems into:
- loosely coupled pieces
- developed and operated independently
- own individual domains and resources
- communicate to compose a complete
system
2022-08-29
What? à Microservices-Based Architecture
6
Structuring systems into:
- loosely coupled pieces
- developed and operated independently
- own individual domains and resources
- communicate to compose a complete
system
2022-08-29
Why? à Microservices based architectures
7
- Focus on one thing and do it well
- Design with multiple points of failure
- Conwell’s law and org. alignment
- Faster releases of functionality
- Independent scaling
- Technological diversity
- Separation of security-critical parts
2022-08-29
How? à Individual development
8
Microservice 1
Microservice 2
Microservice 3
…
Develop
Test
Monitor
…
Develop
Test
Monitor
…
Develop
Test
Monitor
…
Develop
Test
Monitor
…
Develop
Test
Monitor
…
Develop
Test
Monitor
…
time
2022-08-29
How? à Consumer-Driven Contracts
9
Producer Service
Consumer Service
Contract
Contract
2022-08-29
Granularity of Services
10
2022-08-29
Granularity of Services
12
2022-08-29
Granularity of Services
13
2022-08-29
Granularity of Services
14
2022-08-29
Granularity of Services
15
Different structures of services call for different
testing structures
Unit Testing Component Testing
Integration Testing E2E Testing
2022-08-29
Challenges & Gaps
17
New testing
paradigms with
MSAs
How best practices
appear in real-world
implementations
How testing types
come together
2022-08-29
Research objectives
18
Devise testing
architecture of
MSAs
Examine
appearance of best
practices
Investigate
testing strategies
in MSAs
2022-08-29
Research Questions
RQ1: What is the testing architecture of open-source
systems that use MSA and CDC tests?
RQ1.1: What artifacts are used and how do they relate to each other?
RQ1.2: What tools and frameworks implement MSA?
RQ2: Do current implementations of open-source MSAs
follow specific guidelines on MSA testing practices?
19
2022-08-29
Methodology
20
2022-08-29
Methodology
21
2022-08-29
Methodology
22
2022-08-29
Methodology
ID Description Framework # of microservices
P1 IoT application for an intelligent football table Pact 2
P2 Public service platform for online payments Pact 6
P3 Governmental platform for licensing exports & imports Pact 7
P4 MS reference implementation of food delivery service SCC 7
23
22 microservices
2022-08-29
RQ1: Testing
Architecture
24
2022-08-29
Unit Tests
• Scope of one microservice
• Dependent classes replaced
with test double
25
2022-08-29
Integration Tests
• Testing the interactions of an
individual microservice with
external modules
• Containerization is used to test
different transactions
• Not visible in all microservices
26
2022-08-29
Component Test
• The functionality of a single
microservice is tested
• Test by calling different endpoints
27
2022-08-29
System Test
• Mocked actions on UI
• User Journey simulations
28
2022-08-29
RQ1: Testing
Architecture
The testing architecture of the
analysed projects cover all levels
of testing (unit, integration,
component and system-level).
Mocking is used in all levels. Most
projects used component tests as
integration tests, even though they
did not target the interaction
between microservices.
29
2022-08-29
RQ2: Alignment with Guidelines and
Best Practices
Comparison with test pyramid
unit test
component test
integration test*
(contract test)
system
test
flaky
reliable
slow,
expensive
fast,
cheap
number of tests
i
s
o
l
a
t
e
d
i
n
t
e
g
r
a
t
e
d
*isolation depending on implementation
30
2022-08-29
RQ2:
Alignment with
Guidelines and
Best Practices
31
2022-08-29
RQ2:
Alignment with
Guidelines and
Best Practices
32
2022-08-29
RQ2:
Alignment with
Guidelines and
Best Practices
33
2022-08-29
RQ2: Alignment with Guidelines and
Best Practices
unit test
component test
integration test*
(contract test)
system
test
flaky
reliable
slow,
expensive
fast,
cheap
number of tests
i
s
o
l
a
t
e
d
i
n
t
e
g
r
a
t
e
d
*isolation depending on implementation
Open-source microservices systems deviate from the test pyramid and the
proportions suggested in Best Practice. Even though some services align with
the test pyramid, the general picture is that the distinction between integration
and component tests is not so clear.
34
2022-08-29
Implications & Contribution
Call to investigate
further service-level
testing
Adaptation of test
pyramid for systems
using MSA
End-to-End
testing
architecture
35
2022-08-29
Conclusion
36

More Related Content

PDF
Testing Microservices
PPTX
Microservices testing strategy-v2
PPTX
Testing strategies in microservices
PPTX
microservice testing tools and technologies
PDF
Navigating the World of Microservices Testing.pdf
PDF
Effective Software Testing in Microservices Systems.pdf
PPTX
Testing of Microservices in a Cloud Environment
PDF
Microservice Test Strategy (@Bonn Code Meetup)
Testing Microservices
Microservices testing strategy-v2
Testing strategies in microservices
microservice testing tools and technologies
Navigating the World of Microservices Testing.pdf
Effective Software Testing in Microservices Systems.pdf
Testing of Microservices in a Cloud Environment
Microservice Test Strategy (@Bonn Code Meetup)

Similar to An Empirical Analysis of Microservices Systems Using Consumer-Driven Contract Testing (20)

PDF
Test Automation in a Microservices Architecture.pdf
PDF
Microservices Interview Questions and Answers PDF By ScholarHat
ODP
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorks
PDF
Testing microservices
PPTX
Testing.pptx
PDF
SVCC Microservices: Decomposing Applications for Testability and Deployability
PDF
Testing Java Microservices Using Arquillian Hoverfly Assertj Junit Selenium A...
PPTX
deliver:Agile 2019 "Testing Microservices: From Development to Production
PDF
How_to_create_modular_microservice_test_projects.pdf
PPTX
Micro Service automation by Srijit Jain
PDF
Design-Based Microservices AKA Planes, Trains & Automobiles
PPTX
Testing microservices with rest assured
PDF
Understanding MicroSERVICE Architecture with Java & Spring Boot
PPTX
Successful strategies for Microservices Architecture Testing by Sundaresan Kr...
PDF
Kong Summit 2018 - Microservices: decomposing applications for testability an...
PDF
#ATAGTR2020 Presentation - Microservices – Explored
PDF
Introduction to Micro Services
PDF
Microservices: The Best Practices
ODP
micro services architecture (FrosCon2014)
PPTX
(Exploratory) Testing Micro Services
Test Automation in a Microservices Architecture.pdf
Microservices Interview Questions and Answers PDF By ScholarHat
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorks
Testing microservices
Testing.pptx
SVCC Microservices: Decomposing Applications for Testability and Deployability
Testing Java Microservices Using Arquillian Hoverfly Assertj Junit Selenium A...
deliver:Agile 2019 "Testing Microservices: From Development to Production
How_to_create_modular_microservice_test_projects.pdf
Micro Service automation by Srijit Jain
Design-Based Microservices AKA Planes, Trains & Automobiles
Testing microservices with rest assured
Understanding MicroSERVICE Architecture with Java & Spring Boot
Successful strategies for Microservices Architecture Testing by Sundaresan Kr...
Kong Summit 2018 - Microservices: decomposing applications for testability an...
#ATAGTR2020 Presentation - Microservices – Explored
Introduction to Micro Services
Microservices: The Best Practices
micro services architecture (FrosCon2014)
(Exploratory) Testing Micro Services
Ad

More from SEAA 2022 (18)

PDF
Risk and Engineering Knowledge Integration in Cyber-physical Production Syste...
PDF
Bad Smells in Industrial Automation: Sniffing out Feature Envy
PDF
Software Architecture Challenges in Process Automation - From Code Generation...
PDF
From Traditional to Digital: How software, data and AI are transforming the e...
PDF
Exploiting dynamic analysis for architectural smell detection: a preliminary ...
PDF
On the Role of Personality Traits in Implementation Tasks: A Preliminary Inve...
PDF
Have Java Production Methods Co-Evolved With Test Methods Properly?: A Fine-G...
PDF
A Preliminary Conceptualization and Analysis on Automated Static Analysis Too...
PPTX
An Evaluation of Effort-Aware Fine-Grained Just-in-Time Defect Prediction Met...
PDF
The Impact of Forced Working-From-Home on Code Technical Debt: An Industrial ...
PDF
Service Classification through Machine Learning: Aiding in the Efficient Ide...
PDF
Maintainability Challenges inML:ASLR
PDF
Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj...
PDF
An Industrial Experience Report about Challenges from Continuous Monitoring, ...
PDF
API Deprecation: A Systematic Mapping Study
PDF
MDEML_UMLsec4Edge Extending UMLsec to model data-protection-compliant edge co...
PDF
EMMM: A Unified Meta-Model for Tracking Machine Learning Experiments
PDF
Easing the Reuse of ML Solutions by Interactive Clustering-based Autotuning i...
Risk and Engineering Knowledge Integration in Cyber-physical Production Syste...
Bad Smells in Industrial Automation: Sniffing out Feature Envy
Software Architecture Challenges in Process Automation - From Code Generation...
From Traditional to Digital: How software, data and AI are transforming the e...
Exploiting dynamic analysis for architectural smell detection: a preliminary ...
On the Role of Personality Traits in Implementation Tasks: A Preliminary Inve...
Have Java Production Methods Co-Evolved With Test Methods Properly?: A Fine-G...
A Preliminary Conceptualization and Analysis on Automated Static Analysis Too...
An Evaluation of Effort-Aware Fine-Grained Just-in-Time Defect Prediction Met...
The Impact of Forced Working-From-Home on Code Technical Debt: An Industrial ...
Service Classification through Machine Learning: Aiding in the Efficient Ide...
Maintainability Challenges inML:ASLR
Model-Driven Optimization: Generating Smart Mutation Operators for Multi-Obj...
An Industrial Experience Report about Challenges from Continuous Monitoring, ...
API Deprecation: A Systematic Mapping Study
MDEML_UMLsec4Edge Extending UMLsec to model data-protection-compliant edge co...
EMMM: A Unified Meta-Model for Tracking Machine Learning Experiments
Easing the Reuse of ML Solutions by Interactive Clustering-based Autotuning i...
Ad

Recently uploaded (20)

PPTX
microscope-Lecturecjchchchchcuvuvhc.pptx
PDF
diccionario toefl examen de ingles para principiante
PPTX
Comparative Structure of Integument in Vertebrates.pptx
PPT
Chemical bonding and molecular structure
PPTX
neck nodes and dissection types and lymph nodes levels
PDF
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
PDF
bbec55_b34400a7914c42429908233dbd381773.pdf
PPTX
Protein & Amino Acid Structures Levels of protein structure (primary, seconda...
PDF
Phytochemical Investigation of Miliusa longipes.pdf
DOCX
Q1_LE_Mathematics 8_Lesson 5_Week 5.docx
PPTX
TOTAL hIP ARTHROPLASTY Presentation.pptx
PPT
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
PDF
AlphaEarth Foundations and the Satellite Embedding dataset
PPTX
Introduction to Fisheries Biotechnology_Lesson 1.pptx
PDF
Sciences of Europe No 170 (2025)
PPTX
7. General Toxicologyfor clinical phrmacy.pptx
PPTX
Derivatives of integument scales, beaks, horns,.pptx
PPTX
SCIENCE10 Q1 5 WK8 Evidence Supporting Plate Movement.pptx
PPTX
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
PPTX
ECG_Course_Presentation د.محمد صقران ppt
microscope-Lecturecjchchchchcuvuvhc.pptx
diccionario toefl examen de ingles para principiante
Comparative Structure of Integument in Vertebrates.pptx
Chemical bonding and molecular structure
neck nodes and dissection types and lymph nodes levels
IFIT3 RNA-binding activity primores influenza A viruz infection and translati...
bbec55_b34400a7914c42429908233dbd381773.pdf
Protein & Amino Acid Structures Levels of protein structure (primary, seconda...
Phytochemical Investigation of Miliusa longipes.pdf
Q1_LE_Mathematics 8_Lesson 5_Week 5.docx
TOTAL hIP ARTHROPLASTY Presentation.pptx
The World of Physical Science, • Labs: Safety Simulation, Measurement Practice
AlphaEarth Foundations and the Satellite Embedding dataset
Introduction to Fisheries Biotechnology_Lesson 1.pptx
Sciences of Europe No 170 (2025)
7. General Toxicologyfor clinical phrmacy.pptx
Derivatives of integument scales, beaks, horns,.pptx
SCIENCE10 Q1 5 WK8 Evidence Supporting Plate Movement.pptx
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
ECG_Course_Presentation د.محمد صقران ppt

An Empirical Analysis of Microservices Systems Using Consumer-Driven Contract Testing