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 sur 10

Recommandé

High Availability by Design par
High Availability by DesignHigh Availability by Design
High Availability by DesignDavid Prinzing
408 vues14 diapositives
02 api gateway par
02 api gateway02 api gateway
02 api gatewayJanani Velmurugan
235 vues20 diapositives
Server-Sent Events in Action par
Server-Sent Events in ActionServer-Sent Events in Action
Server-Sent Events in ActionAndrei Rusu
12.4K vues21 diapositives
How to build customizable multitenant web applications - IPC11 Spring Edition par
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 vues89 diapositives
Event Driven Streaming Analytics - Demostration on Architecture of IoT par
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 vues32 diapositives
IRJET- An Overview of Web Sockets: The Future of Real-Time Communication par
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 vues4 diapositives

Contenu connexe

Similaire à Webhook Testing Strategy

Petr Dvořák: Mobilní webové služby pohledem iPhone developera par
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 vues57 diapositives
Service workers and their role in PWAs par
Service workers and their role in PWAsService workers and their role in PWAs
Service workers and their role in PWAsIpsha Bhidonia
72 vues53 diapositives
Event-Based API Patterns and Practices par
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and PracticesLaunchAny
47 vues41 diapositives
API Security - Null meet par
API Security - Null meetAPI Security - Null meet
API Security - Null meetvinoth kumar
2.1K vues18 diapositives
Are You Ready For More Visitors Cognizant Gomez Jan20 par
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 vues25 diapositives
Magical Performance tuning with Gomez par
Magical Performance tuning with GomezMagical Performance tuning with Gomez
Magical Performance tuning with Gomezmcsaha
674 vues25 diapositives

Similaire à Webhook Testing Strategy(20)

Petr Dvořák: Mobilní webové služby pohledem iPhone developera par 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 vues
Service workers and their role in PWAs par Ipsha Bhidonia
Service workers and their role in PWAsService workers and their role in PWAs
Service workers and their role in PWAs
Ipsha Bhidonia72 vues
Event-Based API Patterns and Practices par LaunchAny
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and Practices
LaunchAny47 vues
API Security - Null meet par vinoth kumar
API Security - Null meetAPI Security - Null meet
API Security - Null meet
vinoth kumar2.1K vues
Are You Ready For More Visitors Cognizant Gomez Jan20 par 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 vues
Magical Performance tuning with Gomez par mcsaha
Magical Performance tuning with GomezMagical Performance tuning with Gomez
Magical Performance tuning with Gomez
mcsaha674 vues
Don't call us - we'll push - cross tier push architecture (JavaOne 2011) par 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 vues
Statying Alive - Online and OFfline par Erik Hellman
Statying Alive - Online and OFflineStatying Alive - Online and OFfline
Statying Alive - Online and OFfline
Erik Hellman1.5K vues
Difference between Client Polling vs Server Push vs Websocket vs Long Polling par 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 mandal373 vues
Building Event Driven API Services Using Webhooks par 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 vues
Live Streaming & Server Sent Events par tkramar
Live Streaming & Server Sent EventsLive Streaming & Server Sent Events
Live Streaming & Server Sent Events
tkramar7.5K vues
[WSO2Con EU 2018] Building Reactive Applications Using Event Driven Architecture par 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 vues
Events, Picos, and Microservices par Phil Windley
Events, Picos, and MicroservicesEvents, Picos, and Microservices
Events, Picos, and Microservices
Phil Windley6.8K vues
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd par 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 vues
EWD 3 Training Course Part 6: What Happens when a QEWD Application is Started par 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 vues

Dernier

"Node.js Development in 2024: trends and tools", Nikita Galkin par
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin Fwdays
33 vues38 diapositives
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online par
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineShapeBlue
225 vues19 diapositives
"Package management in monorepos", Zoltan Kochan par
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan KochanFwdays
34 vues18 diapositives
Initiating and Advancing Your Strategic GIS Governance Strategy par
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance StrategySafe Software
184 vues68 diapositives
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue par
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueShapeBlue
139 vues15 diapositives
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue par
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlueShapeBlue
152 vues23 diapositives

Dernier(20)

"Node.js Development in 2024: trends and tools", Nikita Galkin par Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays33 vues
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online par ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue225 vues
"Package management in monorepos", Zoltan Kochan par Fwdays
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan Kochan
Fwdays34 vues
Initiating and Advancing Your Strategic GIS Governance Strategy par Safe Software
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software184 vues
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue par ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue139 vues
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue par ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue152 vues
"Surviving highload with Node.js", Andrii Shumada par Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays58 vues
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue par ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue137 vues
Future of AR - Facebook Presentation par Rob McCarty
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
Rob McCarty65 vues
State of the Union - Rohit Yadav - Apache CloudStack par ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue303 vues
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... par ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue164 vues
Optimizing Communication to Optimize Human Behavior - LCBM par Yaman Kumar
Optimizing Communication to Optimize Human Behavior - LCBMOptimizing Communication to Optimize Human Behavior - LCBM
Optimizing Communication to Optimize Human Behavior - LCBM
Yaman Kumar38 vues
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... par ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue183 vues
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue par ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue224 vues
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... par TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc176 vues
Business Analyst Series 2023 - Week 4 Session 7 par DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10146 vues

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