SlideShare a Scribd company logo
1 of 13
Download to read offline
Microservices
Testing Strategy
Rajni Singh,
Manager, Quality Assurance
What are
Microservices?
Micro-services is an
architecture
consisting of focused,
small services that
together create a
complete application
or task.
Every instance of a microservice
represents a single responsibility
within the solution.
Key features of
microservices architecture:
• Self-contained and
componentized
• Decentralized data
management
• Resilient to failures
• Built around a single
business need
• Reasonably small
micros
Important testing scenarios
A good use case of a microservices architecture would
include the following scenarios:
1. The system is too big and complex that it becomes
difficult to manage.
2. The system is expected to handle high traffic & load
and needs to be scalable.
3. Testing between internal microservices and a third-
party services.
4. Testing for microservices which needs to be exposed
to the public domain.
Challenges in testing microservices
• Timely availability of all the services for testing.
• Complicated extraction of logs during testing and data validation.
• Identifying the scope of testing at each service level and
integration testing as each component operate on separate
services and rely on each other to cover their module and
integration with an external service.
• The availability of testing environment considering the
development strategy is agile.
• Distributed and independent nature of a microservice
architecture results in the isolation of each component of the
architecture from the rest. Thus it needs individual testing and
cover all independent services.
• Monitoring multiple log files, databases, and servers increases
the complexity of tracking down issues or verifying processes.
Microservices testing strategy
Bottom-up testing approach is an optimized solution
which includes:
• Test the domain
• Tests closer to the code
• Integrate Early
• Use Mocks / Stubs
• Focus is on Test Pyramid
• Helps visualize/categorize test coverage
better
Microservices
testing types
UI testing
Integration testing
End to end testing
Contract testing
Unit testing
Exploratory testing
Scopeoftesting
Executiontime
Number of tests
• Focuses on one unit (class/module) of a domain
• Verifies functionality of one unit
• White box & API testing
Unit testing helps us in the following
ways:
• Isolates the logic in places where
setting-up all the cases and covering
edge scenarios is much easier than at a
service level.
• Internal dependencies are stubbed and
mocked.
• Non-functional requirements such as
end-user authentication, throttling,
monitoring, etc. are implemented at
each and every microservice level.
Unit testing
A1
G3
X1 Z2
D1
C3
A9 D6
B4 D7
B1 X2
Individual
module/Class
testing
• Individual microservice signatures (end points) are the focus with other services that will consume the service under test.
• Test doubles (mocks) are used to simulate the behavior of consumer microservices.
• One end-point at a time is tested.
• Each service is treated as a black box.
• Tests are end-to-end within the bounds of the service.
• Assertion are on response e.g. JSON body.
Contract testing helps:
• Stub-out dependencies.
• Ensure defect identification within
workflows.
• Identify defect for each service in isolation.
• Decrease complexity to test individual
services.
• Stabilize services and providers.
• Set-up test data easily.
• Get instant feedback on individual service.
• Identify unused interface at initial level.
Contract testing
Mock Authentication
Service
Mock Catalog
Service
Mock Payment
Service
Mock Fulfilment
Service
Cart Service
POST /cart/{:product_id}
HTTP Request
JSON
HTTP Response
Test Client
• An integration test verifies the communication paths and interactions between components to detect interface defects. This
is a critical part of testing a microservices for proper inter-service communication.
• Integration testing is done with data stores and external components.
Integration Testing Helps
• Inter-service communication issues.
• Provide additional coverage from unit and
contract testing for each integration point.
• Identify defsect for the following cases of
integration point:
o Integration with data stores
o Gateway Integration
o Inter-service/external component
integration
Integration testing
Resource
Domain
External
Client
ORM
Stubbed
Service
Data Store
• End-to-end testing verifies that the entire process flows correctly, including all services and DB integration.
• End-to-end testing is more business facing as system is deployed and treated as a black box.
• It verifies environment setup, configuration, firewall, proxies, load balancer are correctly configured as well.
End-to-end testing helps:
• Ensure complete correctness and
health of the application.
• Reduce future risk due to coverage
gap.
• Analyze user experience while
using end-to-end workflow and
various aspects of the application.
End-to-end testing
Authentication
Service
Catalog Service
Payment Service
Fulfilment Service
Cart Service
Place and order
Verify that the
order is placed
Mock Mastercard
Mock Logistics
• User interface testing is most important as it tests the system as an end-user and the end user input is random and very
erratic.
• All the databases, interfaces, internal and third-party services must work together seamlessly to get the expected results.
• This is done to verify and validate the user interface.
User Interface testing helps:
• Provide perspective of end user and
therefore can identify the hidden
issue which was not identified earlier
during functional testing.
• Compatibility with multiple browsers
and devices.
UI testing
UI
Cart Service
Authentication
Service
Payment Service
Fulfilment
Service
Mock Mastercard Mock Logistics
Tools to test
microservices
Tool Type of Testing Type of License
SOAP UI
API
Free open source version and Pro Version
Rest- Assured Open source
Postman Open source
SOAtest Open source
PRACT
Contract Testing Open source
PACTO
Janus
AppDynamics
Monitoring
Free 14-day Trial, then from $230 monthly.
TraceView $39.50/host/month
NewRelic Free plan, then from $149 per month.
Jmeter
Performance
testing
Open source
NeoLoad Licensed
Loadrunner Licensed
• Established best practices like the Test Pyramid
• Common tests across all Microservices can turn into a bottleneck, therefore
should be reduced, for example by performing more consumer-driven
contract tests.
• With suitable tools Stubs can be created from Microservices.
Conclusion
Nagarro drives technology-led business breakthroughs for industry leaders and challengers. When our
clients want to move fast and make things, they turn to us. Some of our clients include Siemens, GE,
Lufthansa, Viacom, Estēe Lauder, ASSA ABLOY, Ericsson, DHL, Mitsubishi, BMW, the City of New York, T-
Systems, SAP and Infor. Working with these clients, we continually push the boundaries of what is possible
to do through technology, and in what time frame.
Today, we are more than 5,000 experts across 20 countries. Together we form Nagarro, the global services
division of Munich-based Allgeier SE.

More Related Content

What's hot

Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architectureThe Software House
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To MicroservicesLalit Kale
 
Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitecturePaul Mooney
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 
A Pattern Language for Microservices
A Pattern Language for MicroservicesA Pattern Language for Microservices
A Pattern Language for MicroservicesChris Richardson
 
The Qa Testing Checklists for Successful Cloud Migration
The Qa Testing Checklists for Successful Cloud MigrationThe Qa Testing Checklists for Successful Cloud Migration
The Qa Testing Checklists for Successful Cloud MigrationTestingXperts
 
What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...Edureka!
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices Bozhidar Bozhanov
 
Micro services Architecture
Micro services ArchitectureMicro services Architecture
Micro services ArchitectureAraf Karsh Hamid
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREAraf Karsh Hamid
 
Microservices architecture overview v3
Microservices architecture overview v3Microservices architecture overview v3
Microservices architecture overview v3Dmitry Skaredov
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSAmazon Web Services
 
Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...Chris Richardson
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...Chris Richardson
 

What's hot (20)

Design patterns for microservice architecture
Design patterns for microservice architectureDesign patterns for microservice architecture
Design patterns for microservice architecture
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To Microservices
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic Architecture
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Serverless Architectures.pdf
Serverless Architectures.pdfServerless Architectures.pdf
Serverless Architectures.pdf
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
A Pattern Language for Microservices
A Pattern Language for MicroservicesA Pattern Language for Microservices
A Pattern Language for Microservices
 
The Qa Testing Checklists for Successful Cloud Migration
The Qa Testing Checklists for Successful Cloud MigrationThe Qa Testing Checklists for Successful Cloud Migration
The Qa Testing Checklists for Successful Cloud Migration
 
What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...
 
Why Microservice
Why Microservice Why Microservice
Why Microservice
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
 
Micro services Architecture
Micro services ArchitectureMicro services Architecture
Micro services Architecture
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
Microservices architecture overview v3
Microservices architecture overview v3Microservices architecture overview v3
Microservices architecture overview v3
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKS
 
Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...Kong Summit 2018 - Microservices: decomposing applications for testability an...
Kong Summit 2018 - Microservices: decomposing applications for testability an...
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...
 

Similar to Testing Microservices

Micro Service automation by Srijit Jain
Micro Service automation by Srijit JainMicro Service automation by Srijit Jain
Micro Service automation by Srijit JainSoftware Testing Board
 
Testing the Migration of Monolithic Applications to Microservices on the Cloud
Testing the Migration of Monolithic Applications to Microservices on the CloudTesting the Migration of Monolithic Applications to Microservices on the Cloud
Testing the Migration of Monolithic Applications to Microservices on the CloudNagarro
 
Whitepaper : Testing Micro Services Part I & Part 2
Whitepaper : Testing Micro Services Part I & Part 2Whitepaper : Testing Micro Services Part I & Part 2
Whitepaper : Testing Micro Services Part I & Part 2Newt Global Consulting LLC
 
Load and performance testing
Load and performance testingLoad and performance testing
Load and performance testingQualitest
 
Navigating the World of Microservices Testing.pdf
Navigating the World of Microservices Testing.pdfNavigating the World of Microservices Testing.pdf
Navigating the World of Microservices Testing.pdfAnanthReddy38
 
Testing microservices, contract testing
Testing microservices, contract testingTesting microservices, contract testing
Testing microservices, contract testingDaria Golub
 
Rethinking Test Automation: The Case for Moving Beyond the User Interface
Rethinking Test Automation: The Case for Moving Beyond the User InterfaceRethinking Test Automation: The Case for Moving Beyond the User Interface
Rethinking Test Automation: The Case for Moving Beyond the User InterfaceCognizant
 
Software Testing includes Performance testing with Load Runner and the JMeter
Software Testing includes Performance testing with Load Runner and the JMeter Software Testing includes Performance testing with Load Runner and the JMeter
Software Testing includes Performance testing with Load Runner and the JMeter Hima Bindu Kosuru
 
Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014Shelley Lambert
 
Ncerc rlmca202 adm m4 ssm
Ncerc rlmca202 adm m4 ssmNcerc rlmca202 adm m4 ssm
Ncerc rlmca202 adm m4 ssmssmarar
 
Cloud Testing by Suganya M
Cloud Testing by Suganya MCloud Testing by Suganya M
Cloud Testing by Suganya MForziatech
 
Experitest & Hexaware Co-Webinar
Experitest & Hexaware Co-WebinarExperitest & Hexaware Co-Webinar
Experitest & Hexaware Co-WebinarExperitest
 
Service Mesh Talk for CTO Forum
Service Mesh Talk for CTO ForumService Mesh Talk for CTO Forum
Service Mesh Talk for CTO ForumRick Hightower
 
Laravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and ToolsLaravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and ToolsMuhammad Shehata
 
Testing throughout the software life cycle - Testing & Implementation
Testing throughout the software life cycle - Testing & ImplementationTesting throughout the software life cycle - Testing & Implementation
Testing throughout the software life cycle - Testing & Implementationyogi syafrialdi
 
Chowdappa Resume
Chowdappa ResumeChowdappa Resume
Chowdappa Resumechowdappa o
 
Chowdappa Resume
Chowdappa ResumeChowdappa Resume
Chowdappa Resumechowdappa o
 

Similar to Testing Microservices (20)

Micro Service automation by Srijit Jain
Micro Service automation by Srijit JainMicro Service automation by Srijit Jain
Micro Service automation by Srijit Jain
 
Testing the Migration of Monolithic Applications to Microservices on the Cloud
Testing the Migration of Monolithic Applications to Microservices on the CloudTesting the Migration of Monolithic Applications to Microservices on the Cloud
Testing the Migration of Monolithic Applications to Microservices on the Cloud
 
Whitepaper : Testing Micro Services Part I & Part 2
Whitepaper : Testing Micro Services Part I & Part 2Whitepaper : Testing Micro Services Part I & Part 2
Whitepaper : Testing Micro Services Part I & Part 2
 
Load and performance testing
Load and performance testingLoad and performance testing
Load and performance testing
 
Navigating the World of Microservices Testing.pdf
Navigating the World of Microservices Testing.pdfNavigating the World of Microservices Testing.pdf
Navigating the World of Microservices Testing.pdf
 
Testing microservices, contract testing
Testing microservices, contract testingTesting microservices, contract testing
Testing microservices, contract testing
 
Rethinking Test Automation: The Case for Moving Beyond the User Interface
Rethinking Test Automation: The Case for Moving Beyond the User InterfaceRethinking Test Automation: The Case for Moving Beyond the User Interface
Rethinking Test Automation: The Case for Moving Beyond the User Interface
 
JMeter
JMeterJMeter
JMeter
 
Software Testing includes Performance testing with Load Runner and the JMeter
Software Testing includes Performance testing with Load Runner and the JMeter Software Testing includes Performance testing with Load Runner and the JMeter
Software Testing includes Performance testing with Load Runner and the JMeter
 
Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014
 
Ncerc rlmca202 adm m4 ssm
Ncerc rlmca202 adm m4 ssmNcerc rlmca202 adm m4 ssm
Ncerc rlmca202 adm m4 ssm
 
Cloud Testing by Suganya M
Cloud Testing by Suganya MCloud Testing by Suganya M
Cloud Testing by Suganya M
 
Madhav_Resume
Madhav_ResumeMadhav_Resume
Madhav_Resume
 
Experitest & Hexaware Co-Webinar
Experitest & Hexaware Co-WebinarExperitest & Hexaware Co-Webinar
Experitest & Hexaware Co-Webinar
 
Service Mesh Talk for CTO Forum
Service Mesh Talk for CTO ForumService Mesh Talk for CTO Forum
Service Mesh Talk for CTO Forum
 
Microservices-101
Microservices-101Microservices-101
Microservices-101
 
Laravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and ToolsLaravel Load Testing: Strategies and Tools
Laravel Load Testing: Strategies and Tools
 
Testing throughout the software life cycle - Testing & Implementation
Testing throughout the software life cycle - Testing & ImplementationTesting throughout the software life cycle - Testing & Implementation
Testing throughout the software life cycle - Testing & Implementation
 
Chowdappa Resume
Chowdappa ResumeChowdappa Resume
Chowdappa Resume
 
Chowdappa Resume
Chowdappa ResumeChowdappa Resume
Chowdappa Resume
 

More from Nagarro

Intelligent automation beyond test execution
Intelligent automation beyond test executionIntelligent automation beyond test execution
Intelligent automation beyond test executionNagarro
 
Flutter: An open-source UI software development kit
Flutter: An open-source UI software development kitFlutter: An open-source UI software development kit
Flutter: An open-source UI software development kitNagarro
 
Remote Collaboration: Working Canvas
Remote Collaboration: Working Canvas Remote Collaboration: Working Canvas
Remote Collaboration: Working Canvas Nagarro
 
Remote Collaboration: Working and Leading from Home
Remote Collaboration: Working and Leading from HomeRemote Collaboration: Working and Leading from Home
Remote Collaboration: Working and Leading from HomeNagarro
 
Chatbot testing
Chatbot testing Chatbot testing
Chatbot testing Nagarro
 
10 Gründe, warum Ihre Testautomatisierung zum Scheitern verurteilt ist
10 Gründe, warum Ihre Testautomatisierung zum Scheitern verurteilt ist 10 Gründe, warum Ihre Testautomatisierung zum Scheitern verurteilt ist
10 Gründe, warum Ihre Testautomatisierung zum Scheitern verurteilt ist Nagarro
 
Integrating AI in software quality in absence of a well-defined requirements
Integrating AI in software quality in absence of a well-defined requirementsIntegrating AI in software quality in absence of a well-defined requirements
Integrating AI in software quality in absence of a well-defined requirementsNagarro
 
Intelligent Digital Mesh Testing
Intelligent Digital Mesh TestingIntelligent Digital Mesh Testing
Intelligent Digital Mesh TestingNagarro
 
Software Quality without Testing
Software Quality without TestingSoftware Quality without Testing
Software Quality without TestingNagarro
 
Advanced Test Automation: Agile Model
Advanced Test Automation: Agile ModelAdvanced Test Automation: Agile Model
Advanced Test Automation: Agile ModelNagarro
 
Testing @ digital speed
 Testing @ digital speed Testing @ digital speed
Testing @ digital speedNagarro
 
How to get started? Digital Transformation: A Down-to-Earth Approach
How to get started? Digital Transformation: A Down-to-Earth ApproachHow to get started? Digital Transformation: A Down-to-Earth Approach
How to get started? Digital Transformation: A Down-to-Earth ApproachNagarro
 
Connecting the dots – Industrial IoT is more than just sensor deployment
Connecting the dots – Industrial IoT is more than just sensor deploymentConnecting the dots – Industrial IoT is more than just sensor deployment
Connecting the dots – Industrial IoT is more than just sensor deploymentNagarro
 
A walk through the AI Use Cases in the Connected Enterprise
A walk through the AI Use Cases in the Connected EnterpriseA walk through the AI Use Cases in the Connected Enterprise
A walk through the AI Use Cases in the Connected EnterpriseNagarro
 
Cloud-enabled analytics
Cloud-enabled analyticsCloud-enabled analytics
Cloud-enabled analyticsNagarro
 
Why Cloud Computing is mandatory for Connected Enterprise
Why Cloud Computing is mandatory for Connected EnterpriseWhy Cloud Computing is mandatory for Connected Enterprise
Why Cloud Computing is mandatory for Connected EnterpriseNagarro
 
Are Your Mobile Apps Secure? (Part I)
Are Your Mobile Apps Secure? (Part I)Are Your Mobile Apps Secure? (Part I)
Are Your Mobile Apps Secure? (Part I)Nagarro
 
Mobile Apps and Security Attacks: An Introduction
Mobile Apps and Security Attacks: An IntroductionMobile Apps and Security Attacks: An Introduction
Mobile Apps and Security Attacks: An IntroductionNagarro
 
Storytelling in Software Development
Storytelling in Software Development Storytelling in Software Development
Storytelling in Software Development Nagarro
 
End-to-End SharePoint Expertise
End-to-End SharePoint ExpertiseEnd-to-End SharePoint Expertise
End-to-End SharePoint ExpertiseNagarro
 

More from Nagarro (20)

Intelligent automation beyond test execution
Intelligent automation beyond test executionIntelligent automation beyond test execution
Intelligent automation beyond test execution
 
Flutter: An open-source UI software development kit
Flutter: An open-source UI software development kitFlutter: An open-source UI software development kit
Flutter: An open-source UI software development kit
 
Remote Collaboration: Working Canvas
Remote Collaboration: Working Canvas Remote Collaboration: Working Canvas
Remote Collaboration: Working Canvas
 
Remote Collaboration: Working and Leading from Home
Remote Collaboration: Working and Leading from HomeRemote Collaboration: Working and Leading from Home
Remote Collaboration: Working and Leading from Home
 
Chatbot testing
Chatbot testing Chatbot testing
Chatbot testing
 
10 Gründe, warum Ihre Testautomatisierung zum Scheitern verurteilt ist
10 Gründe, warum Ihre Testautomatisierung zum Scheitern verurteilt ist 10 Gründe, warum Ihre Testautomatisierung zum Scheitern verurteilt ist
10 Gründe, warum Ihre Testautomatisierung zum Scheitern verurteilt ist
 
Integrating AI in software quality in absence of a well-defined requirements
Integrating AI in software quality in absence of a well-defined requirementsIntegrating AI in software quality in absence of a well-defined requirements
Integrating AI in software quality in absence of a well-defined requirements
 
Intelligent Digital Mesh Testing
Intelligent Digital Mesh TestingIntelligent Digital Mesh Testing
Intelligent Digital Mesh Testing
 
Software Quality without Testing
Software Quality without TestingSoftware Quality without Testing
Software Quality without Testing
 
Advanced Test Automation: Agile Model
Advanced Test Automation: Agile ModelAdvanced Test Automation: Agile Model
Advanced Test Automation: Agile Model
 
Testing @ digital speed
 Testing @ digital speed Testing @ digital speed
Testing @ digital speed
 
How to get started? Digital Transformation: A Down-to-Earth Approach
How to get started? Digital Transformation: A Down-to-Earth ApproachHow to get started? Digital Transformation: A Down-to-Earth Approach
How to get started? Digital Transformation: A Down-to-Earth Approach
 
Connecting the dots – Industrial IoT is more than just sensor deployment
Connecting the dots – Industrial IoT is more than just sensor deploymentConnecting the dots – Industrial IoT is more than just sensor deployment
Connecting the dots – Industrial IoT is more than just sensor deployment
 
A walk through the AI Use Cases in the Connected Enterprise
A walk through the AI Use Cases in the Connected EnterpriseA walk through the AI Use Cases in the Connected Enterprise
A walk through the AI Use Cases in the Connected Enterprise
 
Cloud-enabled analytics
Cloud-enabled analyticsCloud-enabled analytics
Cloud-enabled analytics
 
Why Cloud Computing is mandatory for Connected Enterprise
Why Cloud Computing is mandatory for Connected EnterpriseWhy Cloud Computing is mandatory for Connected Enterprise
Why Cloud Computing is mandatory for Connected Enterprise
 
Are Your Mobile Apps Secure? (Part I)
Are Your Mobile Apps Secure? (Part I)Are Your Mobile Apps Secure? (Part I)
Are Your Mobile Apps Secure? (Part I)
 
Mobile Apps and Security Attacks: An Introduction
Mobile Apps and Security Attacks: An IntroductionMobile Apps and Security Attacks: An Introduction
Mobile Apps and Security Attacks: An Introduction
 
Storytelling in Software Development
Storytelling in Software Development Storytelling in Software Development
Storytelling in Software Development
 
End-to-End SharePoint Expertise
End-to-End SharePoint ExpertiseEnd-to-End SharePoint Expertise
End-to-End SharePoint Expertise
 

Recently uploaded

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Testing Microservices

  • 2. What are Microservices? Micro-services is an architecture consisting of focused, small services that together create a complete application or task. Every instance of a microservice represents a single responsibility within the solution. Key features of microservices architecture: • Self-contained and componentized • Decentralized data management • Resilient to failures • Built around a single business need • Reasonably small micros
  • 3. Important testing scenarios A good use case of a microservices architecture would include the following scenarios: 1. The system is too big and complex that it becomes difficult to manage. 2. The system is expected to handle high traffic & load and needs to be scalable. 3. Testing between internal microservices and a third- party services. 4. Testing for microservices which needs to be exposed to the public domain.
  • 4. Challenges in testing microservices • Timely availability of all the services for testing. • Complicated extraction of logs during testing and data validation. • Identifying the scope of testing at each service level and integration testing as each component operate on separate services and rely on each other to cover their module and integration with an external service. • The availability of testing environment considering the development strategy is agile. • Distributed and independent nature of a microservice architecture results in the isolation of each component of the architecture from the rest. Thus it needs individual testing and cover all independent services. • Monitoring multiple log files, databases, and servers increases the complexity of tracking down issues or verifying processes.
  • 5. Microservices testing strategy Bottom-up testing approach is an optimized solution which includes: • Test the domain • Tests closer to the code • Integrate Early • Use Mocks / Stubs • Focus is on Test Pyramid • Helps visualize/categorize test coverage better
  • 6. Microservices testing types UI testing Integration testing End to end testing Contract testing Unit testing Exploratory testing Scopeoftesting Executiontime Number of tests
  • 7. • Focuses on one unit (class/module) of a domain • Verifies functionality of one unit • White box & API testing Unit testing helps us in the following ways: • Isolates the logic in places where setting-up all the cases and covering edge scenarios is much easier than at a service level. • Internal dependencies are stubbed and mocked. • Non-functional requirements such as end-user authentication, throttling, monitoring, etc. are implemented at each and every microservice level. Unit testing A1 G3 X1 Z2 D1 C3 A9 D6 B4 D7 B1 X2 Individual module/Class testing
  • 8. • Individual microservice signatures (end points) are the focus with other services that will consume the service under test. • Test doubles (mocks) are used to simulate the behavior of consumer microservices. • One end-point at a time is tested. • Each service is treated as a black box. • Tests are end-to-end within the bounds of the service. • Assertion are on response e.g. JSON body. Contract testing helps: • Stub-out dependencies. • Ensure defect identification within workflows. • Identify defect for each service in isolation. • Decrease complexity to test individual services. • Stabilize services and providers. • Set-up test data easily. • Get instant feedback on individual service. • Identify unused interface at initial level. Contract testing Mock Authentication Service Mock Catalog Service Mock Payment Service Mock Fulfilment Service Cart Service POST /cart/{:product_id} HTTP Request JSON HTTP Response
  • 9. Test Client • An integration test verifies the communication paths and interactions between components to detect interface defects. This is a critical part of testing a microservices for proper inter-service communication. • Integration testing is done with data stores and external components. Integration Testing Helps • Inter-service communication issues. • Provide additional coverage from unit and contract testing for each integration point. • Identify defsect for the following cases of integration point: o Integration with data stores o Gateway Integration o Inter-service/external component integration Integration testing Resource Domain External Client ORM Stubbed Service Data Store
  • 10. • End-to-end testing verifies that the entire process flows correctly, including all services and DB integration. • End-to-end testing is more business facing as system is deployed and treated as a black box. • It verifies environment setup, configuration, firewall, proxies, load balancer are correctly configured as well. End-to-end testing helps: • Ensure complete correctness and health of the application. • Reduce future risk due to coverage gap. • Analyze user experience while using end-to-end workflow and various aspects of the application. End-to-end testing Authentication Service Catalog Service Payment Service Fulfilment Service Cart Service Place and order Verify that the order is placed Mock Mastercard Mock Logistics
  • 11. • User interface testing is most important as it tests the system as an end-user and the end user input is random and very erratic. • All the databases, interfaces, internal and third-party services must work together seamlessly to get the expected results. • This is done to verify and validate the user interface. User Interface testing helps: • Provide perspective of end user and therefore can identify the hidden issue which was not identified earlier during functional testing. • Compatibility with multiple browsers and devices. UI testing UI Cart Service Authentication Service Payment Service Fulfilment Service Mock Mastercard Mock Logistics
  • 12. Tools to test microservices Tool Type of Testing Type of License SOAP UI API Free open source version and Pro Version Rest- Assured Open source Postman Open source SOAtest Open source PRACT Contract Testing Open source PACTO Janus AppDynamics Monitoring Free 14-day Trial, then from $230 monthly. TraceView $39.50/host/month NewRelic Free plan, then from $149 per month. Jmeter Performance testing Open source NeoLoad Licensed Loadrunner Licensed
  • 13. • Established best practices like the Test Pyramid • Common tests across all Microservices can turn into a bottleneck, therefore should be reduced, for example by performing more consumer-driven contract tests. • With suitable tools Stubs can be created from Microservices. Conclusion Nagarro drives technology-led business breakthroughs for industry leaders and challengers. When our clients want to move fast and make things, they turn to us. Some of our clients include Siemens, GE, Lufthansa, Viacom, Estēe Lauder, ASSA ABLOY, Ericsson, DHL, Mitsubishi, BMW, the City of New York, T- Systems, SAP and Infor. Working with these clients, we continually push the boundaries of what is possible to do through technology, and in what time frame. Today, we are more than 5,000 experts across 20 countries. Together we form Nagarro, the global services division of Munich-based Allgeier SE.