Configuring a webhook for Measure
When you want to export test results to Measure after the test run, you can do so by configuring a webhook to receive the customized results.
Before you begin
You must have completed the following tasks:
- Read and fulfilled the prerequisites that are listed in Integration of Test Hub with Measure.
- Read and understood Configuration of a webhook.
- Read and understood the configuration of a webhook template. For more information, refer to Configuring a webhook template.
- Read and understood the configuration of a server webhook. For more information, refer to Configuring a server webhook.
About this task
You can set up webhooks to send notifications to various messaging apps such as Microsoft Teams, Slack, Measure, or to any application that can receive an HTTP POST request, whenever specific events happen on Test Hub. For instance, a webhook can be triggered when a test run fails. After the event, the payload that is received by the application contains the details of the event, including the additional parameters that you added. If you want the result events to be correlated when using systems such as Measure, you must add the properties that are present in the webhook template as additional parameters in the Execute test asset window.
Procedure
-
Log in to Test Hub.
The Projects page of the initial team space is displayed.
-
Click to open the project that contains the test assets.
The Overview page of the project is displayed.
-
Click .
The Templates tab is displayed.
-
Click New Template.
The New template page is displayed.
-
Perform the following actions on the DETAILS tab.
- Enter a unique name for the template.
- Create a new channel type by clicking the Create new channel
type ... option.
The New channel type dialog is displayed.
- Enter a unique name for the channel type, and then enter a description for the channel type.
-
Click Apply.
The channel type is created and added to the Channel Type list.
-
Click This template is suitable for events, and select
only the following events from the Execution Events
list:
- Execution Stopped Manually
- Execution Completed with Verdict Pass
- Test and Suite Errors
- Click the Template tab.
-
Click the infinity icon
to insert a Measure sample template in the Template body.
A message is displayed about the action that inserts text in the template body. - Click Ok.
- The text is inserted in the Template body.
-
Click Apply.
The template is created and added to the Templates tab.
-
Click the Webhooks tab, and then click New
Webhook.
The New Webhook page is displayed.
- Enter a name for the webhook in the Name field.
- Paste the URL that you copied earlier from the Integrations page of Measure in the Webhook URL field.
- Click the Channel Type, and then select the channel type that you just created from the list.
- Enter a description for the webhook in Description.
- Select the template that you just created from the drop-down list.
-
Click Apply.
The webhook is created and added to the Webhooks tab.
