SlideShare a Scribd company logo
Break Up the Monolith: Testing
Microservices
February 22nd, 2019
What to take away
2
● Understand the phases of microservice
implementation
● Insight into the decisions being made
● Where you fit in (primarily as QA)
● Actions you can take during the various phases
● Your responsibility to the org—and your users
@mmerrell
DECISIONS & PLANNING
What is my responsibility during planning?
4@mmerrell
● Sit in the meetings
● Be a part of the plan
● Understand the decisions
● Educate yourself about the stack
● Establish rapport with everyone
● (you should already be doing this, btw)
● How is testing different in a microservice?
○ Data modeling/creation
○ Mocking
○ Performance
○ Contracts
To rewrite, or
not to rewrite?
5@mmerrell
...the single worst strategic
mistake...
6https://bit.ly/2iF64Qm @mmerrell
—Joel Spolsky
7https://bit.ly/2MFDQke @mmerrell
8
QUESTIONS
It is your responsibility...
10
● To ask questions
● To push for testability
● To think about system interactions
● To consider “how to release”
The org won’t automatically know these things. You are
the experts, and the org is counting on you!
@mmerrell
Is it better as a microservice?
11@mmerrell
12
Aren’t Microservices Always Better?
Monolith
● Pros
○ It was already working
○ Unified tech stack
○ Unified developer/tester
ergonomics
● Cons
○ Harder to fix bugs
○ Hard to make big changes
Microservices
● Pros
○ Developers in different areas
can use the best tool for them
○ Release independently
● Cons
○ Hard to coordinate multi-system
releases
○ Teams get disconnected
@mmerrell
Is it Testable?
13@mmerrell
Testability
14@mmerrell
● Can you test it? Are there “hooks” in the code for you?
● Do you have access to the code?
● Can endpoints be added for testability?
● How are the unit tests?
● Basic Authentication in lower environments?
● Are there 3rd party tools/vendors involved?
Is the contract published?
15@mmerrell
16@mmerrell
17@mmerrell
Are the
endpoints
versioned?
18@mmerrell
Versioned endpoints pin your
users to a version of the contract...
19
...allowing you to minimize
unintentional breakage
@mmerrell
Version
20@mmerrell
Your
21@mmerrell
Endpoints
22@mmerrell
http://yourdomain.io/v2/accounts/create
23@mmerrell
Are you using
feature flags?
24@mmerrell
Feature flags allow you to release to
production in an “off” state
25@mmerrell
Use
26@mmerrell
Feature
27@mmerrell
Flags
28@mmerrell
29
Are your processes
asynchronous?
30@mmerrell
Understand
31@mmerrell
Synchronicity
32@mmerrell
33
https://bit.ly/2K94FzF
@mmerrell
How’s that pyramid lookin’? 34@mmerrell
What should it look like? 35@mmerrell
DEVELOPMENT
What is my responsibility during development?
37
● Hold Product/Eng accountable for the previous questions
● Identify risks as they arise
● Set expectations
● Identify in-flows/out-flows of data
● Mock API calls to other microservices
@mmerrell
What is my responsibility during development?
38
● Oh yeah, TEST!
● Test to the contracts
● Understand the unit/integration testing devs are doing
● Understand, assist with or create CI builds
● Ideally, automate tickets as you verify
● Always think about & communicate risks!
@mmerrell
Normal activities, different in Microservice-land
39
● Data generation
● Mocking
● Sharing with other teams
● Other teams depend on you and your dates
● Help them understand what can be done in parallel
@mmerrell
Test Data Generation & Mocking
40
● You will need to generate data for testing
● You should provide tooling for other teams to do the same
with your system
● Integration testing might require Mocking other services
● Mock based on Swagger docs
● Test against dedicated environments (ideally)
@mmerrell
DEPLOYMENT/RELEASE
What is my responsibility during release?
42
YOU ARE THE CRITICAL PATH
@mmerrell
What is my responsibility during release?
43
Specifically, though:
● Understand the upstream/downstream changes
● Ensure new contracts are published
● Communicate changes
● Understand/communicate feature flags to be flipped, in
sequence, and when
@mmerrell
Definition of Done
44
● Give input into the Definition of Done
● Ideally this comes from Product
● If DoD isn’t being written, YOU SHOULD WRITE IT
● Test plans feed directly into the DoD
● DoD defines user/product state, NOT dev state
@mmerrell
Definition of Done - Examples
45
Bad Example
“At the end of this milestone, all tickets
will be in Pending Release, test plans
will be executed and passing, and
stakeholders will be alerted as to the
release date. No outstanding bugs at
Sev2 or above.”
Good Example
“At the end of this milestone, all users
will use the new security procedure for
login and password creation. Legacy
data will still be allowed to flow for older
OS versions until legacy traffic falls
below defined threshold of 0.5%.”
@mmerrell
Definition of Done - Examples
46
Bad Example
“At the end of this milestone, all tickets
will be in Pending Release, test plans
will be executed and passing, and
stakeholders will be alerted as to the
release date. No outstanding bugs at
Sev2 or above.”
Good Example
“At the end of this milestone, all users
will use the new security procedure for
login and password creation. Legacy
data will still be allowed to flow for older
OS versions until legacy traffic falls
below defined threshold of 0.5%.”
@mmerrell
This is why QA is seen as a “bottleneck”
47
● Because we don’t stay engaged from the beginning
● Because we wait for features to be handed to us
● Because management doesn’t understand our value-
prop—they just know “it has to be tested”
● “What is taking so long??”
● If we’re involved the whole time, there’s no mystery
@mmerrell
Story time!
48
(but first, some terms)
@mmerrell
49
PII - Personally Identifiable Information
https://bit.ly/2KgjUpN @mmerrell
50
JWT - Javascript Web Token
https://jwt.io @mmerrell
51
GraphQL
https://graphql.org/ @mmerrell
52
And now, a Monolith
(Not to scale)
53
...Microserviced
54
In the before time
● We didn’t store PII
● We didn’t need super-strong security
● 8-digit hashed tokens (e.g. user=8cba496e)
● Email Address only
● Pre-GDPR
@mmerrell
55
Introducing JWTs!
56
The initial plan
57
The “screenplay”
58
Milestone Sequence—Scene 1
@mmerrell
59
Milestone Sequence—Scene 2, DoD
@mmerrell
60
What did we learn?
Risk Mitigation
● Rollbacks for every step
● Figure out stopping points
● Consider external departments
● Get “head nod” from EVERYONE
● Test until it’s BORING
● Sunset plan for legacy services
● Measure, measure, measure
● Don’t include development
timelines
● Have a meaningful retrospective
● Maybe have multiple
Assume Nothing
@mmerrell
61
So how did we do?
● 13 services
● 9 scheduled run-throughs
● 8 teams
● Over 200,000 logins per day
● Zero reported defects during week of
release
@mmerrell
62
More conclusions
● I lobbied for this to be my full-time job
● I was told, “we should never have to do
this again”
● They were right about “should”
● But it kept happening
It will keep happening
@mmerrell
CONCLUSIONS
64
Conclusions
● This is a pendulum, not a gate
● Expect more changes to “conventional wisdom”
● It is possible, even likely, that your org will over-
do it
● You have a unique opportunity to guide this
conversation
@mmerrell
65
Conclusions
● As testers, we hold this transition in our hands
● QA is no longer a single-function discipline
(it never really was)
● This is where we become thought-leaders, not
just reactive test-bots
@mmerrell
QUESTIONS?
67
More links and resources
● https://martinfowler.com/articles/break-monolith-into-microservices.html
@mmerrell

More Related Content

Similar to Break up the Monolith: Testing Microservices

Top Tips Every Notes Developer Needs To Know
Top Tips Every Notes Developer Needs To KnowTop Tips Every Notes Developer Needs To Know
Top Tips Every Notes Developer Needs To Know
Kathy Brown
 
Agile contract for working software
Agile contract for working softwareAgile contract for working software
Agile contract for working software
Joshua Lai
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
Viktor Turskyi
 
The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор Турский
Sigma Software
 
How to be your Security Team's Best Friend
How to be your Security Team's Best FriendHow to be your Security Team's Best Friend
How to be your Security Team's Best Friend
EmilyGladstoneCole
 
TomaszPoszytek_ALM-Fundamentals_SS2023.pdf
TomaszPoszytek_ALM-Fundamentals_SS2023.pdfTomaszPoszytek_ALM-Fundamentals_SS2023.pdf
TomaszPoszytek_ALM-Fundamentals_SS2023.pdf
Tomasz Poszytek
 
QCon SF 2017 - Microservices: Service-Oriented Development
QCon SF 2017 - Microservices: Service-Oriented DevelopmentQCon SF 2017 - Microservices: Service-Oriented Development
QCon SF 2017 - Microservices: Service-Oriented Development
Ambassador Labs
 
Why more than half of ML models don't make it to production
Why more than half of ML models don't make it to productionWhy more than half of ML models don't make it to production
Why more than half of ML models don't make it to production
cnvrg.io AI OS - Hands-on ML Workshops
 
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy Code
Andrea Polci
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
Fwdays
 
Building A Machine Learning Platform At Quora (1)
Building A Machine Learning Platform At Quora (1)Building A Machine Learning Platform At Quora (1)
Building A Machine Learning Platform At Quora (1)
Nikhil Garg
 
Nikhil Garg, Engineering Manager, Quora at MLconf SF 2016
Nikhil Garg, Engineering Manager, Quora at MLconf SF 2016Nikhil Garg, Engineering Manager, Quora at MLconf SF 2016
Nikhil Garg, Engineering Manager, Quora at MLconf SF 2016
MLconf
 
Sydney mule soft meetup 30 april 2020
Sydney mule soft meetup   30 april 2020Sydney mule soft meetup   30 april 2020
Sydney mule soft meetup 30 april 2020
Royston Lobo
 
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to MicroservicesLessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
VMware Tanzu
 
Stop Sucking at Building Stuff!
Stop Sucking at Building Stuff!Stop Sucking at Building Stuff!
Stop Sucking at Building Stuff!
Puppet
 
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Marcin Grzejszczak
 
Creando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUGCreando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUG
César Hernández
 
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
DevSecCon
 
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
Applitools
 
A Tester's Life
A Tester's LifeA Tester's Life
A Tester's Life
Bertold Kolics
 

Similar to Break up the Monolith: Testing Microservices (20)

Top Tips Every Notes Developer Needs To Know
Top Tips Every Notes Developer Needs To KnowTop Tips Every Notes Developer Needs To Know
Top Tips Every Notes Developer Needs To Know
 
Agile contract for working software
Agile contract for working softwareAgile contract for working software
Agile contract for working software
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
 
The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор Турский
 
How to be your Security Team's Best Friend
How to be your Security Team's Best FriendHow to be your Security Team's Best Friend
How to be your Security Team's Best Friend
 
TomaszPoszytek_ALM-Fundamentals_SS2023.pdf
TomaszPoszytek_ALM-Fundamentals_SS2023.pdfTomaszPoszytek_ALM-Fundamentals_SS2023.pdf
TomaszPoszytek_ALM-Fundamentals_SS2023.pdf
 
QCon SF 2017 - Microservices: Service-Oriented Development
QCon SF 2017 - Microservices: Service-Oriented DevelopmentQCon SF 2017 - Microservices: Service-Oriented Development
QCon SF 2017 - Microservices: Service-Oriented Development
 
Why more than half of ML models don't make it to production
Why more than half of ML models don't make it to productionWhy more than half of ML models don't make it to production
Why more than half of ML models don't make it to production
 
Working With Legacy Code
Working With Legacy CodeWorking With Legacy Code
Working With Legacy Code
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
 
Building A Machine Learning Platform At Quora (1)
Building A Machine Learning Platform At Quora (1)Building A Machine Learning Platform At Quora (1)
Building A Machine Learning Platform At Quora (1)
 
Nikhil Garg, Engineering Manager, Quora at MLconf SF 2016
Nikhil Garg, Engineering Manager, Quora at MLconf SF 2016Nikhil Garg, Engineering Manager, Quora at MLconf SF 2016
Nikhil Garg, Engineering Manager, Quora at MLconf SF 2016
 
Sydney mule soft meetup 30 april 2020
Sydney mule soft meetup   30 april 2020Sydney mule soft meetup   30 april 2020
Sydney mule soft meetup 30 april 2020
 
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to MicroservicesLessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
 
Stop Sucking at Building Stuff!
Stop Sucking at Building Stuff!Stop Sucking at Building Stuff!
Stop Sucking at Building Stuff!
 
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
Continuous Deployment To The Cloud With Spring Cloud Pipelines @WarsawCloudNa...
 
Creando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUGCreando microservicios con Java y Microprofile - Nicaragua JUG
Creando microservicios con Java y Microprofile - Nicaragua JUG
 
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
 
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
 
A Tester's Life
A Tester's LifeA Tester's Life
A Tester's Life
 

More from Marcus Merrell

How, why, and the roi kcdc '21
How, why, and the roi  kcdc '21How, why, and the roi  kcdc '21
How, why, and the roi kcdc '21
Marcus Merrell
 
SeleniumCamp 2020 - Shift Right and Observability
SeleniumCamp 2020 - Shift Right and ObservabilitySeleniumCamp 2020 - Shift Right and Observability
SeleniumCamp 2020 - Shift Right and Observability
Marcus Merrell
 
Selenium 4 ukraine keynote slides
Selenium 4 ukraine keynote   slidesSelenium 4 ukraine keynote   slides
Selenium 4 ukraine keynote slides
Marcus Merrell
 
Grading the Quality of Selenium Tests
Grading the Quality of Selenium TestsGrading the Quality of Selenium Tests
Grading the Quality of Selenium Tests
Marcus Merrell
 
Selenium grid workshop london 2016
Selenium grid workshop london 2016Selenium grid workshop london 2016
Selenium grid workshop london 2016
Marcus Merrell
 
User Analytics Testing - SeleniumCamp 2015
User Analytics Testing - SeleniumCamp 2015User Analytics Testing - SeleniumCamp 2015
User Analytics Testing - SeleniumCamp 2015
Marcus Merrell
 

More from Marcus Merrell (6)

How, why, and the roi kcdc '21
How, why, and the roi  kcdc '21How, why, and the roi  kcdc '21
How, why, and the roi kcdc '21
 
SeleniumCamp 2020 - Shift Right and Observability
SeleniumCamp 2020 - Shift Right and ObservabilitySeleniumCamp 2020 - Shift Right and Observability
SeleniumCamp 2020 - Shift Right and Observability
 
Selenium 4 ukraine keynote slides
Selenium 4 ukraine keynote   slidesSelenium 4 ukraine keynote   slides
Selenium 4 ukraine keynote slides
 
Grading the Quality of Selenium Tests
Grading the Quality of Selenium TestsGrading the Quality of Selenium Tests
Grading the Quality of Selenium Tests
 
Selenium grid workshop london 2016
Selenium grid workshop london 2016Selenium grid workshop london 2016
Selenium grid workshop london 2016
 
User Analytics Testing - SeleniumCamp 2015
User Analytics Testing - SeleniumCamp 2015User Analytics Testing - SeleniumCamp 2015
User Analytics Testing - SeleniumCamp 2015
 

Recently uploaded

Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
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
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 

Recently uploaded (20)

Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
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
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 

Break up the Monolith: Testing Microservices

  • 1. Break Up the Monolith: Testing Microservices February 22nd, 2019
  • 2. What to take away 2 ● Understand the phases of microservice implementation ● Insight into the decisions being made ● Where you fit in (primarily as QA) ● Actions you can take during the various phases ● Your responsibility to the org—and your users @mmerrell
  • 4. What is my responsibility during planning? 4@mmerrell ● Sit in the meetings ● Be a part of the plan ● Understand the decisions ● Educate yourself about the stack ● Establish rapport with everyone ● (you should already be doing this, btw) ● How is testing different in a microservice? ○ Data modeling/creation ○ Mocking ○ Performance ○ Contracts
  • 5. To rewrite, or not to rewrite? 5@mmerrell
  • 6. ...the single worst strategic mistake... 6https://bit.ly/2iF64Qm @mmerrell —Joel Spolsky
  • 8. 8
  • 10. It is your responsibility... 10 ● To ask questions ● To push for testability ● To think about system interactions ● To consider “how to release” The org won’t automatically know these things. You are the experts, and the org is counting on you! @mmerrell
  • 11. Is it better as a microservice? 11@mmerrell
  • 12. 12 Aren’t Microservices Always Better? Monolith ● Pros ○ It was already working ○ Unified tech stack ○ Unified developer/tester ergonomics ● Cons ○ Harder to fix bugs ○ Hard to make big changes Microservices ● Pros ○ Developers in different areas can use the best tool for them ○ Release independently ● Cons ○ Hard to coordinate multi-system releases ○ Teams get disconnected @mmerrell
  • 14. Testability 14@mmerrell ● Can you test it? Are there “hooks” in the code for you? ● Do you have access to the code? ● Can endpoints be added for testability? ● How are the unit tests? ● Basic Authentication in lower environments? ● Are there 3rd party tools/vendors involved?
  • 15. Is the contract published? 15@mmerrell
  • 19. Versioned endpoints pin your users to a version of the contract... 19 ...allowing you to minimize unintentional breakage @mmerrell
  • 24. Are you using feature flags? 24@mmerrell
  • 25. Feature flags allow you to release to production in an “off” state 25@mmerrell
  • 29. 29
  • 34. How’s that pyramid lookin’? 34@mmerrell
  • 35. What should it look like? 35@mmerrell
  • 37. What is my responsibility during development? 37 ● Hold Product/Eng accountable for the previous questions ● Identify risks as they arise ● Set expectations ● Identify in-flows/out-flows of data ● Mock API calls to other microservices @mmerrell
  • 38. What is my responsibility during development? 38 ● Oh yeah, TEST! ● Test to the contracts ● Understand the unit/integration testing devs are doing ● Understand, assist with or create CI builds ● Ideally, automate tickets as you verify ● Always think about & communicate risks! @mmerrell
  • 39. Normal activities, different in Microservice-land 39 ● Data generation ● Mocking ● Sharing with other teams ● Other teams depend on you and your dates ● Help them understand what can be done in parallel @mmerrell
  • 40. Test Data Generation & Mocking 40 ● You will need to generate data for testing ● You should provide tooling for other teams to do the same with your system ● Integration testing might require Mocking other services ● Mock based on Swagger docs ● Test against dedicated environments (ideally) @mmerrell
  • 42. What is my responsibility during release? 42 YOU ARE THE CRITICAL PATH @mmerrell
  • 43. What is my responsibility during release? 43 Specifically, though: ● Understand the upstream/downstream changes ● Ensure new contracts are published ● Communicate changes ● Understand/communicate feature flags to be flipped, in sequence, and when @mmerrell
  • 44. Definition of Done 44 ● Give input into the Definition of Done ● Ideally this comes from Product ● If DoD isn’t being written, YOU SHOULD WRITE IT ● Test plans feed directly into the DoD ● DoD defines user/product state, NOT dev state @mmerrell
  • 45. Definition of Done - Examples 45 Bad Example “At the end of this milestone, all tickets will be in Pending Release, test plans will be executed and passing, and stakeholders will be alerted as to the release date. No outstanding bugs at Sev2 or above.” Good Example “At the end of this milestone, all users will use the new security procedure for login and password creation. Legacy data will still be allowed to flow for older OS versions until legacy traffic falls below defined threshold of 0.5%.” @mmerrell
  • 46. Definition of Done - Examples 46 Bad Example “At the end of this milestone, all tickets will be in Pending Release, test plans will be executed and passing, and stakeholders will be alerted as to the release date. No outstanding bugs at Sev2 or above.” Good Example “At the end of this milestone, all users will use the new security procedure for login and password creation. Legacy data will still be allowed to flow for older OS versions until legacy traffic falls below defined threshold of 0.5%.” @mmerrell
  • 47. This is why QA is seen as a “bottleneck” 47 ● Because we don’t stay engaged from the beginning ● Because we wait for features to be handed to us ● Because management doesn’t understand our value- prop—they just know “it has to be tested” ● “What is taking so long??” ● If we’re involved the whole time, there’s no mystery @mmerrell
  • 48. Story time! 48 (but first, some terms) @mmerrell
  • 49. 49 PII - Personally Identifiable Information https://bit.ly/2KgjUpN @mmerrell
  • 50. 50 JWT - Javascript Web Token https://jwt.io @mmerrell
  • 52. 52 And now, a Monolith (Not to scale)
  • 54. 54 In the before time ● We didn’t store PII ● We didn’t need super-strong security ● 8-digit hashed tokens (e.g. user=8cba496e) ● Email Address only ● Pre-GDPR @mmerrell
  • 60. 60 What did we learn? Risk Mitigation ● Rollbacks for every step ● Figure out stopping points ● Consider external departments ● Get “head nod” from EVERYONE ● Test until it’s BORING ● Sunset plan for legacy services ● Measure, measure, measure ● Don’t include development timelines ● Have a meaningful retrospective ● Maybe have multiple Assume Nothing @mmerrell
  • 61. 61 So how did we do? ● 13 services ● 9 scheduled run-throughs ● 8 teams ● Over 200,000 logins per day ● Zero reported defects during week of release @mmerrell
  • 62. 62 More conclusions ● I lobbied for this to be my full-time job ● I was told, “we should never have to do this again” ● They were right about “should” ● But it kept happening It will keep happening @mmerrell
  • 64. 64 Conclusions ● This is a pendulum, not a gate ● Expect more changes to “conventional wisdom” ● It is possible, even likely, that your org will over- do it ● You have a unique opportunity to guide this conversation @mmerrell
  • 65. 65 Conclusions ● As testers, we hold this transition in our hands ● QA is no longer a single-function discipline (it never really was) ● This is where we become thought-leaders, not just reactive test-bots @mmerrell
  • 67. 67 More links and resources ● https://martinfowler.com/articles/break-monolith-into-microservices.html @mmerrell