Webhook Testing Strategy

Beyond The Callback:
Webhook Testing For Modern
Applications
By Dimpy Adhikary, Quality Analyst, Thoughtworks
Agenda
01 - Introduction to Webhook
Why/What/How
02 - Webhook Demo
Simple webhook implementation
03 - Challenges in Webhook
What can go wrong
04 - Webhook Testing Strategy
How to test a webhook based application
ECOMMERCE
Inventory Management
Use Cases
MARKETING AUTOMATION
Personalized Campaign
HEALTHCARE SERVICES
Patient Data Sharing
FINANCIAL SERVICES
Loan Application
Process
Why Webhook
ECOMMERCE
What is Webhook
Source app Payload Destination App
Event Webhook URL
Webhook is a user specified HTTP callback that get
triggered by some event to connect and share data between two applications.
How Webhook Works
Register For
The Event In
Source App
Received Data
And Taking Action In
Source App
Repeat
The Process
Waiting For
The Event In Destination
App
Setting Up The
Webhook (Callback URL)
In Source App
Event
Is triggered In
Source App
ECOMMERCE
Polling Vs Webhook
Polling Webhooks
Request origin Client Server
Trigger Client-initiated Server-initiated
Frequency Scheduled or continuous Event-driven
Efficiency Less efficient More efficient
Scalability Less scalable More scalable
Weather Notification - Webhook Demo
Prerequisite:
- Python (pip install flask,requests)
- Curl
● Users can subscribe to receive weather updates for specific cities.
● When the weather conditions match their preferences, a webhook is sent
to the user's registered endpoint.
Implementation:
- sender.py - Send webhook
notification
- receiver.py - Listen for incoming
weather notification.
Simulation of the event: curl -X POST -H "Content-Type: application/json" -d '{"city": "city1",
"weather": "sunny", "user_endpoints": {"city1": "http://localhost:3000/receive_weather_notification",
"city2": "http://localhost:3000/receive_weather_notification"}}'
http://localhost:5000/simulate_weather_update
Challenges in Webhook
Payload
- Contract change
- Missing data
- Invalid data
Configuration
- IP white listing
- Incorrect URL/payload format
- Token expiry
- Incorrect token/credentials
- Wrong event association
- Incorrect rate limiting
Error Handling
- Unhandled errors
- No error retry
mechanism
- No error notification
Challenges in Webhook
Performance
- Slow webhook processing
- Timeout error
- Resource exhaustion
- Scalability issues
Resilience
- Availability
- Idempotence
- External dependencies
- Async communication
- Network failures
Security
- Unauthorized access
- Data breaches
- Replay attacks
- DoS attacks
Compliance
- Data privacy regulations
(GDPR)
- Financial regulations (PCI)
- Industry-specific
regulations (HIPPA)
Testing
Strategy
Functional Testing
- Configuration
- Error handling
- Integration
- User journey
Reliability Testing
- Simulating failures
- Infra testing
- Retry mechanism
- Monitoring
Performance Testing
- Load/Stress/Volume testing
Contract testing
- Payload/schema
- Consumer/provider
driven
Compliance Testing
- Data compliance
- PCI/PII
Security Testing
- OWASP top 10
- Attack simulation
1 de 10

Recomendados

High Availability by Design por
High Availability by DesignHigh Availability by Design
High Availability by DesignDavid Prinzing
408 visualizações14 slides
02 api gateway por
02 api gateway02 api gateway
02 api gatewayJanani Velmurugan
233 visualizações20 slides
Server-Sent Events in Action por
Server-Sent Events in ActionServer-Sent Events in Action
Server-Sent Events in ActionAndrei Rusu
12.4K visualizações21 slides
How to build customizable multitenant web applications - IPC11 Spring Edition por
How to build customizable multitenant web applications - IPC11 Spring EditionHow to build customizable multitenant web applications - IPC11 Spring Edition
How to build customizable multitenant web applications - IPC11 Spring EditionStephan Hochdörfer
16.3K visualizações89 slides
Event Driven Streaming Analytics - Demostration on Architecture of IoT por
Event Driven Streaming Analytics - Demostration on Architecture of IoTEvent Driven Streaming Analytics - Demostration on Architecture of IoT
Event Driven Streaming Analytics - Demostration on Architecture of IoTLei Xu
1.7K visualizações32 slides
IRJET- An Overview of Web Sockets: The Future of Real-Time Communication por
IRJET- An Overview of Web Sockets: The Future of Real-Time CommunicationIRJET- An Overview of Web Sockets: The Future of Real-Time Communication
IRJET- An Overview of Web Sockets: The Future of Real-Time CommunicationIRJET Journal
14 visualizações4 slides

Mais conteúdo relacionado

Similar a Webhook Testing Strategy

Petr Dvořák: Mobilní webové služby pohledem iPhone developera por
Petr Dvořák: Mobilní webové služby pohledem iPhone developeraPetr Dvořák: Mobilní webové služby pohledem iPhone developera
Petr Dvořák: Mobilní webové služby pohledem iPhone developeraWebExpo
398 visualizações57 slides
Service workers and their role in PWAs por
Service workers and their role in PWAsService workers and their role in PWAs
Service workers and their role in PWAsIpsha Bhidonia
72 visualizações53 slides
Event-Based API Patterns and Practices por
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and PracticesLaunchAny
46 visualizações41 slides
API Security - Null meet por
API Security - Null meetAPI Security - Null meet
API Security - Null meetvinoth kumar
2.1K visualizações18 slides
Are You Ready For More Visitors Cognizant Gomez Jan20 por
Are You Ready For More Visitors   Cognizant  Gomez Jan20Are You Ready For More Visitors   Cognizant  Gomez Jan20
Are You Ready For More Visitors Cognizant Gomez Jan20Compuware APM
844 visualizações25 slides
Magical Performance tuning with Gomez por
Magical Performance tuning with GomezMagical Performance tuning with Gomez
Magical Performance tuning with Gomezmcsaha
674 visualizações25 slides

Similar a Webhook Testing Strategy(20)

Petr Dvořák: Mobilní webové služby pohledem iPhone developera por WebExpo
Petr Dvořák: Mobilní webové služby pohledem iPhone developeraPetr Dvořák: Mobilní webové služby pohledem iPhone developera
Petr Dvořák: Mobilní webové služby pohledem iPhone developera
WebExpo398 visualizações
Service workers and their role in PWAs por Ipsha Bhidonia
Service workers and their role in PWAsService workers and their role in PWAs
Service workers and their role in PWAs
Ipsha Bhidonia72 visualizações
Event-Based API Patterns and Practices por LaunchAny
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and Practices
LaunchAny46 visualizações
API Security - Null meet por vinoth kumar
API Security - Null meetAPI Security - Null meet
API Security - Null meet
vinoth kumar2.1K visualizações
Are You Ready For More Visitors Cognizant Gomez Jan20 por Compuware APM
Are You Ready For More Visitors   Cognizant  Gomez Jan20Are You Ready For More Visitors   Cognizant  Gomez Jan20
Are You Ready For More Visitors Cognizant Gomez Jan20
Compuware APM844 visualizações
Magical Performance tuning with Gomez por mcsaha
Magical Performance tuning with GomezMagical Performance tuning with Gomez
Magical Performance tuning with Gomez
mcsaha674 visualizações
Don't call us - we'll push - cross tier push architecture (JavaOne 2011) por Lucas Jellema
Don't call us - we'll push - cross tier push architecture (JavaOne 2011)Don't call us - we'll push - cross tier push architecture (JavaOne 2011)
Don't call us - we'll push - cross tier push architecture (JavaOne 2011)
Lucas Jellema2.3K visualizações
Statying Alive - Online and OFfline por Erik Hellman
Statying Alive - Online and OFflineStatying Alive - Online and OFfline
Statying Alive - Online and OFfline
Erik Hellman1.5K visualizações
Webservices Testing PPT.pdf por AbhishekDhotre4
Webservices Testing PPT.pdfWebservices Testing PPT.pdf
Webservices Testing PPT.pdf
AbhishekDhotre44 visualizações
Event driven architecure por Touraj Ebrahimi
Event driven architecureEvent driven architecure
Event driven architecure
Touraj Ebrahimi333 visualizações
PHP Continuous Data Processing por Michael Peacock
PHP Continuous Data ProcessingPHP Continuous Data Processing
PHP Continuous Data Processing
Michael Peacock765 visualizações
Difference between Client Polling vs Server Push vs Websocket vs Long Polling por jeetendra mandal
Difference between Client Polling vs Server Push vs Websocket vs Long PollingDifference between Client Polling vs Server Push vs Websocket vs Long Polling
Difference between Client Polling vs Server Push vs Websocket vs Long Polling
jeetendra mandal371 visualizações
Building Event Driven API Services Using Webhooks por Cloud Elements
Building Event Driven API Services Using WebhooksBuilding Event Driven API Services Using Webhooks
Building Event Driven API Services Using Webhooks
Cloud Elements5.1K visualizações
Live Streaming & Server Sent Events por tkramar
Live Streaming & Server Sent EventsLive Streaming & Server Sent Events
Live Streaming & Server Sent Events
tkramar7.5K visualizações
[WSO2Con EU 2018] Building Reactive Applications Using Event Driven Architecture por WSO2
[WSO2Con EU 2018] Building Reactive Applications Using Event Driven Architecture[WSO2Con EU 2018] Building Reactive Applications Using Event Driven Architecture
[WSO2Con EU 2018] Building Reactive Applications Using Event Driven Architecture
WSO2319 visualizações
Webhooks por Priyank Thada
WebhooksWebhooks
Webhooks
Priyank Thada508 visualizações
Events, Picos, and Microservices por Phil Windley
Events, Picos, and MicroservicesEvents, Picos, and Microservices
Events, Picos, and Microservices
Phil Windley6.8K visualizações
Multiple_Vendors_Part-1 por Philip Storey
Multiple_Vendors_Part-1Multiple_Vendors_Part-1
Multiple_Vendors_Part-1
Philip Storey142 visualizações
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd por Sencha
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha1.1K visualizações
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started por Rob Tweed
EWD 3 Training Course Part 6: What Happens when a QEWD Application is StartedEWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started
Rob Tweed1K visualizações

Último

STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf por
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdfDr. Jimmy Schwarzkopf
16 visualizações29 slides
Kyo - Functional Scala 2023.pdf por
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfFlavio W. Brasil
298 visualizações92 slides
20231123_Camunda Meetup Vienna.pdf por
20231123_Camunda Meetup Vienna.pdf20231123_Camunda Meetup Vienna.pdf
20231123_Camunda Meetup Vienna.pdfPhactum Softwareentwicklung GmbH
33 visualizações73 slides
Business Analyst Series 2023 - Week 3 Session 5 por
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5DianaGray10
237 visualizações20 slides
Evolving the Network Automation Journey from Python to Platforms por
Evolving the Network Automation Journey from Python to PlatformsEvolving the Network Automation Journey from Python to Platforms
Evolving the Network Automation Journey from Python to PlatformsNetwork Automation Forum
12 visualizações21 slides
Transcript: The Details of Description Techniques tips and tangents on altern... por
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...BookNet Canada
135 visualizações15 slides

Último(20)

STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf por Dr. Jimmy Schwarzkopf
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf
Dr. Jimmy Schwarzkopf16 visualizações
Kyo - Functional Scala 2023.pdf por Flavio W. Brasil
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdf
Flavio W. Brasil298 visualizações
Business Analyst Series 2023 - Week 3 Session 5 por DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10237 visualizações
Evolving the Network Automation Journey from Python to Platforms por Network Automation Forum
Evolving the Network Automation Journey from Python to PlatformsEvolving the Network Automation Journey from Python to Platforms
Evolving the Network Automation Journey from Python to Platforms
Network Automation Forum12 visualizações
Transcript: The Details of Description Techniques tips and tangents on altern... por BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada135 visualizações
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... por Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker33 visualizações
PRODUCT PRESENTATION.pptx por angelicacueva6
PRODUCT PRESENTATION.pptxPRODUCT PRESENTATION.pptx
PRODUCT PRESENTATION.pptx
angelicacueva613 visualizações
Info Session November 2023.pdf por AleksandraKoprivica4
Info Session November 2023.pdfInfo Session November 2023.pdf
Info Session November 2023.pdf
AleksandraKoprivica411 visualizações
Piloting & Scaling Successfully With Microsoft Viva por Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
Richard Harbridge12 visualizações
Five Things You SHOULD Know About Postman por Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman30 visualizações
PRODUCT LISTING.pptx por angelicacueva6
PRODUCT LISTING.pptxPRODUCT LISTING.pptx
PRODUCT LISTING.pptx
angelicacueva613 visualizações
Igniting Next Level Productivity with AI-Infused Data Integration Workflows por Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software257 visualizações
SAP Automation Using Bar Code and FIORI.pdf por Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Virendra Rai, PMP22 visualizações
Attacking IoT Devices from a Web Perspective - Linux Day por Simone Onofri
Attacking IoT Devices from a Web Perspective - Linux Day Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day
Simone Onofri15 visualizações
Case Study Copenhagen Energy and Business Central.pdf por Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana16 visualizações
Mini-Track: Challenges to Network Automation Adoption por Network Automation Forum
Mini-Track: Challenges to Network Automation AdoptionMini-Track: Challenges to Network Automation Adoption
Mini-Track: Challenges to Network Automation Adoption
Network Automation Forum12 visualizações

Webhook Testing Strategy

  • 1. Beyond The Callback: Webhook Testing For Modern Applications By Dimpy Adhikary, Quality Analyst, Thoughtworks
  • 2. Agenda 01 - Introduction to Webhook Why/What/How 02 - Webhook Demo Simple webhook implementation 03 - Challenges in Webhook What can go wrong 04 - Webhook Testing Strategy How to test a webhook based application
  • 3. ECOMMERCE Inventory Management Use Cases MARKETING AUTOMATION Personalized Campaign HEALTHCARE SERVICES Patient Data Sharing FINANCIAL SERVICES Loan Application Process Why Webhook
  • 4. ECOMMERCE What is Webhook Source app Payload Destination App Event Webhook URL Webhook is a user specified HTTP callback that get triggered by some event to connect and share data between two applications.
  • 5. How Webhook Works Register For The Event In Source App Received Data And Taking Action In Source App Repeat The Process Waiting For The Event In Destination App Setting Up The Webhook (Callback URL) In Source App Event Is triggered In Source App
  • 6. ECOMMERCE Polling Vs Webhook Polling Webhooks Request origin Client Server Trigger Client-initiated Server-initiated Frequency Scheduled or continuous Event-driven Efficiency Less efficient More efficient Scalability Less scalable More scalable
  • 7. Weather Notification - Webhook Demo Prerequisite: - Python (pip install flask,requests) - Curl ● Users can subscribe to receive weather updates for specific cities. ● When the weather conditions match their preferences, a webhook is sent to the user's registered endpoint. Implementation: - sender.py - Send webhook notification - receiver.py - Listen for incoming weather notification. Simulation of the event: curl -X POST -H "Content-Type: application/json" -d '{"city": "city1", "weather": "sunny", "user_endpoints": {"city1": "http://localhost:3000/receive_weather_notification", "city2": "http://localhost:3000/receive_weather_notification"}}' http://localhost:5000/simulate_weather_update
  • 8. Challenges in Webhook Payload - Contract change - Missing data - Invalid data Configuration - IP white listing - Incorrect URL/payload format - Token expiry - Incorrect token/credentials - Wrong event association - Incorrect rate limiting Error Handling - Unhandled errors - No error retry mechanism - No error notification
  • 9. Challenges in Webhook Performance - Slow webhook processing - Timeout error - Resource exhaustion - Scalability issues Resilience - Availability - Idempotence - External dependencies - Async communication - Network failures Security - Unauthorized access - Data breaches - Replay attacks - DoS attacks Compliance - Data privacy regulations (GDPR) - Financial regulations (PCI) - Industry-specific regulations (HIPPA)
  • 10. Testing Strategy Functional Testing - Configuration - Error handling - Integration - User journey Reliability Testing - Simulating failures - Infra testing - Retry mechanism - Monitoring Performance Testing - Load/Stress/Volume testing Contract testing - Payload/schema - Consumer/provider driven Compliance Testing - Data compliance - PCI/PII Security Testing - OWASP top 10 - Attack simulation