Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
webhooks/docs: Document testing with the third-party service.
Dhruv Shettya65eb321e623
diff --git a/docs/development/using.md b/docs/development/using.mdindex 343eb75aed4..4560914e900 100644--- a/docs/development/using.md+++ b/docs/development/using.md@@ -90,7 +90,9 @@ the development environment][authentication-dev-server].## MobileSee the mobile project's documentation on [getting set up to develop-and contribute to the mobile app][mobile-development-guide].+and contribute to the mobile app][mobile-development-guide], including+how to [run the app against your development+server][mobile-dev-server-guide].[rest-api]: https://zulip.com/api/rest[authentication-dev-server]: authentication.md@@ -98,3 +100,4 @@ and contribute to the mobile app][mobile-development-guide].[new-feature-tutorial]: ../tutorials/new-feature-tutorial.md[testing-docs]: ../testing/testing.md[mobile-development-guide]: https://github.com/zulip/zulip-flutter/blob/main/docs/setup.md+[mobile-dev-server-guide]: https://github.com/zulip/zulip-flutter/blob/main/docs/howto/dev-server.mddiff --git a/docs/webhooks/incoming-webhooks-overview.md b/docs/webhooks/incoming-webhooks-overview.mdindex 18a41e35605..5cf4d6721c4 100644--- a/docs/webhooks/incoming-webhooks-overview.md+++ b/docs/webhooks/incoming-webhooks-overview.md@@ -135,12 +135,6 @@ configured! 🎉"- Sometimes it can be helpful to contact the third-party service if itappears they don't have an API or outgoing webhook you can use.Sometimes the API you're looking for is just not properly documented.-- A helpful tool for testing your integration is [UltraHook](http://www.ultrahook.com/),- which allows you to receive webhook calls via your local Zulip- development environment. This enables you to do end-to-end testing with- live data from the third-party service you're integrating, and can help- you spot why something isn't working or if the service is using [custom- HTTP headers](incoming-webhooks-reference.md#custom-http-headers).## URL specificationdiff --git a/docs/webhooks/incoming-webhooks-walkthrough.md b/docs/webhooks/incoming-webhooks-walkthrough.mdindex 92b62becb02..0327404f9aa 100644--- a/docs/webhooks/incoming-webhooks-walkthrough.md+++ b/docs/webhooks/incoming-webhooks-walkthrough.md@@ -339,6 +339,35 @@ test fixtures.Custom HTTP headers must be entered as a JSON dictionary, if you want touse any. Feel free to use 4-spaces as tabs for indentation if you'd like.+### Testing with the third-party service++:::{warning}+The development environment is not hardened against hostile traffic. Only+expose it while you are actively testing.+:::++To have the third-party service deliver the webhooks itself, it needs to+be able to reach your development server over the internet.++You don't need to reconfigure the development server for this. You can+use a tunneling tool, such as [UltraHook](https://www.ultrahook.com/) or+[localtunnel](https://github.com/localtunnel/localtunnel), to expose+`http://localhost:9991` at a temporary public URL. When you configure the+webhook in the third-party service, use that temporary public URL with the+path for your incoming webhook integration, e.g.,+`<temporary-public-url>/api/v1/external/helloworld?api_key=<api_key>`.++End-to-end testing with live data can help you spot why something isn't+working, or whether the service is using [custom HTTP+headers](incoming-webhooks-reference.md#custom-http-headers) that your+integration needs to handle.++If you instead need the development server to be reachable from another+device on your own network, the mobile project's guide to [running the app+against a development+server](https://github.com/zulip/zulip-flutter/blob/main/docs/howto/dev-server.md)+covers configuring the server to listen on all network interfaces.+## Step 5: Create automated testsEvery incoming webhook integration should have a corresponding `tests.py`