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:

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

  1. Log in to Test Hub.
    The Projects page of the initial team space is displayed.
  2. Click My projects > project_name to open the project that contains the test assets.
    The Overview page of the project is displayed.
  3. Click Manage > Webhooks.
    The Templates tab is displayed.
  4. Click New Template.
    The New template page is displayed.
  5. Perform the following actions on the DETAILS tab.
    1. Enter a unique name for the template.
    2. Create a new channel type by clicking the Create new channel type ... option.

      The New channel type dialog is displayed.

    3. Enter a unique name for the channel type, and then enter a description for the channel type.
  6. Click Apply.
    The channel type is created and added to the Channel Type list.
  7. 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
  8. Click the Template tab.
  9. Click the infinity icon Measure template to insert a Measure sample template in the Template body.
    A message is displayed about the action that inserts text in the template body.
  10. Click Ok.
  11. The text is inserted in the Template body.
  12. Click Apply.
    The template is created and added to the Templates tab.
  13. Click the Webhooks tab, and then click New Webhook.
    The New Webhook page is displayed.
  14. Enter a name for the webhook in the Name field.
  15. Paste the URL that you copied earlier from the Integrations page of Measure in the Webhook URL field.
  16. Click the Channel Type, and then select the channel type that you just created from the list.
  17. Enter a description for the webhook in Description.
  18. Select the template that you just created from the drop-down list.
  19. Click Apply.
    The webhook is created and added to the Webhooks tab.

Results

You have configured a webhook to export the test results to Measure after the test run is complete.

What to do next

You can configure the test run and run the test to export the result summary to Measure. See Adding additional parameters for test runs.