Successful strategies for Microservices Architecture Testing by Sundaresan Krishnaswami and Felicia Kartika

Agile Testing Alliance
Agile Testing AllianceAgile Testing Alliance
SUCCESSFUL
STRATEGIES FOR
MICRO SERVICES
TESTING - AN ECOMMERCE
Sundaresan Krishnaswami
Felicia Kartika
Agile Testing Alliance Bangalore 13th
Meetup
KEY
TAKEAWA
YS
- Brief intro Monolithic and Micro-service
architecture
- Analyze challenges in micro-services testing
- Agile solutions to tackle challenges
MONOLITHIC VS
MICRO SERVICES
THE
MONOLITHS
- Architecture – all in one
 UI
 Business Logic
 Database
- Single war file
 Easy to deploy
 Easy to scale
THE
MONOLITHS
(CONTD…)
Culture
 One Team Manages it all
 Easy to communicate
within team
 Single codebase
 Developers know most of
their codebase
THE MONOLITHS
(DRAWBACKS)
Huge codebase
Debugging is tricky for new comers
Overloaded container
Entire container brought down for
deployments
Moving to latest technologies is almost
impossible
Limited innovation
MONOLITHS VS MICRO
SERVICES
THE MICRO SERVICES
THE MICRO
SERVICES
(CONTD…)
- Each function in its own container
- Many technology stacks
- Talks a common protocol – often
REST APIs
- Services deployed independently
- Issues in one service need not
affect the other
- Limited performance impact
- Scope for innovation
- Autonomy for the team
COMPANIES EMBRACING
MICRO SERVICES
THE MICRO
SERVICES
(DRAWBACKS)
- Tackling distributed systems
- Deployment complexity
- Maintaining data consistency between
services
- Tackling communication between teams
- Strategize decoupling or decompose
services
- Culture driven
TESTING
CHALLENGES
MICRO SERVICES GROWTH
A
B
C
D
E
F G
H
I
J K
L
M
N
O
TESTING CHALLENGES
NO TIME
NO RESOURCE
DEADLINE
TESTING
CHALLENGES
- Strategy to cover all layers
TESTING
CHALLENGE
S
Complete coverage
Coverage across services
Coverage around
interaction points
Non-functional coverage
Dependent on other
teams
STRATEGIES
TEAM MGMT
Product
Manager
UX Developer
Quality
Assurance
DB Admin
Team 1
Team 2
KNOWLEDGE SHARING
PERFORMANCE TESTING
Non
functional
Testing
Integration
Test
Component Test
Unit Test
Click to add text
THE TESTING PYRAMID
UNIT TEST
Non
functional
Testing
Integration
Test
Component Test
Unit Test
RED [Fail]
• Write a test
that fails
GREEN
[Pass]
• Make the
code work
REFACTOR
• Improve
code quality
TDD Approach
UNIT TEST BEST PRACTICES
Write unit tests for all sociable
business logic
Cover all states - the application
transitions
Cover all interactions and
collaborations with other services
RECOMMENDED TOOLS
COMPONENT TEST
Non
functional
Testing
Integration
Test
Component Test
Unit Test
AUTOMATE THE COMPONENT
TEST
Product
Service
Cart
Service
Payment
Service
Order
Service
e-commerce
RECOMMENDED TOOLS
CONTRACT TESTING
Non
functional
Testing
Integration
Test
Component Test
Unit Test
UI contract
Mockup
Giving Unique ID for automation
API Contract
Request Body
Response Body
CONTRACT TESTING
INTEGRATION TEST
Non
functional
Testing
Integration
Test
Component Test
Unit Test
VERIFY ALL THE
COMPONENT COMMUNICATE
WELL
VERIFY ALL THE
COMPONENT COMMUNICATE
WELL
Product
Service
Cart Service
Payment
Service
Order Service
E-commerce
TOOLS WE USE
THE BDD APPROACH
A common language across
stakeholders – Gherkin
Enables all stake holders to read
and be on the same page
Uses the fail, pass, refactor
approach
Helps implement automation
early in the release
 A story narrative
Customer orders a handphone
As a customer
I want to buy a handphone so that I
don't have to buy from offline store
 Given, When, Then Scenarios
Given that I can add a handphone to
cart
When the item is available in stock
Then I should be able to pay and
complete the order
NON FUNCTIONAL
TESTING
Non
functional
Testing
Integration
Test
Component Test
Unit Test
NON FUNCTIONAL TESTING
UI Testing
Performance Testing
Load Testing
Compatibility Testing
others
TOOLS WE USE
MANUAL TESTING
STRATEGY
MANUAL
TESTING
STRATEG
Y
Understand all the requirement
Join the sprint planning, meeting, standup meeting
Have a blitz meeting with PM, Dev, QA (cross
services)
Conduct blitz testing among QA teams
Discuss when you found a hole in the system
IN CONCLUSION
Microservices is the future
Embrace the challenges
Keep essential documentation
Embrace automation early
Identify the right tools
Don't spend too much time on
identifying tools :)
Successful strategies for Microservices Architecture Testing by Sundaresan Krishnaswami and Felicia Kartika
1 of 43

More Related Content

Similar to Successful strategies for Microservices Architecture Testing by Sundaresan Krishnaswami and Felicia Kartika

Similar to Successful strategies for Microservices Architecture Testing by Sundaresan Krishnaswami and Felicia Kartika(20)

More from Agile Testing Alliance(20)

Parallel Test execution in Cypress with CI/CDParallel Test execution in Cypress with CI/CD
Parallel Test execution in Cypress with CI/CD
Agile Testing Alliance6 views
Localisation Testing using UI automationLocalisation Testing using UI automation
Localisation Testing using UI automation
Agile Testing Alliance8 views
AI in UI automation using HeleniumAI in UI automation using Helenium
AI in UI automation using Helenium
Agile Testing Alliance10 views
Automation for test data anonymizationAutomation for test data anonymization
Automation for test data anonymization
Agile Testing Alliance6 views
MobSF: Mobile Security Testing (Android/IoS)MobSF: Mobile Security Testing (Android/IoS)
MobSF: Mobile Security Testing (Android/IoS)
Agile Testing Alliance34 views
Web Application Security TestingWeb Application Security Testing
Web Application Security Testing
Agile Testing Alliance13 views
Significance of AI in TestingSignificance of AI in Testing
Significance of AI in Testing
Agile Testing Alliance14 views
Accessibility Testing.pptxAccessibility Testing.pptx
Accessibility Testing.pptx
Agile Testing Alliance12 views

Recently uploaded(20)

Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdf
gdsczhcet48 views
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation23 views
ThroughputThroughput
Throughput
Moisés Armani Ramírez28 views
Java Platform Approach 1.0 - Picnic MeetupJava Platform Approach 1.0 - Picnic Meetup
Java Platform Approach 1.0 - Picnic Meetup
Rick Ossendrijver23 views

Successful strategies for Microservices Architecture Testing by Sundaresan Krishnaswami and Felicia Kartika