Sending webhook
Last updated
Last updated
Outgoing webhooks are a powerful feature for advanced users that can be used to integrate BugBug into your current workflow, such as sending custom notifications to your team's communicator like Slack.
Before proceeding to the next step, remember to first set up a webhook in your external service. You will need the webhook configuration to populate the form fields.
Note: You can use built-in variables in any field, e.g. {{testRunId}}.
In the first two fields, you need to define the request method and the webhook URL. Currently, we support the most popular webhook request methods like POST and GET.
The Body is an optional field that consumes data in JSON format. Its value depends on your needs and the requirements of your external service provider.
If you need to send additional data through the webhook request, it's the best place to do so.
Before creating a new webhook alert, it's possible to check how it works by clicking on the "Trigger Alert" button.
It's a good practice to do this. It allows you to avoid unexpected errors in the future, for example, invalid credentials or wrong body format.
When it comes to setting up the Body of your webhook, you can easily use only the built-in variables within BugBug, so the overall configuration will be more intuitive. Knowing this, for instance, you can set an alert that will send the name of the test with the usage of the POST method that contains within its Body a variable that reflects the finished test's name, like here:
The {{testName}}
built-in variable was used here, which resulted in an output of a webhook alert (after the test finished) in the "Raw Content" section in the tested Webhook service:
This matches the test's name that exists and was executed: