Knowledge Base

  1. Home
  2. Knowledge Base
  3. General
  4. How-to
  5. Integrate a webhook at the end of a monitor and test run

Integrate a webhook at the end of a monitor and test run

You can define a webhook that will be called at the end of a monitor and test run execution.

In order to define the ‘end of test/monitor webhook’, add #webhook field in the test configuration page – ‘Run Options’ parameter.

Two types of ‘end of test/monitor webhook’ field structure are supported:

  1. Simple webhook: [URL] (see example below)
  2. Advanced webhook

The advanced webhook definition supports a complete JSON data like:

{"url": "", "headers": {"custom-webhook-header": "web-testrtc-webhook"}}

If a webhook exists for a given executed test or monitor, testRTC manager will call that webhook after the execution of the test with the following information:

  • Type (monitor | test)
  • Test name
  • Test run ID
  • Execution status

For further information about the JSON data format and available parameters, please refer to

A nice utility to validate your JSON structure:

For Slack integration check this article.

Sample webhook calls data:

Successful test execution:


Failed test execution:


webhook testing example

In order to test the end of test/monitor webhook, you can follow the following steps:

  1. Generate a custom endpoint in Mockbin – in click on ‘Create Bin’
  2. In the ‘Bin Builder’ page, leave all suggested default parameters and just click on ‘Create Bin’ at the bottom-right area of the page
  3. In the next page your temporary created Bin Identifier will be presented
    Your URL should be[Bin Identifier]
    You can generate this URL yourself or copy it from the code samples at the bottom of the ‘Bin Identifier’ page. Note that if you copy the URL from the codesample, you should take off the URL parameters at the end of the URL (remove “?foo=bar&foo=baz”)
  4. Add the URL to your test – in the test configuration page under Webook (for example):
  5. Click on ‘View History’ to go to the Mockbin Bin History page
  6. Run the test
  7. After the test was ended refresh the Mockbin Bin History page
  8. You should find a new entry in the history. Click on the new entry history entry to see the request details and body:

Was this article helpful?

Related Articles

Leave a Reply 0 comments

Leave a Reply: