Linked List: FOSS Tools to Debug and Test Webhooks
Webhooks are part and parcel of today's web applications. It's the primary way to get informed about the events happening on an external system, whether it's payment or communication. So any developer needs to know and use webhooks today. Here are some of the tools that I use daily to test and integrate webhooks (Also async APIs). I hope they are helpful to you too.
webhook.site
With Webhook.site, you instantly get a unique, random URL that you can use to test and debug Webhooks and HTTP requests,
It has many other features, but this is the most used feature. Before you start consuming any external webhooks, you can set it up to send to webhook.site. It will give a way to explore the data and headers coming from the event generating site. So then you can plan to write your consumers well. I don't use it in production systems. I use it only during development. It's an open-source project.
httpbin is an alternative to webhook.site. It is suited for internal hosting. It also helps you in debugging other APIs. It's FOSS, easy to run and use. It doesn't have a database part. So you can easily host it on Google CloudRun.
Insomnia
Insomnia is an Open Source API Client and Design Platform for GraphQL, REST and gRPC.
I use it to trigger webhooks to my consumers when testing a webhook consumer. Let's say I am receiving a payment-complete webhook from the payments service. I am writing a consumer to receive this event and take appropriate actions on my application side. It's a waste of time to make the whole flow from payment service to the consumer during every step of my development. So you could use Insomnia to send the webhook payload to your consumer endpoint during development.
Of course, Insomnia is a full-fledged API design and testing tool. This is just one use case.
Pagekite
PageKite is a reverse proxy tool that connects local servers to the public Internet.
It gives proper domain names to servers running on
Pagekitelocalhost
and makes them visible to the world, bypassing NAT and firewalls. PageKite works today on any computer with a modern Python (2.x) interpreter (pagekite.py
) and a C-language version (libpagekite
) for embedded devices is under development.
Assume you are testing a webhook consumer locally. But the producer you want to try needs an internet-accessible URL for the consumer. You can use Pagekite.py service to expose your local server to the internet so that the producer can push the payload. This way, you can test or debug your consumer running locally against the actual producer.
Pagekite Free Software. You can deploy your server/frontend component of the Pagekite if you want a secure and private setup. If you are experimenting or not an expert in setting up server or DNS, you can try the hosted version.
Localtunnel allows you to easily share a web service on your local development machine without messing with DNS and firewall settings.
Localtunnel
Localtunnel is another free and open-source option.
Karate
Karate is the only open-source tool to combine API test-automation, mocks, performance-testing and even UI automation into a single, unified framework. The BDD syntax popularized by Cucumber is language-neutral, and easy for even non-programmers. Assertions and HTML reports are built-in, and you can run tests in parallel for speed.
Karate Framework
Karate is a testing framework. I have used it to automate my webhook tests. If you are implementing a webhook to do any serious work, it needs to be tested well and have automated tests. I have written in length how to automate the tests for async systems. I use the same process for testing webhooks.
What are your favorite tools to work with webhooks?