SlideShare a Scribd company logo
1 of 30
Mocking and Monitoring
(for) your APIs
Hello!
I am Pricilla Bilavendran
I am here because, I love to talk about APIs and spreading API literacy
among Test engineers!!
2
We will discuss about
◈ Introduction to Mock Servers
◈ Mock Process
◈ Mocking types and tools
◈ Advantages of mocks
◈ Introduction to API Monitoring
◈ Why monitoring?
◈ Tools available
◈ Demo
3
What, When, Why and How?
1. “Mock” your APIs
4
5
Mockingbird
When we talk about Mocks
Mock Objects
In OOPS, mock object is
a simulated object
6
Mock Testing
With the help of mock
objects, simulation is
done for the integration
testing of the individual
components
Is mocking good or bad?
😉
Ofcourse, it is bad with
people and unacceptable.
But it’s good for your API
testing process.
7
8
What is a Mock Server?
◈ Simulate real server
◈ Not real server (call is fake)
◈ Gives the mocked response
How does it work?
Finalize your
expected
response
Configure
your Mock
Server
Server sends
the same
response
9
Types of Mock Servers
10
Public
◈ Accessible to everyone
◈ No Auth required
Private
◈ Only to the intended
user and requires
authentication
◈ Sensitive data
When to use Mock Servers?
◈ New APIs feedback before real development
◈ Under-developed applications/APIs
◈ Unstable server
◈ Integration tests/chaining of APIs
◈ External dependencies
◈ Reduce load to real server
11
“
Don’t watch the clock; do what it does. Keep going
- Sam Levenson
12
Advantages of Mocks
◈ Analysis of responses and provide feedbacks
◈ Testers to write assertions
◈ Development continues when the external service
fails
◈ Avoids data sharing and data privacy is maintained
◈ Supports to test the endpoints individually
13
Tools used
◈ Postman
◈ Stoplight
◈ Wiremock
◈ Mocky.io
◈ Mockoon
14
15
Tips to improve the Mocks
◈ Validate JSON payload before mocking it
◈ Select your tool wisely
◈ Understand the type of project
◈ Public/Private
Creating Mock Servers in Postman
16
Mock Responses using mocky.io
17
What, When, Why and How?
2. “Monitor” your APIs
18
◈ Collecting and Analyzing data
◈ Performance and Availability of the API
◈ Security
19
What is API Monitoring?
Top Monitoring Metrics
◈ Overall availability (99.999%)
◈ Response Time
◈ Request Per min
◈ Latency
◈ TTFB/TTLB
◈ Errors per min
20
“
Without logging and monitoring, breaches cannot
be detected - OWASP
21
As per “The 2021 Data Breach Investigations
Report”, 20% of the breaches stay
undiscovered for months. This helps the
hackers to cross layer-by-layer
22
Why API Monitoring?
◈ Understand the trend
◈ Find the security leaks/threats
◈ Outages detection and quick actions
◈ Happy customers
23
Tools available
◈ RapidAPI
◈ ReadyAPI
◈ Postman
◈ New Relic
◈ AWS CloudWatch
24
Best Practices
◈ Analyze the trend
◈ Document the deviations
◈ Never skip the dependencies
◈ CI/CD
◈ Tool Selection
◈ Configure alerting
25
26
Monitoring Vs Observability
Collection of Metrics Technical solutions
Debugging
27
DEMO
28
References
❖ https://mock-server.com/
❖ https://learning.postman.com/docs/designing-and-developing-your-
api/mocking-data/setting-up-mock/
❖ https://learning.postman.com/docs/monitoring-your-api/intro-
monitors/#:~:text=Postman%20Monitors%20give%20you%20continuous,and
%20validate%20critical%20API%20flows.
❖ https://www.postman.com/product/integrations/
Thanks!
Any questions?
You can find me at:
@pricillabelwin
29
Credits
Special thanks to all the people who made and
released these awesome resources for free:
◈ Presentation template by SlidesCarnival
◈ Photographs by Unsplash
◈ Backgrounds by SubtlePatterns
30

More Related Content

Similar to Mocking and Monitoring your APIs.pptx

API Security Best Practices and Guidelines
API Security Best Practices and GuidelinesAPI Security Best Practices and Guidelines
API Security Best Practices and GuidelinesWSO2
 
Landmines in the API Landscape
Landmines in the API LandscapeLandmines in the API Landscape
Landmines in the API LandscapeMatt Tesauro
 
Hacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdfHacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdfMatt Tesauro
 
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...apidays
 
London Adapt or Die: Securing your APIs the Right Way!
London Adapt or Die: Securing your APIs the Right Way!London Adapt or Die: Securing your APIs the Right Way!
London Adapt or Die: Securing your APIs the Right Way!Apigee | Google Cloud
 
Your API Sucks! Why developers hang up and how to stop that.
Your API Sucks! Why developers hang up and how to stop that.Your API Sucks! Why developers hang up and how to stop that.
Your API Sucks! Why developers hang up and how to stop that.Apigee | Google Cloud
 
To Open Banking and Beyond: Developing APIs that are Resilient to every new I...
To Open Banking and Beyond: Developing APIs that are Resilient to every new I...To Open Banking and Beyond: Developing APIs that are Resilient to every new I...
To Open Banking and Beyond: Developing APIs that are Resilient to every new I...Curiosity Software Ireland
 
Common Security API Issues and How to Mitigate Them Using Postman
Common Security API Issues and How to Mitigate Them Using PostmanCommon Security API Issues and How to Mitigate Them Using Postman
Common Security API Issues and How to Mitigate Them Using PostmanPostman
 
Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...
Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...
Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...Jitendra Bafna
 
Apidays Paris 2023 - Building an Inventory, Maria Teresa Pereira, KPMG Portugal
Apidays Paris 2023 - Building an Inventory,  Maria Teresa Pereira, KPMG PortugalApidays Paris 2023 - Building an Inventory,  Maria Teresa Pereira, KPMG Portugal
Apidays Paris 2023 - Building an Inventory, Maria Teresa Pereira, KPMG Portugalapidays
 
"The working architecture of NodeJs applications" Viktor Turskyi
"The working architecture of NodeJs applications" Viktor Turskyi"The working architecture of NodeJs applications" Viktor Turskyi
"The working architecture of NodeJs applications" Viktor TurskyiJulia Cherniak
 
Mobile testing - the releationship between tests, business goals and design c...
Mobile testing - the releationship between tests, business goals and design c...Mobile testing - the releationship between tests, business goals and design c...
Mobile testing - the releationship between tests, business goals and design c...Derk-Jan de Grood
 
2022 APIsecure_A day in the life of an API; Fighting the odds
2022 APIsecure_A day in the life of an API; Fighting the odds2022 APIsecure_A day in the life of an API; Fighting the odds
2022 APIsecure_A day in the life of an API; Fighting the oddsAPIsecure_ Official
 
Why your APIs should fly first class
Why your APIs should fly first classWhy your APIs should fly first class
Why your APIs should fly first classLibbySchulze
 
API Testing and Hacking (1).pdf
API Testing and Hacking (1).pdfAPI Testing and Hacking (1).pdf
API Testing and Hacking (1).pdfVishwas N
 
API Testing and Hacking.pdf
API Testing and Hacking.pdfAPI Testing and Hacking.pdf
API Testing and Hacking.pdfVishwas N
 
API Testing and Hacking.pdf
API Testing and Hacking.pdfAPI Testing and Hacking.pdf
API Testing and Hacking.pdfVishwasN6
 
Postman 101 for developers
Postman 101 for developersPostman 101 for developers
Postman 101 for developersPostman
 
apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...
apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...
apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...apidays
 

Similar to Mocking and Monitoring your APIs.pptx (20)

API Security Best Practices and Guidelines
API Security Best Practices and GuidelinesAPI Security Best Practices and Guidelines
API Security Best Practices and Guidelines
 
Landmines in the API Landscape
Landmines in the API LandscapeLandmines in the API Landscape
Landmines in the API Landscape
 
Hacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdfHacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdf
 
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...
apidays LIVE Paris 2021 - Addressing OWASP API Security Top 10 by Isabelle Ma...
 
London Adapt or Die: Securing your APIs the Right Way!
London Adapt or Die: Securing your APIs the Right Way!London Adapt or Die: Securing your APIs the Right Way!
London Adapt or Die: Securing your APIs the Right Way!
 
Your API Sucks! Why developers hang up and how to stop that.
Your API Sucks! Why developers hang up and how to stop that.Your API Sucks! Why developers hang up and how to stop that.
Your API Sucks! Why developers hang up and how to stop that.
 
To Open Banking and Beyond: Developing APIs that are Resilient to every new I...
To Open Banking and Beyond: Developing APIs that are Resilient to every new I...To Open Banking and Beyond: Developing APIs that are Resilient to every new I...
To Open Banking and Beyond: Developing APIs that are Resilient to every new I...
 
Common Security API Issues and How to Mitigate Them Using Postman
Common Security API Issues and How to Mitigate Them Using PostmanCommon Security API Issues and How to Mitigate Them Using Postman
Common Security API Issues and How to Mitigate Them Using Postman
 
Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...
Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...
Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...
 
Apidays Paris 2023 - Building an Inventory, Maria Teresa Pereira, KPMG Portugal
Apidays Paris 2023 - Building an Inventory,  Maria Teresa Pereira, KPMG PortugalApidays Paris 2023 - Building an Inventory,  Maria Teresa Pereira, KPMG Portugal
Apidays Paris 2023 - Building an Inventory, Maria Teresa Pereira, KPMG Portugal
 
"The working architecture of NodeJs applications" Viktor Turskyi
"The working architecture of NodeJs applications" Viktor Turskyi"The working architecture of NodeJs applications" Viktor Turskyi
"The working architecture of NodeJs applications" Viktor Turskyi
 
Mobile testing - the releationship between tests, business goals and design c...
Mobile testing - the releationship between tests, business goals and design c...Mobile testing - the releationship between tests, business goals and design c...
Mobile testing - the releationship between tests, business goals and design c...
 
2022 APIsecure_A day in the life of an API; Fighting the odds
2022 APIsecure_A day in the life of an API; Fighting the odds2022 APIsecure_A day in the life of an API; Fighting the odds
2022 APIsecure_A day in the life of an API; Fighting the odds
 
Why your APIs should fly first class
Why your APIs should fly first classWhy your APIs should fly first class
Why your APIs should fly first class
 
API Testing and Hacking (1).pdf
API Testing and Hacking (1).pdfAPI Testing and Hacking (1).pdf
API Testing and Hacking (1).pdf
 
API Testing and Hacking.pdf
API Testing and Hacking.pdfAPI Testing and Hacking.pdf
API Testing and Hacking.pdf
 
API Testing and Hacking.pdf
API Testing and Hacking.pdfAPI Testing and Hacking.pdf
API Testing and Hacking.pdf
 
Postman 101 for developers
Postman 101 for developersPostman 101 for developers
Postman 101 for developers
 
Monitoring Solutions for APIs
Monitoring Solutions for APIsMonitoring Solutions for APIs
Monitoring Solutions for APIs
 
apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...
apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...
apidays LIVE Singapore 2021 - Why verifying user identity Is not enough In 20...
 

More from Pricilla Bilavendran

The Unuttered, and the Unaware Unconscious Biases.pdf
The Unuttered, and the Unaware Unconscious Biases.pdfThe Unuttered, and the Unaware Unconscious Biases.pdf
The Unuttered, and the Unaware Unconscious Biases.pdfPricilla Bilavendran
 
Land of Utopia for Testers Does it exists.pdf
Land of Utopia for Testers Does it exists.pdfLand of Utopia for Testers Does it exists.pdf
Land of Utopia for Testers Does it exists.pdfPricilla Bilavendran
 
Testing your APIs Performance.pptx
Testing your APIs Performance.pptxTesting your APIs Performance.pptx
Testing your APIs Performance.pptxPricilla Bilavendran
 

More from Pricilla Bilavendran (6)

The Unuttered, and the Unaware Unconscious Biases.pdf
The Unuttered, and the Unaware Unconscious Biases.pdfThe Unuttered, and the Unaware Unconscious Biases.pdf
The Unuttered, and the Unaware Unconscious Biases.pdf
 
Land of Utopia for Testers Does it exists.pdf
Land of Utopia for Testers Does it exists.pdfLand of Utopia for Testers Does it exists.pdf
Land of Utopia for Testers Does it exists.pdf
 
Testing your APIs Performance.pptx
Testing your APIs Performance.pptxTesting your APIs Performance.pptx
Testing your APIs Performance.pptx
 
API Testing for everyone.pptx
API Testing for everyone.pptxAPI Testing for everyone.pptx
API Testing for everyone.pptx
 
Unleash the Speaker in YOU.pptx
Unleash the Speaker in YOU.pptxUnleash the Speaker in YOU.pptx
Unleash the Speaker in YOU.pptx
 
Just let it _Flow_.pptx
Just let it _Flow_.pptxJust let it _Flow_.pptx
Just let it _Flow_.pptx
 

Recently uploaded

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 

Recently uploaded (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
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)
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Mocking and Monitoring your APIs.pptx

  • 2. Hello! I am Pricilla Bilavendran I am here because, I love to talk about APIs and spreading API literacy among Test engineers!! 2
  • 3. We will discuss about ◈ Introduction to Mock Servers ◈ Mock Process ◈ Mocking types and tools ◈ Advantages of mocks ◈ Introduction to API Monitoring ◈ Why monitoring? ◈ Tools available ◈ Demo 3
  • 4. What, When, Why and How? 1. “Mock” your APIs 4
  • 6. When we talk about Mocks Mock Objects In OOPS, mock object is a simulated object 6 Mock Testing With the help of mock objects, simulation is done for the integration testing of the individual components
  • 7. Is mocking good or bad? 😉 Ofcourse, it is bad with people and unacceptable. But it’s good for your API testing process. 7
  • 8. 8 What is a Mock Server? ◈ Simulate real server ◈ Not real server (call is fake) ◈ Gives the mocked response
  • 9. How does it work? Finalize your expected response Configure your Mock Server Server sends the same response 9
  • 10. Types of Mock Servers 10 Public ◈ Accessible to everyone ◈ No Auth required Private ◈ Only to the intended user and requires authentication ◈ Sensitive data
  • 11. When to use Mock Servers? ◈ New APIs feedback before real development ◈ Under-developed applications/APIs ◈ Unstable server ◈ Integration tests/chaining of APIs ◈ External dependencies ◈ Reduce load to real server 11
  • 12. “ Don’t watch the clock; do what it does. Keep going - Sam Levenson 12
  • 13. Advantages of Mocks ◈ Analysis of responses and provide feedbacks ◈ Testers to write assertions ◈ Development continues when the external service fails ◈ Avoids data sharing and data privacy is maintained ◈ Supports to test the endpoints individually 13
  • 14. Tools used ◈ Postman ◈ Stoplight ◈ Wiremock ◈ Mocky.io ◈ Mockoon 14
  • 15. 15 Tips to improve the Mocks ◈ Validate JSON payload before mocking it ◈ Select your tool wisely ◈ Understand the type of project ◈ Public/Private
  • 16. Creating Mock Servers in Postman 16
  • 17. Mock Responses using mocky.io 17
  • 18. What, When, Why and How? 2. “Monitor” your APIs 18
  • 19. ◈ Collecting and Analyzing data ◈ Performance and Availability of the API ◈ Security 19 What is API Monitoring?
  • 20. Top Monitoring Metrics ◈ Overall availability (99.999%) ◈ Response Time ◈ Request Per min ◈ Latency ◈ TTFB/TTLB ◈ Errors per min 20
  • 21. “ Without logging and monitoring, breaches cannot be detected - OWASP 21
  • 22. As per “The 2021 Data Breach Investigations Report”, 20% of the breaches stay undiscovered for months. This helps the hackers to cross layer-by-layer 22
  • 23. Why API Monitoring? ◈ Understand the trend ◈ Find the security leaks/threats ◈ Outages detection and quick actions ◈ Happy customers 23
  • 24. Tools available ◈ RapidAPI ◈ ReadyAPI ◈ Postman ◈ New Relic ◈ AWS CloudWatch 24
  • 25. Best Practices ◈ Analyze the trend ◈ Document the deviations ◈ Never skip the dependencies ◈ CI/CD ◈ Tool Selection ◈ Configure alerting 25
  • 26. 26 Monitoring Vs Observability Collection of Metrics Technical solutions Debugging
  • 28. 28 References ❖ https://mock-server.com/ ❖ https://learning.postman.com/docs/designing-and-developing-your- api/mocking-data/setting-up-mock/ ❖ https://learning.postman.com/docs/monitoring-your-api/intro- monitors/#:~:text=Postman%20Monitors%20give%20you%20continuous,and %20validate%20critical%20API%20flows. ❖ https://www.postman.com/product/integrations/
  • 29. Thanks! Any questions? You can find me at: @pricillabelwin 29
  • 30. Credits Special thanks to all the people who made and released these awesome resources for free: ◈ Presentation template by SlidesCarnival ◈ Photographs by Unsplash ◈ Backgrounds by SubtlePatterns 30

Editor's Notes

  1. Unmonitored mail box