SlideShare a Scribd company logo
Serverless microservices
Matt Fellows
@matthewfellows
smarter
Test , not harder
2
The new uService
The New Microservice
3
The New Microservice > After
API
External
Events
API
Outside World
Microservice
Interface
API
Master Data
API
Inside bounded context
Event Emitters
API
Materialised view /
cache
Events and
Processing
Data
Event Handlers
Processing
Offline Processing
4
Provisioning
Amazon ML
The New Microservice > After > Example Team 1 Bounded Context
Place Order API
External
Events
Order Status API
Outside World
Internal Events
Microservice
Interface
Data, Events and
Processing
Suggestions API
Publish Event
to external
subscribers
Insights /
Predictions
Customer /
Other Event
Orders
Push API
Inside bounded context
CRM
Materialised view of
customer
Provisioning Event
External
Events
… API
5
Provisioning
The New Microservice > After > Example Team 1 Bounded Context
External
Events
Outside World
Internal Events
Microservice
Interface
Data, Events and
Processing
Publish Event
to external
subscribers
Insights /
Predictions
Place Order API
Customer /
Other Event
Orders
Inside bounded context
Materialised view of
customer
Provisioning Event
CRM
Marketing
Automation
Customer
Support
6
The New Microservice > After > IoT ExampleThe New Microservice > After > Example 2 > IoT Architecture
API Gateway
Sensor A
Sensor B
Sensor C
IoT Rule A
IoT Rule B
IoT Rule C
AWS IoT Core
Sensor Data A
Sensor Data C
Processed Events
Sensor A
Vendor
Device API
Real-time events
Sensor Data B
Analytics
Device Ingest Process Store
8
Testing The New Microservice
How do we test these?
9
Testing The New Microservice > Test Pyramid
https://martinfowler.com/bliki/TestPyramid.html
Testing The New Microservice > Test Pyramid
Mama-mia!
11
Testing The New Microservice > Test Pyramid > Ideal Software Testing Pyramid
https://watirmelon.blog/testing-pyramids/
Don’t forget people - the
ones doing the testing!
Let me make this a bit
clearer for you...
12
Testing The New Microservice > Test Pyramid > Software Testing Trophy
https://kentcdodds.com/blog/write-tests
13
Testing The New Microservice > Test Pyramid > Testing Funnel?
https://medium.com/@copyconstruct/testing-microservices-the-sane-way-9bb31d158c16
14
Testing The New Microservice > Test Pyramid > Round Earth Heuristic
https://www.satisfice.com/blog/archives/4947
Today’s focus
Architecture > Microservices
1. Testability
2. Reduce need for UI / end-to-end testing
3. Observability
Testability
17
Structure
Testability
18
Testability > Lambda Pattern > Ports and Adaptors > Example
Order
Provisioning
Orders CRM
Orders
Testability > Lambda Anti-pattern > Example
MQ Handler
WebSocket
handler
Azure Function
Handler
Google Cloud Fn
Handler
Lambda
Handler
Service
Repository
Port
Adapter
Business Logic Domain Model Collaborators
Testability > Lambda Pattern > Ports and Adaptors
...
Test Harness
Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
Summary
● Separate protocol handling from
business logic
● Business logic shouldn’t change with
introduction of a new protocol
● Enables testability - Port, Adapter and
Business Logic are independently
testable
Testability > Lambda Pattern > Ports and Adaptors > Summary
WHAT WE ARE KNOWN FORTestability > Modularisation
Adapted from https://martinfowler.com/articles/microservice-testing
Adapters
Services
Domain
Repositories
Collaborators
External
Service
Test
modularity
30
How do you test locally?
Testability
WHAT WE ARE KNOWN FOR
31
Options
Testability > Testing Locally
● Use real services
● Stub services (e.g. Localstack)
● Stub SDK (e.g. Moto)
● Local Unit, Integration +
Component tests
32
Testability > Testing Locally
WHAT WE ARE KNOWN FOR
33
Options
● Feature arms race
● Trustworthy?
● Integrated = slower / harder
● All cloud providers?
● Point at the real services
● Stub services (e.g. Localstack)
● Stub SDK (e.g. Moto)
● Local Unit, Integration +
Component tests
Testability > Testing Locally
Challenges
34
Local Integration Test
Testability > Testing Locally
WHAT WE ARE KNOWN FORTestability > Testing Locally
Show me
where?
Adapters
Domain
Repositories
Collaborators
mock
Services
Testability > Testing Locally > Integration Test > Order Service
Look ma, no AWS
Code
Testability > Testing Locally > Integration Test > Order Service
Dependencies
injected
Testability > Testing Locally > Integration Test > Order Service
Look ma, no AWS
Code
Testability > Testing Locally > Integration Test > Order Service
Setup dependencies as
simple interface fakes
Testability > Testing Locally > Integration Test > Order Service
Run the unit under
test
Testability > Testing Locally > Integration Test > Order Service
Assert
42
Local Component Test
Testability > Testing Locally
WHAT WE ARE KNOWN FORTestability > Testing Locally > Component Test > Order Provisioning Service
Show me
where?
Adapters
Services
Domain
Repositories
Collaborators
mock
In-memory database
Testability > Testing Locally > Component Test > Order Provisioning Service
Component test of
handler
Setup dependencies,
inputs and expected
output
Testability > Testing Locally > Component Test > Order Provisioning Service
Testability > Testing Locally > Component Test > Order Provisioning Service
Invoke handler with
kinesis-shaped input
Testability > Testing Locally > Component Test > Order Provisioning Service
Assert the handler
response
Reduce # of e2e tests
Challenges
Integration
● More “white space” - integrations
● Async
○ who is my consumer?
○ delay in feedback
● Third Parties
50
Contract tests
Integration > Contract Tests
Problems with
automated e2e
tests
Integration > Contract Tests > Contracts
● Slow
● Easy to break
● Hard to fix
● Scales badly across teams
● Lots of set up  maintenance
● $$ potentially costly
Integration > Contract Tests > Contracts
Mocks to the rescue?
Integration > Contract Tests > Contracts
Mocks to the rescue?
WHAT WE ARE KNOWN FOR
54
Mocks
Solved problems New problems
● Hard to keep both sides in
sync
● Fast feedback
● Few dependencies
● No dedicated environment
● Reliable
● Easy to debug
Integration > Contract Tests > Contracts
55
Contract
{
“id”: 1234,
“items”:[
...
],
}
Consumer
Provider
Integration > Contract Tests > Contracts
Order API
GET /orders/1234
56
Provisioning
Amazon ML
Integration > Contract Tests > Contracts
Place Order API
External
Events
Order Status API
Outside World
Internal Events
Microservice
Interface
Data, Events and
Processing
Suggestions API
Publish Event
to external
subscribers
Insights /
Predictions
Customer /
Other Event
Orders
Push API
Inside bounded context
CRM
Materialised view of
customer
Provisioning Event
External
Events
… API
57
Provisioning
Amazon ML
Integration > Contract Tests > Contracts Everywhere!
Place Order API
External
Events
Order Status API
Outside World
Internal Events
Microservice
Interface
Data, Events and
Processing
Suggestions API
Publish Event
to external
subscribers
Insights /
Predictions
Customer /
Other Event
Orders
Push API
Inside bounded context
CRM
Materialised view of
customer
Provisioning Event
External
Events
… API
Contract
Contract
Contract
Contract
Contract
Contract
Contract
Contract
Integration > Contract Tests > Contracts
Integration > Contract Tests > Contracts
Mock
Integration > Contract Tests > Contracts
Mock
GET /orders/1234
Integration > Contract Tests > Contracts
Mock
{
“id”: 1234,
“items”:[
...
],
}
GET /orders/1234
Integration > Contract Tests > Contracts
Mock
Integration > Contract Tests > Contracts
Mock
GET /orders/1234
Integration > Contract Tests > Contracts
Mock
{
“id”: 1234,
“items”:[
...
],
}
GET /orders/1234
Integration > Contract Tests > Contracts
Mock ✔
WHAT WE ARE KNOWN FORTestability > Modularisation > Consumer Test
Adapted from https://martinfowler.com/articles/microservice-testing
Adapters
Services
Domain
Repositories
Collaborators
External
Service
Show me
where?
WHAT WE ARE KNOWN FORTestability > Modularisation > Provider Test
Adapted from https://martinfowler.com/articles/microservice-testing
Show me
where?
Adapters
Services
Domain
Repositories
Collaborators
mock
In-memory database
68
Integration > Contract Tests > Contracts
https://martinfowler.com/bliki/TestPyramid.html
Contract
Show me
where?
Bug turnaround -
minutes
Contracts tests
Integration > Contract Tests > Contracts
Know before you
commit
Contracts tests
Integration > Contract Tests > Contracts
Make changes with
speed and confidence
Contracts tests
Integration > Contract Tests > Contracts
Deploy independently
Contracts tests
Integration > Contract Tests > Contracts
Better API design
(Consumer)
Contracts tests
Integration > Contract Tests > Contracts
74
● Open source
● Multiple languages
○ Javascript
○ Go
○ Python
○ JVM
○ .NET
○ + more
pact.io
● HTTP contracts
● Message contracts
● … protocol agnostic!
Integration > Contract Tests > Contracts
75
Contract
{
“id”: 1234,
“items”:[
...
],
}
Consumer
Provider
Integration > Contract Tests > Consumer Contract Test
Order API
GET /orders/1234
Integration > Contract Tests > Contracts > Fetch Order Example
Setup API Host
Integration > Contract Tests > Contracts > Fetch Order Example
Expectations on
Order API made clear
Integration > Contract Tests > Contracts > Fetch Order Example
Expectations on
Order API made clear
Integration > Contract Tests > Contracts > Fetch Order Example
Call the OrderService
+ Assert
Integration > Contract Tests > Contracts > Fetch Order Example
Test state setup
Integration > Contract Tests > Contracts > Fetch Order Example
Test state setup
● Contract tests are faster, easier to
maintain and more reliable than e2e
tests
● Works for both synchronous and async
communication
● Use contract tests to reduce your
end-to-end test reliance
● End-to-end tests closer represent the
user experience
● Contract testing doesn’t replace
functional testing!
Summary
Integration > Contract Tests
Observe the Platform
84
Push responsibility into Platform
Observability
85
Push responsibility into Platform
Observability
86
#1 Log all the things!
Observability
87
#2 Use Middleware
Observability
Handler
Observability > Approach #2 > Middleware
{
"Records": [
{
"EventVersion": "1.0",
"EventSubscriptionArn": "somearn",
"EventSource": "aws:sns",
"Sns": {
...
}
}
]
}
{
"Success": true
}
HandlerHandlerHandler
before after
Request Response
1st middleware
2nd middleware
3rd middleware
Observability > Approach #2 > Middleware
Observability > Approach #2 > Middleware
Observability > Approach #2 > Middleware
92
#3 Push responsibility into Platform
Observability
93
Observability > Approach #1 > IT Ops Automation
Decide
Alarm
Schedule
Notify Pagerduty
Act
Isolate instance from
ASG
Offsite backup
Ship logs to Splunk
Orient
Security Analysis
Application Anomaly /
Canary Detection
Log forwarder
Policy Violation
Observe
Flow Logs
CloudTrail
CloudWatch Logs
Application Event
Configured Rule
Event
subscription
94
Observability > Approach #1 > IT Ops Automation
Decide
Alarm
Act
Ship logs to Splunk
Orient
Log forwarder
Observe
CloudWatch Logs
Event
subscription
WHAT WE ARE KNOWN FOR
95
Examples
● Automatically subscribe log groups and forward to ___
● Allow dynamic DEBUG monitoring (runtime sampling)
● Enable platform tracing (e.g. X-ray, IOPipe, Dashbird)
● Automatically inject correlation IDs
● Anomaly detection
Observability > Approach #1 > IT Ops Automation
● Invest in platform
● Structured + semantic logging is crucial
● Middleware to simplify and template out
specific shaped functions
Summary
Observability > Summary
Wrap it up
Summary
98
Summary
Problems
● Microservices + architecture has evolved
● ...and so must the pyramid!
● More diverse integrations
● More glue, cloud-native code
We’re all digital plumbers!
● Use Ports + Adapters (Hexagonal
architecture) to increase modularity
● Enable better testability and test
modularity
● Mock SDK for local tests
● Component tests can help to reduce
need for e2e tests
There is no single test strategy that will
work for all cases!
Structure...
Summary > Structure
● Contract tests are faster and more
reliable than E2E tests
● Use them to reduce your E2E footprint
● Contract tests enable independent
deployment
● They are not functional tests
Never forget forget the end user!
Reduce E2E...
Summary > Reduce reliance on E2E
● Is the property of understanding a
system as illuminated by its outputs
● Allows us to ask questions
● Helps us discover and respond to
unknown, unknowns
It’s not monitoring, but there is significant
implementation overlap.
Observability...
Summary > Observability
Matt Fellows
@matthewfellows
Serverless microservices
smarter
Pact
@pact_up
@pactflow
slack.pact.io
Test , not harder

More Related Content

What's hot

REST vs gRPC: Battle of API's
REST vs gRPC: Battle of API'sREST vs gRPC: Battle of API's
REST vs gRPC: Battle of API's
Luram Archanjo
 
Cheat Sheet: 8 ways to split your user stories
Cheat Sheet:  8 ways to split your user storiesCheat Sheet:  8 ways to split your user stories
Cheat Sheet: 8 ways to split your user stories
Payton Consulting
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQ
Araf Karsh Hamid
 
Breaking down agile requirements in Agile Methodology
Breaking down agile requirements in Agile MethodologyBreaking down agile requirements in Agile Methodology
Breaking down agile requirements in Agile Methodology
Mario Lucero
 
Designing APIs and Microservices Using Domain-Driven Design
Designing APIs and Microservices Using Domain-Driven DesignDesigning APIs and Microservices Using Domain-Driven Design
Designing APIs and Microservices Using Domain-Driven Design
LaunchAny
 
Domain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal ArchitectureDomain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal Architecture
Can Pekdemir
 
PMI-ACP Training Deck
PMI-ACP Training DeckPMI-ACP Training Deck
PMI-ACP Training Deck
wjperez0629
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
Uwe Friedrichsen
 
Agile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven DesignAgile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven Design
Araf Karsh Hamid
 
Conceptos de desarrollo ágil
Conceptos de desarrollo ágilConceptos de desarrollo ágil
Conceptos de desarrollo ágil
Guino Henostroza
 
User Story Splitting.pptx
User Story Splitting.pptxUser Story Splitting.pptx
User Story Splitting.pptx
Paul Boos
 
How to Improve Performance Testing Using InfluxDB and Apache JMeter
How to Improve Performance Testing Using InfluxDB and Apache JMeterHow to Improve Performance Testing Using InfluxDB and Apache JMeter
How to Improve Performance Testing Using InfluxDB and Apache JMeter
InfluxData
 
Writing Good User Stories (Hint: It's not about writing)
Writing Good User Stories (Hint: It's not about writing)Writing Good User Stories (Hint: It's not about writing)
Writing Good User Stories (Hint: It's not about writing)
one80
 
Scrum Prioritization Techniques PowerPoint Presentation Slides
Scrum Prioritization Techniques PowerPoint Presentation SlidesScrum Prioritization Techniques PowerPoint Presentation Slides
Scrum Prioritization Techniques PowerPoint Presentation Slides
SlideTeam
 
Writing Effective User Stories
Writing Effective User StoriesWriting Effective User Stories
Writing Effective User StoriesJaneve George
 
Performance Testing in the Agile Lifecycle
Performance Testing in the Agile LifecyclePerformance Testing in the Agile Lifecycle
Performance Testing in the Agile Lifecycle
Lee Barnes
 
Scrum master basics
Scrum master basics Scrum master basics
Scrum master basics
Elad Sofer
 
Introduction to SAML 2.0
Introduction to SAML 2.0Introduction to SAML 2.0
Introduction to SAML 2.0
Mika Koivisto
 
Story of user story
Story of user storyStory of user story
Story of user story
Balaji Sathram
 

What's hot (20)

REST vs gRPC: Battle of API's
REST vs gRPC: Battle of API'sREST vs gRPC: Battle of API's
REST vs gRPC: Battle of API's
 
Cheat Sheet: 8 ways to split your user stories
Cheat Sheet:  8 ways to split your user storiesCheat Sheet:  8 ways to split your user stories
Cheat Sheet: 8 ways to split your user stories
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQ
 
Breaking down agile requirements in Agile Methodology
Breaking down agile requirements in Agile MethodologyBreaking down agile requirements in Agile Methodology
Breaking down agile requirements in Agile Methodology
 
Designing APIs and Microservices Using Domain-Driven Design
Designing APIs and Microservices Using Domain-Driven DesignDesigning APIs and Microservices Using Domain-Driven Design
Designing APIs and Microservices Using Domain-Driven Design
 
Domain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal ArchitectureDomain Driven Design & Hexagonal Architecture
Domain Driven Design & Hexagonal Architecture
 
PMI-ACP Training Deck
PMI-ACP Training DeckPMI-ACP Training Deck
PMI-ACP Training Deck
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 
Agile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven DesignAgile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven Design
 
Conceptos de desarrollo ágil
Conceptos de desarrollo ágilConceptos de desarrollo ágil
Conceptos de desarrollo ágil
 
User Story Splitting.pptx
User Story Splitting.pptxUser Story Splitting.pptx
User Story Splitting.pptx
 
Scrum roles
Scrum rolesScrum roles
Scrum roles
 
How to Improve Performance Testing Using InfluxDB and Apache JMeter
How to Improve Performance Testing Using InfluxDB and Apache JMeterHow to Improve Performance Testing Using InfluxDB and Apache JMeter
How to Improve Performance Testing Using InfluxDB and Apache JMeter
 
Writing Good User Stories (Hint: It's not about writing)
Writing Good User Stories (Hint: It's not about writing)Writing Good User Stories (Hint: It's not about writing)
Writing Good User Stories (Hint: It's not about writing)
 
Scrum Prioritization Techniques PowerPoint Presentation Slides
Scrum Prioritization Techniques PowerPoint Presentation SlidesScrum Prioritization Techniques PowerPoint Presentation Slides
Scrum Prioritization Techniques PowerPoint Presentation Slides
 
Writing Effective User Stories
Writing Effective User StoriesWriting Effective User Stories
Writing Effective User Stories
 
Performance Testing in the Agile Lifecycle
Performance Testing in the Agile LifecyclePerformance Testing in the Agile Lifecycle
Performance Testing in the Agile Lifecycle
 
Scrum master basics
Scrum master basics Scrum master basics
Scrum master basics
 
Introduction to SAML 2.0
Introduction to SAML 2.0Introduction to SAML 2.0
Introduction to SAML 2.0
 
Story of user story
Story of user storyStory of user story
Story of user story
 

Similar to Serverless microservices: Test smarter, not harder

Deploying large-scale, serverless and asynchronous systems - without integrat...
Deploying large-scale, serverless and asynchronous systems - without integrat...Deploying large-scale, serverless and asynchronous systems - without integrat...
Deploying large-scale, serverless and asynchronous systems - without integrat...
DiUS
 
Trends and development practices in Serverless architectures
Trends and development practices in Serverless architecturesTrends and development practices in Serverless architectures
Trends and development practices in Serverless architectures
DiUS
 
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Chris Richardson
 
Contract testing | Евгений Кузьмин | CODEiD
Contract testing | Евгений Кузьмин | CODEiDContract testing | Евгений Кузьмин | CODEiD
Contract testing | Евгений Кузьмин | CODEiD
CODEiD PHP Community
 
Acceptance Test Driven Development at StarWest 2014
Acceptance Test Driven Development at StarWest 2014Acceptance Test Driven Development at StarWest 2014
Acceptance Test Driven Development at StarWest 2014
jaredrrichardson
 
SIPfoundry CoLab 2013 - Web Contact Center
SIPfoundry CoLab 2013 - Web Contact CenterSIPfoundry CoLab 2013 - Web Contact Center
SIPfoundry CoLab 2013 - Web Contact Center
SIPfoundry
 
Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...
Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...
Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...
Evgeniy Kuzmin
 
Complex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWSComplex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWS
Boyan Dimitrov
 
Contract based testing
Contract based testingContract based testing
Contract based testing
Alisa Petivotova
 
Testing microservices
Testing microservicesTesting microservices
Testing microservices
Anik Kale
 
Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy Model
Atlassian
 
Testing Microservices
Testing MicroservicesTesting Microservices
Testing Microservices
Nagarro
 
MSB Deep Dive
MSB Deep DiveMSB Deep Dive
MSB Deep Dive
Huabing Zhao
 
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorks
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorksTesting strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorks
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorksThoughtworks
 
Using Service Discovery and Service Proxy
Using Service Discovery and Service ProxyUsing Service Discovery and Service Proxy
Using Service Discovery and Service Proxy
IBM
 
Complex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWSComplex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWS
Boyan Dimitrov
 
Delivering High Performance Ecommerce with Magento Commerce Cloud
Delivering High Performance Ecommerce with Magento Commerce CloudDelivering High Performance Ecommerce with Magento Commerce Cloud
Delivering High Performance Ecommerce with Magento Commerce Cloud
Guncha Pental
 
Advanced Controls access and user security for superusers con8824
Advanced Controls access and user security for superusers con8824Advanced Controls access and user security for superusers con8824
Advanced Controls access and user security for superusers con8824
Oracle
 
the grinder testing certification
the grinder testing certificationthe grinder testing certification
the grinder testing certification
Vskills
 
Grand tour of Azure API Management.pdf
Grand tour of Azure API Management.pdfGrand tour of Azure API Management.pdf
Grand tour of Azure API Management.pdf
Sherman37
 

Similar to Serverless microservices: Test smarter, not harder (20)

Deploying large-scale, serverless and asynchronous systems - without integrat...
Deploying large-scale, serverless and asynchronous systems - without integrat...Deploying large-scale, serverless and asynchronous systems - without integrat...
Deploying large-scale, serverless and asynchronous systems - without integrat...
 
Trends and development practices in Serverless architectures
Trends and development practices in Serverless architecturesTrends and development practices in Serverless architectures
Trends and development practices in Serverless architectures
 
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
 
Contract testing | Евгений Кузьмин | CODEiD
Contract testing | Евгений Кузьмин | CODEiDContract testing | Евгений Кузьмин | CODEiD
Contract testing | Евгений Кузьмин | CODEiD
 
Acceptance Test Driven Development at StarWest 2014
Acceptance Test Driven Development at StarWest 2014Acceptance Test Driven Development at StarWest 2014
Acceptance Test Driven Development at StarWest 2014
 
SIPfoundry CoLab 2013 - Web Contact Center
SIPfoundry CoLab 2013 - Web Contact CenterSIPfoundry CoLab 2013 - Web Contact Center
SIPfoundry CoLab 2013 - Web Contact Center
 
Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...
Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...
Contract testing. Isolated testing of microservices with pact.io - Evgeniy Ku...
 
Complex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWSComplex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWS
 
Contract based testing
Contract based testingContract based testing
Contract based testing
 
Testing microservices
Testing microservicesTesting microservices
Testing microservices
 
Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy Model
 
Testing Microservices
Testing MicroservicesTesting Microservices
Testing Microservices
 
MSB Deep Dive
MSB Deep DiveMSB Deep Dive
MSB Deep Dive
 
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorks
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorksTesting strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorks
Testing strategies for micro services - Ketan Soni, Jesal Mistry, ThoughtWorks
 
Using Service Discovery and Service Proxy
Using Service Discovery and Service ProxyUsing Service Discovery and Service Proxy
Using Service Discovery and Service Proxy
 
Complex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWSComplex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWS
 
Delivering High Performance Ecommerce with Magento Commerce Cloud
Delivering High Performance Ecommerce with Magento Commerce CloudDelivering High Performance Ecommerce with Magento Commerce Cloud
Delivering High Performance Ecommerce with Magento Commerce Cloud
 
Advanced Controls access and user security for superusers con8824
Advanced Controls access and user security for superusers con8824Advanced Controls access and user security for superusers con8824
Advanced Controls access and user security for superusers con8824
 
the grinder testing certification
the grinder testing certificationthe grinder testing certification
the grinder testing certification
 
Grand tour of Azure API Management.pdf
Grand tour of Azure API Management.pdfGrand tour of Azure API Management.pdf
Grand tour of Azure API Management.pdf
 

More from DiUS

Lunch and Learn: You have the data, now what?
Lunch and Learn: You have the data, now what?Lunch and Learn: You have the data, now what?
Lunch and Learn: You have the data, now what?
DiUS
 
How to build confidence in your release cycle
How to build confidence in your release cycleHow to build confidence in your release cycle
How to build confidence in your release cycle
DiUS
 
Test Smart, not hard
Test Smart, not hardTest Smart, not hard
Test Smart, not hard
DiUS
 
10 things-to-inspire-in-10-mins
10 things-to-inspire-in-10-mins10 things-to-inspire-in-10-mins
10 things-to-inspire-in-10-mins
DiUS
 
The Diversity Dilemma - Supporting our Sisters in STEM
The Diversity Dilemma - Supporting our Sisters in STEMThe Diversity Dilemma - Supporting our Sisters in STEM
The Diversity Dilemma - Supporting our Sisters in STEM
DiUS
 
GameDay - Achieving resilience through Chaos Engineering
GameDay - Achieving resilience through Chaos EngineeringGameDay - Achieving resilience through Chaos Engineering
GameDay - Achieving resilience through Chaos Engineering
DiUS
 
The case for consumer-driven contracts
The case for consumer-driven contractsThe case for consumer-driven contracts
The case for consumer-driven contracts
DiUS
 
Deploy with Confidence using Pact Go!
Deploy with Confidence using Pact Go!Deploy with Confidence using Pact Go!
Deploy with Confidence using Pact Go!
DiUS
 
Crafting Quality Software
Crafting Quality SoftwareCrafting Quality Software
Crafting Quality Software
DiUS
 
Metrics on the front, data in the back
Metrics on the front, data in the backMetrics on the front, data in the back
Metrics on the front, data in the back
DiUS
 
Antifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failureAntifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failure
DiUS
 
DIY IoT Backend
DIY IoT BackendDIY IoT Backend
DIY IoT Backend
DiUS
 
How to Build Hardware Lean
How to Build Hardware LeanHow to Build Hardware Lean
How to Build Hardware Lean
DiUS
 
Behaviour Change and Coaching: What we can learn from BJ Fogg
Behaviour Change and Coaching: What we can learn from BJ FoggBehaviour Change and Coaching: What we can learn from BJ Fogg
Behaviour Change and Coaching: What we can learn from BJ Fogg
DiUS
 
Power in Agile Teams
Power in Agile Teams Power in Agile Teams
Power in Agile Teams
DiUS
 
The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...
The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...
The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...
DiUS
 
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary SlidesRise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
DiUS
 
AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...
AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...
AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...
DiUS
 
Agile Australia 2014 | A light saber for your disruptive tool belt: the Busin...
Agile Australia 2014 | A light saber for your disruptive tool belt: the Busin...Agile Australia 2014 | A light saber for your disruptive tool belt: the Busin...
Agile Australia 2014 | A light saber for your disruptive tool belt: the Busin...
DiUS
 
Agile Australia 2014 | UX: How to measure more than a gut feel by Amir Ansari
Agile Australia 2014 | UX: How to measure more than a gut feel by Amir AnsariAgile Australia 2014 | UX: How to measure more than a gut feel by Amir Ansari
Agile Australia 2014 | UX: How to measure more than a gut feel by Amir Ansari
DiUS
 

More from DiUS (20)

Lunch and Learn: You have the data, now what?
Lunch and Learn: You have the data, now what?Lunch and Learn: You have the data, now what?
Lunch and Learn: You have the data, now what?
 
How to build confidence in your release cycle
How to build confidence in your release cycleHow to build confidence in your release cycle
How to build confidence in your release cycle
 
Test Smart, not hard
Test Smart, not hardTest Smart, not hard
Test Smart, not hard
 
10 things-to-inspire-in-10-mins
10 things-to-inspire-in-10-mins10 things-to-inspire-in-10-mins
10 things-to-inspire-in-10-mins
 
The Diversity Dilemma - Supporting our Sisters in STEM
The Diversity Dilemma - Supporting our Sisters in STEMThe Diversity Dilemma - Supporting our Sisters in STEM
The Diversity Dilemma - Supporting our Sisters in STEM
 
GameDay - Achieving resilience through Chaos Engineering
GameDay - Achieving resilience through Chaos EngineeringGameDay - Achieving resilience through Chaos Engineering
GameDay - Achieving resilience through Chaos Engineering
 
The case for consumer-driven contracts
The case for consumer-driven contractsThe case for consumer-driven contracts
The case for consumer-driven contracts
 
Deploy with Confidence using Pact Go!
Deploy with Confidence using Pact Go!Deploy with Confidence using Pact Go!
Deploy with Confidence using Pact Go!
 
Crafting Quality Software
Crafting Quality SoftwareCrafting Quality Software
Crafting Quality Software
 
Metrics on the front, data in the back
Metrics on the front, data in the backMetrics on the front, data in the back
Metrics on the front, data in the back
 
Antifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failureAntifragility and testing for distributed systems failure
Antifragility and testing for distributed systems failure
 
DIY IoT Backend
DIY IoT BackendDIY IoT Backend
DIY IoT Backend
 
How to Build Hardware Lean
How to Build Hardware LeanHow to Build Hardware Lean
How to Build Hardware Lean
 
Behaviour Change and Coaching: What we can learn from BJ Fogg
Behaviour Change and Coaching: What we can learn from BJ FoggBehaviour Change and Coaching: What we can learn from BJ Fogg
Behaviour Change and Coaching: What we can learn from BJ Fogg
 
Power in Agile Teams
Power in Agile Teams Power in Agile Teams
Power in Agile Teams
 
The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...
The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...
The Diversity Dilemma: Attracting and Retaining Talented Women in Technology-...
 
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary SlidesRise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
 
AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...
AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...
AWS Summit Melbourne 2014 | The Path to Business Agility for Vodafone: How Am...
 
Agile Australia 2014 | A light saber for your disruptive tool belt: the Busin...
Agile Australia 2014 | A light saber for your disruptive tool belt: the Busin...Agile Australia 2014 | A light saber for your disruptive tool belt: the Busin...
Agile Australia 2014 | A light saber for your disruptive tool belt: the Busin...
 
Agile Australia 2014 | UX: How to measure more than a gut feel by Amir Ansari
Agile Australia 2014 | UX: How to measure more than a gut feel by Amir AnsariAgile Australia 2014 | UX: How to measure more than a gut feel by Amir Ansari
Agile Australia 2014 | UX: How to measure more than a gut feel by Amir Ansari
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
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
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
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
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 

Serverless microservices: Test smarter, not harder

  • 2. 2 The new uService The New Microservice
  • 3. 3 The New Microservice > After API External Events API Outside World Microservice Interface API Master Data API Inside bounded context Event Emitters API Materialised view / cache Events and Processing Data Event Handlers Processing Offline Processing
  • 4. 4 Provisioning Amazon ML The New Microservice > After > Example Team 1 Bounded Context Place Order API External Events Order Status API Outside World Internal Events Microservice Interface Data, Events and Processing Suggestions API Publish Event to external subscribers Insights / Predictions Customer / Other Event Orders Push API Inside bounded context CRM Materialised view of customer Provisioning Event External Events … API
  • 5. 5 Provisioning The New Microservice > After > Example Team 1 Bounded Context External Events Outside World Internal Events Microservice Interface Data, Events and Processing Publish Event to external subscribers Insights / Predictions Place Order API Customer / Other Event Orders Inside bounded context Materialised view of customer Provisioning Event CRM Marketing Automation Customer Support
  • 6. 6 The New Microservice > After > IoT ExampleThe New Microservice > After > Example 2 > IoT Architecture API Gateway Sensor A Sensor B Sensor C IoT Rule A IoT Rule B IoT Rule C AWS IoT Core Sensor Data A Sensor Data C Processed Events Sensor A Vendor Device API Real-time events Sensor Data B Analytics Device Ingest Process Store
  • 7.
  • 8. 8 Testing The New Microservice How do we test these?
  • 9. 9 Testing The New Microservice > Test Pyramid https://martinfowler.com/bliki/TestPyramid.html
  • 10. Testing The New Microservice > Test Pyramid Mama-mia!
  • 11. 11 Testing The New Microservice > Test Pyramid > Ideal Software Testing Pyramid https://watirmelon.blog/testing-pyramids/ Don’t forget people - the ones doing the testing! Let me make this a bit clearer for you...
  • 12. 12 Testing The New Microservice > Test Pyramid > Software Testing Trophy https://kentcdodds.com/blog/write-tests
  • 13. 13 Testing The New Microservice > Test Pyramid > Testing Funnel? https://medium.com/@copyconstruct/testing-microservices-the-sane-way-9bb31d158c16
  • 14. 14 Testing The New Microservice > Test Pyramid > Round Earth Heuristic https://www.satisfice.com/blog/archives/4947
  • 15. Today’s focus Architecture > Microservices 1. Testability 2. Reduce need for UI / end-to-end testing 3. Observability
  • 18. 18 Testability > Lambda Pattern > Ports and Adaptors > Example Order Provisioning Orders CRM Orders
  • 19. Testability > Lambda Anti-pattern > Example
  • 20. MQ Handler WebSocket handler Azure Function Handler Google Cloud Fn Handler Lambda Handler Service Repository Port Adapter Business Logic Domain Model Collaborators Testability > Lambda Pattern > Ports and Adaptors ... Test Harness
  • 21. Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
  • 22. Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
  • 23. Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
  • 24. Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
  • 25. Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
  • 26. Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
  • 27. Testability > Lambda Pattern > Ports and Adaptors > Lambda Adapter
  • 28. Summary ● Separate protocol handling from business logic ● Business logic shouldn’t change with introduction of a new protocol ● Enables testability - Port, Adapter and Business Logic are independently testable Testability > Lambda Pattern > Ports and Adaptors > Summary
  • 29. WHAT WE ARE KNOWN FORTestability > Modularisation Adapted from https://martinfowler.com/articles/microservice-testing Adapters Services Domain Repositories Collaborators External Service Test modularity
  • 30. 30 How do you test locally? Testability
  • 31. WHAT WE ARE KNOWN FOR 31 Options Testability > Testing Locally ● Use real services ● Stub services (e.g. Localstack) ● Stub SDK (e.g. Moto) ● Local Unit, Integration + Component tests
  • 33. WHAT WE ARE KNOWN FOR 33 Options ● Feature arms race ● Trustworthy? ● Integrated = slower / harder ● All cloud providers? ● Point at the real services ● Stub services (e.g. Localstack) ● Stub SDK (e.g. Moto) ● Local Unit, Integration + Component tests Testability > Testing Locally Challenges
  • 35. WHAT WE ARE KNOWN FORTestability > Testing Locally Show me where? Adapters Domain Repositories Collaborators mock Services
  • 36. Testability > Testing Locally > Integration Test > Order Service Look ma, no AWS Code
  • 37. Testability > Testing Locally > Integration Test > Order Service Dependencies injected
  • 38. Testability > Testing Locally > Integration Test > Order Service Look ma, no AWS Code
  • 39. Testability > Testing Locally > Integration Test > Order Service Setup dependencies as simple interface fakes
  • 40. Testability > Testing Locally > Integration Test > Order Service Run the unit under test
  • 41. Testability > Testing Locally > Integration Test > Order Service Assert
  • 43. WHAT WE ARE KNOWN FORTestability > Testing Locally > Component Test > Order Provisioning Service Show me where? Adapters Services Domain Repositories Collaborators mock In-memory database
  • 44. Testability > Testing Locally > Component Test > Order Provisioning Service Component test of handler
  • 45. Setup dependencies, inputs and expected output Testability > Testing Locally > Component Test > Order Provisioning Service
  • 46. Testability > Testing Locally > Component Test > Order Provisioning Service Invoke handler with kinesis-shaped input
  • 47. Testability > Testing Locally > Component Test > Order Provisioning Service Assert the handler response
  • 48. Reduce # of e2e tests
  • 49. Challenges Integration ● More “white space” - integrations ● Async ○ who is my consumer? ○ delay in feedback ● Third Parties
  • 51. Problems with automated e2e tests Integration > Contract Tests > Contracts ● Slow ● Easy to break ● Hard to fix ● Scales badly across teams ● Lots of set up maintenance ● $$ potentially costly
  • 52. Integration > Contract Tests > Contracts Mocks to the rescue?
  • 53. Integration > Contract Tests > Contracts Mocks to the rescue?
  • 54. WHAT WE ARE KNOWN FOR 54 Mocks Solved problems New problems ● Hard to keep both sides in sync ● Fast feedback ● Few dependencies ● No dedicated environment ● Reliable ● Easy to debug Integration > Contract Tests > Contracts
  • 55. 55 Contract { “id”: 1234, “items”:[ ... ], } Consumer Provider Integration > Contract Tests > Contracts Order API GET /orders/1234
  • 56. 56 Provisioning Amazon ML Integration > Contract Tests > Contracts Place Order API External Events Order Status API Outside World Internal Events Microservice Interface Data, Events and Processing Suggestions API Publish Event to external subscribers Insights / Predictions Customer / Other Event Orders Push API Inside bounded context CRM Materialised view of customer Provisioning Event External Events … API
  • 57. 57 Provisioning Amazon ML Integration > Contract Tests > Contracts Everywhere! Place Order API External Events Order Status API Outside World Internal Events Microservice Interface Data, Events and Processing Suggestions API Publish Event to external subscribers Insights / Predictions Customer / Other Event Orders Push API Inside bounded context CRM Materialised view of customer Provisioning Event External Events … API Contract Contract Contract Contract Contract Contract Contract Contract
  • 58. Integration > Contract Tests > Contracts
  • 59. Integration > Contract Tests > Contracts Mock
  • 60. Integration > Contract Tests > Contracts Mock GET /orders/1234
  • 61. Integration > Contract Tests > Contracts Mock { “id”: 1234, “items”:[ ... ], } GET /orders/1234
  • 62. Integration > Contract Tests > Contracts Mock
  • 63. Integration > Contract Tests > Contracts Mock GET /orders/1234
  • 64. Integration > Contract Tests > Contracts Mock { “id”: 1234, “items”:[ ... ], } GET /orders/1234
  • 65. Integration > Contract Tests > Contracts Mock ✔
  • 66. WHAT WE ARE KNOWN FORTestability > Modularisation > Consumer Test Adapted from https://martinfowler.com/articles/microservice-testing Adapters Services Domain Repositories Collaborators External Service Show me where?
  • 67. WHAT WE ARE KNOWN FORTestability > Modularisation > Provider Test Adapted from https://martinfowler.com/articles/microservice-testing Show me where? Adapters Services Domain Repositories Collaborators mock In-memory database
  • 68. 68 Integration > Contract Tests > Contracts https://martinfowler.com/bliki/TestPyramid.html Contract Show me where?
  • 69. Bug turnaround - minutes Contracts tests Integration > Contract Tests > Contracts
  • 70. Know before you commit Contracts tests Integration > Contract Tests > Contracts
  • 71. Make changes with speed and confidence Contracts tests Integration > Contract Tests > Contracts
  • 72. Deploy independently Contracts tests Integration > Contract Tests > Contracts
  • 73. Better API design (Consumer) Contracts tests Integration > Contract Tests > Contracts
  • 74. 74 ● Open source ● Multiple languages ○ Javascript ○ Go ○ Python ○ JVM ○ .NET ○ + more pact.io ● HTTP contracts ● Message contracts ● … protocol agnostic! Integration > Contract Tests > Contracts
  • 75. 75 Contract { “id”: 1234, “items”:[ ... ], } Consumer Provider Integration > Contract Tests > Consumer Contract Test Order API GET /orders/1234
  • 76. Integration > Contract Tests > Contracts > Fetch Order Example Setup API Host
  • 77. Integration > Contract Tests > Contracts > Fetch Order Example Expectations on Order API made clear
  • 78. Integration > Contract Tests > Contracts > Fetch Order Example Expectations on Order API made clear
  • 79. Integration > Contract Tests > Contracts > Fetch Order Example Call the OrderService + Assert
  • 80. Integration > Contract Tests > Contracts > Fetch Order Example Test state setup
  • 81. Integration > Contract Tests > Contracts > Fetch Order Example Test state setup
  • 82. ● Contract tests are faster, easier to maintain and more reliable than e2e tests ● Works for both synchronous and async communication ● Use contract tests to reduce your end-to-end test reliance ● End-to-end tests closer represent the user experience ● Contract testing doesn’t replace functional testing! Summary Integration > Contract Tests
  • 84. 84 Push responsibility into Platform Observability
  • 85. 85 Push responsibility into Platform Observability
  • 86. 86 #1 Log all the things! Observability
  • 88. Handler Observability > Approach #2 > Middleware { "Records": [ { "EventVersion": "1.0", "EventSubscriptionArn": "somearn", "EventSource": "aws:sns", "Sns": { ... } } ] } { "Success": true } HandlerHandlerHandler before after Request Response 1st middleware 2nd middleware 3rd middleware
  • 89. Observability > Approach #2 > Middleware
  • 90. Observability > Approach #2 > Middleware
  • 91. Observability > Approach #2 > Middleware
  • 92. 92 #3 Push responsibility into Platform Observability
  • 93. 93 Observability > Approach #1 > IT Ops Automation Decide Alarm Schedule Notify Pagerduty Act Isolate instance from ASG Offsite backup Ship logs to Splunk Orient Security Analysis Application Anomaly / Canary Detection Log forwarder Policy Violation Observe Flow Logs CloudTrail CloudWatch Logs Application Event Configured Rule Event subscription
  • 94. 94 Observability > Approach #1 > IT Ops Automation Decide Alarm Act Ship logs to Splunk Orient Log forwarder Observe CloudWatch Logs Event subscription
  • 95. WHAT WE ARE KNOWN FOR 95 Examples ● Automatically subscribe log groups and forward to ___ ● Allow dynamic DEBUG monitoring (runtime sampling) ● Enable platform tracing (e.g. X-ray, IOPipe, Dashbird) ● Automatically inject correlation IDs ● Anomaly detection Observability > Approach #1 > IT Ops Automation
  • 96. ● Invest in platform ● Structured + semantic logging is crucial ● Middleware to simplify and template out specific shaped functions Summary Observability > Summary
  • 98. Summary 98 Summary Problems ● Microservices + architecture has evolved ● ...and so must the pyramid! ● More diverse integrations ● More glue, cloud-native code We’re all digital plumbers!
  • 99. ● Use Ports + Adapters (Hexagonal architecture) to increase modularity ● Enable better testability and test modularity ● Mock SDK for local tests ● Component tests can help to reduce need for e2e tests There is no single test strategy that will work for all cases! Structure... Summary > Structure
  • 100. ● Contract tests are faster and more reliable than E2E tests ● Use them to reduce your E2E footprint ● Contract tests enable independent deployment ● They are not functional tests Never forget forget the end user! Reduce E2E... Summary > Reduce reliance on E2E
  • 101. ● Is the property of understanding a system as illuminated by its outputs ● Allows us to ask questions ● Helps us discover and respond to unknown, unknowns It’s not monitoring, but there is significant implementation overlap. Observability... Summary > Observability