Configuring a webhook template

You can configure a webhook template on Rational® Test Automation Server to send notifications to the configured messaging application. You can configure a webhook template at the server, team space and project levels.

Before you begin

You must have completed the following tasks:

About this task

You can select a generic template to send notifications to the generic application. You can also select a JSON sample template with specific fields defined to display event-related notifications in Microsoft Teams or Slack. You can create a template based on the channel type that you configured. You can use the sample template that is available for the messaging application or you can also define a JSON template to post the message about the events that occur on Rational® Test Automation Server.

Procedure

  1. Log in to Rational® Test Automation Server.

    The team space that contains your project is displayed.

  2. Click Active projects > 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 in the navigation pane.
    The TEMPLATES tab of Webhooks 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. Click the Channel type option, and then select an existing channel type.
    3. Alternatively, you can create a new channel type by clicking Create new channel type icon create channel type if there are no webhook templates available in the drop-down list.

      The New channel type dialog is displayed.

    4. Enter a unique name for the channel type, and then enter a description for the channel type.
      Note: You can also create a new channel type from Webhooks > TEMPLATES > Edit channel type option.
  6. Perform the following steps if you want to select either a channel icon or a brand icon:
    1. Click the Channel type icon default icon.

      The Select icon page is displayed.

    2. View a list of icons that are displayed In the GENERAL tab.
    3. Search for the icons by entering any text contained in the icon name in the Search field, and then select the required icon.

      The selected icon is displayed in the Selected icon box.

    4. Click the BRANDS tab.

      View a list of icons that are displayed.

    5. Search for the brands by entering any text contained in the brand name in the Search field, and then select the brand.

      The selected brand is displayed in the Selected icon box.

    6. Click Ok.

      The default icon is replaced with the selected icon.

  7. Enter a description for the channel type, and then click Apply.
    The channel type is created and added to the Channel Type list.
  8. Enter a description for the template.
  9. Perform the following steps to select an event:
    1. Click This template is suitable for events and select All Events, or any of the subset events from the following list:
      • All Events
      • Team Space Events
      • Project Events
      • Execution Events
      • License Events
    2. Search for the events by entering any text contained in the events name in the Search field, and then select the corresponding checkbox to select the specific event.
      Note: All Events is the default event that is set for the webhook template.
  10. Click the TEMPLATES tab, and then perform any of the following actions:
    1. Perform the following steps to insert a generic template:
      1. Click the cloud icon cloud templateto insert a velocity text processing template in the Template body.

        A message is displayed about the action that inserts a text in the template body.

      2. Click Ok.

        The text is inserted in the Template body.

    2. Perform the following steps to insert a Microsoft Teams sample template:
      1. Click the Microsoft Teams icon Teams template to replace a template with a Microsoft Teams template.

        A message is displayed about the action that replaces the content of the template body with a Microsoft Teams template.

      2. Click Ok.

        A Microsoft Teams sample template is inserted in the Template body.

    3. Perform the following steps to insert a Slack sample template:
      1. Click the Slack icon. slack template.
      2. A message is displayed about the action that replaces the content of the template body with a Slack template.
      3. Click Ok.

        A Slack sample template is inserted in the Template body.

  11. Click Apply.
    The template is created and added to the TEMPLATES tab.

Results

You have configured and created a webhook template on Rational® Test Automation Server.

What to do next

You must configure a webhook to post the events from Rational® Test Automation Server to the messaging application. See Configuring a webhook.