Support & information center

Integrating testing and monitoring results with Slack

You can send testRTC run results with a Slack channel. To that end you will be using the webhook entry field of your test script:

How to Create a Slack Webhook:

  1. Optional | Create a Slack app: You can skip this and use an existing channel
    • Go to https://api.slack.com/apps and click “Create New App“
    • Choose a name and select a workspace to associate your app with.
    • Click “Create App“
  2. Enable Incoming Webhooks:
    • After creating the app, you will be redirected to the app’s settings page (if you are using an existing app, just load its settings via your app’s management dashboard).
    • From here, click on the “Incoming Webhooks” feature in the navigation menu on the left.
    • Toggle the switch to “Activate Incoming Webhooks”
  3. Add the Webhook to a channel:
    • Scroll down to the “Add New Webhook to Workspace” section and click “Add New Webhook to Channel”
    • Select the channel you want testRTC notifications to appear in, then click “Allow” to finalize your selection.
  4. Obtain the Webhook URL:
    • The app’s settings page should refresh, and you should now see the Webhook URL in the “Webhook URLs for Your Workspace” section. You should copy it!
  5. Paste it:
    • Paste your copied URL in the following format into the Webhook field in the editor for your test or monitor script: {“format”: “json/text”, “url”:””<YOUR-WEBHOOK-URL>”}

Note: It should look something like this!

{
   "format": "json/object",
   "url": "https://app.testrtc.com/api/slack-bridge?url=https://hooks.slack.com/services/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"
}

This will send all results of a monitor or a test to the slack channel.

You can also integrate a webhook filter as shown in the image above to filter the webhook and have it invoked only on certain test result status. For example, you can set it to invoke the webhook only for tests that finish with an error or a warning status.

Read Webhooks in testRTC for more information on webhooks and their available formats.

Was this article helpful?

Related Articles